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