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