001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
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            */
055            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
056            public com.liferay.portal.model.Group addGroup(
057                    com.liferay.portal.model.Group group);
058    
059            /**
060            * Adds a group.
061            *
062            * @param userId the primary key of the group's creator/owner
063            * @param parentGroupId the primary key of the parent group
064            * @param className the entity's class name
065            * @param classPK the primary key of the entity's instance
066            * @param liveGroupId the primary key of the live group
067            * @param name the entity's name
068            * @param description the group's description (optionally
069            <code>null</code>)
070            * @param type the group's type. For more information see {@link
071            GroupConstants}.
072            * @param manualMembership whether manual membership is allowed for the
073            group
074            * @param membershipRestriction the group's membership restriction. For
075            more information see {@link GroupConstants}.
076            * @param friendlyURL the group's friendlyURL (optionally
077            <code>null</code>)
078            * @param site whether the group is to be associated with a main site
079            * @param active whether the group is active
080            * @param serviceContext the service context to be applied (optionally
081            <code>null</code>). Can set asset category IDs and asset tag
082            names for the group, and whether the group is for staging.
083            * @return the group
084            * @throws PortalException if a portal exception occured
085            * @deprecated As of 7.0.0, replaced by {@link #addGroup(long, long, String,
086            long, long, Map, Map, int, boolean, int, String, boolean,
087            boolean, ServiceContext)}
088            */
089            @java.lang.Deprecated
090            public com.liferay.portal.model.Group addGroup(long userId,
091                    long parentGroupId, java.lang.String className, long classPK,
092                    long liveGroupId, java.lang.String name, java.lang.String description,
093                    int type, boolean manualMembership, int membershipRestriction,
094                    java.lang.String friendlyURL, boolean site, boolean active,
095                    com.liferay.portal.service.ServiceContext serviceContext)
096                    throws PortalException;
097    
098            public com.liferay.portal.model.Group addGroup(long userId,
099                    long parentGroupId, java.lang.String className, long classPK,
100                    long liveGroupId,
101                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
102                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
103                    int type, boolean manualMembership, int membershipRestriction,
104                    java.lang.String friendlyURL, boolean site, boolean active,
105                    com.liferay.portal.service.ServiceContext serviceContext)
106                    throws PortalException;
107    
108            public com.liferay.portal.model.Group addGroup(long userId,
109                    long parentGroupId, java.lang.String className, long classPK,
110                    long liveGroupId,
111                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
112                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
113                    int type, boolean manualMembership, int membershipRestriction,
114                    java.lang.String friendlyURL, boolean site, boolean inheritContent,
115                    boolean active, com.liferay.portal.service.ServiceContext serviceContext)
116                    throws PortalException;
117    
118            public void addOrganizationGroup(long organizationId,
119                    com.liferay.portal.model.Group group);
120    
121            public void addOrganizationGroup(long organizationId, long groupId);
122    
123            public void addOrganizationGroups(long organizationId,
124                    java.util.List<com.liferay.portal.model.Group> Groups);
125    
126            public void addOrganizationGroups(long organizationId, long[] groupIds);
127    
128            public void addRoleGroup(long roleId, com.liferay.portal.model.Group group);
129    
130            public void addRoleGroup(long roleId, long groupId);
131    
132            public void addRoleGroups(long roleId,
133                    java.util.List<com.liferay.portal.model.Group> Groups);
134    
135            public void addRoleGroups(long roleId, long[] groupIds);
136    
137            public void addUserGroup(long userId, com.liferay.portal.model.Group group);
138    
139            public void addUserGroup(long userId, long groupId);
140    
141            public void addUserGroupGroup(long userGroupId,
142                    com.liferay.portal.model.Group group);
143    
144            public void addUserGroupGroup(long userGroupId, long groupId);
145    
146            public void addUserGroupGroups(long userGroupId,
147                    java.util.List<com.liferay.portal.model.Group> Groups);
148    
149            public void addUserGroupGroups(long userGroupId, long[] groupIds);
150    
151            public void addUserGroups(long userId,
152                    java.util.List<com.liferay.portal.model.Group> Groups);
153    
154            public void addUserGroups(long userId, long[] groupIds);
155    
156            /**
157            * Adds a company group if it does not exist. This method is typically used
158            * when a virtual host is added.
159            *
160            * @param companyId the primary key of the company
161            * @throws PortalException if a portal exception occurred
162            */
163            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
164            public void checkCompanyGroup(long companyId) throws PortalException;
165    
166            /**
167            * Creates systems groups and other related data needed by the system on the
168            * very first startup. Also takes care of creating the Control Panel groups
169            * and layouts.
170            *
171            * @param companyId the primary key of the company
172            * @throws PortalException if a portal exception occurred
173            */
174            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
175            public void checkSystemGroups(long companyId) throws PortalException;
176    
177            public void clearOrganizationGroups(long organizationId);
178    
179            public void clearRoleGroups(long roleId);
180    
181            public void clearUserGroupGroups(long userGroupId);
182    
183            public void clearUserGroups(long userId);
184    
185            /**
186            * Creates a new group with the primary key. Does not add the group to the database.
187            *
188            * @param groupId the primary key for the new group
189            * @return the new group
190            */
191            public com.liferay.portal.model.Group createGroup(long groupId);
192    
193            /**
194            * Deletes the group from the database. Also notifies the appropriate model listeners.
195            *
196            * @param group the group
197            * @return the group that was removed
198            * @throws PortalException
199            */
200            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
201            public com.liferay.portal.model.Group deleteGroup(
202                    com.liferay.portal.model.Group group) throws PortalException;
203    
204            /**
205            * Deletes the group with the primary key from the database. Also notifies the appropriate model listeners.
206            *
207            * @param groupId the primary key of the group
208            * @return the group that was removed
209            * @throws PortalException if a group with the primary key could not be found
210            */
211            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
212            public com.liferay.portal.model.Group deleteGroup(long groupId)
213                    throws PortalException;
214    
215            public void deleteOrganizationGroup(long organizationId,
216                    com.liferay.portal.model.Group group);
217    
218            public void deleteOrganizationGroup(long organizationId, long groupId);
219    
220            public void deleteOrganizationGroups(long organizationId,
221                    java.util.List<com.liferay.portal.model.Group> Groups);
222    
223            public void deleteOrganizationGroups(long organizationId, long[] groupIds);
224    
225            /**
226            * @throws PortalException
227            */
228            @Override
229            public com.liferay.portal.model.PersistedModel deletePersistedModel(
230                    com.liferay.portal.model.PersistedModel persistedModel)
231                    throws PortalException;
232    
233            public void deleteRoleGroup(long roleId,
234                    com.liferay.portal.model.Group group);
235    
236            public void deleteRoleGroup(long roleId, long groupId);
237    
238            public void deleteRoleGroups(long roleId,
239                    java.util.List<com.liferay.portal.model.Group> Groups);
240    
241            public void deleteRoleGroups(long roleId, long[] groupIds);
242    
243            public void deleteUserGroup(long userId,
244                    com.liferay.portal.model.Group group);
245    
246            public void deleteUserGroup(long userId, long groupId);
247    
248            public void deleteUserGroupGroup(long userGroupId,
249                    com.liferay.portal.model.Group group);
250    
251            public void deleteUserGroupGroup(long userGroupId, long groupId);
252    
253            public void deleteUserGroupGroups(long userGroupId,
254                    java.util.List<com.liferay.portal.model.Group> Groups);
255    
256            public void deleteUserGroupGroups(long userGroupId, long[] groupIds);
257    
258            public void deleteUserGroups(long userId,
259                    java.util.List<com.liferay.portal.model.Group> Groups);
260    
261            public void deleteUserGroups(long userId, long[] groupIds);
262    
263            public void disableStaging(long groupId) throws PortalException;
264    
265            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
266    
267            /**
268            * Performs a dynamic query on the database and returns the matching rows.
269            *
270            * @param dynamicQuery the dynamic query
271            * @return the matching rows
272            */
273            public <T> java.util.List<T> dynamicQuery(
274                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
275    
276            /**
277            * Performs a dynamic query on the database and returns a range of the matching rows.
278            *
279            * <p>
280            * 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.
281            * </p>
282            *
283            * @param dynamicQuery the dynamic query
284            * @param start the lower bound of the range of model instances
285            * @param end the upper bound of the range of model instances (not inclusive)
286            * @return the range of matching rows
287            */
288            public <T> java.util.List<T> dynamicQuery(
289                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
290                    int end);
291    
292            /**
293            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
294            *
295            * <p>
296            * 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.
297            * </p>
298            *
299            * @param dynamicQuery the dynamic query
300            * @param start the lower bound of the range of model instances
301            * @param end the upper bound of the range of model instances (not inclusive)
302            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
303            * @return the ordered range of matching rows
304            */
305            public <T> java.util.List<T> dynamicQuery(
306                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
307                    int end,
308                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
309    
310            /**
311            * Returns the number of rows matching the dynamic query.
312            *
313            * @param dynamicQuery the dynamic query
314            * @return the number of rows matching the dynamic query
315            */
316            public long dynamicQueryCount(
317                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
318    
319            /**
320            * Returns the number of rows matching the dynamic query.
321            *
322            * @param dynamicQuery the dynamic query
323            * @param projection the projection to apply to the query
324            * @return the number of rows matching the dynamic query
325            */
326            public long dynamicQueryCount(
327                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
328                    com.liferay.portal.kernel.dao.orm.Projection projection);
329    
330            public void enableStaging(long groupId) throws PortalException;
331    
332            /**
333            * Returns the company's group.
334            *
335            * @param companyId the primary key of the company
336            * @return the company's group, or <code>null</code> if a matching group
337            could not be found
338            */
339            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
340            public com.liferay.portal.model.Group fetchCompanyGroup(long companyId);
341    
342            /**
343            * Returns the group with the matching friendly URL.
344            *
345            * @param companyId the primary key of the company
346            * @param friendlyURL the friendly URL
347            * @return the group with the friendly URL, or <code>null</code> if a
348            matching group could not be found
349            */
350            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
351            public com.liferay.portal.model.Group fetchFriendlyURLGroup(
352                    long companyId, java.lang.String friendlyURL);
353    
354            /**
355            * Returns the group with the matching group key by first searching the
356            * system groups and then using the finder cache.
357            *
358            * @param companyId the primary key of the company
359            * @param groupKey the group key
360            * @return the group with the group key and associated company, or
361            <code>null</code> if a matching group could not be found
362            */
363            @com.liferay.portal.kernel.spring.aop.Skip
364            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
365            public com.liferay.portal.model.Group fetchGroup(long companyId,
366                    java.lang.String groupKey);
367    
368            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
369            public com.liferay.portal.model.Group fetchGroup(long groupId);
370    
371            /**
372            * Returns the group with the matching UUID and company.
373            *
374            * @param uuid the group's UUID
375            * @param companyId the primary key of the company
376            * @return the matching group, or <code>null</code> if a matching group could not be found
377            */
378            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
379            public com.liferay.portal.model.Group fetchGroupByUuidAndCompanyId(
380                    java.lang.String uuid, long companyId);
381    
382            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
383            public com.liferay.portal.model.Group fetchUserGroup(long companyId,
384                    long userId);
385    
386            /**
387            * Returns the default user's personal site group.
388            *
389            * @param companyId the primary key of the company
390            * @return the default user's personal site group, or <code>null</code> if a
391            matching group could not be found
392            * @throws PortalException if a portal exception occurred
393            */
394            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
395            public com.liferay.portal.model.Group fetchUserPersonalSiteGroup(
396                    long companyId) throws PortalException;
397    
398            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
399            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
400    
401            /**
402            * Returns all the active or inactive groups associated with the company.
403            *
404            * @param companyId the primary key of the company
405            * @param active whether to return only active groups, or only inactive
406            groups
407            * @return the active or inactive groups associated with the company
408            */
409            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
410            public java.util.List<com.liferay.portal.model.Group> getActiveGroups(
411                    long companyId, boolean active);
412    
413            /**
414            * Returns the company group.
415            *
416            * @param companyId the primary key of the company
417            * @return the group associated with the company
418            * @throws PortalException if a portal exception occurred
419            */
420            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
421            public com.liferay.portal.model.Group getCompanyGroup(long companyId)
422                    throws PortalException;
423    
424            /**
425            * Returns a range of all the groups associated with the company.
426            *
427            * <p>
428            * Useful when paginating results. Returns a maximum of <code>end -
429            * start</code> instances. <code>start</code> and <code>end</code> are not
430            * primary keys, they are indexes in the result set. Thus, <code>0</code>
431            * refers to the first result in the set. Setting both <code>start</code>
432            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
433            * result set.
434            * </p>
435            *
436            * @param companyId the primary key of the company
437            * @param start the lower bound of the range of groups to return
438            * @param end the upper bound of the range of groups to return (not
439            inclusive)
440            * @return the range of groups associated with the company
441            */
442            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
443            public java.util.List<com.liferay.portal.model.Group> getCompanyGroups(
444                    long companyId, int start, int end);
445    
446            /**
447            * Returns the number of groups associated with the company.
448            *
449            * @param companyId the primary key of the company
450            * @return the number of groups associated with the company
451            */
452            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
453            public int getCompanyGroupsCount(long companyId);
454    
455            /**
456            * Returns the group with the matching friendly URL.
457            *
458            * @param companyId the primary key of the company
459            * @param friendlyURL the group's friendlyURL
460            * @return the group with the friendly URL
461            * @throws PortalException if a portal exception occurred
462            */
463            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
464            public com.liferay.portal.model.Group getFriendlyURLGroup(long companyId,
465                    java.lang.String friendlyURL) throws PortalException;
466    
467            /**
468            * Returns the group with the matching group key.
469            *
470            * @param companyId the primary key of the company
471            * @param groupKey the group key
472            * @return the group with the group key
473            * @throws PortalException if a portal exception occurred
474            */
475            @com.liferay.portal.kernel.spring.aop.Skip
476            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
477            public com.liferay.portal.model.Group getGroup(long companyId,
478                    java.lang.String groupKey) throws PortalException;
479    
480            /**
481            * Returns the group with the primary key.
482            *
483            * @param groupId the primary key of the group
484            * @return the group
485            * @throws PortalException if a group with the primary key could not be found
486            */
487            @com.liferay.portal.kernel.cache.thread.local.ThreadLocalCachable
488            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
489            public com.liferay.portal.model.Group getGroup(long groupId)
490                    throws PortalException;
491    
492            /**
493            * Returns the group with the matching UUID and company.
494            *
495            * @param uuid the group's UUID
496            * @param companyId the primary key of the company
497            * @return the matching group
498            * @throws PortalException if a matching group could not be found
499            */
500            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
501            public com.liferay.portal.model.Group getGroupByUuidAndCompanyId(
502                    java.lang.String uuid, long companyId) throws PortalException;
503    
504            /**
505            * @deprecated As of 7.0.0, replaced by {@link
506            Group#getDescriptiveName(Locale)}
507            */
508            @java.lang.Deprecated
509            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
510            public java.lang.String getGroupDescriptiveName(
511                    com.liferay.portal.model.Group group, java.util.Locale locale)
512                    throws PortalException;
513    
514            /**
515            * @deprecated As of 7.0.0, replaced by {@link
516            Group#getDescriptiveName(Locale)}
517            */
518            @java.lang.Deprecated
519            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
520            public java.lang.String getGroupDescriptiveName(long groupId,
521                    java.util.Locale locale) throws PortalException;
522    
523            /**
524            * Returns all the groups that are direct children of the parent group with
525            * the matching className.
526            *
527            * @param companyId the primary key of the company
528            * @param className the class name of the group
529            * @param parentGroupId the primary key of the parent group
530            * @return the matching groups, or <code>null</code> if no matches were
531            found
532            */
533            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
534            public java.util.List<com.liferay.portal.model.Group> getGroups(
535                    long companyId, java.lang.String className, long parentGroupId);
536    
537            /**
538            * Returns a range of all the groups that are direct children of the parent
539            * group with the matching className.
540            *
541            * @param companyId the primary key of the company
542            * @param className the class name of the group
543            * @param parentGroupId the primary key of the parent group
544            * @param start the lower bound of the range of results
545            * @param end the upper bound of the range of results (not inclusive)
546            * @return the range of matching groups
547            */
548            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
549            public java.util.List<com.liferay.portal.model.Group> getGroups(
550                    long companyId, java.lang.String className, long parentGroupId,
551                    int start, int end);
552    
553            /**
554            * Returns all the groups that are direct children of the parent group.
555            *
556            * @param companyId the primary key of the company
557            * @param parentGroupId the primary key of the parent group
558            * @param site whether the group is to be associated with a main site
559            * @return the matching groups, or <code>null</code> if no matches were
560            found
561            */
562            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
563            public java.util.List<com.liferay.portal.model.Group> getGroups(
564                    long companyId, long parentGroupId, boolean site);
565    
566            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
567            public java.util.List<com.liferay.portal.model.Group> getGroups(
568                    long companyId, long parentGroupId, boolean site, boolean inheritContent);
569    
570            /**
571            * Returns the groups with the matching primary keys.
572            *
573            * @param groupIds the primary keys of the groups
574            * @return the groups with the primary keys
575            * @throws PortalException if a portal exception occurred
576            */
577            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
578            public java.util.List<com.liferay.portal.model.Group> getGroups(
579                    long[] groupIds) throws PortalException;
580    
581            /**
582            * Returns a range of all the groups.
583            *
584            * <p>
585            * 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.
586            * </p>
587            *
588            * @param start the lower bound of the range of groups
589            * @param end the upper bound of the range of groups (not inclusive)
590            * @return the range of groups
591            */
592            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
593            public java.util.List<com.liferay.portal.model.Group> getGroups(int start,
594                    int end);
595    
596            /**
597            * Returns the number of groups.
598            *
599            * @return the number of groups
600            */
601            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
602            public int getGroupsCount();
603    
604            /**
605            * Returns the number of groups that are direct children of the parent group
606            * with the matching className.
607            *
608            * @param companyId the primary key of the company
609            * @param className the class name of the group
610            * @param parentGroupId the primary key of the parent group
611            * @return the number of matching groups
612            */
613            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
614            public int getGroupsCount(long companyId, java.lang.String className,
615                    long parentGroupId);
616    
617            /**
618            * Returns the number of groups that are direct children of the parent
619            * group.
620            *
621            * @param companyId the primary key of the company
622            * @param parentGroupId the primary key of the parent group
623            * @param site whether the group is to be associated with a main site
624            * @return the number of matching groups
625            */
626            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
627            public int getGroupsCount(long companyId, long parentGroupId, boolean site);
628    
629            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
630            public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
631    
632            /**
633            * Returns the group associated with the layout.
634            *
635            * @param companyId the primary key of the company
636            * @param plid the primary key of the layout
637            * @return the group associated with the layout
638            * @throws PortalException if a portal exception occurred
639            */
640            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
641            public com.liferay.portal.model.Group getLayoutGroup(long companyId,
642                    long plid) throws PortalException;
643    
644            /**
645            * Returns the group associated with the layout prototype.
646            *
647            * @param companyId the primary key of the company
648            * @param layoutPrototypeId the primary key of the layout prototype
649            * @return the group associated with the layout prototype
650            * @throws PortalException if a portal exception occurred
651            */
652            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
653            public com.liferay.portal.model.Group getLayoutPrototypeGroup(
654                    long companyId, long layoutPrototypeId) throws PortalException;
655    
656            /**
657            * Returns the group associated with the layout set prototype.
658            *
659            * @param companyId the primary key of the company
660            * @param layoutSetPrototypeId the primary key of the layout set prototype
661            * @return the group associated with the layout set prototype
662            * @throws PortalException if a portal exception occurred
663            */
664            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
665            public com.liferay.portal.model.Group getLayoutSetPrototypeGroup(
666                    long companyId, long layoutSetPrototypeId) throws PortalException;
667    
668            /**
669            * Returns a range of all groups that are children of the parent group and
670            * that have at least one layout.
671            *
672            * <p>
673            * Useful when paginating results. Returns a maximum of <code>end -
674            * start</code> instances. <code>start</code> and <code>end</code> are not
675            * primary keys, they are indexes in the result set. Thus, <code>0</code>
676            * refers to the first result in the set. Setting both <code>start</code>
677            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
678            * result set.
679            * </p>
680            *
681            * @param companyId the primary key of the company
682            * @param parentGroupId the primary key of the parent group
683            * @param site whether the group is to be associated with a main site
684            * @param start the lower bound of the range of groups to return
685            * @param end the upper bound of the range of groups to return (not
686            inclusive)
687            * @param obc the comparator to order the groups (optionally
688            <code>null</code>)
689            * @return the range of matching groups ordered by comparator
690            <code>obc</code>
691            */
692            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
693            public java.util.List<com.liferay.portal.model.Group> getLayoutsGroups(
694                    long companyId, long parentGroupId, boolean site, int start, int end,
695                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> obc);
696    
697            /**
698            * Returns the number of groups that are children or the parent group and
699            * that have at least one layout
700            *
701            * @param companyId the primary key of the company
702            * @param parentGroupId the primary key of the parent group
703            * @param site whether the group is to be associated with a main site
704            * @return the number of matching groups
705            */
706            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
707            public int getLayoutsGroupsCount(long companyId, long parentGroupId,
708                    boolean site);
709    
710            /**
711            * Returns all live groups.
712            *
713            * @return all live groups
714            */
715            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
716            public java.util.List<com.liferay.portal.model.Group> getLiveGroups();
717    
718            /**
719            * Returns a range of all non-system groups of a specified type (className)
720            * that have no layouts.
721            *
722            * <p>
723            * Useful when paginating results. Returns a maximum of <code>end -
724            * start</code> instances. <code>start</code> and <code>end</code> are not
725            * primary keys, they are indexes in the result set. Thus, <code>0</code>
726            * refers to the first result in the set. Setting both <code>start</code>
727            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
728            * result set.
729            * </p>
730            *
731            * @param className the entity's class name
732            * @param privateLayout whether to include groups with private layout sets
733            or non-private layout sets
734            * @param start the lower bound of the range of groups to return
735            * @param end the upper bound of the range of groups to return (not
736            inclusive)
737            * @return the range of matching groups
738            */
739            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
740            public java.util.List<com.liferay.portal.model.Group> getNoLayoutsGroups(
741                    java.lang.String className, boolean privateLayout, int start, int end);
742    
743            /**
744            * Returns all non-system groups having <code>null</code> or empty friendly
745            * URLs.
746            *
747            * @return the non-system groups having <code>null</code> or empty friendly
748            URLs
749            */
750            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
751            public java.util.List<com.liferay.portal.model.Group> getNullFriendlyURLGroups();
752    
753            /**
754            * Returns the OSGi service identifier.
755            *
756            * @return the OSGi service identifier
757            */
758            public java.lang.String getOSGiServiceIdentifier();
759    
760            /**
761            * Returns the specified organization group.
762            *
763            * @param companyId the primary key of the company
764            * @param organizationId the primary key of the organization
765            * @return the group associated with the organization
766            * @throws PortalException if a portal exception occurred
767            */
768            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
769            public com.liferay.portal.model.Group getOrganizationGroup(long companyId,
770                    long organizationId) throws PortalException;
771    
772            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
773            public java.util.List<com.liferay.portal.model.Group> getOrganizationGroups(
774                    long organizationId);
775    
776            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
777            public java.util.List<com.liferay.portal.model.Group> getOrganizationGroups(
778                    long organizationId, int start, int end);
779    
780            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
781            public java.util.List<com.liferay.portal.model.Group> getOrganizationGroups(
782                    long organizationId, int start, int end,
783                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> orderByComparator);
784    
785            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
786            public int getOrganizationGroupsCount(long organizationId);
787    
788            /**
789            * Returns the organizationIds of the organizations associated with the group.
790            *
791            * @param groupId the groupId of the group
792            * @return long[] the organizationIds of organizations associated with the group
793            */
794            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
795            public long[] getOrganizationPrimaryKeys(long groupId);
796    
797            /**
798            * Returns the specified organization groups.
799            *
800            * @param organizations the organizations
801            * @return the groups associated with the organizations
802            */
803            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
804            public java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups(
805                    java.util.List<com.liferay.portal.model.Organization> organizations);
806    
807            /**
808            * Returns all the groups related to the organizations.
809            *
810            * @param organizations the organizations
811            * @return the groups related to the organizations
812            */
813            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
814            public java.util.List<com.liferay.portal.model.Group> getOrganizationsRelatedGroups(
815                    java.util.List<com.liferay.portal.model.Organization> organizations);
816    
817            /**
818            * Returns the group followed by all its parent groups ordered by closest
819            * ancestor.
820            *
821            * @param groupId the primary key of the group
822            * @return the group followed by all its parent groups ordered by closest
823            ancestor
824            * @throws PortalException if a portal exception occurred
825            */
826            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
827            public java.util.List<com.liferay.portal.model.Group> getParentGroups(
828                    long groupId) throws PortalException;
829    
830            @Override
831            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
832            public com.liferay.portal.model.PersistedModel getPersistedModel(
833                    java.io.Serializable primaryKeyObj) throws PortalException;
834    
835            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
836            public java.util.List<com.liferay.portal.model.Group> getRoleGroups(
837                    long roleId);
838    
839            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
840            public java.util.List<com.liferay.portal.model.Group> getRoleGroups(
841                    long roleId, int start, int end);
842    
843            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
844            public java.util.List<com.liferay.portal.model.Group> getRoleGroups(
845                    long roleId, int start, int end,
846                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> orderByComparator);
847    
848            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
849            public int getRoleGroupsCount(long roleId);
850    
851            /**
852            * Returns the roleIds of the roles associated with the group.
853            *
854            * @param groupId the groupId of the group
855            * @return long[] the roleIds of roles associated with the group
856            */
857            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
858            public long[] getRolePrimaryKeys(long groupId);
859    
860            /**
861            * Returns the staging group.
862            *
863            * @param liveGroupId the primary key of the live group
864            * @return the staging group
865            * @throws PortalException if a portal exception occurred
866            */
867            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
868            public com.liferay.portal.model.Group getStagingGroup(long liveGroupId)
869                    throws PortalException;
870    
871            /**
872            * Returns the group directly associated with the user.
873            *
874            * @param companyId the primary key of the company
875            * @param userId the primary key of the user
876            * @return the group directly associated with the user
877            * @throws PortalException if a portal exception occurred
878            */
879            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
880            public com.liferay.portal.model.Group getUserGroup(long companyId,
881                    long userId) throws PortalException;
882    
883            /**
884            * Returns the specified "user group" group. That is, the group that
885            * represents the {@link UserGroup} entity.
886            *
887            * @param companyId the primary key of the company
888            * @param userGroupId the primary key of the user group
889            * @return the group associated with the user group
890            * @throws PortalException if a portal exception occurred
891            */
892            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
893            public com.liferay.portal.model.Group getUserGroupGroup(long companyId,
894                    long userGroupId) throws PortalException;
895    
896            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
897            public java.util.List<com.liferay.portal.model.Group> getUserGroupGroups(
898                    long userGroupId);
899    
900            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
901            public java.util.List<com.liferay.portal.model.Group> getUserGroupGroups(
902                    long userGroupId, int start, int end);
903    
904            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
905            public java.util.List<com.liferay.portal.model.Group> getUserGroupGroups(
906                    long userGroupId, int start, int end,
907                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> orderByComparator);
908    
909            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
910            public int getUserGroupGroupsCount(long userGroupId);
911    
912            /**
913            * Returns the userGroupIds of the user groups associated with the group.
914            *
915            * @param groupId the groupId of the group
916            * @return long[] the userGroupIds of user groups associated with the group
917            */
918            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
919            public long[] getUserGroupPrimaryKeys(long groupId);
920    
921            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
922            public java.util.List<com.liferay.portal.model.Group> getUserGroups(
923                    long userId);
924    
925            /**
926            * Returns all the user's site groups and immediate organization groups,
927            * optionally including the user's inherited organization groups and user
928            * groups. System and staged groups are not included.
929            *
930            * @param userId the primary key of the user
931            * @param inherit whether to include the user's inherited organization
932            groups and user groups
933            * @return the user's groups and immediate organization groups
934            * @throws PortalException if a portal exception occurred
935            */
936            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
937            public java.util.List<com.liferay.portal.model.Group> getUserGroups(
938                    long userId, boolean inherit) throws PortalException;
939    
940            /**
941            * Returns an ordered range of all the user's site groups and immediate
942            * organization groups, optionally including the user's inherited
943            * organization groups and user groups. System and staged groups are not
944            * included.
945            *
946            * <p>
947            * Useful when paginating results. Returns a maximum of <code>end -
948            * start</code> instances. <code>start</code> and <code>end</code> are not
949            * primary keys, they are indexes in the result set. Thus, <code>0</code>
950            * refers to the first result in the set. Setting both <code>start</code>
951            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
952            * result set.
953            * </p>
954            *
955            * @param userId the primary key of the user
956            * @param inherit whether to include the user's inherited organization
957            groups and user groups
958            * @param start the lower bound of the range of groups to return
959            * @param end the upper bound of the range of groups to return (not
960            inclusive)
961            * @return the range of the user's groups and immediate organization groups
962            ordered by name
963            * @throws PortalException if a portal exception occurred
964            */
965            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
966            public java.util.List<com.liferay.portal.model.Group> getUserGroups(
967                    long userId, boolean inherit, int start, int end)
968                    throws PortalException;
969    
970            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
971            public java.util.List<com.liferay.portal.model.Group> getUserGroups(
972                    long userId, int start, int end);
973    
974            /**
975            * @throws PortalException
976            */
977            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
978            public java.util.List<com.liferay.portal.model.Group> getUserGroups(
979                    long userId, int start, int end,
980                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> orderByComparator)
981                    throws PortalException;
982    
983            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
984            public int getUserGroupsCount(long userId);
985    
986            /**
987            * Returns the groups associated with the user groups.
988            *
989            * @param userGroups the user groups
990            * @return the groups associated with the user groups
991            * @throws PortalException if a portal exception occurred
992            */
993            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
994            public java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups(
995                    java.util.List<com.liferay.portal.model.UserGroup> userGroups)
996                    throws PortalException;
997    
998            /**
999            * Returns all the groups related to the user groups.
1000            *
1001            * @param userGroups the user groups
1002            * @return the groups related to the user groups
1003            */
1004            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1005            public java.util.List<com.liferay.portal.model.Group> getUserGroupsRelatedGroups(
1006                    java.util.List<com.liferay.portal.model.UserGroup> userGroups);
1007    
1008            /**
1009            * Returns the range of all groups associated with the user's organization
1010            * groups, including the ancestors of the organization groups, unless portal
1011            * property <code>organizations.membership.strict</code> is set to
1012            * <code>true</code>.
1013            *
1014            * <p>
1015            * Useful when paginating results. Returns a maximum of <code>end -
1016            * start</code> instances. <code>start</code> and <code>end</code> are not
1017            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1018            * refers to the first result in the set. Setting both <code>start</code>
1019            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1020            * result set.
1021            * </p>
1022            *
1023            * @param userId the primary key of the user
1024            * @param start the lower bound of the range of groups to consider
1025            * @param end the upper bound of the range of groups to consider (not
1026            inclusive)
1027            * @return the range of groups associated with the user's organization
1028            groups
1029            * @throws PortalException if a portal exception occurred
1030            */
1031            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1032            public java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups(
1033                    long userId, int start, int end) throws PortalException;
1034    
1035            /**
1036            * Returns the default user's personal site group.
1037            *
1038            * @param companyId the primary key of the company
1039            * @return the default user's personal site group
1040            * @throws PortalException if a portal exception occurred
1041            */
1042            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1043            public com.liferay.portal.model.Group getUserPersonalSiteGroup(
1044                    long companyId) throws PortalException;
1045    
1046            /**
1047            * Returns the userIds of the users associated with the group.
1048            *
1049            * @param groupId the groupId of the group
1050            * @return long[] the userIds of users associated with the group
1051            */
1052            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1053            public long[] getUserPrimaryKeys(long groupId);
1054    
1055            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1056            public java.util.List<com.liferay.portal.model.Group> getUserSitesGroups(
1057                    long userId) throws PortalException;
1058    
1059            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1060            public java.util.List<com.liferay.portal.model.Group> getUserSitesGroups(
1061                    long userId, boolean includeAdministrative) throws PortalException;
1062    
1063            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1064            public boolean hasOrganizationGroup(long organizationId, long groupId);
1065    
1066            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1067            public boolean hasOrganizationGroups(long organizationId);
1068    
1069            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1070            public boolean hasRoleGroup(long roleId, long groupId);
1071    
1072            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1073            public boolean hasRoleGroups(long roleId);
1074    
1075            /**
1076            * Returns <code>true</code> if the live group has a staging group.
1077            *
1078            * @param liveGroupId the primary key of the live group
1079            * @return <code>true</code> if the live group has a staging group;
1080            <code>false</code> otherwise
1081            */
1082            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1083            public boolean hasStagingGroup(long liveGroupId);
1084    
1085            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1086            public boolean hasUserGroup(long userId, long groupId);
1087    
1088            /**
1089            * Returns <code>true</code> if the user is immediately associated with the
1090            * group, or optionally if the user is associated with the group via the
1091            * user's organizations, inherited organizations, or user groups.
1092            *
1093            * @param userId the primary key of the user
1094            * @param groupId the primary key of the group
1095            * @param inherit whether to include organization groups and user groups to
1096            which the user belongs in the determination
1097            * @return <code>true</code> if the user is associated with the group;
1098            <code>false</code> otherwise
1099            */
1100            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1101            public boolean hasUserGroup(long userId, long groupId, boolean inherit);
1102    
1103            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1104            public boolean hasUserGroupGroup(long userGroupId, long groupId);
1105    
1106            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1107            public boolean hasUserGroupGroups(long userGroupId);
1108    
1109            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1110            public boolean hasUserGroups(long userId);
1111    
1112            /**
1113            * Returns the group with the matching group key by first searching the
1114            * system groups and then using the finder cache.
1115            *
1116            * @param companyId the primary key of the company
1117            * @param groupKey the group key
1118            * @return the group with the group key and associated company, or
1119            <code>null</code> if a matching group could not be found
1120            */
1121            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1122            public com.liferay.portal.model.Group loadFetchGroup(long companyId,
1123                    java.lang.String groupKey);
1124    
1125            /**
1126            * Returns the group with the matching group key.
1127            *
1128            * @param companyId the primary key of the company
1129            * @param groupKey the group key
1130            * @return the group with the group key and associated company
1131            * @throws PortalException if a portal exception occurred
1132            */
1133            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1134            public com.liferay.portal.model.Group loadGetGroup(long companyId,
1135                    java.lang.String groupKey) throws PortalException;
1136    
1137            /**
1138            * Rebuilds the group tree.
1139            *
1140            * <p>
1141            * Only call this method if the tree has become stale through operations
1142            * other than normal CRUD. Under normal circumstances the tree is
1143            * automatically rebuilt whenever necessary.
1144            * </p>
1145            *
1146            * @param companyId the primary key of the group's company
1147            * @throws PortalException if a portal exception occurred
1148            */
1149            public void rebuildTree(long companyId) throws PortalException;
1150    
1151            /**
1152            * Returns an ordered range of all the groups that match the class name IDs
1153            * and keywords, optionally including the user's inherited organization
1154            * groups and user groups. System and staged groups are not included.
1155            *
1156            * <p>
1157            * Useful when paginating results. Returns a maximum of <code>end -
1158            * start</code> instances. <code>start</code> and <code>end</code> are not
1159            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1160            * refers to the first result in the set. Setting both <code>start</code>
1161            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1162            * result set.
1163            * </p>
1164            *
1165            * @param companyId the primary key of the company
1166            * @param classNameIds the primary keys of the class names of the entities
1167            the groups are related to (optionally <code>null</code>)
1168            * @param keywords the keywords (space separated), which may occur in the
1169            sites's name, or description (optionally <code>null</code>)
1170            * @param params the finder params (optionally <code>null</code>). To
1171            include a user's organizations, inherited organizations, and user
1172            groups in the search, add an entry with key
1173            &quot;usersGroups&quot; mapped to the user's ID and an entry with
1174            key &quot;inherit&quot; mapped to a non-<code>null</code> object.
1175            For more information see {@link
1176            com.liferay.portal.service.persistence.GroupFinder}.
1177            * @param start the lower bound of the range of groups to return
1178            * @param end the upper bound of the range of groups to return (not
1179            inclusive)
1180            * @return the matching groups ordered by name
1181            */
1182            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1183            public java.util.List<com.liferay.portal.model.Group> search(
1184                    long companyId, long[] classNameIds, java.lang.String keywords,
1185                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1186                    int start, int end);
1187    
1188            /**
1189            * Returns an ordered range of all the groups that match the class name IDs
1190            * and keywords, optionally including the user's inherited organization
1191            * groups and user groups. System and staged groups are not included.
1192            *
1193            * <p>
1194            * Useful when paginating results. Returns a maximum of <code>end -
1195            * start</code> instances. <code>start</code> and <code>end</code> are not
1196            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1197            * refers to the first result in the set. Setting both <code>start</code>
1198            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1199            * result set.
1200            * </p>
1201            *
1202            * @param companyId the primary key of the company
1203            * @param classNameIds the primary keys of the class names of the entities
1204            the groups are related to (optionally <code>null</code>)
1205            * @param keywords the keywords (space separated), which may occur in the
1206            sites's name, or description (optionally <code>null</code>)
1207            * @param params the finder params (optionally <code>null</code>). To
1208            include a user's organizations, inherited organizations, and user
1209            groups in the search, add an entry with key
1210            &quot;usersGroups&quot; mapped to the user's ID and an entry with
1211            key &quot;inherit&quot; mapped to a non-<code>null</code> object.
1212            For more information see {@link
1213            com.liferay.portal.service.persistence.GroupFinder}.
1214            * @param start the lower bound of the range of groups to return
1215            * @param end the upper bound of the range of groups to return (not
1216            inclusive)
1217            * @param obc the comparator to order the groups (optionally
1218            <code>null</code>)
1219            * @return the matching groups ordered by comparator <code>obc</code>
1220            */
1221            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1222            public java.util.List<com.liferay.portal.model.Group> search(
1223                    long companyId, long[] classNameIds, java.lang.String keywords,
1224                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1225                    int start, int end,
1226                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> obc);
1227    
1228            /**
1229            * Returns an ordered range of all the groups that match the class name IDs,
1230            * name, and description, optionally including the user's inherited
1231            * organization groups and user groups. System and staged groups are not
1232            * included.
1233            *
1234            * <p>
1235            * Useful when paginating results. Returns a maximum of <code>end -
1236            * start</code> instances. <code>start</code> and <code>end</code> are not
1237            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1238            * refers to the first result in the set. Setting both <code>start</code>
1239            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1240            * result set.
1241            * </p>
1242            *
1243            * @param companyId the primary key of the company
1244            * @param classNameIds the primary keys of the class names of the entities
1245            the groups are related to (optionally <code>null</code>)
1246            * @param name the group's name (optionally <code>null</code>)
1247            * @param description the group's description (optionally
1248            <code>null</code>)
1249            * @param params the finder params (optionally <code>null</code>). To
1250            include a user's organizations, inherited organizations, and user
1251            groups in the search, add an entry with key
1252            &quot;usersGroups&quot; mapped to the user's ID and an entry with
1253            key &quot;inherit&quot; mapped to a non-<code>null</code> object.
1254            For more information see {@link
1255            com.liferay.portal.service.persistence.GroupFinder}.
1256            * @param andOperator whether every field must match its keywords, or just
1257            one field.
1258            * @param start the lower bound of the range of groups to return
1259            * @param end the upper bound of the range of groups to return (not
1260            inclusive)
1261            * @return the matching groups ordered by name
1262            */
1263            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1264            public java.util.List<com.liferay.portal.model.Group> search(
1265                    long companyId, long[] classNameIds, java.lang.String name,
1266                    java.lang.String description,
1267                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1268                    boolean andOperator, int start, int end);
1269    
1270            /**
1271            * Returns an ordered range of all the groups that match the class name IDs,
1272            * name, and description, optionally including the user's inherited
1273            * organization groups and user groups. System and staged groups are not
1274            * included.
1275            *
1276            * <p>
1277            * Useful when paginating results. Returns a maximum of <code>end -
1278            * start</code> instances. <code>start</code> and <code>end</code> are not
1279            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1280            * refers to the first result in the set. Setting both <code>start</code>
1281            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1282            * result set.
1283            * </p>
1284            *
1285            * @param companyId the primary key of the company
1286            * @param classNameIds the primary keys of the class names of the entities
1287            the groups are related to (optionally <code>null</code>)
1288            * @param name the group's name (optionally <code>null</code>)
1289            * @param description the group's description (optionally
1290            <code>null</code>)
1291            * @param params the finder params (optionally <code>null</code>). To
1292            include a user's organizations, inherited organizations, and user
1293            groups in the search, add an entry with key
1294            &quot;usersGroups&quot; mapped to the user's ID and an entry with
1295            key &quot;inherit&quot; mapped to a non-<code>null</code> object.
1296            For more information see {@link
1297            com.liferay.portal.service.persistence.GroupFinder}.
1298            * @param andOperator whether every field must match its keywords, or just
1299            one field.
1300            * @param start the lower bound of the range of groups to return
1301            * @param end the upper bound of the range of groups to return (not
1302            inclusive)
1303            * @param obc the comparator to order the groups (optionally
1304            <code>null</code>)
1305            * @return the matching groups ordered by comparator <code>obc</code>
1306            */
1307            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1308            public java.util.List<com.liferay.portal.model.Group> search(
1309                    long companyId, long[] classNameIds, java.lang.String name,
1310                    java.lang.String description,
1311                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1312                    boolean andOperator, int start, int end,
1313                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> obc);
1314    
1315            /**
1316            * Returns an ordered range of all the groups belonging to the parent group
1317            * that match the class name IDs and keywords, optionally including the
1318            * user's inherited organization groups and user groups. System and staged
1319            * groups are not included.
1320            *
1321            * <p>
1322            * Useful when paginating results. Returns a maximum of <code>end -
1323            * start</code> instances. <code>start</code> and <code>end</code> are not
1324            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1325            * refers to the first result in the set. Setting both <code>start</code>
1326            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1327            * result set.
1328            * </p>
1329            *
1330            * @param companyId the primary key of the company
1331            * @param classNameIds the primary keys of the class names of the entities
1332            the groups are related to (optionally <code>null</code>)
1333            * @param parentGroupId the primary key of the parent group
1334            * @param keywords the keywords (space separated), which may occur in the
1335            sites's name, or description (optionally <code>null</code>)
1336            * @param params the finder params (optionally <code>null</code>). To
1337            include a user's organizations, inherited organizations, and user
1338            groups in the search, add an entry with key
1339            &quot;usersGroups&quot; mapped to the user's ID and an entry with
1340            key &quot;inherit&quot; mapped to a non-<code>null</code> object.
1341            For more information see {@link
1342            com.liferay.portal.service.persistence.GroupFinder}.
1343            * @param start the lower bound of the range of groups to return
1344            * @param end the upper bound of the range of groups to return (not
1345            inclusive)
1346            * @return the matching groups ordered by name
1347            */
1348            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1349            public java.util.List<com.liferay.portal.model.Group> search(
1350                    long companyId, long[] classNameIds, long parentGroupId,
1351                    java.lang.String keywords,
1352                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1353                    int start, int end);
1354    
1355            /**
1356            * Returns an ordered range of all the groups belonging to the parent group
1357            * that match the class name IDs and keywords, optionally including the
1358            * user's inherited organization groups and user groups. System and staged
1359            * groups are not included.
1360            *
1361            * <p>
1362            * Useful when paginating results. Returns a maximum of <code>end -
1363            * start</code> instances. <code>start</code> and <code>end</code> are not
1364            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1365            * refers to the first result in the set. Setting both <code>start</code>
1366            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1367            * result set.
1368            * </p>
1369            *
1370            * @param companyId the primary key of the company
1371            * @param classNameIds the primary keys of the class names of the entities
1372            the groups are related to (optionally <code>null</code>)
1373            * @param parentGroupId the primary key of the parent group
1374            * @param keywords the keywords (space separated), which may occur in the
1375            sites's name, or description (optionally <code>null</code>)
1376            * @param params the finder params (optionally <code>null</code>). To
1377            include a user's organizations, inherited organizations, and user
1378            groups in the search, add an entry with key
1379            &quot;usersGroups&quot; mapped to the user's ID and an entry with
1380            key &quot;inherit&quot; mapped to a non-<code>null</code> object.
1381            For more information see {@link
1382            com.liferay.portal.service.persistence.GroupFinder}.
1383            * @param start the lower bound of the range of groups to return
1384            * @param end the upper bound of the range of groups to return (not
1385            inclusive)
1386            * @param obc the comparator to order the groups (optionally
1387            <code>null</code>)
1388            * @return the matching groups ordered by comparator <code>obc</code>
1389            */
1390            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1391            public java.util.List<com.liferay.portal.model.Group> search(
1392                    long companyId, long[] classNameIds, long parentGroupId,
1393                    java.lang.String keywords,
1394                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1395                    int start, int end,
1396                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> obc);
1397    
1398            /**
1399            * Returns an ordered range of all the groups belonging to the parent group
1400            * that match the class name IDs, name, and description, optionally
1401            * including the user's inherited organization groups and user groups.
1402            * System and staged groups are not included.
1403            *
1404            * <p>
1405            * Useful when paginating results. Returns a maximum of <code>end -
1406            * start</code> instances. <code>start</code> and <code>end</code> are not
1407            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1408            * refers to the first result in the set. Setting both <code>start</code>
1409            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1410            * result set.
1411            * </p>
1412            *
1413            * @param companyId the primary key of the company
1414            * @param classNameIds the primary keys of the class names of the entities
1415            the groups are related to (optionally <code>null</code>)
1416            * @param parentGroupId the primary key of the parent group
1417            * @param name the group's name (optionally <code>null</code>)
1418            * @param description the group's description (optionally
1419            <code>null</code>)
1420            * @param params the finder params (optionally <code>null</code>). To
1421            include a user's organizations, inherited organizations, and user
1422            groups in the search, add an entry with key
1423            &quot;usersGroups&quot; mapped to the user's ID and an entry with
1424            key &quot;inherit&quot; mapped to a non-<code>null</code> object.
1425            For more information see {@link
1426            com.liferay.portal.service.persistence.GroupFinder}.
1427            * @param andOperator whether every field must match its keywords, or just
1428            one field.
1429            * @param start the lower bound of the range of groups to return
1430            * @param end the upper bound of the range of groups to return (not
1431            inclusive)
1432            * @return the matching groups ordered by name
1433            */
1434            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1435            public java.util.List<com.liferay.portal.model.Group> search(
1436                    long companyId, long[] classNameIds, long parentGroupId,
1437                    java.lang.String name, java.lang.String description,
1438                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1439                    boolean andOperator, int start, int end);
1440    
1441            /**
1442            * Returns an ordered range of all the groups belonging to the parent group
1443            * that match the class name IDs, name, and description, optionally
1444            * including the user's inherited organization groups and user groups.
1445            * System and staged groups are not included.
1446            *
1447            * <p>
1448            * Useful when paginating results. Returns a maximum of <code>end -
1449            * start</code> instances. <code>start</code> and <code>end</code> are not
1450            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1451            * refers to the first result in the set. Setting both <code>start</code>
1452            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1453            * result set.
1454            * </p>
1455            *
1456            * @param companyId the primary key of the company
1457            * @param classNameIds the primary keys of the class names of the entities
1458            the groups are related to (optionally <code>null</code>)
1459            * @param parentGroupId the primary key of the parent group
1460            * @param name the group's name (optionally <code>null</code>)
1461            * @param description the group's description (optionally
1462            <code>null</code>)
1463            * @param params the finder params (optionally <code>null</code>). To
1464            include a user's organizations, inherited organizations, and user
1465            groups in the search, add an entry with key
1466            &quot;usersGroups&quot; mapped to the user's ID and an entry with
1467            key &quot;inherit&quot; mapped to a non-<code>null</code> object.
1468            For more information see {@link
1469            com.liferay.portal.service.persistence.GroupFinder}.
1470            * @param andOperator whether every field must match its keywords, or just
1471            one field.
1472            * @param start the lower bound of the range of groups to return
1473            * @param end the upper bound of the range of groups to return (not
1474            inclusive)
1475            * @param obc the comparator to order the groups (optionally
1476            <code>null</code>)
1477            * @return the matching groups ordered by comparator <code>obc</code>
1478            */
1479            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1480            public java.util.List<com.liferay.portal.model.Group> search(
1481                    long companyId, long[] classNameIds, long parentGroupId,
1482                    java.lang.String name, java.lang.String description,
1483                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1484                    boolean andOperator, int start, int end,
1485                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> obc);
1486    
1487            /**
1488            * Returns an ordered range of all the groups that match the keywords,
1489            * optionally including the user's inherited organization groups and user
1490            * groups. System and staged groups are not included.
1491            *
1492            * <p>
1493            * Useful when paginating results. Returns a maximum of <code>end -
1494            * start</code> instances. <code>start</code> and <code>end</code> are not
1495            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1496            * refers to the first result in the set. Setting both <code>start</code>
1497            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1498            * result set.
1499            * </p>
1500            *
1501            * @param companyId the primary key of the company
1502            * @param keywords the keywords (space separated), which may occur in the
1503            sites's name, or description (optionally <code>null</code>)
1504            * @param params the finder params (optionally <code>null</code>). To
1505            include the user's inherited organizations and user groups in the
1506            search, add entries having &quot;usersGroups&quot; and
1507            &quot;inherit&quot; as keys mapped to the the user's ID. For more
1508            information see {@link
1509            com.liferay.portal.service.persistence.GroupFinder}.
1510            * @param start the lower bound of the range of groups to return
1511            * @param end the upper bound of the range of groups to return (not
1512            inclusive)
1513            * @return the matching groups ordered by name
1514            */
1515            @com.liferay.portal.kernel.cache.thread.local.ThreadLocalCachable
1516            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1517            public java.util.List<com.liferay.portal.model.Group> search(
1518                    long companyId, java.lang.String keywords,
1519                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1520                    int start, int end);
1521    
1522            /**
1523            * Returns an ordered range of all the groups that match the keywords,
1524            * optionally including the user's inherited organization groups and user
1525            * groups. System and staged groups are not included.
1526            *
1527            * <p>
1528            * Useful when paginating results. Returns a maximum of <code>end -
1529            * start</code> instances. <code>start</code> and <code>end</code> are not
1530            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1531            * refers to the first result in the set. Setting both <code>start</code>
1532            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1533            * result set.
1534            * </p>
1535            *
1536            * @param companyId the primary key of the company
1537            * @param keywords the keywords (space separated), which may occur in the
1538            sites's name, or description (optionally <code>null</code>)
1539            * @param params the finder params (optionally <code>null</code>). To
1540            include the user's inherited organizations and user groups in the
1541            search, add entries having &quot;usersGroups&quot; and
1542            &quot;inherit&quot; as keys mapped to the the user's ID. For more
1543            information see {@link
1544            com.liferay.portal.service.persistence.GroupFinder}.
1545            * @param start the lower bound of the range of groups to return
1546            * @param end the upper bound of the range of groups to return (not
1547            inclusive)
1548            * @param obc the comparator to order the groups (optionally
1549            <code>null</code>)
1550            * @return the matching groups ordered by comparator <code>obc</code>
1551            */
1552            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1553            public java.util.List<com.liferay.portal.model.Group> search(
1554                    long companyId, java.lang.String keywords,
1555                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1556                    int start, int end,
1557                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> obc);
1558    
1559            /**
1560            * Returns an ordered range of all the site groups and organization groups
1561            * that match the name and description, optionally including the user's
1562            * inherited organization groups and user groups. System and staged groups
1563            * are not included.
1564            *
1565            * <p>
1566            * Useful when paginating results. Returns a maximum of <code>end -
1567            * start</code> instances. <code>start</code> and <code>end</code> are not
1568            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1569            * refers to the first result in the set. Setting both <code>start</code>
1570            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1571            * result set.
1572            * </p>
1573            *
1574            * @param companyId the primary key of the company
1575            * @param name the group's name (optionally <code>null</code>)
1576            * @param description the group's description (optionally
1577            <code>null</code>)
1578            * @param params the finder params (optionally <code>null</code>). To
1579            include the user's inherited organizations and user groups in the
1580            search, add entries having &quot;usersGroups&quot; and
1581            &quot;inherit&quot; as keys mapped to the the user's ID. For more
1582            information see {@link
1583            com.liferay.portal.service.persistence.GroupFinder}.
1584            * @param andOperator whether every field must match its keywords, or just
1585            one field.
1586            * @param start the lower bound of the range of groups to return
1587            * @param end the upper bound of the range of groups to return (not
1588            inclusive)
1589            * @return the matching groups ordered by name
1590            */
1591            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1592            public java.util.List<com.liferay.portal.model.Group> search(
1593                    long companyId, java.lang.String name, java.lang.String description,
1594                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1595                    boolean andOperator, int start, int end);
1596    
1597            /**
1598            * Returns an ordered range of all the site groups and organization groups
1599            * that match the name and description, optionally including the user's
1600            * inherited organization groups and user groups. System and staged groups
1601            * are not included.
1602            *
1603            * <p>
1604            * Useful when paginating results. Returns a maximum of <code>end -
1605            * start</code> instances. <code>start</code> and <code>end</code> are not
1606            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1607            * refers to the first result in the set. Setting both <code>start</code>
1608            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1609            * result set.
1610            * </p>
1611            *
1612            * @param companyId the primary key of the company
1613            * @param name the group's name (optionally <code>null</code>)
1614            * @param description the group's description (optionally
1615            <code>null</code>)
1616            * @param params the finder params (optionally <code>null</code>). To
1617            include the user's inherited organizations and user groups in the
1618            search, add entries having &quot;usersGroups&quot; and
1619            &quot;inherit&quot; as keys mapped to the the user's ID. For more
1620            information see {@link
1621            com.liferay.portal.service.persistence.GroupFinder}.
1622            * @param andOperator whether every field must match its keywords, or just
1623            one field.
1624            * @param start the lower bound of the range of groups to return
1625            * @param end the upper bound of the range of groups to return (not
1626            inclusive)
1627            * @param obc the comparator to order the groups (optionally
1628            <code>null</code>)
1629            * @return the matching groups ordered by comparator <code>obc</code>
1630            */
1631            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1632            public java.util.List<com.liferay.portal.model.Group> search(
1633                    long companyId, java.lang.String name, java.lang.String description,
1634                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1635                    boolean andOperator, int start, int end,
1636                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> obc);
1637    
1638            /**
1639            * Returns an ordered range of all the company's groups, optionally
1640            * including the user's inherited organization groups and user groups.
1641            * System and staged groups are not included.
1642            *
1643            * <p>
1644            * Useful when paginating results. Returns a maximum of <code>end -
1645            * start</code> instances. <code>start</code> and <code>end</code> are not
1646            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1647            * refers to the first result in the set. Setting both <code>start</code>
1648            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1649            * result set.
1650            * </p>
1651            *
1652            * @param companyId the primary key of the company
1653            * @param params the finder params (optionally <code>null</code>). To
1654            include a user's organizations, inherited organizations, and user
1655            groups in the search, add an entry with key
1656            &quot;usersGroups&quot; mapped to the user's ID and an entry with
1657            key &quot;inherit&quot; mapped to a non-<code>null</code> object.
1658            For more information see {@link
1659            com.liferay.portal.service.persistence.GroupFinder}.
1660            * @param start the lower bound of the range of groups to return
1661            * @param end the upper bound of the range of groups to return (not
1662            inclusive)
1663            * @return the matching groups ordered by name
1664            */
1665            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1666            public java.util.List<com.liferay.portal.model.Group> search(
1667                    long companyId,
1668                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1669                    int start, int end);
1670    
1671            /**
1672            * Returns an ordered range of all the groups belonging to the parent group
1673            * that match the keywords, optionally including the user's inherited
1674            * organization groups and user groups. System and staged groups are not
1675            * included.
1676            *
1677            * <p>
1678            * Useful when paginating results. Returns a maximum of <code>end -
1679            * start</code> instances. <code>start</code> and <code>end</code> are not
1680            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1681            * refers to the first result in the set. Setting both <code>start</code>
1682            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1683            * result set.
1684            * </p>
1685            *
1686            * @param companyId the primary key of the company
1687            * @param parentGroupId the primary key of the parent group
1688            * @param keywords the keywords (space separated), which may occur in the
1689            sites's name, or description (optionally <code>null</code>)
1690            * @param params the finder params (optionally <code>null</code>). To
1691            include the user's inherited organizations and user groups in the
1692            search, add entries having &quot;usersGroups&quot; and
1693            &quot;inherit&quot; as keys mapped to the the user's ID. For more
1694            information see {@link
1695            com.liferay.portal.service.persistence.GroupFinder}.
1696            * @param start the lower bound of the range of groups to return
1697            * @param end the upper bound of the range of groups to return (not
1698            inclusive)
1699            * @return the matching groups ordered by name
1700            */
1701            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1702            public java.util.List<com.liferay.portal.model.Group> search(
1703                    long companyId, long parentGroupId, java.lang.String keywords,
1704                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1705                    int start, int end);
1706    
1707            /**
1708            * Returns an ordered range of all the groups belonging to the parent group
1709            * that match the keywords, optionally including the user's inherited
1710            * organization groups and user groups. System and staged groups are not
1711            * included.
1712            *
1713            * <p>
1714            * Useful when paginating results. Returns a maximum of <code>end -
1715            * start</code> instances. <code>start</code> and <code>end</code> are not
1716            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1717            * refers to the first result in the set. Setting both <code>start</code>
1718            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1719            * result set.
1720            * </p>
1721            *
1722            * @param companyId the primary key of the company
1723            * @param parentGroupId the primary key of the parent group
1724            * @param keywords the keywords (space separated), which may occur in the
1725            sites's name, or description (optionally <code>null</code>)
1726            * @param params the finder params (optionally <code>null</code>). To
1727            include the user's inherited organizations and user groups in the
1728            search, add entries having &quot;usersGroups&quot; and
1729            &quot;inherit&quot; as keys mapped to the the user's ID. For more
1730            information see {@link
1731            com.liferay.portal.service.persistence.GroupFinder}.
1732            * @param start the lower bound of the range of groups to return
1733            * @param end the upper bound of the range of groups to return (not
1734            inclusive)
1735            * @param obc the comparator to order the groups (optionally
1736            <code>null</code>)
1737            * @return the matching groups ordered by comparator <code>obc</code>
1738            */
1739            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1740            public java.util.List<com.liferay.portal.model.Group> search(
1741                    long companyId, long parentGroupId, java.lang.String keywords,
1742                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1743                    int start, int end,
1744                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> obc);
1745    
1746            /**
1747            * Returns an ordered range of all the site groups belonging to the parent
1748            * group and organization groups that match the name and description,
1749            * optionally including the user's inherited organization groups and user
1750            * groups. System and staged groups are not included.
1751            *
1752            * <p>
1753            * Useful when paginating results. Returns a maximum of <code>end -
1754            * start</code> instances. <code>start</code> and <code>end</code> are not
1755            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1756            * refers to the first result in the set. Setting both <code>start</code>
1757            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1758            * result set.
1759            * </p>
1760            *
1761            * @param companyId the primary key of the company
1762            * @param parentGroupId the primary key of the parent group
1763            * @param name the group's name (optionally <code>null</code>)
1764            * @param description the group's description (optionally
1765            <code>null</code>)
1766            * @param params the finder params (optionally <code>null</code>). To
1767            include the user's inherited organizations and user groups in the
1768            search, add entries having &quot;usersGroups&quot; and
1769            &quot;inherit&quot; as keys mapped to the the user's ID. For more
1770            information see {@link
1771            com.liferay.portal.service.persistence.GroupFinder}.
1772            * @param andOperator whether every field must match its keywords, or just
1773            one field.
1774            * @param start the lower bound of the range of groups to return
1775            * @param end the upper bound of the range of groups to return (not
1776            inclusive)
1777            * @return the matching groups ordered by name
1778            */
1779            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1780            public java.util.List<com.liferay.portal.model.Group> search(
1781                    long companyId, long parentGroupId, java.lang.String name,
1782                    java.lang.String description,
1783                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1784                    boolean andOperator, int start, int end);
1785    
1786            /**
1787            * Returns an ordered range of all the site groups belonging to the parent
1788            * group and organization groups that match the name and description,
1789            * optionally including the user's inherited organization groups and user
1790            * groups. System and staged groups are not included.
1791            *
1792            * <p>
1793            * Useful when paginating results. Returns a maximum of <code>end -
1794            * start</code> instances. <code>start</code> and <code>end</code> are not
1795            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1796            * refers to the first result in the set. Setting both <code>start</code>
1797            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1798            * result set.
1799            * </p>
1800            *
1801            * @param companyId the primary key of the company
1802            * @param parentGroupId the primary key of the parent group
1803            * @param name the group's name (optionally <code>null</code>)
1804            * @param description the group's description (optionally
1805            <code>null</code>)
1806            * @param params the finder params (optionally <code>null</code>). To
1807            include the user's inherited organizations and user groups in the
1808            search, add entries having &quot;usersGroups&quot; and
1809            &quot;inherit&quot; as keys mapped to the the user's ID. For more
1810            information see {@link
1811            com.liferay.portal.service.persistence.GroupFinder}.
1812            * @param andOperator whether every field must match its keywords, or just
1813            one field.
1814            * @param start the lower bound of the range of groups to return
1815            * @param end the upper bound of the range of groups to return (not
1816            inclusive)
1817            * @param obc the comparator to order the groups (optionally
1818            <code>null</code>)
1819            * @return the matching groups ordered by comparator <code>obc</code>
1820            */
1821            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1822            public java.util.List<com.liferay.portal.model.Group> search(
1823                    long companyId, long parentGroupId, java.lang.String name,
1824                    java.lang.String description,
1825                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1826                    boolean andOperator, int start, int end,
1827                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> obc);
1828    
1829            /**
1830            * Returns the number of groups that match the class name IDs, and keywords,
1831            * optionally including the user's inherited organization groups and user
1832            * groups. System and staged groups are not included.
1833            *
1834            * @param companyId the primary key of the company
1835            * @param classNameIds the primary keys of the class names of the entities
1836            the groups are related to (optionally <code>null</code>)
1837            * @param keywords the keywords (space separated), which may occur in the
1838            sites's name, or description (optionally <code>null</code>)
1839            * @param params the finder params (optionally <code>null</code>). To
1840            include the user's inherited organization groups and user groups
1841            in the search, add entries having &quot;usersGroups&quot; and
1842            &quot;inherit&quot; as keys mapped to the the user's ID. For more
1843            information see {@link
1844            com.liferay.portal.service.persistence.GroupFinder}.
1845            * @return the number of matching groups
1846            */
1847            @com.liferay.portal.kernel.cache.thread.local.ThreadLocalCachable
1848            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1849            public int searchCount(long companyId, long[] classNameIds,
1850                    java.lang.String keywords,
1851                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params);
1852    
1853            /**
1854            * Returns the number of groups that match the class name IDs, name, and
1855            * description, optionally including the user's inherited organization
1856            * groups and user groups. System and staged groups are not included.
1857            *
1858            * @param companyId the primary key of the company
1859            * @param classNameIds the primary keys of the class names of the entities
1860            the groups are related to (optionally <code>null</code>)
1861            * @param name the group's name (optionally <code>null</code>)
1862            * @param description the group's description (optionally
1863            <code>null</code>)
1864            * @param params the finder params (optionally <code>null</code>). To
1865            include the user's inherited organization groups and user groups
1866            in the search, add entries having &quot;usersGroups&quot; and
1867            &quot;inherit&quot; as keys mapped to the the user's ID. For more
1868            information see {@link
1869            com.liferay.portal.service.persistence.GroupFinder}.
1870            * @param andOperator whether every field must match its keywords, or just
1871            one field.
1872            * @return the number of matching groups
1873            */
1874            @com.liferay.portal.kernel.cache.thread.local.ThreadLocalCachable
1875            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1876            public int searchCount(long companyId, long[] classNameIds,
1877                    java.lang.String name, java.lang.String description,
1878                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1879                    boolean andOperator);
1880    
1881            /**
1882            * Returns the number of groups belonging to the parent group that match the
1883            * class name IDs, and keywords, optionally including the user's inherited
1884            * organization groups and user groups. System and staged groups are not
1885            * included.
1886            *
1887            * @param companyId the primary key of the company
1888            * @param classNameIds the primary keys of the class names of the entities
1889            the groups are related to (optionally <code>null</code>)
1890            * @param parentGroupId the primary key of the parent group
1891            * @param keywords the keywords (space separated), which may occur in the
1892            sites's name, or description (optionally <code>null</code>)
1893            * @param params the finder params (optionally <code>null</code>). To
1894            include the user's inherited organization groups and user groups
1895            in the search, add entries having &quot;usersGroups&quot; and
1896            &quot;inherit&quot; as keys mapped to the the user's ID. For more
1897            information see {@link
1898            com.liferay.portal.service.persistence.GroupFinder}.
1899            * @return the number of matching groups
1900            */
1901            @com.liferay.portal.kernel.cache.thread.local.ThreadLocalCachable
1902            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1903            public int searchCount(long companyId, long[] classNameIds,
1904                    long parentGroupId, java.lang.String keywords,
1905                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params);
1906    
1907            /**
1908            * Returns the number of groups belonging to the parent group that match the
1909            * class name IDs, name, and description, optionally including the user's
1910            * inherited organization groups and user groups. System and staged groups
1911            * are not included.
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 the user's inherited organization groups and user groups
1922            in the search, add entries having &quot;usersGroups&quot; and
1923            &quot;inherit&quot; as keys mapped to the the user's ID. For more
1924            information see {@link
1925            com.liferay.portal.service.persistence.GroupFinder}.
1926            * @param andOperator whether every field must match its keywords, or just
1927            one field.
1928            * @return the number of matching groups
1929            */
1930            @com.liferay.portal.kernel.cache.thread.local.ThreadLocalCachable
1931            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1932            public int searchCount(long companyId, long[] classNameIds,
1933                    long parentGroupId, java.lang.String name,
1934                    java.lang.String description,
1935                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1936                    boolean andOperator);
1937    
1938            /**
1939            * Returns the number of groups that match the keywords, optionally
1940            * including the user's inherited organization groups and user groups.
1941            * System and staged groups are not included.
1942            *
1943            * @param companyId the primary key of the company
1944            * @param keywords the keywords (space separated), which may occur in the
1945            sites's name, or description (optionally <code>null</code>)
1946            * @param params the finder params (optionally <code>null</code>). To
1947            include the user's inherited organization groups and user groups
1948            in the search, add entries having &quot;usersGroups&quot; and
1949            &quot;inherit&quot; as keys mapped to the the user's ID. For more
1950            information see {@link
1951            com.liferay.portal.service.persistence.GroupFinder}.
1952            * @return the number of matching groups
1953            */
1954            @com.liferay.portal.kernel.cache.thread.local.ThreadLocalCachable
1955            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1956            public int searchCount(long companyId, java.lang.String keywords,
1957                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params);
1958    
1959            /**
1960            * Returns the number of groups and immediate organization groups that match
1961            * the name and description, optionally including the user's inherited
1962            * organization groups and user groups. System and staged groups are not
1963            * included.
1964            *
1965            * @param companyId the primary key of the company
1966            * @param name the group's name (optionally <code>null</code>)
1967            * @param description the group's description (optionally
1968            <code>null</code>)
1969            * @param params the finder params (optionally <code>null</code>). To
1970            include the user's inherited organization groups and user groups
1971            in the search, add entries having &quot;usersGroups&quot; and
1972            &quot;inherit&quot; as keys mapped to the the user's ID. For more
1973            information see {@link
1974            com.liferay.portal.service.persistence.GroupFinder}.
1975            * @param andOperator whether every field must match its keywords, or just
1976            one field.
1977            * @return the number of matching groups
1978            */
1979            @com.liferay.portal.kernel.cache.thread.local.ThreadLocalCachable
1980            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1981            public int searchCount(long companyId, java.lang.String name,
1982                    java.lang.String description,
1983                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1984                    boolean andOperator);
1985    
1986            /**
1987            * Returns the number of groups belonging to the parent group that match the
1988            * keywords, optionally including the user's inherited organization groups
1989            * and user groups. System and staged groups are not included.
1990            *
1991            * @param companyId the primary key of the company
1992            * @param parentGroupId the primary key of the parent group
1993            * @param keywords the keywords (space separated), which may occur in the
1994            sites's name, or description (optionally <code>null</code>)
1995            * @param params the finder params (optionally <code>null</code>). To
1996            include the user's inherited organization groups and user groups
1997            in the search, add entries having &quot;usersGroups&quot; and
1998            &quot;inherit&quot; as keys mapped to the the user's ID. For more
1999            information see {@link
2000            com.liferay.portal.service.persistence.GroupFinder}.
2001            * @return the number of matching groups
2002            */
2003            @com.liferay.portal.kernel.cache.thread.local.ThreadLocalCachable
2004            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2005            public int searchCount(long companyId, long parentGroupId,
2006                    java.lang.String keywords,
2007                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params);
2008    
2009            /**
2010            * Returns the number of groups belonging to the parent group and immediate
2011            * organization groups that match the name and description, optionally
2012            * including the user's inherited organization groups and user groups.
2013            * System and staged groups are not included.
2014            *
2015            * @param companyId the primary key of the company
2016            * @param parentGroupId the primary key of the parent group
2017            * @param name the group's name (optionally <code>null</code>)
2018            * @param description the group's description (optionally
2019            <code>null</code>)
2020            * @param params the finder params (optionally <code>null</code>). To
2021            include the user's inherited organization groups and user groups
2022            in the search, add entries having &quot;usersGroups&quot; and
2023            &quot;inherit&quot; as keys mapped to the the user's ID. For more
2024            information see {@link
2025            com.liferay.portal.service.persistence.GroupFinder}.
2026            * @param andOperator whether every field must match its keywords, or just
2027            one field.
2028            * @return the number of matching groups
2029            */
2030            @com.liferay.portal.kernel.cache.thread.local.ThreadLocalCachable
2031            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2032            public int searchCount(long companyId, long parentGroupId,
2033                    java.lang.String name, java.lang.String description,
2034                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2035                    boolean andOperator);
2036    
2037            public void setOrganizationGroups(long organizationId, long[] groupIds);
2038    
2039            public void setRoleGroups(long roleId, long[] groupIds);
2040    
2041            public void setUserGroupGroups(long userGroupId, long[] groupIds);
2042    
2043            public void setUserGroups(long userId, long[] groupIds);
2044    
2045            /**
2046            * Removes the groups from the role.
2047            *
2048            * @param roleId the primary key of the role
2049            * @param groupIds the primary keys of the groups
2050            */
2051            public void unsetRoleGroups(long roleId, long[] groupIds);
2052    
2053            /**
2054            * Removes the user from the groups.
2055            *
2056            * @param userId the primary key of the user
2057            * @param groupIds the primary keys of the groups
2058            */
2059            public void unsetUserGroups(long userId, long[] groupIds);
2060    
2061            /**
2062            * Updates the group's asset replacing categories and tag names.
2063            *
2064            * @param userId the primary key of the user
2065            * @param group the group
2066            * @param assetCategoryIds the primary keys of the asset categories
2067            (optionally <code>null</code>)
2068            * @param assetTagNames the asset tag names (optionally <code>null</code>)
2069            * @throws PortalException if a portal exception occurred
2070            */
2071            public void updateAsset(long userId, com.liferay.portal.model.Group group,
2072                    long[] assetCategoryIds, java.lang.String[] assetTagNames)
2073                    throws PortalException;
2074    
2075            /**
2076            * Updates the group's friendly URL.
2077            *
2078            * @param groupId the primary key of the group
2079            * @param friendlyURL the group's new friendlyURL (optionally
2080            <code>null</code>)
2081            * @return the group
2082            * @throws PortalException if a portal exception occurred
2083            */
2084            public com.liferay.portal.model.Group updateFriendlyURL(long groupId,
2085                    java.lang.String friendlyURL) throws PortalException;
2086    
2087            /**
2088            * Updates the group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
2089            *
2090            * @param group the group
2091            * @return the group that was updated
2092            */
2093            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
2094            public com.liferay.portal.model.Group updateGroup(
2095                    com.liferay.portal.model.Group group);
2096    
2097            /**
2098            * Updates the group.
2099            *
2100            * @param groupId the primary key of the group
2101            * @param parentGroupId the primary key of the parent group
2102            * @param name the name's key
2103            * @param description the group's new description (optionally
2104            <code>null</code>)
2105            * @param type the group's new type. For more information see {@link
2106            GroupConstants}.
2107            * @param manualMembership whether manual membership is allowed for the
2108            group
2109            * @param membershipRestriction the group's membership restriction. For
2110            more information see {@link GroupConstants}.
2111            * @param friendlyURL the group's new friendlyURL (optionally
2112            <code>null</code>)
2113            * @param inheritContent whether to inherit content from the parent
2114            group
2115            * @param active whether the group is active
2116            * @param serviceContext the service context to be applied (optionally
2117            <code>null</code>). Can set asset category IDs and asset tag
2118            names for the group.
2119            * @return the group
2120            * @throws PortalException if a portal exception occurred
2121            * @deprecated As of 7.0.0, replaced by {@link #updateGroup(long, long, Map,
2122            Map, int, boolean, int, String, boolean, boolean,
2123            ServiceContext)}
2124            */
2125            @java.lang.Deprecated
2126            public com.liferay.portal.model.Group updateGroup(long groupId,
2127                    long parentGroupId, java.lang.String name,
2128                    java.lang.String description, int type, boolean manualMembership,
2129                    int membershipRestriction, java.lang.String friendlyURL,
2130                    boolean inheritContent, boolean active,
2131                    com.liferay.portal.service.ServiceContext serviceContext)
2132                    throws PortalException;
2133    
2134            public com.liferay.portal.model.Group updateGroup(long groupId,
2135                    long parentGroupId,
2136                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
2137                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
2138                    int type, boolean manualMembership, int membershipRestriction,
2139                    java.lang.String friendlyURL, boolean inheritContent, boolean active,
2140                    com.liferay.portal.service.ServiceContext serviceContext)
2141                    throws PortalException;
2142    
2143            /**
2144            * Updates the group's type settings.
2145            *
2146            * @param groupId the primary key of the group
2147            * @param typeSettings the group's new type settings (optionally
2148            <code>null</code>)
2149            * @return the group
2150            * @throws PortalException if a portal exception occurred
2151            */
2152            public com.liferay.portal.model.Group updateGroup(long groupId,
2153                    java.lang.String typeSettings) throws PortalException;
2154    
2155            /**
2156            * Associates the group with a main site if the group is an organization.
2157            *
2158            * @param groupId the primary key of the group
2159            * @param site whether the group is to be associated with a main site
2160            * @return the group
2161            * @throws PortalException if a portal exception occurred
2162            */
2163            public com.liferay.portal.model.Group updateSite(long groupId, boolean site)
2164                    throws PortalException;
2165    }