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