001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.exception.PortalException;
020    import com.liferay.portal.kernel.exception.SystemException;
021    import com.liferay.portal.kernel.search.IndexableType;
022    import com.liferay.portal.kernel.transaction.Isolation;
023    import com.liferay.portal.kernel.transaction.Propagation;
024    import com.liferay.portal.kernel.transaction.Transactional;
025    
026    /**
027     * Provides the local service interface for Group. Methods of this
028     * service will not have security checks based on the propagated JAAS
029     * credentials because this service can only be accessed from within the same
030     * VM.
031     *
032     * @author Brian Wing Shun Chan
033     * @see GroupLocalServiceUtil
034     * @see com.liferay.portal.service.base.GroupLocalServiceBaseImpl
035     * @see com.liferay.portal.service.impl.GroupLocalServiceImpl
036     * @generated
037     */
038    @ProviderType
039    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
040            PortalException.class, SystemException.class})
041    public interface GroupLocalService extends BaseLocalService,
042            PersistedModelLocalService {
043            /*
044             * NOTE FOR DEVELOPERS:
045             *
046             * Never modify or reference this interface directly. Always use {@link GroupLocalServiceUtil} to access the group local service. Add custom service methods to {@link com.liferay.portal.service.impl.GroupLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
047             */
048    
049            /**
050            * Adds the group to the database. Also notifies the appropriate model listeners.
051            *
052            * @param group the group
053            * @return the group that was added
054            * @throws SystemException if a system exception occurred
055            */
056            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
057            public com.liferay.portal.model.Group addGroup(
058                    com.liferay.portal.model.Group group)
059                    throws com.liferay.portal.kernel.exception.SystemException;
060    
061            /**
062            * Creates a new group with the primary key. Does not add the group to the database.
063            *
064            * @param groupId the primary key for the new group
065            * @return the new group
066            */
067            public com.liferay.portal.model.Group createGroup(long groupId);
068    
069            /**
070            * Deletes the group with the primary key from the database. Also notifies the appropriate model listeners.
071            *
072            * @param groupId the primary key of the group
073            * @return the group that was removed
074            * @throws PortalException if a group with the primary key could not be found
075            * @throws SystemException if a system exception occurred
076            */
077            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
078            public com.liferay.portal.model.Group deleteGroup(long groupId)
079                    throws com.liferay.portal.kernel.exception.PortalException,
080                            com.liferay.portal.kernel.exception.SystemException;
081    
082            /**
083            * Deletes the group from the database. Also notifies the appropriate model listeners.
084            *
085            * @param group the group
086            * @return the group that was removed
087            * @throws PortalException
088            * @throws SystemException if a system exception occurred
089            */
090            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
091            public com.liferay.portal.model.Group deleteGroup(
092                    com.liferay.portal.model.Group group)
093                    throws com.liferay.portal.kernel.exception.PortalException,
094                            com.liferay.portal.kernel.exception.SystemException;
095    
096            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
097    
098            /**
099            * Performs a dynamic query on the database and returns the matching rows.
100            *
101            * @param dynamicQuery the dynamic query
102            * @return the matching rows
103            * @throws SystemException if a system exception occurred
104            */
105            @SuppressWarnings("rawtypes")
106            public java.util.List dynamicQuery(
107                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
108                    throws com.liferay.portal.kernel.exception.SystemException;
109    
110            /**
111            * Performs a dynamic query on the database and returns a range of the matching rows.
112            *
113            * <p>
114            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.GroupModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
115            * </p>
116            *
117            * @param dynamicQuery the dynamic query
118            * @param start the lower bound of the range of model instances
119            * @param end the upper bound of the range of model instances (not inclusive)
120            * @return the range of matching rows
121            * @throws SystemException if a system exception occurred
122            */
123            @SuppressWarnings("rawtypes")
124            public java.util.List dynamicQuery(
125                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
126                    int end) throws com.liferay.portal.kernel.exception.SystemException;
127    
128            /**
129            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
130            *
131            * <p>
132            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.GroupModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
133            * </p>
134            *
135            * @param dynamicQuery the dynamic query
136            * @param start the lower bound of the range of model instances
137            * @param end the upper bound of the range of model instances (not inclusive)
138            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
139            * @return the ordered range of matching rows
140            * @throws SystemException if a system exception occurred
141            */
142            @SuppressWarnings("rawtypes")
143            public java.util.List dynamicQuery(
144                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
145                    int end,
146                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
147                    throws com.liferay.portal.kernel.exception.SystemException;
148    
149            /**
150            * Returns the number of rows that match the dynamic query.
151            *
152            * @param dynamicQuery the dynamic query
153            * @return the number of rows that match the dynamic query
154            * @throws SystemException if a system exception occurred
155            */
156            public long dynamicQueryCount(
157                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
158                    throws com.liferay.portal.kernel.exception.SystemException;
159    
160            /**
161            * Returns the number of rows that match the dynamic query.
162            *
163            * @param dynamicQuery the dynamic query
164            * @param projection the projection to apply to the query
165            * @return the number of rows that match the dynamic query
166            * @throws SystemException if a system exception occurred
167            */
168            public long dynamicQueryCount(
169                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
170                    com.liferay.portal.kernel.dao.orm.Projection projection)
171                    throws com.liferay.portal.kernel.exception.SystemException;
172    
173            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
174            public com.liferay.portal.model.Group fetchGroup(long groupId)
175                    throws com.liferay.portal.kernel.exception.SystemException;
176    
177            /**
178            * Returns the group with the matching UUID and company.
179            *
180            * @param uuid the group's UUID
181            * @param companyId the primary key of the company
182            * @return the matching group, or <code>null</code> if a matching group could not be found
183            * @throws SystemException if a system exception occurred
184            */
185            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
186            public com.liferay.portal.model.Group fetchGroupByUuidAndCompanyId(
187                    java.lang.String uuid, long companyId)
188                    throws com.liferay.portal.kernel.exception.SystemException;
189    
190            /**
191            * Returns the group with the primary key.
192            *
193            * @param groupId the primary key of the group
194            * @return the group
195            * @throws PortalException if a group with the primary key could not be found
196            * @throws SystemException if a system exception occurred
197            */
198            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
199            public com.liferay.portal.model.Group getGroup(long groupId)
200                    throws com.liferay.portal.kernel.exception.PortalException,
201                            com.liferay.portal.kernel.exception.SystemException;
202    
203            @Override
204            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
205            public com.liferay.portal.model.PersistedModel getPersistedModel(
206                    java.io.Serializable primaryKeyObj)
207                    throws com.liferay.portal.kernel.exception.PortalException,
208                            com.liferay.portal.kernel.exception.SystemException;
209    
210            /**
211            * Returns the group with the matching UUID and company.
212            *
213            * @param uuid the group's UUID
214            * @param companyId the primary key of the company
215            * @return the matching group
216            * @throws PortalException if a matching group could not be found
217            * @throws SystemException if a system exception occurred
218            */
219            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
220            public com.liferay.portal.model.Group getGroupByUuidAndCompanyId(
221                    java.lang.String uuid, long companyId)
222                    throws com.liferay.portal.kernel.exception.PortalException,
223                            com.liferay.portal.kernel.exception.SystemException;
224    
225            /**
226            * Returns a range of all the groups.
227            *
228            * <p>
229            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.GroupModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
230            * </p>
231            *
232            * @param start the lower bound of the range of groups
233            * @param end the upper bound of the range of groups (not inclusive)
234            * @return the range of groups
235            * @throws SystemException if a system exception occurred
236            */
237            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
238            public java.util.List<com.liferay.portal.model.Group> getGroups(int start,
239                    int end) throws com.liferay.portal.kernel.exception.SystemException;
240    
241            /**
242            * Returns the number of groups.
243            *
244            * @return the number of groups
245            * @throws SystemException if a system exception occurred
246            */
247            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
248            public int getGroupsCount()
249                    throws com.liferay.portal.kernel.exception.SystemException;
250    
251            /**
252            * Updates the group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
253            *
254            * @param group the group
255            * @return the group that was updated
256            * @throws SystemException if a system exception occurred
257            */
258            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
259            public com.liferay.portal.model.Group updateGroup(
260                    com.liferay.portal.model.Group group)
261                    throws com.liferay.portal.kernel.exception.SystemException;
262    
263            /**
264            * @throws SystemException if a system exception occurred
265            */
266            public void addOrganizationGroup(long organizationId, long groupId)
267                    throws com.liferay.portal.kernel.exception.SystemException;
268    
269            /**
270            * @throws SystemException if a system exception occurred
271            */
272            public void addOrganizationGroup(long organizationId,
273                    com.liferay.portal.model.Group group)
274                    throws com.liferay.portal.kernel.exception.SystemException;
275    
276            /**
277            * @throws SystemException if a system exception occurred
278            */
279            public void addOrganizationGroups(long organizationId, long[] groupIds)
280                    throws com.liferay.portal.kernel.exception.SystemException;
281    
282            /**
283            * @throws SystemException if a system exception occurred
284            */
285            public void addOrganizationGroups(long organizationId,
286                    java.util.List<com.liferay.portal.model.Group> Groups)
287                    throws com.liferay.portal.kernel.exception.SystemException;
288    
289            /**
290            * @throws SystemException if a system exception occurred
291            */
292            public void clearOrganizationGroups(long organizationId)
293                    throws com.liferay.portal.kernel.exception.SystemException;
294    
295            /**
296            * @throws SystemException if a system exception occurred
297            */
298            public void deleteOrganizationGroup(long organizationId, long groupId)
299                    throws com.liferay.portal.kernel.exception.SystemException;
300    
301            /**
302            * @throws SystemException if a system exception occurred
303            */
304            public void deleteOrganizationGroup(long organizationId,
305                    com.liferay.portal.model.Group group)
306                    throws com.liferay.portal.kernel.exception.SystemException;
307    
308            /**
309            * @throws SystemException if a system exception occurred
310            */
311            public void deleteOrganizationGroups(long organizationId, long[] groupIds)
312                    throws com.liferay.portal.kernel.exception.SystemException;
313    
314            /**
315            * @throws SystemException if a system exception occurred
316            */
317            public void deleteOrganizationGroups(long organizationId,
318                    java.util.List<com.liferay.portal.model.Group> Groups)
319                    throws com.liferay.portal.kernel.exception.SystemException;
320    
321            /**
322            * @throws SystemException if a system exception occurred
323            */
324            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
325            public java.util.List<com.liferay.portal.model.Group> getOrganizationGroups(
326                    long organizationId)
327                    throws com.liferay.portal.kernel.exception.SystemException;
328    
329            /**
330            * @throws SystemException if a system exception occurred
331            */
332            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
333            public java.util.List<com.liferay.portal.model.Group> getOrganizationGroups(
334                    long organizationId, int start, int end)
335                    throws com.liferay.portal.kernel.exception.SystemException;
336    
337            /**
338            * @throws SystemException if a system exception occurred
339            */
340            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
341            public java.util.List<com.liferay.portal.model.Group> getOrganizationGroups(
342                    long organizationId, int start, int end,
343                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
344                    throws com.liferay.portal.kernel.exception.SystemException;
345    
346            /**
347            * @throws SystemException if a system exception occurred
348            */
349            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
350            public int getOrganizationGroupsCount(long organizationId)
351                    throws com.liferay.portal.kernel.exception.SystemException;
352    
353            /**
354            * @throws SystemException if a system exception occurred
355            */
356            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
357            public boolean hasOrganizationGroup(long organizationId, long groupId)
358                    throws com.liferay.portal.kernel.exception.SystemException;
359    
360            /**
361            * @throws SystemException if a system exception occurred
362            */
363            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
364            public boolean hasOrganizationGroups(long organizationId)
365                    throws com.liferay.portal.kernel.exception.SystemException;
366    
367            /**
368            * @throws SystemException if a system exception occurred
369            */
370            public void setOrganizationGroups(long organizationId, long[] groupIds)
371                    throws com.liferay.portal.kernel.exception.SystemException;
372    
373            /**
374            * @throws SystemException if a system exception occurred
375            */
376            public void addRoleGroup(long roleId, long groupId)
377                    throws com.liferay.portal.kernel.exception.SystemException;
378    
379            /**
380            * @throws SystemException if a system exception occurred
381            */
382            public void addRoleGroup(long roleId, com.liferay.portal.model.Group group)
383                    throws com.liferay.portal.kernel.exception.SystemException;
384    
385            /**
386            * @throws SystemException if a system exception occurred
387            */
388            public void addRoleGroups(long roleId, long[] groupIds)
389                    throws com.liferay.portal.kernel.exception.SystemException;
390    
391            /**
392            * @throws SystemException if a system exception occurred
393            */
394            public void addRoleGroups(long roleId,
395                    java.util.List<com.liferay.portal.model.Group> Groups)
396                    throws com.liferay.portal.kernel.exception.SystemException;
397    
398            /**
399            * @throws SystemException if a system exception occurred
400            */
401            public void clearRoleGroups(long roleId)
402                    throws com.liferay.portal.kernel.exception.SystemException;
403    
404            /**
405            * @throws SystemException if a system exception occurred
406            */
407            public void deleteRoleGroup(long roleId, long groupId)
408                    throws com.liferay.portal.kernel.exception.SystemException;
409    
410            /**
411            * @throws SystemException if a system exception occurred
412            */
413            public void deleteRoleGroup(long roleId,
414                    com.liferay.portal.model.Group group)
415                    throws com.liferay.portal.kernel.exception.SystemException;
416    
417            /**
418            * @throws SystemException if a system exception occurred
419            */
420            public void deleteRoleGroups(long roleId, long[] groupIds)
421                    throws com.liferay.portal.kernel.exception.SystemException;
422    
423            /**
424            * @throws SystemException if a system exception occurred
425            */
426            public void deleteRoleGroups(long roleId,
427                    java.util.List<com.liferay.portal.model.Group> Groups)
428                    throws com.liferay.portal.kernel.exception.SystemException;
429    
430            /**
431            * @throws SystemException if a system exception occurred
432            */
433            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
434            public java.util.List<com.liferay.portal.model.Group> getRoleGroups(
435                    long roleId) throws com.liferay.portal.kernel.exception.SystemException;
436    
437            /**
438            * @throws SystemException if a system exception occurred
439            */
440            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
441            public java.util.List<com.liferay.portal.model.Group> getRoleGroups(
442                    long roleId, int start, int end)
443                    throws com.liferay.portal.kernel.exception.SystemException;
444    
445            /**
446            * @throws SystemException if a system exception occurred
447            */
448            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
449            public java.util.List<com.liferay.portal.model.Group> getRoleGroups(
450                    long roleId, int start, int end,
451                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
452                    throws com.liferay.portal.kernel.exception.SystemException;
453    
454            /**
455            * @throws SystemException if a system exception occurred
456            */
457            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
458            public int getRoleGroupsCount(long roleId)
459                    throws com.liferay.portal.kernel.exception.SystemException;
460    
461            /**
462            * @throws SystemException if a system exception occurred
463            */
464            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
465            public boolean hasRoleGroup(long roleId, long groupId)
466                    throws com.liferay.portal.kernel.exception.SystemException;
467    
468            /**
469            * @throws SystemException if a system exception occurred
470            */
471            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
472            public boolean hasRoleGroups(long roleId)
473                    throws com.liferay.portal.kernel.exception.SystemException;
474    
475            /**
476            * @throws SystemException if a system exception occurred
477            */
478            public void setRoleGroups(long roleId, long[] groupIds)
479                    throws com.liferay.portal.kernel.exception.SystemException;
480    
481            /**
482            * @throws SystemException if a system exception occurred
483            */
484            public void addUserGroupGroup(long userGroupId, long groupId)
485                    throws com.liferay.portal.kernel.exception.SystemException;
486    
487            /**
488            * @throws SystemException if a system exception occurred
489            */
490            public void addUserGroupGroup(long userGroupId,
491                    com.liferay.portal.model.Group group)
492                    throws com.liferay.portal.kernel.exception.SystemException;
493    
494            /**
495            * @throws SystemException if a system exception occurred
496            */
497            public void addUserGroupGroups(long userGroupId, long[] groupIds)
498                    throws com.liferay.portal.kernel.exception.SystemException;
499    
500            /**
501            * @throws SystemException if a system exception occurred
502            */
503            public void addUserGroupGroups(long userGroupId,
504                    java.util.List<com.liferay.portal.model.Group> Groups)
505                    throws com.liferay.portal.kernel.exception.SystemException;
506    
507            /**
508            * @throws SystemException if a system exception occurred
509            */
510            public void clearUserGroupGroups(long userGroupId)
511                    throws com.liferay.portal.kernel.exception.SystemException;
512    
513            /**
514            * @throws SystemException if a system exception occurred
515            */
516            public void deleteUserGroupGroup(long userGroupId, long groupId)
517                    throws com.liferay.portal.kernel.exception.SystemException;
518    
519            /**
520            * @throws SystemException if a system exception occurred
521            */
522            public void deleteUserGroupGroup(long userGroupId,
523                    com.liferay.portal.model.Group group)
524                    throws com.liferay.portal.kernel.exception.SystemException;
525    
526            /**
527            * @throws SystemException if a system exception occurred
528            */
529            public void deleteUserGroupGroups(long userGroupId, long[] groupIds)
530                    throws com.liferay.portal.kernel.exception.SystemException;
531    
532            /**
533            * @throws SystemException if a system exception occurred
534            */
535            public void deleteUserGroupGroups(long userGroupId,
536                    java.util.List<com.liferay.portal.model.Group> Groups)
537                    throws com.liferay.portal.kernel.exception.SystemException;
538    
539            /**
540            * @throws SystemException if a system exception occurred
541            */
542            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
543            public java.util.List<com.liferay.portal.model.Group> getUserGroupGroups(
544                    long userGroupId)
545                    throws com.liferay.portal.kernel.exception.SystemException;
546    
547            /**
548            * @throws SystemException if a system exception occurred
549            */
550            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
551            public java.util.List<com.liferay.portal.model.Group> getUserGroupGroups(
552                    long userGroupId, int start, int end)
553                    throws com.liferay.portal.kernel.exception.SystemException;
554    
555            /**
556            * @throws SystemException if a system exception occurred
557            */
558            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
559            public java.util.List<com.liferay.portal.model.Group> getUserGroupGroups(
560                    long userGroupId, int start, int end,
561                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
562                    throws com.liferay.portal.kernel.exception.SystemException;
563    
564            /**
565            * @throws SystemException if a system exception occurred
566            */
567            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
568            public int getUserGroupGroupsCount(long userGroupId)
569                    throws com.liferay.portal.kernel.exception.SystemException;
570    
571            /**
572            * @throws SystemException if a system exception occurred
573            */
574            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
575            public boolean hasUserGroupGroup(long userGroupId, long groupId)
576                    throws com.liferay.portal.kernel.exception.SystemException;
577    
578            /**
579            * @throws SystemException if a system exception occurred
580            */
581            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
582            public boolean hasUserGroupGroups(long userGroupId)
583                    throws com.liferay.portal.kernel.exception.SystemException;
584    
585            /**
586            * @throws SystemException if a system exception occurred
587            */
588            public void setUserGroupGroups(long userGroupId, long[] groupIds)
589                    throws com.liferay.portal.kernel.exception.SystemException;
590    
591            /**
592            * @throws SystemException if a system exception occurred
593            */
594            public void addUserGroup(long userId, long groupId)
595                    throws com.liferay.portal.kernel.exception.SystemException;
596    
597            /**
598            * @throws SystemException if a system exception occurred
599            */
600            public void addUserGroup(long userId, com.liferay.portal.model.Group group)
601                    throws com.liferay.portal.kernel.exception.SystemException;
602    
603            /**
604            * @throws SystemException if a system exception occurred
605            */
606            public void addUserGroups(long userId, long[] groupIds)
607                    throws com.liferay.portal.kernel.exception.SystemException;
608    
609            /**
610            * @throws SystemException if a system exception occurred
611            */
612            public void addUserGroups(long userId,
613                    java.util.List<com.liferay.portal.model.Group> Groups)
614                    throws com.liferay.portal.kernel.exception.SystemException;
615    
616            /**
617            * @throws SystemException if a system exception occurred
618            */
619            public void clearUserGroups(long userId)
620                    throws com.liferay.portal.kernel.exception.SystemException;
621    
622            /**
623            * @throws SystemException if a system exception occurred
624            */
625            public void deleteUserGroup(long userId, long groupId)
626                    throws com.liferay.portal.kernel.exception.SystemException;
627    
628            /**
629            * @throws SystemException if a system exception occurred
630            */
631            public void deleteUserGroup(long userId,
632                    com.liferay.portal.model.Group group)
633                    throws com.liferay.portal.kernel.exception.SystemException;
634    
635            /**
636            * @throws SystemException if a system exception occurred
637            */
638            public void deleteUserGroups(long userId, long[] groupIds)
639                    throws com.liferay.portal.kernel.exception.SystemException;
640    
641            /**
642            * @throws SystemException if a system exception occurred
643            */
644            public void deleteUserGroups(long userId,
645                    java.util.List<com.liferay.portal.model.Group> Groups)
646                    throws com.liferay.portal.kernel.exception.SystemException;
647    
648            /**
649            * @throws SystemException if a system exception occurred
650            */
651            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
652            public java.util.List<com.liferay.portal.model.Group> getUserGroups(
653                    long userId) throws com.liferay.portal.kernel.exception.SystemException;
654    
655            /**
656            * @throws SystemException if a system exception occurred
657            */
658            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
659            public java.util.List<com.liferay.portal.model.Group> getUserGroups(
660                    long userId, int start, int end)
661                    throws com.liferay.portal.kernel.exception.SystemException;
662    
663            /**
664            * @throws PortalException
665            * @throws SystemException if a system exception occurred
666            */
667            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
668            public java.util.List<com.liferay.portal.model.Group> getUserGroups(
669                    long userId, int start, int end,
670                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
671                    throws com.liferay.portal.kernel.exception.PortalException,
672                            com.liferay.portal.kernel.exception.SystemException;
673    
674            /**
675            * @throws SystemException if a system exception occurred
676            */
677            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
678            public int getUserGroupsCount(long userId)
679                    throws com.liferay.portal.kernel.exception.SystemException;
680    
681            /**
682            * @throws SystemException if a system exception occurred
683            */
684            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
685            public boolean hasUserGroup(long userId, long groupId)
686                    throws com.liferay.portal.kernel.exception.SystemException;
687    
688            /**
689            * @throws SystemException if a system exception occurred
690            */
691            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
692            public boolean hasUserGroups(long userId)
693                    throws com.liferay.portal.kernel.exception.SystemException;
694    
695            /**
696            * @throws SystemException if a system exception occurred
697            */
698            public void setUserGroups(long userId, long[] groupIds)
699                    throws com.liferay.portal.kernel.exception.SystemException;
700    
701            /**
702            * Returns the Spring bean ID for this bean.
703            *
704            * @return the Spring bean ID for this bean
705            */
706            public java.lang.String getBeanIdentifier();
707    
708            /**
709            * Sets the Spring bean ID for this bean.
710            *
711            * @param beanIdentifier the Spring bean ID for this bean
712            */
713            public void setBeanIdentifier(java.lang.String beanIdentifier);
714    
715            /**
716            * Adds a group.
717            *
718            * @param userId the primary key of the group's creator/owner
719            * @param parentGroupId the primary key of the parent group
720            * @param className the entity's class name
721            * @param classPK the primary key of the entity's instance
722            * @param liveGroupId the primary key of the live group
723            * @param name the entity's name
724            * @param description the group's description (optionally
725            <code>null</code>)
726            * @param type the group's type. For more information see {@link
727            com.liferay.portal.model.GroupConstants}
728            * @param friendlyURL the group's friendlyURL (optionally
729            <code>null</code>)
730            * @param site whether the group is to be associated with a main site
731            * @param active whether the group is active
732            * @param serviceContext the service context to be applied (optionally
733            <code>null</code>). Can set asset category IDs and asset tag
734            names for the group, and whether the group is for staging.
735            * @return the group
736            * @throws PortalException if a creator could not be found, if the group's
737            information was invalid, if a layout could not be found, or if a
738            valid friendly URL could not be created for the group
739            * @throws SystemException if a system exception occurred
740            */
741            public com.liferay.portal.model.Group addGroup(long userId,
742                    long parentGroupId, java.lang.String className, long classPK,
743                    long liveGroupId, java.lang.String name, java.lang.String description,
744                    int type, boolean manualMembership, int membershipRestriction,
745                    java.lang.String friendlyURL, boolean site, boolean active,
746                    com.liferay.portal.service.ServiceContext serviceContext)
747                    throws com.liferay.portal.kernel.exception.PortalException,
748                            com.liferay.portal.kernel.exception.SystemException;
749    
750            /**
751            * Adds the group using the default live group.
752            *
753            * @param userId the primary key of the group's creator/owner
754            * @param parentGroupId the primary key of the parent group
755            * @param className the entity's class name
756            * @param classPK the primary key of the entity's instance
757            * @param name the entity's name
758            * @param description the group's description (optionally
759            <code>null</code>)
760            * @param type the group's type. For more information see {@link
761            com.liferay.portal.model.GroupConstants}
762            * @param friendlyURL the group's friendlyURL
763            * @param site whether the group is to be associated with a main site
764            * @param active whether the group is active
765            * @param serviceContext the service context to be applied (optionally
766            <code>null</code>). Can set asset category IDs and asset tag
767            names for the group, and whether the group is for staging.
768            * @return the group
769            * @throws PortalException if a creator could not be found, if the
770            group's information was invalid, if a layout could not be
771            found, or if a valid friendly URL could not be created for
772            the group
773            * @throws SystemException if a system exception occurred
774            * @deprecated As of 6.2.0, replaced by {@link #addGroup(long, long, String,
775            long, long, String, String, int, boolean, int, String,
776            boolean, boolean, ServiceContext)}
777            */
778            public com.liferay.portal.model.Group addGroup(long userId,
779                    long parentGroupId, java.lang.String className, long classPK,
780                    java.lang.String name, java.lang.String description, int type,
781                    java.lang.String friendlyURL, boolean site, boolean active,
782                    com.liferay.portal.service.ServiceContext serviceContext)
783                    throws com.liferay.portal.kernel.exception.PortalException,
784                            com.liferay.portal.kernel.exception.SystemException;
785    
786            /**
787            * Adds a group.
788            *
789            * @param userId the primary key of the group's creator/owner
790            * @param className the entity's class name
791            * @param classPK the primary key of the entity's instance
792            * @param liveGroupId the primary key of the live group
793            * @param name the entity's name
794            * @param description the group's description (optionally
795            <code>null</code>)
796            * @param type the group's type. For more information see {@link
797            com.liferay.portal.model.GroupConstants}
798            * @param friendlyURL the group's friendlyURL (optionally
799            <code>null</code>)
800            * @param site whether the group is to be associated with a main site
801            * @param active whether the group is active
802            * @param serviceContext the service context to be applied (optionally
803            <code>null</code>). Can set asset category IDs and asset tag
804            names for the group, and whether the group is for staging.
805            * @return the group
806            * @throws PortalException if a creator could not be found, if the
807            group's information was invalid, if a layout could not be
808            found, or if a valid friendly URL could not be created for
809            the group
810            * @throws SystemException if a system exception occurred
811            * @deprecated As of 6.2.0, replaced by {@link #addGroup(long, long, String,
812            long, long, String, String, int, boolean, int, String,
813            boolean, boolean, ServiceContext)}
814            */
815            public com.liferay.portal.model.Group addGroup(long userId,
816                    java.lang.String className, long classPK, long liveGroupId,
817                    java.lang.String name, java.lang.String description, int type,
818                    java.lang.String friendlyURL, boolean site, boolean active,
819                    com.liferay.portal.service.ServiceContext serviceContext)
820                    throws com.liferay.portal.kernel.exception.PortalException,
821                            com.liferay.portal.kernel.exception.SystemException;
822    
823            /**
824            * Adds the group using the default live group.
825            *
826            * @param userId the primary key of the group's creator/owner
827            * @param className the entity's class name
828            * @param classPK the primary key of the entity's instance
829            * @param name the entity's name
830            * @param description the group's description (optionally
831            <code>null</code>)
832            * @param type the group's type. For more information see {@link
833            com.liferay.portal.model.GroupConstants}
834            * @param friendlyURL the group's friendlyURL
835            * @param site whether the group is to be associated with a main site
836            * @param active whether the group is active
837            * @param serviceContext the service context to be applied (optionally
838            <code>null</code>). Can set asset category IDs and asset tag
839            names for the group, and whether the group is for staging.
840            * @return the group
841            * @throws PortalException if a creator could not be found, if the
842            group's information was invalid, if a layout could not be
843            found, or if a valid friendly URL could not be created for
844            the group
845            * @throws SystemException if a system exception occurred
846            * @deprecated As of 6.2.0, replaced by {@link #addGroup(long, long, String,
847            long, long, String, String, int, boolean, int, String,
848            boolean, boolean, ServiceContext)}
849            */
850            public com.liferay.portal.model.Group addGroup(long userId,
851                    java.lang.String className, long classPK, java.lang.String name,
852                    java.lang.String description, int type, java.lang.String friendlyURL,
853                    boolean site, boolean active,
854                    com.liferay.portal.service.ServiceContext serviceContext)
855                    throws com.liferay.portal.kernel.exception.PortalException,
856                            com.liferay.portal.kernel.exception.SystemException;
857    
858            /**
859            * Adds a company group if it does not exist. This method is typically used
860            * when a virtual host is added.
861            *
862            * @param companyId the primary key of the company
863            * @throws PortalException if a default user for the company could not be
864            found, if the group's information was invalid, if a layout could
865            not be found, or if a valid friendly URL could not be created for
866            the group
867            * @throws SystemException if a system exception occurred
868            */
869            @com.liferay.portal.kernel.transaction.Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
870            public void checkCompanyGroup(long companyId)
871                    throws com.liferay.portal.kernel.exception.PortalException,
872                            com.liferay.portal.kernel.exception.SystemException;
873    
874            /**
875            * Creates systems groups and other related data needed by the system on the
876            * very first startup. Also takes care of creating the Control Panel groups
877            * and layouts.
878            *
879            * @param companyId the primary key of the company
880            * @throws PortalException if a new system group could not be created
881            * @throws SystemException if a system exception occurred
882            */
883            @com.liferay.portal.kernel.transaction.Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
884            public void checkSystemGroups(long companyId)
885                    throws com.liferay.portal.kernel.exception.PortalException,
886                            com.liferay.portal.kernel.exception.SystemException;
887    
888            public void disableStaging(long groupId)
889                    throws com.liferay.portal.kernel.exception.PortalException,
890                            com.liferay.portal.kernel.exception.SystemException;
891    
892            public void enableStaging(long groupId)
893                    throws com.liferay.portal.kernel.exception.PortalException,
894                            com.liferay.portal.kernel.exception.SystemException;
895    
896            /**
897            * Returns the group with the matching friendly URL.
898            *
899            * @param companyId the primary key of the company
900            * @param friendlyURL the friendly URL
901            * @return the group with the friendly URL, or <code>null</code> if a
902            matching group could not be found
903            * @throws SystemException if a system exception occurred
904            */
905            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
906            public com.liferay.portal.model.Group fetchFriendlyURLGroup(
907                    long companyId, java.lang.String friendlyURL)
908                    throws com.liferay.portal.kernel.exception.SystemException;
909    
910            /**
911            * Returns the group with the matching group name by first searching the
912            * system groups and then using the finder cache.
913            *
914            * @param companyId the primary key of the company
915            * @param name the group's name
916            * @return the group with the name and associated company, or
917            <code>null</code> if a matching group could not be found
918            * @throws SystemException if a system exception occurred
919            */
920            @com.liferay.portal.kernel.spring.aop.Skip
921            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
922            public com.liferay.portal.model.Group fetchGroup(long companyId,
923                    java.lang.String name)
924                    throws com.liferay.portal.kernel.exception.SystemException;
925    
926            /**
927            * Returns all the active or inactive groups associated with the company.
928            *
929            * @param companyId the primary key of the company
930            * @param active whether to return only active groups, or only inactive
931            groups
932            * @return the active or inactive groups associated with the company
933            * @throws SystemException if a system exception occurred
934            */
935            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
936            public java.util.List<com.liferay.portal.model.Group> getActiveGroups(
937                    long companyId, boolean active)
938                    throws com.liferay.portal.kernel.exception.SystemException;
939    
940            /**
941            * Returns the company group.
942            *
943            * @param companyId the primary key of the company
944            * @return the group associated with the company
945            * @throws PortalException if a matching group could not be found
946            * @throws SystemException if a system exception occurred
947            */
948            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
949            public com.liferay.portal.model.Group getCompanyGroup(long companyId)
950                    throws com.liferay.portal.kernel.exception.PortalException,
951                            com.liferay.portal.kernel.exception.SystemException;
952    
953            /**
954            * Returns a range of all the groups associated with the company.
955            *
956            * <p>
957            * Useful when paginating results. Returns a maximum of <code>end -
958            * start</code> instances. <code>start</code> and <code>end</code> are not
959            * primary keys, they are indexes in the result set. Thus, <code>0</code>
960            * refers to the first result in the set. Setting both <code>start</code>
961            * and <code>end</code> to {@link
962            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
963            * result set.
964            * </p>
965            *
966            * @param companyId the primary key of the company
967            * @param start the lower bound of the range of groups to return
968            * @param end the upper bound of the range of groups to return (not
969            inclusive)
970            * @return the range of groups associated with the company
971            * @throws SystemException if a system exception occurred
972            */
973            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
974            public java.util.List<com.liferay.portal.model.Group> getCompanyGroups(
975                    long companyId, int start, int end)
976                    throws com.liferay.portal.kernel.exception.SystemException;
977    
978            /**
979            * Returns the number of groups associated with the company.
980            *
981            * @param companyId the primary key of the company
982            * @return the number of groups associated with the company
983            * @throws SystemException if a system exception occurred
984            */
985            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
986            public int getCompanyGroupsCount(long companyId)
987                    throws com.liferay.portal.kernel.exception.SystemException;
988    
989            /**
990            * Returns the group with the matching friendly URL.
991            *
992            * @param companyId the primary key of the company
993            * @param friendlyURL the group's friendlyURL
994            * @return the group with the friendly URL
995            * @throws PortalException if a matching group could not be found, or if the
996            friendly URL was invalid
997            * @throws SystemException if a system exception occurred
998            */
999            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1000            public com.liferay.portal.model.Group getFriendlyURLGroup(long companyId,
1001                    java.lang.String friendlyURL)
1002                    throws com.liferay.portal.kernel.exception.PortalException,
1003                            com.liferay.portal.kernel.exception.SystemException;
1004    
1005            /**
1006            * Returns the group with the matching group name.
1007            *
1008            * @param companyId the primary key of the company
1009            * @param name the group's name
1010            * @return the group with the name
1011            * @throws PortalException if a matching group could not be found
1012            * @throws SystemException if a system exception occurred
1013            */
1014            @com.liferay.portal.kernel.spring.aop.Skip
1015            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1016            public com.liferay.portal.model.Group getGroup(long companyId,
1017                    java.lang.String name)
1018                    throws com.liferay.portal.kernel.exception.PortalException,
1019                            com.liferay.portal.kernel.exception.SystemException;
1020    
1021            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1022            public java.lang.String getGroupDescriptiveName(
1023                    com.liferay.portal.model.Group group, java.util.Locale locale)
1024                    throws com.liferay.portal.kernel.exception.PortalException,
1025                            com.liferay.portal.kernel.exception.SystemException;
1026    
1027            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1028            public java.lang.String getGroupDescriptiveName(long groupId,
1029                    java.util.Locale locale)
1030                    throws com.liferay.portal.kernel.exception.PortalException,
1031                            com.liferay.portal.kernel.exception.SystemException;
1032    
1033            /**
1034            * Returns all the groups that are direct children of the parent group.
1035            *
1036            * @param companyId the primary key of the company
1037            * @param parentGroupId the primary key of the parent group
1038            * @param site whether the group is to be associated with a main site
1039            * @return the matching groups, or <code>null</code> if no matches were
1040            found
1041            * @throws SystemException if a system exception occurred
1042            */
1043            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1044            public java.util.List<com.liferay.portal.model.Group> getGroups(
1045                    long companyId, long parentGroupId, boolean site)
1046                    throws com.liferay.portal.kernel.exception.SystemException;
1047    
1048            /**
1049            * Returns all the groups that are direct children of the parent group with
1050            * the matching className.
1051            *
1052            * @param companyId the primary key of the company
1053            * @param className the class name of the group
1054            * @param parentGroupId the primary key of the parent group
1055            * @return the matching groups, or <code>null</code> if no matches were
1056            found
1057            * @throws SystemException if a system exception occurred
1058            */
1059            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1060            public java.util.List<com.liferay.portal.model.Group> getGroups(
1061                    long companyId, java.lang.String className, long parentGroupId)
1062                    throws com.liferay.portal.kernel.exception.SystemException;
1063    
1064            /**
1065            * Returns a range of all the groups that are direct children of the parent
1066            * group with the matching className.
1067            *
1068            * @param companyId the primary key of the company
1069            * @param className the class name of the group
1070            * @param parentGroupId the primary key of the parent group
1071            * @param start the lower bound of the range of results
1072            * @param end the upper bound of the range of results (not inclusive)
1073            * @return the range of matching groups
1074            * @throws SystemException if a system exception occurred
1075            */
1076            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1077            public java.util.List<com.liferay.portal.model.Group> getGroups(
1078                    long companyId, java.lang.String className, long parentGroupId,
1079                    int start, int end)
1080                    throws com.liferay.portal.kernel.exception.SystemException;
1081    
1082            /**
1083            * Returns the groups with the matching primary keys.
1084            *
1085            * @param groupIds the primary keys of the groups
1086            * @return the groups with the primary keys
1087            * @throws PortalException if any one of the groups could not be found
1088            * @throws SystemException if a system exception occurred
1089            */
1090            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1091            public java.util.List<com.liferay.portal.model.Group> getGroups(
1092                    long[] groupIds)
1093                    throws com.liferay.portal.kernel.exception.PortalException,
1094                            com.liferay.portal.kernel.exception.SystemException;
1095    
1096            /**
1097            * Returns the number of groups that are direct children of the parent
1098            * group.
1099            *
1100            * @param companyId the primary key of the company
1101            * @param parentGroupId the primary key of the parent group
1102            * @param site whether the group is to be associated with a main site
1103            * @return the number of matching groups
1104            * @throws SystemException if a system exception occurred
1105            */
1106            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1107            public int getGroupsCount(long companyId, long parentGroupId, boolean site)
1108                    throws com.liferay.portal.kernel.exception.SystemException;
1109    
1110            /**
1111            * Returns the number of groups that are direct children of the parent group
1112            * with the matching className.
1113            *
1114            * @param companyId the primary key of the company
1115            * @param className the class name of the group
1116            * @param parentGroupId the primary key of the parent group
1117            * @return the number of matching groups
1118            * @throws SystemException if a system exception occurred
1119            */
1120            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1121            public int getGroupsCount(long companyId, java.lang.String className,
1122                    long parentGroupId)
1123                    throws com.liferay.portal.kernel.exception.SystemException;
1124    
1125            /**
1126            * Returns the group associated with the layout.
1127            *
1128            * @param companyId the primary key of the company
1129            * @param plid the primary key of the layout
1130            * @return the group associated with the layout
1131            * @throws PortalException if a matching group could not be found
1132            * @throws SystemException if a system exception occurred
1133            */
1134            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1135            public com.liferay.portal.model.Group getLayoutGroup(long companyId,
1136                    long plid)
1137                    throws com.liferay.portal.kernel.exception.PortalException,
1138                            com.liferay.portal.kernel.exception.SystemException;
1139    
1140            /**
1141            * Returns the group associated with the layout prototype.
1142            *
1143            * @param companyId the primary key of the company
1144            * @param layoutPrototypeId the primary key of the layout prototype
1145            * @return the group associated with the layout prototype
1146            * @throws PortalException if a matching group could not be found
1147            * @throws SystemException if a system exception occurred
1148            */
1149            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1150            public com.liferay.portal.model.Group getLayoutPrototypeGroup(
1151                    long companyId, long layoutPrototypeId)
1152                    throws com.liferay.portal.kernel.exception.PortalException,
1153                            com.liferay.portal.kernel.exception.SystemException;
1154    
1155            /**
1156            * Returns the group associated with the layout set prototype.
1157            *
1158            * @param companyId the primary key of the company
1159            * @param layoutSetPrototypeId the primary key of the layout set prototype
1160            * @return the group associated with the layout set prototype
1161            * @throws PortalException if a matching group could not be found
1162            * @throws SystemException if a system exception occurred
1163            */
1164            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1165            public com.liferay.portal.model.Group getLayoutSetPrototypeGroup(
1166                    long companyId, long layoutSetPrototypeId)
1167                    throws com.liferay.portal.kernel.exception.PortalException,
1168                            com.liferay.portal.kernel.exception.SystemException;
1169    
1170            /**
1171            * Returns a range of all groups that are children of the parent group and
1172            * that have at least one layout.
1173            *
1174            * <p>
1175            * Useful when paginating results. Returns a maximum of <code>end -
1176            * start</code> instances. <code>start</code> and <code>end</code> are not
1177            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1178            * refers to the first result in the set. Setting both <code>start</code>
1179            * and <code>end</code> to {@link
1180            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1181            * result set.
1182            * </p>
1183            *
1184            * @param companyId the primary key of the company
1185            * @param parentGroupId the primary key of the parent group
1186            * @param site whether the group is to be associated with a main site
1187            * @param start the lower bound of the range of groups to return
1188            * @param end the upper bound of the range of groups to return (not
1189            inclusive)
1190            * @return the range of matching groups
1191            * @throws SystemException if a system exception occurred
1192            * @deprecated As of 6.2.0, replaced by {@link #getLayoutsGroups(long, long,
1193            boolean, int, int, OrderByComparator)}
1194            */
1195            @java.lang.Deprecated
1196            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1197            public java.util.List<com.liferay.portal.model.Group> getLayoutsGroups(
1198                    long companyId, long parentGroupId, boolean site, int start, int end)
1199                    throws com.liferay.portal.kernel.exception.SystemException;
1200    
1201            /**
1202            * Returns a range of all groups that are children of the parent group and
1203            * that have at least one layout.
1204            *
1205            * <p>
1206            * Useful when paginating results. Returns a maximum of <code>end -
1207            * start</code> instances. <code>start</code> and <code>end</code> are not
1208            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1209            * refers to the first result in the set. Setting both <code>start</code>
1210            * and <code>end</code> to {@link
1211            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1212            * result set.
1213            * </p>
1214            *
1215            * @param companyId the primary key of the company
1216            * @param parentGroupId the primary key of the parent group
1217            * @param site whether the group is to be associated with a main site
1218            * @param start the lower bound of the range of groups to return
1219            * @param end the upper bound of the range of groups to return (not
1220            inclusive)
1221            * @param obc the comparator to order the groups (optionally
1222            <code>null</code>)
1223            * @return the range of matching groups ordered by comparator
1224            <code>obc</code>
1225            * @throws SystemException if a system exception occurred
1226            */
1227            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1228            public java.util.List<com.liferay.portal.model.Group> getLayoutsGroups(
1229                    long companyId, long parentGroupId, boolean site, int start, int end,
1230                    com.liferay.portal.kernel.util.OrderByComparator obc)
1231                    throws com.liferay.portal.kernel.exception.SystemException;
1232    
1233            /**
1234            * Returns the number of groups that are children or the parent group and
1235            * that have at least one layout
1236            *
1237            * @param companyId the primary key of the company
1238            * @param parentGroupId the primary key of the parent group
1239            * @param site whether the group is to be associated with a main site
1240            * @return the number of matching groups
1241            * @throws SystemException if a system exception occurred
1242            */
1243            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1244            public int getLayoutsGroupsCount(long companyId, long parentGroupId,
1245                    boolean site)
1246                    throws com.liferay.portal.kernel.exception.SystemException;
1247    
1248            /**
1249            * Returns all live groups.
1250            *
1251            * @return all live groups
1252            * @throws SystemException if a system exception occurred
1253            */
1254            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1255            public java.util.List<com.liferay.portal.model.Group> getLiveGroups()
1256                    throws com.liferay.portal.kernel.exception.SystemException;
1257    
1258            /**
1259            * Returns a range of all non-system groups of a specified type (className)
1260            * that have no layouts.
1261            *
1262            * <p>
1263            * Useful when paginating results. Returns a maximum of <code>end -
1264            * start</code> instances. <code>start</code> and <code>end</code> are not
1265            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1266            * refers to the first result in the set. Setting both <code>start</code>
1267            * and <code>end</code> to {@link
1268            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1269            * result set.
1270            * </p>
1271            *
1272            * @param className the entity's class name
1273            * @param privateLayout whether to include groups with private layout sets
1274            or non-private layout sets
1275            * @param start the lower bound of the range of groups to return
1276            * @param end the upper bound of the range of groups to return (not
1277            inclusive)
1278            * @return the range of matching groups
1279            * @throws SystemException if a system exception occurred
1280            */
1281            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1282            public java.util.List<com.liferay.portal.model.Group> getNoLayoutsGroups(
1283                    java.lang.String className, boolean privateLayout, int start, int end)
1284                    throws com.liferay.portal.kernel.exception.SystemException;
1285    
1286            /**
1287            * Returns all non-system groups having <code>null</code> or empty friendly
1288            * URLs.
1289            *
1290            * @return the non-system groups having <code>null</code> or empty friendly
1291            URLs
1292            * @throws SystemException if a system exception occurred
1293            */
1294            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1295            public java.util.List<com.liferay.portal.model.Group> getNullFriendlyURLGroups()
1296                    throws com.liferay.portal.kernel.exception.SystemException;
1297    
1298            /**
1299            * Returns the specified organization group.
1300            *
1301            * @param companyId the primary key of the company
1302            * @param organizationId the primary key of the organization
1303            * @return the group associated with the organization
1304            * @throws PortalException if a matching group could not be found
1305            * @throws SystemException if a system exception occurred
1306            */
1307            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1308            public com.liferay.portal.model.Group getOrganizationGroup(long companyId,
1309                    long organizationId)
1310                    throws com.liferay.portal.kernel.exception.PortalException,
1311                            com.liferay.portal.kernel.exception.SystemException;
1312    
1313            /**
1314            * Returns the specified organization groups.
1315            *
1316            * @param organizations the organizations
1317            * @return the groups associated with the organizations
1318            */
1319            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1320            public java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups(
1321                    java.util.List<com.liferay.portal.model.Organization> organizations);
1322    
1323            /**
1324            * Returns all the groups related to the organizations.
1325            *
1326            * @param organizations the organizations
1327            * @return the groups related to the organizations
1328            * @throws SystemException if a system exception occurred
1329            */
1330            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1331            public java.util.List<com.liferay.portal.model.Group> getOrganizationsRelatedGroups(
1332                    java.util.List<com.liferay.portal.model.Organization> organizations)
1333                    throws com.liferay.portal.kernel.exception.SystemException;
1334    
1335            /**
1336            * Returns the group followed by all its parent groups ordered by closest
1337            * ancestor.
1338            *
1339            * @param groupId the primary key of the group
1340            * @return the group followed by all its parent groups ordered by closest
1341            ancestor
1342            * @throws PortalException if a group with the primary key could not be
1343            found
1344            * @throws SystemException if a system exception occurred
1345            */
1346            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1347            public java.util.List<com.liferay.portal.model.Group> getParentGroups(
1348                    long groupId)
1349                    throws com.liferay.portal.kernel.exception.PortalException,
1350                            com.liferay.portal.kernel.exception.SystemException;
1351    
1352            /**
1353            * Returns the staging group.
1354            *
1355            * @param liveGroupId the primary key of the live group
1356            * @return the staging group
1357            * @throws PortalException if a matching staging group could not be found
1358            * @throws SystemException if a system exception occurred
1359            */
1360            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1361            public com.liferay.portal.model.Group getStagingGroup(long liveGroupId)
1362                    throws com.liferay.portal.kernel.exception.PortalException,
1363                            com.liferay.portal.kernel.exception.SystemException;
1364    
1365            /**
1366            * Returns the group associated with the user.
1367            *
1368            * @param companyId the primary key of the company
1369            * @param userId the primary key of the user
1370            * @return the group associated with the user
1371            * @throws PortalException if a matching group could not be found
1372            * @throws SystemException if a system exception occurred
1373            */
1374            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1375            public com.liferay.portal.model.Group getUserGroup(long companyId,
1376                    long userId)
1377                    throws com.liferay.portal.kernel.exception.PortalException,
1378                            com.liferay.portal.kernel.exception.SystemException;
1379    
1380            /**
1381            * Returns the specified "user group" group. That is, the group that
1382            * represents the {@link com.liferay.portal.model.UserGroup} entity.
1383            *
1384            * @param companyId the primary key of the company
1385            * @param userGroupId the primary key of the user group
1386            * @return the group associated with the user group
1387            * @throws PortalException if a matching group could not be found
1388            * @throws SystemException if a system exception occurred
1389            */
1390            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1391            public com.liferay.portal.model.Group getUserGroupGroup(long companyId,
1392                    long userGroupId)
1393                    throws com.liferay.portal.kernel.exception.PortalException,
1394                            com.liferay.portal.kernel.exception.SystemException;
1395    
1396            /**
1397            * Returns all the user's site groups and immediate organization groups,
1398            * optionally including the user's inherited organization groups and user
1399            * groups. System and staged groups are not included.
1400            *
1401            * @param userId the primary key of the user
1402            * @param inherit whether to include the user's inherited organization
1403            groups and user groups
1404            * @return the user's groups and immediate organization groups
1405            * @throws PortalException if a user with the primary key could not be found
1406            * @throws SystemException if a system exception occurred
1407            */
1408            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1409            public java.util.List<com.liferay.portal.model.Group> getUserGroups(
1410                    long userId, boolean inherit)
1411                    throws com.liferay.portal.kernel.exception.PortalException,
1412                            com.liferay.portal.kernel.exception.SystemException;
1413    
1414            /**
1415            * Returns an ordered range of all the user's site groups and immediate
1416            * organization groups, optionally including the user's inherited
1417            * organization groups and user groups. System and staged groups are not
1418            * included.
1419            *
1420            * <p>
1421            * Useful when paginating results. Returns a maximum of <code>end -
1422            * start</code> instances. <code>start</code> and <code>end</code> are not
1423            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1424            * refers to the first result in the set. Setting both <code>start</code>
1425            * and <code>end</code> to {@link
1426            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1427            * result set.
1428            * </p>
1429            *
1430            * @param userId the primary key of the user
1431            * @param inherit whether to include the user's inherited organization
1432            groups and user groups
1433            * @param start the lower bound of the range of groups to return
1434            * @param end the upper bound of the range of groups to return (not
1435            inclusive)
1436            * @return the range of the user's groups and immediate organization groups
1437            ordered by name
1438            * @throws PortalException if a user with the primary key could not be found
1439            * @throws SystemException if a system exception occurred
1440            */
1441            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1442            public java.util.List<com.liferay.portal.model.Group> getUserGroups(
1443                    long userId, boolean inherit, int start, int end)
1444                    throws com.liferay.portal.kernel.exception.PortalException,
1445                            com.liferay.portal.kernel.exception.SystemException;
1446    
1447            /**
1448            * Returns the groups associated with the user groups.
1449            *
1450            * @param userGroups the user groups
1451            * @return the groups associated with the user groups
1452            * @throws PortalException if any one of the user group's group could not be
1453            found
1454            * @throws SystemException if a system exception occurred
1455            */
1456            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1457            public java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups(
1458                    java.util.List<com.liferay.portal.model.UserGroup> userGroups)
1459                    throws com.liferay.portal.kernel.exception.PortalException,
1460                            com.liferay.portal.kernel.exception.SystemException;
1461    
1462            /**
1463            * Returns all the groups related to the user groups.
1464            *
1465            * @param userGroups the user groups
1466            * @return the groups related to the user groups
1467            * @throws SystemException if a system exception occurred
1468            */
1469            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1470            public java.util.List<com.liferay.portal.model.Group> getUserGroupsRelatedGroups(
1471                    java.util.List<com.liferay.portal.model.UserGroup> userGroups)
1472                    throws com.liferay.portal.kernel.exception.SystemException;
1473    
1474            /**
1475            * Returns the range of all groups associated with the user's organization
1476            * groups, including the ancestors of the organization groups, unless portal
1477            * property <code>organizations.membership.strict</code> is set to
1478            * <code>true</code>.
1479            *
1480            * <p>
1481            * Useful when paginating results. Returns a maximum of <code>end -
1482            * start</code> instances. <code>start</code> and <code>end</code> are not
1483            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1484            * refers to the first result in the set. Setting both <code>start</code>
1485            * and <code>end</code> to {@link
1486            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1487            * result set.
1488            * </p>
1489            *
1490            * @param userId the primary key of the user
1491            * @param start the lower bound of the range of groups to consider
1492            * @param end the upper bound of the range of groups to consider (not
1493            inclusive)
1494            * @return the range of groups associated with the user's organization
1495            groups
1496            * @throws PortalException if a user with the primary key could not be found
1497            or if another portal exception occurred
1498            * @throws SystemException if a system exception occurred
1499            */
1500            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1501            public java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups(
1502                    long userId, int start, int end)
1503                    throws com.liferay.portal.kernel.exception.PortalException,
1504                            com.liferay.portal.kernel.exception.SystemException;
1505    
1506            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1507            public com.liferay.portal.model.Group getUserPersonalSiteGroup(
1508                    long companyId)
1509                    throws com.liferay.portal.kernel.exception.PortalException,
1510                            com.liferay.portal.kernel.exception.SystemException;
1511    
1512            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1513            public java.util.List<com.liferay.portal.model.Group> getUserSitesGroups(
1514                    long userId)
1515                    throws com.liferay.portal.kernel.exception.PortalException,
1516                            com.liferay.portal.kernel.exception.SystemException;
1517    
1518            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1519            public java.util.List<com.liferay.portal.model.Group> getUserSitesGroups(
1520                    long userId, boolean includeAdministrative)
1521                    throws com.liferay.portal.kernel.exception.PortalException,
1522                            com.liferay.portal.kernel.exception.SystemException;
1523    
1524            /**
1525            * Returns <code>true</code> if the live group has a staging group.
1526            *
1527            * @param liveGroupId the primary key of the live group
1528            * @return <code>true</code> if the live group has a staging group;
1529            <code>false</code> otherwise
1530            * @throws SystemException if a system exception occurred
1531            */
1532            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1533            public boolean hasStagingGroup(long liveGroupId)
1534                    throws com.liferay.portal.kernel.exception.SystemException;
1535    
1536            /**
1537            * Returns <code>true</code> if the user is immediately associated with the
1538            * group, or optionally if the user is associated with the group via the
1539            * user's organizations, inherited organizations, or user groups.
1540            *
1541            * @param userId the primary key of the user
1542            * @param groupId the primary key of the group
1543            * @param inherit whether to include organization groups and user groups to
1544            which the user belongs in the determination
1545            * @return <code>true</code> if the user is associated with the group;
1546            <code>false</code> otherwise
1547            * @throws SystemException if a system exception occurred
1548            */
1549            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1550            public boolean hasUserGroup(long userId, long groupId, boolean inherit)
1551                    throws com.liferay.portal.kernel.exception.SystemException;
1552    
1553            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1554            public boolean isLiveGroupActive(com.liferay.portal.model.Group group);
1555    
1556            /**
1557            * Returns the group with the matching group name by first searching the
1558            * system groups and then using the finder cache.
1559            *
1560            * @param companyId the primary key of the company
1561            * @param name the group's name
1562            * @return the group with the name and associated company, or
1563            <code>null</code> if a matching group could not be found
1564            * @throws SystemException if a system exception occurred
1565            */
1566            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1567            public com.liferay.portal.model.Group loadFetchGroup(long companyId,
1568                    java.lang.String name)
1569                    throws com.liferay.portal.kernel.exception.SystemException;
1570    
1571            /**
1572            * Returns the group with the matching group name.
1573            *
1574            * @param companyId the primary key of the company
1575            * @param name the group's name
1576            * @return the group with the name and associated company
1577            * @throws PortalException if a matching group could not be found
1578            * @throws SystemException if a system exception occurred
1579            */
1580            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1581            public com.liferay.portal.model.Group loadGetGroup(long companyId,
1582                    java.lang.String name)
1583                    throws com.liferay.portal.kernel.exception.PortalException,
1584                            com.liferay.portal.kernel.exception.SystemException;
1585    
1586            /**
1587            * Rebuilds the group tree.
1588            *
1589            * <p>
1590            * Only call this method if the tree has become stale through operations
1591            * other than normal CRUD. Under normal circumstances the tree is
1592            * automatically rebuilt whenever necessary.
1593            * </p>
1594            *
1595            * @param companyId the primary key of the group's company
1596            * @throws PortalException if a group with the primary key could not be
1597            found
1598            * @throws SystemException if a system exception occurred
1599            */
1600            public void rebuildTree(long companyId)
1601                    throws com.liferay.portal.kernel.exception.PortalException,
1602                            com.liferay.portal.kernel.exception.SystemException;
1603    
1604            /**
1605            * Returns an ordered range of all the company's groups, optionally
1606            * including the user's inherited organization groups and user groups.
1607            * System and staged groups are not included.
1608            *
1609            * <p>
1610            * Useful when paginating results. Returns a maximum of <code>end -
1611            * start</code> instances. <code>start</code> and <code>end</code> are not
1612            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1613            * refers to the first result in the set. Setting both <code>start</code>
1614            * and <code>end</code> to {@link
1615            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1616            * result set.
1617            * </p>
1618            *
1619            * @param companyId the primary key of the company
1620            * @param params the finder params (optionally <code>null</code>). To
1621            include a user's organizations, inherited organizations, and user
1622            groups in the search, add an entry with key
1623            &quot;usersGroups&quot; mapped to the user's ID and an entry with
1624            key &quot;inherit&quot; mapped to a non-<code>null</code> object.
1625            For more information see {@link
1626            com.liferay.portal.service.persistence.GroupFinder}
1627            * @param start the lower bound of the range of groups to return
1628            * @param end the upper bound of the range of groups to return (not
1629            inclusive)
1630            * @return the matching groups ordered by name
1631            * @throws SystemException if a system exception occurred
1632            */
1633            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1634            public java.util.List<com.liferay.portal.model.Group> search(
1635                    long companyId,
1636                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1637                    int start, int end)
1638                    throws com.liferay.portal.kernel.exception.SystemException;
1639    
1640            /**
1641            * Returns an ordered range of all the groups belonging to the parent group
1642            * that match the keywords, optionally including the user's inherited
1643            * organization groups and user groups. System and staged groups are not
1644            * included.
1645            *
1646            * <p>
1647            * Useful when paginating results. Returns a maximum of <code>end -
1648            * start</code> instances. <code>start</code> and <code>end</code> are not
1649            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1650            * refers to the first result in the set. Setting both <code>start</code>
1651            * and <code>end</code> to {@link
1652            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1653            * result set.
1654            * </p>
1655            *
1656            * @param companyId the primary key of the company
1657            * @param parentGroupId the primary key of the parent group
1658            * @param keywords the keywords (space separated), which may occur in the
1659            sites's name, or description (optionally <code>null</code>)
1660            * @param params the finder params (optionally <code>null</code>). To
1661            include the user's inherited organizations and user groups in the
1662            search, add entries having &quot;usersGroups&quot; and
1663            &quot;inherit&quot; as keys mapped to the the user's ID. For more
1664            information see {@link
1665            com.liferay.portal.service.persistence.GroupFinder}
1666            * @param start the lower bound of the range of groups to return
1667            * @param end the upper bound of the range of groups to return (not
1668            inclusive)
1669            * @return the matching groups ordered by name
1670            * @throws SystemException if a system exception occurred
1671            */
1672            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1673            public java.util.List<com.liferay.portal.model.Group> search(
1674                    long companyId, long parentGroupId, java.lang.String keywords,
1675                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1676                    int start, int end)
1677                    throws com.liferay.portal.kernel.exception.SystemException;
1678    
1679            /**
1680            * Returns an ordered range of all the groups belonging to the parent group
1681            * that match the keywords, optionally including the user's inherited
1682            * organization groups and user groups. System and staged groups are not
1683            * included.
1684            *
1685            * <p>
1686            * Useful when paginating results. Returns a maximum of <code>end -
1687            * start</code> instances. <code>start</code> and <code>end</code> are not
1688            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1689            * refers to the first result in the set. Setting both <code>start</code>
1690            * and <code>end</code> to {@link
1691            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1692            * result set.
1693            * </p>
1694            *
1695            * @param companyId the primary key of the company
1696            * @param parentGroupId the primary key of the parent group
1697            * @param keywords the keywords (space separated), which may occur in the
1698            sites's name, or description (optionally <code>null</code>)
1699            * @param params the finder params (optionally <code>null</code>). To
1700            include the user's inherited organizations and user groups in the
1701            search, add entries having &quot;usersGroups&quot; and
1702            &quot;inherit&quot; as keys mapped to the the user's ID. For more
1703            information see {@link
1704            com.liferay.portal.service.persistence.GroupFinder}
1705            * @param start the lower bound of the range of groups to return
1706            * @param end the upper bound of the range of groups to return (not
1707            inclusive)
1708            * @param obc the comparator to order the groups (optionally
1709            <code>null</code>)
1710            * @return the matching groups ordered by comparator <code>obc</code>
1711            * @throws SystemException if a system exception occurred
1712            */
1713            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1714            public java.util.List<com.liferay.portal.model.Group> search(
1715                    long companyId, long parentGroupId, java.lang.String keywords,
1716                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1717                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
1718                    throws com.liferay.portal.kernel.exception.SystemException;
1719    
1720            /**
1721            * Returns an ordered range of all the site groups belonging to the parent
1722            * group and organization groups that match the name and description,
1723            * optionally including the user's inherited organization groups and user
1724            * groups. System and staged groups are not included.
1725            *
1726            * <p>
1727            * Useful when paginating results. Returns a maximum of <code>end -
1728            * start</code> instances. <code>start</code> and <code>end</code> are not
1729            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1730            * refers to the first result in the set. Setting both <code>start</code>
1731            * and <code>end</code> to {@link
1732            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1733            * result set.
1734            * </p>
1735            *
1736            * @param companyId the primary key of the company
1737            * @param parentGroupId the primary key of the parent group
1738            * @param name the group's name (optionally <code>null</code>)
1739            * @param description the group's description (optionally
1740            <code>null</code>)
1741            * @param params the finder params (optionally <code>null</code>). To
1742            include the user's inherited organizations and user groups in the
1743            search, add entries having &quot;usersGroups&quot; and
1744            &quot;inherit&quot; as keys mapped to the the user's ID. For more
1745            information see {@link
1746            com.liferay.portal.service.persistence.GroupFinder}
1747            * @param andOperator whether every field must match its keywords, or just
1748            one field.
1749            * @param start the lower bound of the range of groups to return
1750            * @param end the upper bound of the range of groups to return (not
1751            inclusive)
1752            * @return the matching groups ordered by name
1753            * @throws SystemException if a system exception occurred
1754            */
1755            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1756            public java.util.List<com.liferay.portal.model.Group> search(
1757                    long companyId, long parentGroupId, java.lang.String name,
1758                    java.lang.String description,
1759                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1760                    boolean andOperator, int start, int end)
1761                    throws com.liferay.portal.kernel.exception.SystemException;
1762    
1763            /**
1764            * Returns an ordered range of all the site groups belonging to the parent
1765            * group and organization groups that match the name and description,
1766            * optionally including the user's inherited organization groups and user
1767            * groups. System and staged groups are not included.
1768            *
1769            * <p>
1770            * Useful when paginating results. Returns a maximum of <code>end -
1771            * start</code> instances. <code>start</code> and <code>end</code> are not
1772            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1773            * refers to the first result in the set. Setting both <code>start</code>
1774            * and <code>end</code> to {@link
1775            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1776            * result set.
1777            * </p>
1778            *
1779            * @param companyId the primary key of the company
1780            * @param parentGroupId the primary key of the parent group
1781            * @param name the group's name (optionally <code>null</code>)
1782            * @param description the group's description (optionally
1783            <code>null</code>)
1784            * @param params the finder params (optionally <code>null</code>). To
1785            include the user's inherited organizations and user groups in the
1786            search, add entries having &quot;usersGroups&quot; and
1787            &quot;inherit&quot; as keys mapped to the the user's ID. For more
1788            information see {@link
1789            com.liferay.portal.service.persistence.GroupFinder}
1790            * @param andOperator whether every field must match its keywords, or just
1791            one field.
1792            * @param start the lower bound of the range of groups to return
1793            * @param end the upper bound of the range of groups to return (not
1794            inclusive)
1795            * @param obc the comparator to order the groups (optionally
1796            <code>null</code>)
1797            * @return the matching groups ordered by comparator <code>obc</code>
1798            * @throws SystemException if a system exception occurred
1799            */
1800            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1801            public java.util.List<com.liferay.portal.model.Group> search(
1802                    long companyId, long parentGroupId, java.lang.String name,
1803                    java.lang.String description,
1804                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1805                    boolean andOperator, int start, int end,
1806                    com.liferay.portal.kernel.util.OrderByComparator obc)
1807                    throws com.liferay.portal.kernel.exception.SystemException;
1808    
1809            /**
1810            * Returns an ordered range of all the groups belonging to the parent group
1811            * that match the class name IDs and keywords, optionally including the
1812            * user's inherited organization groups and user groups. System and staged
1813            * groups are not included.
1814            *
1815            * <p>
1816            * Useful when paginating results. Returns a maximum of <code>end -
1817            * start</code> instances. <code>start</code> and <code>end</code> are not
1818            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1819            * refers to the first result in the set. Setting both <code>start</code>
1820            * and <code>end</code> to {@link
1821            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1822            * result set.
1823            * </p>
1824            *
1825            * @param companyId the primary key of the company
1826            * @param classNameIds the primary keys of the class names of the entities
1827            the groups are related to (optionally <code>null</code>)
1828            * @param parentGroupId the primary key of the parent group
1829            * @param keywords the keywords (space separated), which may occur in the
1830            sites's name, or description (optionally <code>null</code>)
1831            * @param params the finder params (optionally <code>null</code>). To
1832            include a user's organizations, inherited organizations, and user
1833            groups in the search, add an entry with key
1834            &quot;usersGroups&quot; mapped to the user's ID and an entry with
1835            key &quot;inherit&quot; mapped to a non-<code>null</code> object.
1836            For more information see {@link
1837            com.liferay.portal.service.persistence.GroupFinder}
1838            * @param start the lower bound of the range of groups to return
1839            * @param end the upper bound of the range of groups to return (not
1840            inclusive)
1841            * @return the matching groups ordered by name
1842            * @throws SystemException if a system exception occurred
1843            */
1844            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1845            public java.util.List<com.liferay.portal.model.Group> search(
1846                    long companyId, long[] classNameIds, long parentGroupId,
1847                    java.lang.String keywords,
1848                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1849                    int start, int end)
1850                    throws com.liferay.portal.kernel.exception.SystemException;
1851    
1852            /**
1853            * Returns an ordered range of all the groups belonging to the parent group
1854            * that match the class name IDs and keywords, optionally including the
1855            * user's inherited organization groups and user groups. System and staged
1856            * groups are not included.
1857            *
1858            * <p>
1859            * Useful when paginating results. Returns a maximum of <code>end -
1860            * start</code> instances. <code>start</code> and <code>end</code> are not
1861            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1862            * refers to the first result in the set. Setting both <code>start</code>
1863            * and <code>end</code> to {@link
1864            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1865            * result set.
1866            * </p>
1867            *
1868            * @param companyId the primary key of the company
1869            * @param classNameIds the primary keys of the class names of the entities
1870            the groups are related to (optionally <code>null</code>)
1871            * @param parentGroupId the primary key of the parent group
1872            * @param keywords the keywords (space separated), which may occur in the
1873            sites's name, or description (optionally <code>null</code>)
1874            * @param params the finder params (optionally <code>null</code>). To
1875            include a user's organizations, inherited organizations, and user
1876            groups in the search, add an entry with key
1877            &quot;usersGroups&quot; mapped to the user's ID and an entry with
1878            key &quot;inherit&quot; mapped to a non-<code>null</code> object.
1879            For more information see {@link
1880            com.liferay.portal.service.persistence.GroupFinder}
1881            * @param start the lower bound of the range of groups to return
1882            * @param end the upper bound of the range of groups to return (not
1883            inclusive)
1884            * @param obc the comparator to order the groups (optionally
1885            <code>null</code>)
1886            * @return the matching groups ordered by comparator <code>obc</code>
1887            * @throws SystemException if a system exception occurred
1888            */
1889            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1890            public java.util.List<com.liferay.portal.model.Group> search(
1891                    long companyId, long[] classNameIds, long parentGroupId,
1892                    java.lang.String keywords,
1893                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1894                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
1895                    throws com.liferay.portal.kernel.exception.SystemException;
1896    
1897            /**
1898            * Returns an ordered range of all the groups belonging to the parent group
1899            * that match the class name IDs, name, and description, optionally
1900            * including the user's inherited organization groups and user groups.
1901            * System and staged groups are not included.
1902            *
1903            * <p>
1904            * Useful when paginating results. Returns a maximum of <code>end -
1905            * start</code> instances. <code>start</code> and <code>end</code> are not
1906            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1907            * refers to the first result in the set. Setting both <code>start</code>
1908            * and <code>end</code> to {@link
1909            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1910            * result set.
1911            * </p>
1912            *
1913            * @param companyId the primary key of the company
1914            * @param classNameIds the primary keys of the class names of the entities
1915            the groups are related to (optionally <code>null</code>)
1916            * @param parentGroupId the primary key of the parent group
1917            * @param name the group's name (optionally <code>null</code>)
1918            * @param description the group's description (optionally
1919            <code>null</code>)
1920            * @param params the finder params (optionally <code>null</code>). To
1921            include a user's organizations, inherited organizations, and user
1922            groups in the search, add an entry with key
1923            &quot;usersGroups&quot; mapped to the user's ID and an entry with
1924            key &quot;inherit&quot; mapped to a non-<code>null</code> object.
1925            For more information see {@link
1926            com.liferay.portal.service.persistence.GroupFinder}
1927            * @param andOperator whether every field must match its keywords, or just
1928            one field.
1929            * @param start the lower bound of the range of groups to return
1930            * @param end the upper bound of the range of groups to return (not
1931            inclusive)
1932            * @return the matching groups ordered by name
1933            * @throws SystemException if a system exception occurred
1934            */
1935            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1936            public java.util.List<com.liferay.portal.model.Group> search(
1937                    long companyId, long[] classNameIds, long parentGroupId,
1938                    java.lang.String name, java.lang.String description,
1939                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1940                    boolean andOperator, int start, int end)
1941                    throws com.liferay.portal.kernel.exception.SystemException;
1942    
1943            /**
1944            * Returns an ordered range of all the groups belonging to the parent group
1945            * that match the class name IDs, name, and description, optionally
1946            * including the user's inherited organization groups and user groups.
1947            * System and staged groups are not included.
1948            *
1949            * <p>
1950            * Useful when paginating results. Returns a maximum of <code>end -
1951            * start</code> instances. <code>start</code> and <code>end</code> are not
1952            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1953            * refers to the first result in the set. Setting both <code>start</code>
1954            * and <code>end</code> to {@link
1955            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1956            * result set.
1957            * </p>
1958            *
1959            * @param companyId the primary key of the company
1960            * @param classNameIds the primary keys of the class names of the entities
1961            the groups are related to (optionally <code>null</code>)
1962            * @param parentGroupId the primary key of the parent group
1963            * @param name the group's name (optionally <code>null</code>)
1964            * @param description the group's description (optionally
1965            <code>null</code>)
1966            * @param params the finder params (optionally <code>null</code>). To
1967            include a user's organizations, inherited organizations, and user
1968            groups in the search, add an entry with key
1969            &quot;usersGroups&quot; mapped to the user's ID and an entry with
1970            key &quot;inherit&quot; mapped to a non-<code>null</code> object.
1971            For more information see {@link
1972            com.liferay.portal.service.persistence.GroupFinder}
1973            * @param andOperator whether every field must match its keywords, or just
1974            one field.
1975            * @param start the lower bound of the range of groups to return
1976            * @param end the upper bound of the range of groups to return (not
1977            inclusive)
1978            * @param obc the comparator to order the groups (optionally
1979            <code>null</code>)
1980            * @return the matching groups ordered by comparator <code>obc</code>
1981            * @throws SystemException if a system exception occurred
1982            */
1983            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1984            public java.util.List<com.liferay.portal.model.Group> search(
1985                    long companyId, long[] classNameIds, long parentGroupId,
1986                    java.lang.String name, java.lang.String description,
1987                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1988                    boolean andOperator, int start, int end,
1989                    com.liferay.portal.kernel.util.OrderByComparator obc)
1990                    throws com.liferay.portal.kernel.exception.SystemException;
1991    
1992            /**
1993            * Returns an ordered range of all the groups that match the class name IDs
1994            * and keywords, optionally including the user's inherited organization
1995            * groups and user groups. System and staged groups are not included.
1996            *
1997            * <p>
1998            * Useful when paginating results. Returns a maximum of <code>end -
1999            * start</code> instances. <code>start</code> and <code>end</code> are not
2000            * primary keys, they are indexes in the result set. Thus, <code>0</code>
2001            * refers to the first result in the set. Setting both <code>start</code>
2002            * and <code>end</code> to {@link
2003            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
2004            * result set.
2005            * </p>
2006            *
2007            * @param companyId the primary key of the company
2008            * @param classNameIds the primary keys of the class names of the entities
2009            the groups are related to (optionally <code>null</code>)
2010            * @param keywords the keywords (space separated), which may occur in the
2011            sites's name, or description (optionally <code>null</code>)
2012            * @param params the finder params (optionally <code>null</code>). To
2013            include a user's organizations, inherited organizations, and user
2014            groups in the search, add an entry with key
2015            &quot;usersGroups&quot; mapped to the user's ID and an entry with
2016            key &quot;inherit&quot; mapped to a non-<code>null</code> object.
2017            For more information see {@link
2018            com.liferay.portal.service.persistence.GroupFinder}
2019            * @param start the lower bound of the range of groups to return
2020            * @param end the upper bound of the range of groups to return (not
2021            inclusive)
2022            * @return the matching groups ordered by name
2023            * @throws SystemException if a system exception occurred
2024            */
2025            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2026            public java.util.List<com.liferay.portal.model.Group> search(
2027                    long companyId, long[] classNameIds, java.lang.String keywords,
2028                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2029                    int start, int end)
2030                    throws com.liferay.portal.kernel.exception.SystemException;
2031    
2032            /**
2033            * Returns an ordered range of all the groups that match the class name IDs
2034            * and keywords, optionally including the user's inherited organization
2035            * groups and user groups. System and staged groups are not included.
2036            *
2037            * <p>
2038            * Useful when paginating results. Returns a maximum of <code>end -
2039            * start</code> instances. <code>start</code> and <code>end</code> are not
2040            * primary keys, they are indexes in the result set. Thus, <code>0</code>
2041            * refers to the first result in the set. Setting both <code>start</code>
2042            * and <code>end</code> to {@link
2043            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
2044            * result set.
2045            * </p>
2046            *
2047            * @param companyId the primary key of the company
2048            * @param classNameIds the primary keys of the class names of the entities
2049            the groups are related to (optionally <code>null</code>)
2050            * @param keywords the keywords (space separated), which may occur in the
2051            sites's name, or description (optionally <code>null</code>)
2052            * @param params the finder params (optionally <code>null</code>). To
2053            include a user's organizations, inherited organizations, and user
2054            groups in the search, add an entry with key
2055            &quot;usersGroups&quot; mapped to the user's ID and an entry with
2056            key &quot;inherit&quot; mapped to a non-<code>null</code> object.
2057            For more information see {@link
2058            com.liferay.portal.service.persistence.GroupFinder}
2059            * @param start the lower bound of the range of groups to return
2060            * @param end the upper bound of the range of groups to return (not
2061            inclusive)
2062            * @param obc the comparator to order the groups (optionally
2063            <code>null</code>)
2064            * @return the matching groups ordered by comparator <code>obc</code>
2065            * @throws SystemException if a system exception occurred
2066            */
2067            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2068            public java.util.List<com.liferay.portal.model.Group> search(
2069                    long companyId, long[] classNameIds, java.lang.String keywords,
2070                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2071                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
2072                    throws com.liferay.portal.kernel.exception.SystemException;
2073    
2074            /**
2075            * Returns an ordered range of all the groups that match the class name IDs,
2076            * name, and description, optionally including the user's inherited
2077            * organization groups and user groups. System and staged groups are not
2078            * included.
2079            *
2080            * <p>
2081            * Useful when paginating results. Returns a maximum of <code>end -
2082            * start</code> instances. <code>start</code> and <code>end</code> are not
2083            * primary keys, they are indexes in the result set. Thus, <code>0</code>
2084            * refers to the first result in the set. Setting both <code>start</code>
2085            * and <code>end</code> to {@link
2086            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
2087            * result set.
2088            * </p>
2089            *
2090            * @param companyId the primary key of the company
2091            * @param classNameIds the primary keys of the class names of the entities
2092            the groups are related to (optionally <code>null</code>)
2093            * @param name the group's name (optionally <code>null</code>)
2094            * @param description the group's description (optionally
2095            <code>null</code>)
2096            * @param params the finder params (optionally <code>null</code>). To
2097            include a user's organizations, inherited organizations, and user
2098            groups in the search, add an entry with key
2099            &quot;usersGroups&quot; mapped to the user's ID and an entry with
2100            key &quot;inherit&quot; mapped to a non-<code>null</code> object.
2101            For more information see {@link
2102            com.liferay.portal.service.persistence.GroupFinder}
2103            * @param andOperator whether every field must match its keywords, or just
2104            one field.
2105            * @param start the lower bound of the range of groups to return
2106            * @param end the upper bound of the range of groups to return (not
2107            inclusive)
2108            * @return the matching groups ordered by name
2109            * @throws SystemException if a system exception occurred
2110            */
2111            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2112            public java.util.List<com.liferay.portal.model.Group> search(
2113                    long companyId, long[] classNameIds, java.lang.String name,
2114                    java.lang.String description,
2115                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2116                    boolean andOperator, int start, int end)
2117                    throws com.liferay.portal.kernel.exception.SystemException;
2118    
2119            /**
2120            * Returns an ordered range of all the groups that match the class name IDs,
2121            * name, and description, optionally including the user's inherited
2122            * organization groups and user groups. System and staged groups are not
2123            * included.
2124            *
2125            * <p>
2126            * Useful when paginating results. Returns a maximum of <code>end -
2127            * start</code> instances. <code>start</code> and <code>end</code> are not
2128            * primary keys, they are indexes in the result set. Thus, <code>0</code>
2129            * refers to the first result in the set. Setting both <code>start</code>
2130            * and <code>end</code> to {@link
2131            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
2132            * result set.
2133            * </p>
2134            *
2135            * @param companyId the primary key of the company
2136            * @param classNameIds the primary keys of the class names of the entities
2137            the groups are related to (optionally <code>null</code>)
2138            * @param name the group's name (optionally <code>null</code>)
2139            * @param description the group's description (optionally
2140            <code>null</code>)
2141            * @param params the finder params (optionally <code>null</code>). To
2142            include a user's organizations, inherited organizations, and user
2143            groups in the search, add an entry with key
2144            &quot;usersGroups&quot; mapped to the user's ID and an entry with
2145            key &quot;inherit&quot; mapped to a non-<code>null</code> object.
2146            For more information see {@link
2147            com.liferay.portal.service.persistence.GroupFinder}
2148            * @param andOperator whether every field must match its keywords, or just
2149            one field.
2150            * @param start the lower bound of the range of groups to return
2151            * @param end the upper bound of the range of groups to return (not
2152            inclusive)
2153            * @param obc the comparator to order the groups (optionally
2154            <code>null</code>)
2155            * @return the matching groups ordered by comparator <code>obc</code>
2156            * @throws SystemException if a system exception occurred
2157            */
2158            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2159            public java.util.List<com.liferay.portal.model.Group> search(
2160                    long companyId, long[] classNameIds, java.lang.String name,
2161                    java.lang.String description,
2162                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2163                    boolean andOperator, int start, int end,
2164                    com.liferay.portal.kernel.util.OrderByComparator obc)
2165                    throws com.liferay.portal.kernel.exception.SystemException;
2166    
2167            /**
2168            * Returns an ordered range of all the groups that match the keywords,
2169            * optionally including the user's inherited organization groups and user
2170            * groups. System and staged groups are not included.
2171            *
2172            * <p>
2173            * Useful when paginating results. Returns a maximum of <code>end -
2174            * start</code> instances. <code>start</code> and <code>end</code> are not
2175            * primary keys, they are indexes in the result set. Thus, <code>0</code>
2176            * refers to the first result in the set. Setting both <code>start</code>
2177            * and <code>end</code> to {@link
2178            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
2179            * result set.
2180            * </p>
2181            *
2182            * @param companyId the primary key of the company
2183            * @param keywords the keywords (space separated), which may occur in the
2184            sites's name, or description (optionally <code>null</code>)
2185            * @param params the finder params (optionally <code>null</code>). To
2186            include the user's inherited organizations and user groups in the
2187            search, add entries having &quot;usersGroups&quot; and
2188            &quot;inherit&quot; as keys mapped to the the user's ID. For more
2189            information see {@link
2190            com.liferay.portal.service.persistence.GroupFinder}
2191            * @param start the lower bound of the range of groups to return
2192            * @param end the upper bound of the range of groups to return (not
2193            inclusive)
2194            * @return the matching groups ordered by name
2195            * @throws SystemException if a system exception occurred
2196            */
2197            @com.liferay.portal.kernel.cache.ThreadLocalCachable
2198            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2199            public java.util.List<com.liferay.portal.model.Group> search(
2200                    long companyId, java.lang.String keywords,
2201                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2202                    int start, int end)
2203                    throws com.liferay.portal.kernel.exception.SystemException;
2204    
2205            /**
2206            * Returns an ordered range of all the groups that match the keywords,
2207            * optionally including the user's inherited organization groups and user
2208            * groups. System and staged groups are not included.
2209            *
2210            * <p>
2211            * Useful when paginating results. Returns a maximum of <code>end -
2212            * start</code> instances. <code>start</code> and <code>end</code> are not
2213            * primary keys, they are indexes in the result set. Thus, <code>0</code>
2214            * refers to the first result in the set. Setting both <code>start</code>
2215            * and <code>end</code> to {@link
2216            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
2217            * result set.
2218            * </p>
2219            *
2220            * @param companyId the primary key of the company
2221            * @param keywords the keywords (space separated), which may occur in the
2222            sites's name, or description (optionally <code>null</code>)
2223            * @param params the finder params (optionally <code>null</code>). To
2224            include the user's inherited organizations and user groups in the
2225            search, add entries having &quot;usersGroups&quot; and
2226            &quot;inherit&quot; as keys mapped to the the user's ID. For more
2227            information see {@link
2228            com.liferay.portal.service.persistence.GroupFinder}
2229            * @param start the lower bound of the range of groups to return
2230            * @param end the upper bound of the range of groups to return (not
2231            inclusive)
2232            * @param obc the comparator to order the groups (optionally
2233            <code>null</code>)
2234            * @return the matching groups ordered by comparator <code>obc</code>
2235            * @throws SystemException if a system exception occurred
2236            */
2237            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2238            public java.util.List<com.liferay.portal.model.Group> search(
2239                    long companyId, java.lang.String keywords,
2240                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2241                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
2242                    throws com.liferay.portal.kernel.exception.SystemException;
2243    
2244            /**
2245            * Returns an ordered range of all the site groups and organization groups
2246            * that match the name and description, optionally including the user's
2247            * inherited organization groups and user groups. System and staged groups
2248            * are not included.
2249            *
2250            * <p>
2251            * Useful when paginating results. Returns a maximum of <code>end -
2252            * start</code> instances. <code>start</code> and <code>end</code> are not
2253            * primary keys, they are indexes in the result set. Thus, <code>0</code>
2254            * refers to the first result in the set. Setting both <code>start</code>
2255            * and <code>end</code> to {@link
2256            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
2257            * result set.
2258            * </p>
2259            *
2260            * @param companyId the primary key of the company
2261            * @param name the group's name (optionally <code>null</code>)
2262            * @param description the group's description (optionally
2263            <code>null</code>)
2264            * @param params the finder params (optionally <code>null</code>). To
2265            include the user's inherited organizations and user groups in the
2266            search, add entries having &quot;usersGroups&quot; and
2267            &quot;inherit&quot; as keys mapped to the the user's ID. For more
2268            information see {@link
2269            com.liferay.portal.service.persistence.GroupFinder}
2270            * @param andOperator whether every field must match its keywords, or just
2271            one field.
2272            * @param start the lower bound of the range of groups to return
2273            * @param end the upper bound of the range of groups to return (not
2274            inclusive)
2275            * @return the matching groups ordered by name
2276            * @throws SystemException if a system exception occurred
2277            */
2278            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2279            public java.util.List<com.liferay.portal.model.Group> search(
2280                    long companyId, java.lang.String name, java.lang.String description,
2281                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2282                    boolean andOperator, int start, int end)
2283                    throws com.liferay.portal.kernel.exception.SystemException;
2284    
2285            /**
2286            * Returns an ordered range of all the site groups and organization groups
2287            * that match the name and description, optionally including the user's
2288            * inherited organization groups and user groups. System and staged groups
2289            * are not included.
2290            *
2291            * <p>
2292            * Useful when paginating results. Returns a maximum of <code>end -
2293            * start</code> instances. <code>start</code> and <code>end</code> are not
2294            * primary keys, they are indexes in the result set. Thus, <code>0</code>
2295            * refers to the first result in the set. Setting both <code>start</code>
2296            * and <code>end</code> to {@link
2297            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
2298            * result set.
2299            * </p>
2300            *
2301            * @param companyId the primary key of the company
2302            * @param name the group's name (optionally <code>null</code>)
2303            * @param description the group's description (optionally
2304            <code>null</code>)
2305            * @param params the finder params (optionally <code>null</code>). To
2306            include the user's inherited organizations and user groups in the
2307            search, add entries having &quot;usersGroups&quot; and
2308            &quot;inherit&quot; as keys mapped to the the user's ID. For more
2309            information see {@link
2310            com.liferay.portal.service.persistence.GroupFinder}
2311            * @param andOperator whether every field must match its keywords, or just
2312            one field.
2313            * @param start the lower bound of the range of groups to return
2314            * @param end the upper bound of the range of groups to return (not
2315            inclusive)
2316            * @param obc the comparator to order the groups (optionally
2317            <code>null</code>)
2318            * @return the matching groups ordered by comparator <code>obc</code>
2319            * @throws SystemException if a system exception occurred
2320            */
2321            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2322            public java.util.List<com.liferay.portal.model.Group> search(
2323                    long companyId, java.lang.String name, java.lang.String description,
2324                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2325                    boolean andOperator, int start, int end,
2326                    com.liferay.portal.kernel.util.OrderByComparator obc)
2327                    throws com.liferay.portal.kernel.exception.SystemException;
2328    
2329            /**
2330            * Returns the number of groups belonging to the parent group that match the
2331            * keywords, optionally including the user's inherited organization groups
2332            * and user groups. System and staged groups are not included.
2333            *
2334            * @param companyId the primary key of the company
2335            * @param parentGroupId the primary key of the parent group
2336            * @param keywords the keywords (space separated), which may occur in the
2337            sites's name, or description (optionally <code>null</code>)
2338            * @param params the finder params (optionally <code>null</code>). To
2339            include the user's inherited organization groups and user groups
2340            in the search, add entries having &quot;usersGroups&quot; and
2341            &quot;inherit&quot; as keys mapped to the the user's ID. For more
2342            information see {@link
2343            com.liferay.portal.service.persistence.GroupFinder}
2344            * @return the number of matching groups
2345            * @throws SystemException if a system exception occurred
2346            */
2347            @com.liferay.portal.kernel.cache.ThreadLocalCachable
2348            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2349            public int searchCount(long companyId, long parentGroupId,
2350                    java.lang.String keywords,
2351                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
2352                    throws com.liferay.portal.kernel.exception.SystemException;
2353    
2354            /**
2355            * Returns the number of groups belonging to the parent group and immediate
2356            * organization groups that match the name and description, optionally
2357            * including the user's inherited organization groups and user groups.
2358            * System and staged groups are not included.
2359            *
2360            * @param companyId the primary key of the company
2361            * @param parentGroupId the primary key of the parent group
2362            * @param name the group's name (optionally <code>null</code>)
2363            * @param description the group's description (optionally
2364            <code>null</code>)
2365            * @param params the finder params (optionally <code>null</code>). To
2366            include the user's inherited organization groups and user groups
2367            in the search, add entries having &quot;usersGroups&quot; and
2368            &quot;inherit&quot; as keys mapped to the the user's ID. For more
2369            information see {@link
2370            com.liferay.portal.service.persistence.GroupFinder}
2371            * @param andOperator whether every field must match its keywords, or just
2372            one field.
2373            * @return the number of matching groups
2374            * @throws SystemException if a system exception occurred
2375            */
2376            @com.liferay.portal.kernel.cache.ThreadLocalCachable
2377            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2378            public int searchCount(long companyId, long parentGroupId,
2379                    java.lang.String name, java.lang.String description,
2380                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2381                    boolean andOperator)
2382                    throws com.liferay.portal.kernel.exception.SystemException;
2383    
2384            /**
2385            * Returns the number of groups belonging to the parent group that match the
2386            * class name IDs, and keywords, optionally including the user's inherited
2387            * organization groups and user groups. System and staged groups are not
2388            * included.
2389            *
2390            * @param companyId the primary key of the company
2391            * @param classNameIds the primary keys of the class names of the entities
2392            the groups are related to (optionally <code>null</code>)
2393            * @param parentGroupId the primary key of the parent group
2394            * @param keywords the keywords (space separated), which may occur in the
2395            sites's name, or description (optionally <code>null</code>)
2396            * @param params the finder params (optionally <code>null</code>). To
2397            include the user's inherited organization groups and user groups
2398            in the search, add entries having &quot;usersGroups&quot; and
2399            &quot;inherit&quot; as keys mapped to the the user's ID. For more
2400            information see {@link
2401            com.liferay.portal.service.persistence.GroupFinder}
2402            * @return the number of matching groups
2403            * @throws SystemException if a system exception occurred
2404            */
2405            @com.liferay.portal.kernel.cache.ThreadLocalCachable
2406            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2407            public int searchCount(long companyId, long[] classNameIds,
2408                    long parentGroupId, java.lang.String keywords,
2409                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
2410                    throws com.liferay.portal.kernel.exception.SystemException;
2411    
2412            /**
2413            * Returns the number of groups belonging to the parent group that match the
2414            * class name IDs, name, and description, optionally including the user's
2415            * inherited organization groups and user groups. System and staged groups
2416            * are not included.
2417            *
2418            * @param companyId the primary key of the company
2419            * @param classNameIds the primary keys of the class names of the entities
2420            the groups are related to (optionally <code>null</code>)
2421            * @param parentGroupId the primary key of the parent group
2422            * @param name the group's name (optionally <code>null</code>)
2423            * @param description the group's description (optionally
2424            <code>null</code>)
2425            * @param params the finder params (optionally <code>null</code>). To
2426            include the user's inherited organization groups and user groups
2427            in the search, add entries having &quot;usersGroups&quot; and
2428            &quot;inherit&quot; as keys mapped to the the user's ID. For more
2429            information see {@link
2430            com.liferay.portal.service.persistence.GroupFinder}
2431            * @param andOperator whether every field must match its keywords, or just
2432            one field.
2433            * @return the number of matching groups
2434            * @throws SystemException if a system exception occurred
2435            */
2436            @com.liferay.portal.kernel.cache.ThreadLocalCachable
2437            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2438            public int searchCount(long companyId, long[] classNameIds,
2439                    long parentGroupId, java.lang.String name,
2440                    java.lang.String description,
2441                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2442                    boolean andOperator)
2443                    throws com.liferay.portal.kernel.exception.SystemException;
2444    
2445            /**
2446            * Returns the number of groups that match the class name IDs, and keywords,
2447            * optionally including the user's inherited organization groups and user
2448            * groups. System and staged groups are not included.
2449            *
2450            * @param companyId the primary key of the company
2451            * @param classNameIds the primary keys of the class names of the entities
2452            the groups are related to (optionally <code>null</code>)
2453            * @param keywords the keywords (space separated), which may occur in the
2454            sites's name, or description (optionally <code>null</code>)
2455            * @param params the finder params (optionally <code>null</code>). To
2456            include the user's inherited organization groups and user groups
2457            in the search, add entries having &quot;usersGroups&quot; and
2458            &quot;inherit&quot; as keys mapped to the the user's ID. For more
2459            information see {@link
2460            com.liferay.portal.service.persistence.GroupFinder}
2461            * @return the number of matching groups
2462            * @throws SystemException if a system exception occurred
2463            */
2464            @com.liferay.portal.kernel.cache.ThreadLocalCachable
2465            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2466            public int searchCount(long companyId, long[] classNameIds,
2467                    java.lang.String keywords,
2468                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
2469                    throws com.liferay.portal.kernel.exception.SystemException;
2470    
2471            /**
2472            * Returns the number of groups that match the class name IDs, name, and
2473            * description, optionally including the user's inherited organization
2474            * groups and user groups. System and staged groups are not included.
2475            *
2476            * @param companyId the primary key of the company
2477            * @param classNameIds the primary keys of the class names of the entities
2478            the groups are related to (optionally <code>null</code>)
2479            * @param name the group's name (optionally <code>null</code>)
2480            * @param description the group's description (optionally
2481            <code>null</code>)
2482            * @param params the finder params (optionally <code>null</code>). To
2483            include the user's inherited organization groups and user groups
2484            in the search, add entries having &quot;usersGroups&quot; and
2485            &quot;inherit&quot; as keys mapped to the the user's ID. For more
2486            information see {@link
2487            com.liferay.portal.service.persistence.GroupFinder}
2488            * @param andOperator whether every field must match its keywords, or just
2489            one field.
2490            * @return the number of matching groups
2491            * @throws SystemException if a system exception occurred
2492            */
2493            @com.liferay.portal.kernel.cache.ThreadLocalCachable
2494            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2495            public int searchCount(long companyId, long[] classNameIds,
2496                    java.lang.String name, java.lang.String description,
2497                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2498                    boolean andOperator)
2499                    throws com.liferay.portal.kernel.exception.SystemException;
2500    
2501            /**
2502            * Returns the number of groups that match the keywords, optionally
2503            * including the user's inherited organization groups and user groups.
2504            * System and staged groups are not included.
2505            *
2506            * @param companyId the primary key of the company
2507            * @param keywords the keywords (space separated), which may occur in the
2508            sites's name, or description (optionally <code>null</code>)
2509            * @param params the finder params (optionally <code>null</code>). To
2510            include the user's inherited organization groups and user groups
2511            in the search, add entries having &quot;usersGroups&quot; and
2512            &quot;inherit&quot; as keys mapped to the the user's ID. For more
2513            information see {@link
2514            com.liferay.portal.service.persistence.GroupFinder}
2515            * @return the number of matching groups
2516            * @throws SystemException if a system exception occurred
2517            */
2518            @com.liferay.portal.kernel.cache.ThreadLocalCachable
2519            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2520            public int searchCount(long companyId, java.lang.String keywords,
2521                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
2522                    throws com.liferay.portal.kernel.exception.SystemException;
2523    
2524            /**
2525            * Returns the number of groups and immediate organization groups that match
2526            * the name and description, optionally including the user's inherited
2527            * organization groups and user groups. System and staged groups are not
2528            * included.
2529            *
2530            * @param companyId the primary key of the company
2531            * @param name the group's name (optionally <code>null</code>)
2532            * @param description the group's description (optionally
2533            <code>null</code>)
2534            * @param params the finder params (optionally <code>null</code>). To
2535            include the user's inherited organization groups and user groups
2536            in the search, add entries having &quot;usersGroups&quot; and
2537            &quot;inherit&quot; as keys mapped to the the user's ID. For more
2538            information see {@link
2539            com.liferay.portal.service.persistence.GroupFinder}
2540            * @param andOperator whether every field must match its keywords, or just
2541            one field.
2542            * @return the number of matching groups
2543            * @throws SystemException if a system exception occurred
2544            */
2545            @com.liferay.portal.kernel.cache.ThreadLocalCachable
2546            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2547            public int searchCount(long companyId, java.lang.String name,
2548                    java.lang.String description,
2549                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2550                    boolean andOperator)
2551                    throws com.liferay.portal.kernel.exception.SystemException;
2552    
2553            /**
2554            * Removes the groups from the role.
2555            *
2556            * @param roleId the primary key of the role
2557            * @param groupIds the primary keys of the groups
2558            * @throws SystemException if a system exception occurred
2559            */
2560            public void unsetRoleGroups(long roleId, long[] groupIds)
2561                    throws com.liferay.portal.kernel.exception.SystemException;
2562    
2563            /**
2564            * Removes the user from the groups.
2565            *
2566            * @param userId the primary key of the user
2567            * @param groupIds the primary keys of the groups
2568            * @throws SystemException if a system exception occurred
2569            */
2570            public void unsetUserGroups(long userId, long[] groupIds)
2571                    throws com.liferay.portal.kernel.exception.SystemException;
2572    
2573            /**
2574            * Updates the group's asset replacing categories and tag names.
2575            *
2576            * @param userId the primary key of the user
2577            * @param group the group
2578            * @param assetCategoryIds the primary keys of the asset categories
2579            (optionally <code>null</code>)
2580            * @param assetTagNames the asset tag names (optionally <code>null</code>)
2581            * @throws PortalException if a user with the primary key could not be found
2582            * @throws SystemException if a system exception occurred
2583            */
2584            public void updateAsset(long userId, com.liferay.portal.model.Group group,
2585                    long[] assetCategoryIds, java.lang.String[] assetTagNames)
2586                    throws com.liferay.portal.kernel.exception.PortalException,
2587                            com.liferay.portal.kernel.exception.SystemException;
2588    
2589            /**
2590            * Updates the group's friendly URL.
2591            *
2592            * @param groupId the primary key of the group
2593            * @param friendlyURL the group's new friendlyURL (optionally
2594            <code>null</code>)
2595            * @return the group
2596            * @throws PortalException if a group with the primary key could not be
2597            found or if a valid friendly URL could not be created for the
2598            group
2599            * @throws SystemException if a system exception occurred
2600            */
2601            public com.liferay.portal.model.Group updateFriendlyURL(long groupId,
2602                    java.lang.String friendlyURL)
2603                    throws com.liferay.portal.kernel.exception.PortalException,
2604                            com.liferay.portal.kernel.exception.SystemException;
2605    
2606            /**
2607            * Updates the group.
2608            *
2609            * @param groupId the primary key of the group
2610            * @param parentGroupId the primary key of the parent group
2611            * @param name the group's new name
2612            * @param description the group's new description (optionally
2613            <code>null</code>)
2614            * @param type the group's new type. For more information see {@link
2615            com.liferay.portal.model.GroupConstants}
2616            * @param friendlyURL the group's new friendlyURL (optionally
2617            <code>null</code>)
2618            * @param active whether the group is active
2619            * @param serviceContext the service context to be applied (optionally
2620            <code>null</code>). Can set asset category IDs and asset tag
2621            names for the group.
2622            * @return the group
2623            * @throws PortalException if a group with the primary key could not be
2624            found or if the friendly URL was invalid or could one not be
2625            created
2626            * @throws SystemException if a system exception occurred
2627            */
2628            public com.liferay.portal.model.Group updateGroup(long groupId,
2629                    long parentGroupId, java.lang.String name,
2630                    java.lang.String description, int type, boolean manualMembership,
2631                    int membershipRestriction, java.lang.String friendlyURL,
2632                    boolean active, com.liferay.portal.service.ServiceContext serviceContext)
2633                    throws com.liferay.portal.kernel.exception.PortalException,
2634                            com.liferay.portal.kernel.exception.SystemException;
2635    
2636            /**
2637            * Updates the group's type settings.
2638            *
2639            * @param groupId the primary key of the group
2640            * @param typeSettings the group's new type settings (optionally
2641            <code>null</code>)
2642            * @return the group
2643            * @throws PortalException if a group with the primary key could not be
2644            found
2645            * @throws SystemException if a system exception occurred
2646            */
2647            public com.liferay.portal.model.Group updateGroup(long groupId,
2648                    java.lang.String typeSettings)
2649                    throws com.liferay.portal.kernel.exception.PortalException,
2650                            com.liferay.portal.kernel.exception.SystemException;
2651    
2652            /**
2653            * Associates the group with a main site if the group is an organization.
2654            *
2655            * @param groupId the primary key of the group
2656            * @param site whether the group is to be associated with a main site
2657            * @return the group
2658            * @throws PortalException if a group with the primary key could not be
2659            found
2660            * @throws SystemException if a system exception occurred
2661            */
2662            public com.liferay.portal.model.Group updateSite(long groupId, boolean site)
2663                    throws com.liferay.portal.kernel.exception.PortalException,
2664                            com.liferay.portal.kernel.exception.SystemException;
2665    }