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