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