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