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