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