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