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 user group local service. This utility wraps {@link com.liferay.portal.service.impl.UserGroupLocalServiceImpl} 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 UserGroupLocalService
029     * @see com.liferay.portal.service.base.UserGroupLocalServiceBaseImpl
030     * @see com.liferay.portal.service.impl.UserGroupLocalServiceImpl
031     * @generated
032     */
033    public class UserGroupLocalServiceUtil {
034            /*
035             * NOTE FOR DEVELOPERS:
036             *
037             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.UserGroupLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
038             */
039    
040            /**
041            * Adds the user group to the database. Also notifies the appropriate model listeners.
042            *
043            * @param userGroup the user group
044            * @return the user group that was added
045            * @throws SystemException if a system exception occurred
046            */
047            public static com.liferay.portal.model.UserGroup addUserGroup(
048                    com.liferay.portal.model.UserGroup userGroup)
049                    throws com.liferay.portal.kernel.exception.SystemException {
050                    return getService().addUserGroup(userGroup);
051            }
052    
053            /**
054            * Creates a new user group with the primary key. Does not add the user group to the database.
055            *
056            * @param userGroupId the primary key for the new user group
057            * @return the new user group
058            */
059            public static com.liferay.portal.model.UserGroup createUserGroup(
060                    long userGroupId) {
061                    return getService().createUserGroup(userGroupId);
062            }
063    
064            /**
065            * Deletes the user group with the primary key from the database. Also notifies the appropriate model listeners.
066            *
067            * @param userGroupId the primary key of the user group
068            * @return the user group that was removed
069            * @throws PortalException if a user group with the primary key could not be found
070            * @throws SystemException if a system exception occurred
071            */
072            public static com.liferay.portal.model.UserGroup deleteUserGroup(
073                    long userGroupId)
074                    throws com.liferay.portal.kernel.exception.PortalException,
075                            com.liferay.portal.kernel.exception.SystemException {
076                    return getService().deleteUserGroup(userGroupId);
077            }
078    
079            /**
080            * Deletes the user group from the database. Also notifies the appropriate model listeners.
081            *
082            * @param userGroup the user group
083            * @return the user group that was removed
084            * @throws PortalException
085            * @throws SystemException if a system exception occurred
086            */
087            public static com.liferay.portal.model.UserGroup deleteUserGroup(
088                    com.liferay.portal.model.UserGroup userGroup)
089                    throws com.liferay.portal.kernel.exception.PortalException,
090                            com.liferay.portal.kernel.exception.SystemException {
091                    return getService().deleteUserGroup(userGroup);
092            }
093    
094            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
095                    return getService().dynamicQuery();
096            }
097    
098            /**
099            * Performs a dynamic query on the database and returns the matching rows.
100            *
101            * @param dynamicQuery the dynamic query
102            * @return the matching rows
103            * @throws SystemException if a system exception occurred
104            */
105            @SuppressWarnings("rawtypes")
106            public static java.util.List dynamicQuery(
107                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
108                    throws com.liferay.portal.kernel.exception.SystemException {
109                    return getService().dynamicQuery(dynamicQuery);
110            }
111    
112            /**
113            * Performs a dynamic query on the database and returns a range of the matching rows.
114            *
115            * <p>
116            * 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.
117            * </p>
118            *
119            * @param dynamicQuery the dynamic query
120            * @param start the lower bound of the range of model instances
121            * @param end the upper bound of the range of model instances (not inclusive)
122            * @return the range of matching rows
123            * @throws SystemException if a system exception occurred
124            */
125            @SuppressWarnings("rawtypes")
126            public static java.util.List dynamicQuery(
127                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
128                    int end) throws com.liferay.portal.kernel.exception.SystemException {
129                    return getService().dynamicQuery(dynamicQuery, start, end);
130            }
131    
132            /**
133            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
134            *
135            * <p>
136            * 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.
137            * </p>
138            *
139            * @param dynamicQuery the dynamic query
140            * @param start the lower bound of the range of model instances
141            * @param end the upper bound of the range of model instances (not inclusive)
142            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
143            * @return the ordered range of matching rows
144            * @throws SystemException if a system exception occurred
145            */
146            @SuppressWarnings("rawtypes")
147            public static java.util.List dynamicQuery(
148                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
149                    int end,
150                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
151                    throws com.liferay.portal.kernel.exception.SystemException {
152                    return getService()
153                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
154            }
155    
156            /**
157            * Returns the number of rows that match the dynamic query.
158            *
159            * @param dynamicQuery the dynamic query
160            * @return the number of rows that match the dynamic query
161            * @throws SystemException if a system exception occurred
162            */
163            public static long dynamicQueryCount(
164                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
165                    throws com.liferay.portal.kernel.exception.SystemException {
166                    return getService().dynamicQueryCount(dynamicQuery);
167            }
168    
169            public static com.liferay.portal.model.UserGroup fetchUserGroup(
170                    long userGroupId)
171                    throws com.liferay.portal.kernel.exception.SystemException {
172                    return getService().fetchUserGroup(userGroupId);
173            }
174    
175            /**
176            * Returns the user group with the primary key.
177            *
178            * @param userGroupId the primary key of the user group
179            * @return the user group
180            * @throws PortalException if a user group with the primary key could not be found
181            * @throws SystemException if a system exception occurred
182            */
183            public static com.liferay.portal.model.UserGroup getUserGroup(
184                    long userGroupId)
185                    throws com.liferay.portal.kernel.exception.PortalException,
186                            com.liferay.portal.kernel.exception.SystemException {
187                    return getService().getUserGroup(userGroupId);
188            }
189    
190            public static com.liferay.portal.model.PersistedModel getPersistedModel(
191                    java.io.Serializable primaryKeyObj)
192                    throws com.liferay.portal.kernel.exception.PortalException,
193                            com.liferay.portal.kernel.exception.SystemException {
194                    return getService().getPersistedModel(primaryKeyObj);
195            }
196    
197            /**
198            * Returns a range of all the user groups.
199            *
200            * <p>
201            * 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.
202            * </p>
203            *
204            * @param start the lower bound of the range of user groups
205            * @param end the upper bound of the range of user groups (not inclusive)
206            * @return the range of user groups
207            * @throws SystemException if a system exception occurred
208            */
209            public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
210                    int start, int end)
211                    throws com.liferay.portal.kernel.exception.SystemException {
212                    return getService().getUserGroups(start, end);
213            }
214    
215            /**
216            * Returns the number of user groups.
217            *
218            * @return the number of user groups
219            * @throws SystemException if a system exception occurred
220            */
221            public static int getUserGroupsCount()
222                    throws com.liferay.portal.kernel.exception.SystemException {
223                    return getService().getUserGroupsCount();
224            }
225    
226            /**
227            * Updates the user group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
228            *
229            * @param userGroup the user group
230            * @return the user group that was updated
231            * @throws SystemException if a system exception occurred
232            */
233            public static com.liferay.portal.model.UserGroup updateUserGroup(
234                    com.liferay.portal.model.UserGroup userGroup)
235                    throws com.liferay.portal.kernel.exception.SystemException {
236                    return getService().updateUserGroup(userGroup);
237            }
238    
239            /**
240            * Updates the user group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
241            *
242            * @param userGroup the user group
243            * @param merge whether to merge the user 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.
244            * @return the user group that was updated
245            * @throws SystemException if a system exception occurred
246            */
247            public static com.liferay.portal.model.UserGroup updateUserGroup(
248                    com.liferay.portal.model.UserGroup userGroup, boolean merge)
249                    throws com.liferay.portal.kernel.exception.SystemException {
250                    return getService().updateUserGroup(userGroup, merge);
251            }
252    
253            /**
254            * @throws SystemException if a system exception occurred
255            */
256            public static void addGroupUserGroup(long groupId, long userGroupId)
257                    throws com.liferay.portal.kernel.exception.SystemException {
258                    getService().addGroupUserGroup(groupId, userGroupId);
259            }
260    
261            /**
262            * @throws SystemException if a system exception occurred
263            */
264            public static void addGroupUserGroup(long groupId,
265                    com.liferay.portal.model.UserGroup userGroup)
266                    throws com.liferay.portal.kernel.exception.SystemException {
267                    getService().addGroupUserGroup(groupId, userGroup);
268            }
269    
270            /**
271            * @throws SystemException if a system exception occurred
272            */
273            public static void addGroupUserGroups(long groupId, long[] userGroupIds)
274                    throws com.liferay.portal.kernel.exception.SystemException {
275                    getService().addGroupUserGroups(groupId, userGroupIds);
276            }
277    
278            /**
279            * @throws SystemException if a system exception occurred
280            */
281            public static void addGroupUserGroups(long groupId,
282                    java.util.List<com.liferay.portal.model.UserGroup> UserGroups)
283                    throws com.liferay.portal.kernel.exception.SystemException {
284                    getService().addGroupUserGroups(groupId, UserGroups);
285            }
286    
287            /**
288            * @throws SystemException if a system exception occurred
289            */
290            public static void clearGroupUserGroups(long groupId)
291                    throws com.liferay.portal.kernel.exception.SystemException {
292                    getService().clearGroupUserGroups(groupId);
293            }
294    
295            /**
296            * @throws SystemException if a system exception occurred
297            */
298            public static void deleteGroupUserGroup(long groupId, long userGroupId)
299                    throws com.liferay.portal.kernel.exception.SystemException {
300                    getService().deleteGroupUserGroup(groupId, userGroupId);
301            }
302    
303            /**
304            * @throws SystemException if a system exception occurred
305            */
306            public static void deleteGroupUserGroup(long groupId,
307                    com.liferay.portal.model.UserGroup userGroup)
308                    throws com.liferay.portal.kernel.exception.SystemException {
309                    getService().deleteGroupUserGroup(groupId, userGroup);
310            }
311    
312            /**
313            * @throws SystemException if a system exception occurred
314            */
315            public static void deleteGroupUserGroups(long groupId, long[] userGroupIds)
316                    throws com.liferay.portal.kernel.exception.SystemException {
317                    getService().deleteGroupUserGroups(groupId, userGroupIds);
318            }
319    
320            /**
321            * @throws SystemException if a system exception occurred
322            */
323            public static void deleteGroupUserGroups(long groupId,
324                    java.util.List<com.liferay.portal.model.UserGroup> UserGroups)
325                    throws com.liferay.portal.kernel.exception.SystemException {
326                    getService().deleteGroupUserGroups(groupId, UserGroups);
327            }
328    
329            /**
330            * @throws SystemException if a system exception occurred
331            */
332            public static java.util.List<com.liferay.portal.model.UserGroup> getGroupUserGroups(
333                    long groupId)
334                    throws com.liferay.portal.kernel.exception.SystemException {
335                    return getService().getGroupUserGroups(groupId);
336            }
337    
338            /**
339            * @throws SystemException if a system exception occurred
340            */
341            public static java.util.List<com.liferay.portal.model.UserGroup> getGroupUserGroups(
342                    long groupId, int start, int end)
343                    throws com.liferay.portal.kernel.exception.SystemException {
344                    return getService().getGroupUserGroups(groupId, start, end);
345            }
346    
347            /**
348            * @throws SystemException if a system exception occurred
349            */
350            public static java.util.List<com.liferay.portal.model.UserGroup> getGroupUserGroups(
351                    long groupId, int start, int end,
352                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
353                    throws com.liferay.portal.kernel.exception.SystemException {
354                    return getService()
355                                       .getGroupUserGroups(groupId, start, end, orderByComparator);
356            }
357    
358            /**
359            * @throws SystemException if a system exception occurred
360            */
361            public static int getGroupUserGroupsCount(long groupId)
362                    throws com.liferay.portal.kernel.exception.SystemException {
363                    return getService().getGroupUserGroupsCount(groupId);
364            }
365    
366            /**
367            * @throws SystemException if a system exception occurred
368            */
369            public static boolean hasGroupUserGroup(long groupId, long userGroupId)
370                    throws com.liferay.portal.kernel.exception.SystemException {
371                    return getService().hasGroupUserGroup(groupId, userGroupId);
372            }
373    
374            /**
375            * @throws SystemException if a system exception occurred
376            */
377            public static boolean hasGroupUserGroups(long groupId)
378                    throws com.liferay.portal.kernel.exception.SystemException {
379                    return getService().hasGroupUserGroups(groupId);
380            }
381    
382            /**
383            * @throws SystemException if a system exception occurred
384            */
385            public static void setGroupUserGroups(long groupId, long[] userGroupIds)
386                    throws com.liferay.portal.kernel.exception.SystemException {
387                    getService().setGroupUserGroups(groupId, userGroupIds);
388            }
389    
390            /**
391            * @throws SystemException if a system exception occurred
392            */
393            public static void addTeamUserGroup(long teamId, long userGroupId)
394                    throws com.liferay.portal.kernel.exception.SystemException {
395                    getService().addTeamUserGroup(teamId, userGroupId);
396            }
397    
398            /**
399            * @throws SystemException if a system exception occurred
400            */
401            public static void addTeamUserGroup(long teamId,
402                    com.liferay.portal.model.UserGroup userGroup)
403                    throws com.liferay.portal.kernel.exception.SystemException {
404                    getService().addTeamUserGroup(teamId, userGroup);
405            }
406    
407            /**
408            * @throws SystemException if a system exception occurred
409            */
410            public static void addTeamUserGroups(long teamId, long[] userGroupIds)
411                    throws com.liferay.portal.kernel.exception.SystemException {
412                    getService().addTeamUserGroups(teamId, userGroupIds);
413            }
414    
415            /**
416            * @throws SystemException if a system exception occurred
417            */
418            public static void addTeamUserGroups(long teamId,
419                    java.util.List<com.liferay.portal.model.UserGroup> UserGroups)
420                    throws com.liferay.portal.kernel.exception.SystemException {
421                    getService().addTeamUserGroups(teamId, UserGroups);
422            }
423    
424            /**
425            * @throws SystemException if a system exception occurred
426            */
427            public static void clearTeamUserGroups(long teamId)
428                    throws com.liferay.portal.kernel.exception.SystemException {
429                    getService().clearTeamUserGroups(teamId);
430            }
431    
432            /**
433            * @throws SystemException if a system exception occurred
434            */
435            public static void deleteTeamUserGroup(long teamId, long userGroupId)
436                    throws com.liferay.portal.kernel.exception.SystemException {
437                    getService().deleteTeamUserGroup(teamId, userGroupId);
438            }
439    
440            /**
441            * @throws SystemException if a system exception occurred
442            */
443            public static void deleteTeamUserGroup(long teamId,
444                    com.liferay.portal.model.UserGroup userGroup)
445                    throws com.liferay.portal.kernel.exception.SystemException {
446                    getService().deleteTeamUserGroup(teamId, userGroup);
447            }
448    
449            /**
450            * @throws SystemException if a system exception occurred
451            */
452            public static void deleteTeamUserGroups(long teamId, long[] userGroupIds)
453                    throws com.liferay.portal.kernel.exception.SystemException {
454                    getService().deleteTeamUserGroups(teamId, userGroupIds);
455            }
456    
457            /**
458            * @throws SystemException if a system exception occurred
459            */
460            public static void deleteTeamUserGroups(long teamId,
461                    java.util.List<com.liferay.portal.model.UserGroup> UserGroups)
462                    throws com.liferay.portal.kernel.exception.SystemException {
463                    getService().deleteTeamUserGroups(teamId, UserGroups);
464            }
465    
466            /**
467            * @throws SystemException if a system exception occurred
468            */
469            public static java.util.List<com.liferay.portal.model.UserGroup> getTeamUserGroups(
470                    long teamId) throws com.liferay.portal.kernel.exception.SystemException {
471                    return getService().getTeamUserGroups(teamId);
472            }
473    
474            /**
475            * @throws SystemException if a system exception occurred
476            */
477            public static java.util.List<com.liferay.portal.model.UserGroup> getTeamUserGroups(
478                    long teamId, int start, int end)
479                    throws com.liferay.portal.kernel.exception.SystemException {
480                    return getService().getTeamUserGroups(teamId, start, end);
481            }
482    
483            /**
484            * @throws SystemException if a system exception occurred
485            */
486            public static java.util.List<com.liferay.portal.model.UserGroup> getTeamUserGroups(
487                    long teamId, int start, int end,
488                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
489                    throws com.liferay.portal.kernel.exception.SystemException {
490                    return getService()
491                                       .getTeamUserGroups(teamId, start, end, orderByComparator);
492            }
493    
494            /**
495            * @throws SystemException if a system exception occurred
496            */
497            public static int getTeamUserGroupsCount(long teamId)
498                    throws com.liferay.portal.kernel.exception.SystemException {
499                    return getService().getTeamUserGroupsCount(teamId);
500            }
501    
502            /**
503            * @throws SystemException if a system exception occurred
504            */
505            public static boolean hasTeamUserGroup(long teamId, long userGroupId)
506                    throws com.liferay.portal.kernel.exception.SystemException {
507                    return getService().hasTeamUserGroup(teamId, userGroupId);
508            }
509    
510            /**
511            * @throws SystemException if a system exception occurred
512            */
513            public static boolean hasTeamUserGroups(long teamId)
514                    throws com.liferay.portal.kernel.exception.SystemException {
515                    return getService().hasTeamUserGroups(teamId);
516            }
517    
518            /**
519            * @throws SystemException if a system exception occurred
520            */
521            public static void setTeamUserGroups(long teamId, long[] userGroupIds)
522                    throws com.liferay.portal.kernel.exception.SystemException {
523                    getService().setTeamUserGroups(teamId, userGroupIds);
524            }
525    
526            /**
527            * @throws SystemException if a system exception occurred
528            */
529            public static void addUserUserGroup(long userId, long userGroupId)
530                    throws com.liferay.portal.kernel.exception.SystemException {
531                    getService().addUserUserGroup(userId, userGroupId);
532            }
533    
534            /**
535            * @throws SystemException if a system exception occurred
536            */
537            public static void addUserUserGroup(long userId,
538                    com.liferay.portal.model.UserGroup userGroup)
539                    throws com.liferay.portal.kernel.exception.SystemException {
540                    getService().addUserUserGroup(userId, userGroup);
541            }
542    
543            /**
544            * @throws SystemException if a system exception occurred
545            */
546            public static void addUserUserGroups(long userId, long[] userGroupIds)
547                    throws com.liferay.portal.kernel.exception.SystemException {
548                    getService().addUserUserGroups(userId, userGroupIds);
549            }
550    
551            /**
552            * @throws SystemException if a system exception occurred
553            */
554            public static void addUserUserGroups(long userId,
555                    java.util.List<com.liferay.portal.model.UserGroup> UserGroups)
556                    throws com.liferay.portal.kernel.exception.SystemException {
557                    getService().addUserUserGroups(userId, UserGroups);
558            }
559    
560            /**
561            * @throws SystemException if a system exception occurred
562            */
563            public static void clearUserUserGroups(long userId)
564                    throws com.liferay.portal.kernel.exception.SystemException {
565                    getService().clearUserUserGroups(userId);
566            }
567    
568            /**
569            * @throws SystemException if a system exception occurred
570            */
571            public static void deleteUserUserGroup(long userId, long userGroupId)
572                    throws com.liferay.portal.kernel.exception.SystemException {
573                    getService().deleteUserUserGroup(userId, userGroupId);
574            }
575    
576            /**
577            * @throws SystemException if a system exception occurred
578            */
579            public static void deleteUserUserGroup(long userId,
580                    com.liferay.portal.model.UserGroup userGroup)
581                    throws com.liferay.portal.kernel.exception.SystemException {
582                    getService().deleteUserUserGroup(userId, userGroup);
583            }
584    
585            /**
586            * @throws SystemException if a system exception occurred
587            */
588            public static void deleteUserUserGroups(long userId, long[] userGroupIds)
589                    throws com.liferay.portal.kernel.exception.SystemException {
590                    getService().deleteUserUserGroups(userId, userGroupIds);
591            }
592    
593            /**
594            * @throws SystemException if a system exception occurred
595            */
596            public static void deleteUserUserGroups(long userId,
597                    java.util.List<com.liferay.portal.model.UserGroup> UserGroups)
598                    throws com.liferay.portal.kernel.exception.SystemException {
599                    getService().deleteUserUserGroups(userId, UserGroups);
600            }
601    
602            /**
603            * @throws SystemException if a system exception occurred
604            */
605            public static java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups(
606                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
607                    return getService().getUserUserGroups(userId);
608            }
609    
610            /**
611            * @throws SystemException if a system exception occurred
612            */
613            public static java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups(
614                    long userId, int start, int end)
615                    throws com.liferay.portal.kernel.exception.SystemException {
616                    return getService().getUserUserGroups(userId, start, end);
617            }
618    
619            /**
620            * @throws SystemException if a system exception occurred
621            */
622            public static java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups(
623                    long userId, int start, int end,
624                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
625                    throws com.liferay.portal.kernel.exception.SystemException {
626                    return getService()
627                                       .getUserUserGroups(userId, start, end, orderByComparator);
628            }
629    
630            /**
631            * @throws SystemException if a system exception occurred
632            */
633            public static int getUserUserGroupsCount(long userId)
634                    throws com.liferay.portal.kernel.exception.SystemException {
635                    return getService().getUserUserGroupsCount(userId);
636            }
637    
638            /**
639            * @throws SystemException if a system exception occurred
640            */
641            public static boolean hasUserUserGroup(long userId, long userGroupId)
642                    throws com.liferay.portal.kernel.exception.SystemException {
643                    return getService().hasUserUserGroup(userId, userGroupId);
644            }
645    
646            /**
647            * @throws SystemException if a system exception occurred
648            */
649            public static boolean hasUserUserGroups(long userId)
650                    throws com.liferay.portal.kernel.exception.SystemException {
651                    return getService().hasUserUserGroups(userId);
652            }
653    
654            /**
655            * @throws PortalException
656            * @throws SystemException if a system exception occurred
657            */
658            public static void setUserUserGroups(long userId, long[] userGroupIds)
659                    throws com.liferay.portal.kernel.exception.PortalException,
660                            com.liferay.portal.kernel.exception.SystemException {
661                    getService().setUserUserGroups(userId, userGroupIds);
662            }
663    
664            /**
665            * Returns the Spring bean ID for this bean.
666            *
667            * @return the Spring bean ID for this bean
668            */
669            public static java.lang.String getBeanIdentifier() {
670                    return getService().getBeanIdentifier();
671            }
672    
673            /**
674            * Sets the Spring bean ID for this bean.
675            *
676            * @param beanIdentifier the Spring bean ID for this bean
677            */
678            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
679                    getService().setBeanIdentifier(beanIdentifier);
680            }
681    
682            /**
683            * Adds a user group.
684            *
685            * <p>
686            * This method handles the creation and bookkeeping of the user group,
687            * including its resources, metadata, and internal data structures. It is
688            * not necessary to make subsequent calls to setup default groups and
689            * resources for the user group.
690            * </p>
691            *
692            * @param userId the primary key of the user
693            * @param companyId the primary key of the user group's company
694            * @param name the user group's name
695            * @param description the user group's description
696            * @return the user group
697            * @throws PortalException if the user group's information was invalid
698            * @throws SystemException if a system exception occurred
699            */
700            public static com.liferay.portal.model.UserGroup addUserGroup(long userId,
701                    long companyId, java.lang.String name, java.lang.String description)
702                    throws com.liferay.portal.kernel.exception.PortalException,
703                            com.liferay.portal.kernel.exception.SystemException {
704                    return getService().addUserGroup(userId, companyId, name, description);
705            }
706    
707            /**
708            * Copies the user group's layout to the user.
709            *
710            * @param userGroupId the primary key of the user group
711            * @param userId the primary key of the user
712            * @throws PortalException if a user with the primary key could not be
713            found or if a portal exception occurred
714            * @throws SystemException if a system exception occurred
715            * @deprecated
716            */
717            public static void copyUserGroupLayouts(long userGroupId, long userId)
718                    throws com.liferay.portal.kernel.exception.PortalException,
719                            com.liferay.portal.kernel.exception.SystemException {
720                    getService().copyUserGroupLayouts(userGroupId, userId);
721            }
722    
723            /**
724            * Copies the user group's layouts to the users who are not already members
725            * of the user group.
726            *
727            * @param userGroupId the primary key of the user group
728            * @param userIds the primary keys of the users
729            * @throws PortalException if any one of the users could not be found or
730            if a portal exception occurred
731            * @throws SystemException if a system exception occurred
732            * @deprecated
733            */
734            public static void copyUserGroupLayouts(long userGroupId, long[] userIds)
735                    throws com.liferay.portal.kernel.exception.PortalException,
736                            com.liferay.portal.kernel.exception.SystemException {
737                    getService().copyUserGroupLayouts(userGroupId, userIds);
738            }
739    
740            /**
741            * Copies the user groups' layouts to the user.
742            *
743            * @param userGroupIds the primary keys of the user groups
744            * @param userId the primary key of the user
745            * @throws PortalException if a user with the primary key could not be
746            found or if a portal exception occurred
747            * @throws SystemException if a system exception occurred
748            * @deprecated
749            */
750            public static void copyUserGroupLayouts(long[] userGroupIds, long userId)
751                    throws com.liferay.portal.kernel.exception.PortalException,
752                            com.liferay.portal.kernel.exception.SystemException {
753                    getService().copyUserGroupLayouts(userGroupIds, userId);
754            }
755    
756            /**
757            * Returns the user group with the name.
758            *
759            * @param companyId the primary key of the user group's company
760            * @param name the user group's name
761            * @return Returns the user group with the name
762            * @throws PortalException if a user group with the name could not be found
763            * @throws SystemException if a system exception occurred
764            */
765            public static com.liferay.portal.model.UserGroup getUserGroup(
766                    long companyId, java.lang.String name)
767                    throws com.liferay.portal.kernel.exception.PortalException,
768                            com.liferay.portal.kernel.exception.SystemException {
769                    return getService().getUserGroup(companyId, name);
770            }
771    
772            /**
773            * Returns all the user groups belonging to the company.
774            *
775            * @param companyId the primary key of the user groups' company
776            * @return the user groups belonging to the company
777            * @throws SystemException if a system exception occurred
778            */
779            public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
780                    long companyId)
781                    throws com.liferay.portal.kernel.exception.SystemException {
782                    return getService().getUserGroups(companyId);
783            }
784    
785            /**
786            * Returns all the user groups with the primary keys.
787            *
788            * @param userGroupIds the primary keys of the user groups
789            * @return the user groups with the primary keys
790            * @throws PortalException if any one of the user groups could not be found
791            * @throws SystemException if a system exception occurred
792            */
793            public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
794                    long[] userGroupIds)
795                    throws com.liferay.portal.kernel.exception.PortalException,
796                            com.liferay.portal.kernel.exception.SystemException {
797                    return getService().getUserGroups(userGroupIds);
798            }
799    
800            public static java.util.List<com.liferay.portal.model.UserGroup> search(
801                    long companyId, java.lang.String keywords,
802                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
803                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
804                    throws com.liferay.portal.kernel.exception.SystemException {
805                    return getService().search(companyId, keywords, params, start, end, obc);
806            }
807    
808            /**
809            * Returns an ordered range of all the user groups that match the name and
810            * description.
811            *
812            * <p>
813            * Useful when paginating results. Returns a maximum of <code>end -
814            * start</code> instances. <code>start</code> and <code>end</code> are not
815            * primary keys, they are indexes in the result set. Thus, <code>0</code>
816            * refers to the first result in the set. Setting both <code>start</code>
817            * and <code>end</code> to {@link
818            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
819            * result set.
820            * </p>
821            *
822            * @param companyId the primary key of the user group's company
823            * @param name the user group's name (optionally <code>null</code>)
824            * @param description the user group's description (optionally
825            <code>null</code>)
826            * @param params the finder params (optionally <code>null</code>). For more
827            information see {@link
828            com.liferay.portal.service.persistence.UserGroupFinder}
829            * @param start the lower bound of the range of user groups to return
830            * @param end the upper bound of the range of user groups to return (not
831            inclusive)
832            * @param obc the comparator to order the user groups (optionally
833            <code>null</code>)
834            * @return the matching user groups ordered by comparator <code>obc</code>
835            * @throws SystemException if a system exception occurred
836            * @see com.liferay.portal.service.persistence.UserGroupFinder
837            */
838            public static java.util.List<com.liferay.portal.model.UserGroup> search(
839                    long companyId, java.lang.String name, java.lang.String description,
840                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
841                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
842                    throws com.liferay.portal.kernel.exception.SystemException {
843                    return getService()
844                                       .search(companyId, name, description, params, start, end, obc);
845            }
846    
847            public static int searchCount(long companyId, java.lang.String keywords,
848                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
849                    throws com.liferay.portal.kernel.exception.SystemException {
850                    return getService().searchCount(companyId, keywords, params);
851            }
852    
853            /**
854            * Returns the number of user groups that match the name and description.
855            *
856            * @param companyId the primary key of the user group's company
857            * @param name the user group's name (optionally <code>null</code>)
858            * @param description the user group's description (optionally
859            <code>null</code>)
860            * @param params the finder params (optionally <code>null</code>). For more
861            information see {@link
862            com.liferay.portal.service.persistence.UserGroupFinder}
863            * @return the number of matching user groups
864            * @throws SystemException if a system exception occurred
865            * @see com.liferay.portal.service.persistence.UserGroupFinder
866            */
867            public static int searchCount(long companyId, java.lang.String name,
868                    java.lang.String description,
869                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
870                    throws com.liferay.portal.kernel.exception.SystemException {
871                    return getService().searchCount(companyId, name, description, params);
872            }
873    
874            /**
875            * Removes the user groups from the group.
876            *
877            * @param groupId the primary key of the group
878            * @param userGroupIds the primary keys of the user groups
879            * @throws SystemException if a system exception occurred
880            */
881            public static void unsetGroupUserGroups(long groupId, long[] userGroupIds)
882                    throws com.liferay.portal.kernel.exception.SystemException {
883                    getService().unsetGroupUserGroups(groupId, userGroupIds);
884            }
885    
886            /**
887            * Removes the user groups from the team.
888            *
889            * @param teamId the primary key of the team
890            * @param userGroupIds the primary keys of the user groups
891            * @throws SystemException if a system exception occurred
892            */
893            public static void unsetTeamUserGroups(long teamId, long[] userGroupIds)
894                    throws com.liferay.portal.kernel.exception.SystemException {
895                    getService().unsetTeamUserGroups(teamId, userGroupIds);
896            }
897    
898            /**
899            * Updates the user group.
900            *
901            * @param companyId the primary key of the user group's company
902            * @param userGroupId the primary key of the user group
903            * @param name the user group's name
904            * @param description the user group's description
905            * @return the user group
906            * @throws PortalException if a user group with the primary key could not be
907            found or if the new information was invalid
908            * @throws SystemException if a system exception occurred
909            */
910            public static com.liferay.portal.model.UserGroup updateUserGroup(
911                    long companyId, long userGroupId, java.lang.String name,
912                    java.lang.String description)
913                    throws com.liferay.portal.kernel.exception.PortalException,
914                            com.liferay.portal.kernel.exception.SystemException {
915                    return getService()
916                                       .updateUserGroup(companyId, userGroupId, name, description);
917            }
918    
919            public static UserGroupLocalService getService() {
920                    if (_service == null) {
921                            _service = (UserGroupLocalService)PortalBeanLocatorUtil.locate(UserGroupLocalService.class.getName());
922    
923                            ReferenceRegistry.registerReference(UserGroupLocalServiceUtil.class,
924                                    "_service");
925                    }
926    
927                    return _service;
928            }
929    
930            /**
931             * @deprecated
932             */
933            public void setService(UserGroupLocalService service) {
934            }
935    
936            private static UserGroupLocalService _service;
937    }