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