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