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