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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
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            * @throws SystemException if a system exception occurred
241            */
242            public static void addGroupUserGroup(long groupId, long userGroupId)
243                    throws com.liferay.portal.kernel.exception.SystemException {
244                    getService().addGroupUserGroup(groupId, userGroupId);
245            }
246    
247            /**
248            * @throws SystemException if a system exception occurred
249            */
250            public static void addGroupUserGroup(long groupId,
251                    com.liferay.portal.model.UserGroup userGroup)
252                    throws com.liferay.portal.kernel.exception.SystemException {
253                    getService().addGroupUserGroup(groupId, userGroup);
254            }
255    
256            /**
257            * @throws SystemException if a system exception occurred
258            */
259            public static void addGroupUserGroups(long groupId, long[] userGroupIds)
260                    throws com.liferay.portal.kernel.exception.SystemException {
261                    getService().addGroupUserGroups(groupId, userGroupIds);
262            }
263    
264            /**
265            * @throws SystemException if a system exception occurred
266            */
267            public static void addGroupUserGroups(long groupId,
268                    java.util.List<com.liferay.portal.model.UserGroup> UserGroups)
269                    throws com.liferay.portal.kernel.exception.SystemException {
270                    getService().addGroupUserGroups(groupId, UserGroups);
271            }
272    
273            /**
274            * @throws SystemException if a system exception occurred
275            */
276            public static void clearGroupUserGroups(long groupId)
277                    throws com.liferay.portal.kernel.exception.SystemException {
278                    getService().clearGroupUserGroups(groupId);
279            }
280    
281            /**
282            * @throws SystemException if a system exception occurred
283            */
284            public static void deleteGroupUserGroup(long groupId, long userGroupId)
285                    throws com.liferay.portal.kernel.exception.SystemException {
286                    getService().deleteGroupUserGroup(groupId, userGroupId);
287            }
288    
289            /**
290            * @throws SystemException if a system exception occurred
291            */
292            public static void deleteGroupUserGroup(long groupId,
293                    com.liferay.portal.model.UserGroup userGroup)
294                    throws com.liferay.portal.kernel.exception.SystemException {
295                    getService().deleteGroupUserGroup(groupId, userGroup);
296            }
297    
298            /**
299            * @throws SystemException if a system exception occurred
300            */
301            public static void deleteGroupUserGroups(long groupId, long[] userGroupIds)
302                    throws com.liferay.portal.kernel.exception.SystemException {
303                    getService().deleteGroupUserGroups(groupId, userGroupIds);
304            }
305    
306            /**
307            * @throws SystemException if a system exception occurred
308            */
309            public static void deleteGroupUserGroups(long groupId,
310                    java.util.List<com.liferay.portal.model.UserGroup> UserGroups)
311                    throws com.liferay.portal.kernel.exception.SystemException {
312                    getService().deleteGroupUserGroups(groupId, UserGroups);
313            }
314    
315            /**
316            * @throws SystemException if a system exception occurred
317            */
318            public static java.util.List<com.liferay.portal.model.UserGroup> getGroupUserGroups(
319                    long groupId)
320                    throws com.liferay.portal.kernel.exception.SystemException {
321                    return getService().getGroupUserGroups(groupId);
322            }
323    
324            /**
325            * @throws SystemException if a system exception occurred
326            */
327            public static java.util.List<com.liferay.portal.model.UserGroup> getGroupUserGroups(
328                    long groupId, int start, int end)
329                    throws com.liferay.portal.kernel.exception.SystemException {
330                    return getService().getGroupUserGroups(groupId, start, end);
331            }
332    
333            /**
334            * @throws SystemException if a system exception occurred
335            */
336            public static java.util.List<com.liferay.portal.model.UserGroup> getGroupUserGroups(
337                    long groupId, int start, int end,
338                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
339                    throws com.liferay.portal.kernel.exception.SystemException {
340                    return getService()
341                                       .getGroupUserGroups(groupId, start, end, orderByComparator);
342            }
343    
344            /**
345            * @throws SystemException if a system exception occurred
346            */
347            public static int getGroupUserGroupsCount(long groupId)
348                    throws com.liferay.portal.kernel.exception.SystemException {
349                    return getService().getGroupUserGroupsCount(groupId);
350            }
351    
352            /**
353            * @throws SystemException if a system exception occurred
354            */
355            public static boolean hasGroupUserGroup(long groupId, long userGroupId)
356                    throws com.liferay.portal.kernel.exception.SystemException {
357                    return getService().hasGroupUserGroup(groupId, userGroupId);
358            }
359    
360            /**
361            * @throws SystemException if a system exception occurred
362            */
363            public static boolean hasGroupUserGroups(long groupId)
364                    throws com.liferay.portal.kernel.exception.SystemException {
365                    return getService().hasGroupUserGroups(groupId);
366            }
367    
368            /**
369            * @throws SystemException if a system exception occurred
370            */
371            public static void setGroupUserGroups(long groupId, long[] userGroupIds)
372                    throws com.liferay.portal.kernel.exception.SystemException {
373                    getService().setGroupUserGroups(groupId, userGroupIds);
374            }
375    
376            /**
377            * @throws SystemException if a system exception occurred
378            */
379            public static void addTeamUserGroup(long teamId, long userGroupId)
380                    throws com.liferay.portal.kernel.exception.SystemException {
381                    getService().addTeamUserGroup(teamId, userGroupId);
382            }
383    
384            /**
385            * @throws SystemException if a system exception occurred
386            */
387            public static void addTeamUserGroup(long teamId,
388                    com.liferay.portal.model.UserGroup userGroup)
389                    throws com.liferay.portal.kernel.exception.SystemException {
390                    getService().addTeamUserGroup(teamId, userGroup);
391            }
392    
393            /**
394            * @throws SystemException if a system exception occurred
395            */
396            public static void addTeamUserGroups(long teamId, long[] userGroupIds)
397                    throws com.liferay.portal.kernel.exception.SystemException {
398                    getService().addTeamUserGroups(teamId, userGroupIds);
399            }
400    
401            /**
402            * @throws SystemException if a system exception occurred
403            */
404            public static void addTeamUserGroups(long teamId,
405                    java.util.List<com.liferay.portal.model.UserGroup> UserGroups)
406                    throws com.liferay.portal.kernel.exception.SystemException {
407                    getService().addTeamUserGroups(teamId, UserGroups);
408            }
409    
410            /**
411            * @throws SystemException if a system exception occurred
412            */
413            public static void clearTeamUserGroups(long teamId)
414                    throws com.liferay.portal.kernel.exception.SystemException {
415                    getService().clearTeamUserGroups(teamId);
416            }
417    
418            /**
419            * @throws SystemException if a system exception occurred
420            */
421            public static void deleteTeamUserGroup(long teamId, long userGroupId)
422                    throws com.liferay.portal.kernel.exception.SystemException {
423                    getService().deleteTeamUserGroup(teamId, userGroupId);
424            }
425    
426            /**
427            * @throws SystemException if a system exception occurred
428            */
429            public static void deleteTeamUserGroup(long teamId,
430                    com.liferay.portal.model.UserGroup userGroup)
431                    throws com.liferay.portal.kernel.exception.SystemException {
432                    getService().deleteTeamUserGroup(teamId, userGroup);
433            }
434    
435            /**
436            * @throws SystemException if a system exception occurred
437            */
438            public static void deleteTeamUserGroups(long teamId, long[] userGroupIds)
439                    throws com.liferay.portal.kernel.exception.SystemException {
440                    getService().deleteTeamUserGroups(teamId, userGroupIds);
441            }
442    
443            /**
444            * @throws SystemException if a system exception occurred
445            */
446            public static void deleteTeamUserGroups(long teamId,
447                    java.util.List<com.liferay.portal.model.UserGroup> UserGroups)
448                    throws com.liferay.portal.kernel.exception.SystemException {
449                    getService().deleteTeamUserGroups(teamId, UserGroups);
450            }
451    
452            /**
453            * @throws SystemException if a system exception occurred
454            */
455            public static java.util.List<com.liferay.portal.model.UserGroup> getTeamUserGroups(
456                    long teamId) throws com.liferay.portal.kernel.exception.SystemException {
457                    return getService().getTeamUserGroups(teamId);
458            }
459    
460            /**
461            * @throws SystemException if a system exception occurred
462            */
463            public static java.util.List<com.liferay.portal.model.UserGroup> getTeamUserGroups(
464                    long teamId, int start, int end)
465                    throws com.liferay.portal.kernel.exception.SystemException {
466                    return getService().getTeamUserGroups(teamId, start, end);
467            }
468    
469            /**
470            * @throws SystemException if a system exception occurred
471            */
472            public static java.util.List<com.liferay.portal.model.UserGroup> getTeamUserGroups(
473                    long teamId, int start, int end,
474                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
475                    throws com.liferay.portal.kernel.exception.SystemException {
476                    return getService()
477                                       .getTeamUserGroups(teamId, start, end, orderByComparator);
478            }
479    
480            /**
481            * @throws SystemException if a system exception occurred
482            */
483            public static int getTeamUserGroupsCount(long teamId)
484                    throws com.liferay.portal.kernel.exception.SystemException {
485                    return getService().getTeamUserGroupsCount(teamId);
486            }
487    
488            /**
489            * @throws SystemException if a system exception occurred
490            */
491            public static boolean hasTeamUserGroup(long teamId, long userGroupId)
492                    throws com.liferay.portal.kernel.exception.SystemException {
493                    return getService().hasTeamUserGroup(teamId, userGroupId);
494            }
495    
496            /**
497            * @throws SystemException if a system exception occurred
498            */
499            public static boolean hasTeamUserGroups(long teamId)
500                    throws com.liferay.portal.kernel.exception.SystemException {
501                    return getService().hasTeamUserGroups(teamId);
502            }
503    
504            /**
505            * @throws SystemException if a system exception occurred
506            */
507            public static void setTeamUserGroups(long teamId, long[] userGroupIds)
508                    throws com.liferay.portal.kernel.exception.SystemException {
509                    getService().setTeamUserGroups(teamId, userGroupIds);
510            }
511    
512            /**
513            * @throws SystemException if a system exception occurred
514            */
515            public static void addUserUserGroup(long userId, long userGroupId)
516                    throws com.liferay.portal.kernel.exception.SystemException {
517                    getService().addUserUserGroup(userId, userGroupId);
518            }
519    
520            /**
521            * @throws SystemException if a system exception occurred
522            */
523            public static void addUserUserGroup(long userId,
524                    com.liferay.portal.model.UserGroup userGroup)
525                    throws com.liferay.portal.kernel.exception.SystemException {
526                    getService().addUserUserGroup(userId, userGroup);
527            }
528    
529            /**
530            * @throws SystemException if a system exception occurred
531            */
532            public static void addUserUserGroups(long userId, long[] userGroupIds)
533                    throws com.liferay.portal.kernel.exception.SystemException {
534                    getService().addUserUserGroups(userId, userGroupIds);
535            }
536    
537            /**
538            * @throws SystemException if a system exception occurred
539            */
540            public static void addUserUserGroups(long userId,
541                    java.util.List<com.liferay.portal.model.UserGroup> UserGroups)
542                    throws com.liferay.portal.kernel.exception.SystemException {
543                    getService().addUserUserGroups(userId, UserGroups);
544            }
545    
546            /**
547            * @throws SystemException if a system exception occurred
548            */
549            public static void clearUserUserGroups(long userId)
550                    throws com.liferay.portal.kernel.exception.SystemException {
551                    getService().clearUserUserGroups(userId);
552            }
553    
554            /**
555            * @throws SystemException if a system exception occurred
556            */
557            public static void deleteUserUserGroup(long userId, long userGroupId)
558                    throws com.liferay.portal.kernel.exception.SystemException {
559                    getService().deleteUserUserGroup(userId, userGroupId);
560            }
561    
562            /**
563            * @throws SystemException if a system exception occurred
564            */
565            public static void deleteUserUserGroup(long userId,
566                    com.liferay.portal.model.UserGroup userGroup)
567                    throws com.liferay.portal.kernel.exception.SystemException {
568                    getService().deleteUserUserGroup(userId, userGroup);
569            }
570    
571            /**
572            * @throws SystemException if a system exception occurred
573            */
574            public static void deleteUserUserGroups(long userId, long[] userGroupIds)
575                    throws com.liferay.portal.kernel.exception.SystemException {
576                    getService().deleteUserUserGroups(userId, userGroupIds);
577            }
578    
579            /**
580            * @throws SystemException if a system exception occurred
581            */
582            public static void deleteUserUserGroups(long userId,
583                    java.util.List<com.liferay.portal.model.UserGroup> UserGroups)
584                    throws com.liferay.portal.kernel.exception.SystemException {
585                    getService().deleteUserUserGroups(userId, UserGroups);
586            }
587    
588            /**
589            * @throws SystemException if a system exception occurred
590            */
591            public static java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups(
592                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
593                    return getService().getUserUserGroups(userId);
594            }
595    
596            /**
597            * @throws SystemException if a system exception occurred
598            */
599            public static java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups(
600                    long userId, int start, int end)
601                    throws com.liferay.portal.kernel.exception.SystemException {
602                    return getService().getUserUserGroups(userId, start, end);
603            }
604    
605            /**
606            * @throws SystemException if a system exception occurred
607            */
608            public static java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups(
609                    long userId, int start, int end,
610                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
611                    throws com.liferay.portal.kernel.exception.SystemException {
612                    return getService()
613                                       .getUserUserGroups(userId, start, end, orderByComparator);
614            }
615    
616            /**
617            * @throws SystemException if a system exception occurred
618            */
619            public static int getUserUserGroupsCount(long userId)
620                    throws com.liferay.portal.kernel.exception.SystemException {
621                    return getService().getUserUserGroupsCount(userId);
622            }
623    
624            /**
625            * @throws SystemException if a system exception occurred
626            */
627            public static boolean hasUserUserGroup(long userId, long userGroupId)
628                    throws com.liferay.portal.kernel.exception.SystemException {
629                    return getService().hasUserUserGroup(userId, userGroupId);
630            }
631    
632            /**
633            * @throws SystemException if a system exception occurred
634            */
635            public static boolean hasUserUserGroups(long userId)
636                    throws com.liferay.portal.kernel.exception.SystemException {
637                    return getService().hasUserUserGroups(userId);
638            }
639    
640            /**
641            * @throws PortalException
642            * @throws SystemException if a system exception occurred
643            */
644            public static void setUserUserGroups(long userId, long[] userGroupIds)
645                    throws com.liferay.portal.kernel.exception.PortalException,
646                            com.liferay.portal.kernel.exception.SystemException {
647                    getService().setUserUserGroups(userId, userGroupIds);
648            }
649    
650            /**
651            * Returns the Spring bean ID for this bean.
652            *
653            * @return the Spring bean ID for this bean
654            */
655            public static java.lang.String getBeanIdentifier() {
656                    return getService().getBeanIdentifier();
657            }
658    
659            /**
660            * Sets the Spring bean ID for this bean.
661            *
662            * @param beanIdentifier the Spring bean ID for this bean
663            */
664            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
665                    getService().setBeanIdentifier(beanIdentifier);
666            }
667    
668            /**
669            * Adds a user group.
670            *
671            * <p>
672            * This method handles the creation and bookkeeping of the user group,
673            * including its resources, metadata, and internal data structures. It is
674            * not necessary to make subsequent calls to setup default groups and
675            * resources for the user group.
676            * </p>
677            *
678            * @param userId the primary key of the user
679            * @param companyId the primary key of the user group's company
680            * @param name the user group's name
681            * @param description the user group's description
682            * @return the user group
683            * @throws PortalException if the user group's information was invalid
684            * @throws SystemException if a system exception occurred
685            * @deprecated As of 6.2.0, replaced by {@link #addUserGroup(long, long,
686            String, String, ServiceContext)}
687            */
688            public static com.liferay.portal.model.UserGroup addUserGroup(long userId,
689                    long companyId, java.lang.String name, java.lang.String description)
690                    throws com.liferay.portal.kernel.exception.PortalException,
691                            com.liferay.portal.kernel.exception.SystemException {
692                    return getService().addUserGroup(userId, companyId, name, description);
693            }
694    
695            /**
696            * Adds a user group.
697            *
698            * <p>
699            * This method handles the creation and bookkeeping of the user group,
700            * including its resources, metadata, and internal data structures. It is
701            * not necessary to make subsequent calls to setup default groups and
702            * resources for the user group.
703            * </p>
704            *
705            * @param userId the primary key of the user
706            * @param companyId the primary key of the user group's company
707            * @param name the user group's name
708            * @param description the user group's description
709            * @param serviceContext the service context to be applied (optionally
710            <code>null</code>). Can set expando bridge attributes for the
711            user group.
712            * @return the user group
713            * @throws PortalException if the user group's information was invalid
714            * @throws SystemException if a system exception occurred
715            */
716            public static com.liferay.portal.model.UserGroup addUserGroup(long userId,
717                    long companyId, java.lang.String name, java.lang.String description,
718                    com.liferay.portal.service.ServiceContext serviceContext)
719                    throws com.liferay.portal.kernel.exception.PortalException,
720                            com.liferay.portal.kernel.exception.SystemException {
721                    return getService()
722                                       .addUserGroup(userId, companyId, name, description,
723                            serviceContext);
724            }
725    
726            /**
727            * Copies the user group's layout to the user.
728            *
729            * @param userGroupId the primary key of the user group
730            * @param userId the primary key of the user
731            * @throws PortalException if a user with the primary key could not be
732            found or if a portal exception occurred
733            * @throws SystemException if a system exception occurred
734            * @deprecated As of 6.2.0
735            */
736            public static void copyUserGroupLayouts(long userGroupId, long userId)
737                    throws com.liferay.portal.kernel.exception.PortalException,
738                            com.liferay.portal.kernel.exception.SystemException {
739                    getService().copyUserGroupLayouts(userGroupId, userId);
740            }
741    
742            /**
743            * Copies the user group's layouts to the users who are not already members
744            * of the user group.
745            *
746            * @param userGroupId the primary key of the user group
747            * @param userIds the primary keys of the users
748            * @throws PortalException if any one of the users could not be found or
749            if a portal exception occurred
750            * @throws SystemException if a system exception occurred
751            * @deprecated As of 6.1.0
752            */
753            public static void copyUserGroupLayouts(long userGroupId, long[] userIds)
754                    throws com.liferay.portal.kernel.exception.PortalException,
755                            com.liferay.portal.kernel.exception.SystemException {
756                    getService().copyUserGroupLayouts(userGroupId, userIds);
757            }
758    
759            /**
760            * Copies the user groups' layouts to the user.
761            *
762            * @param userGroupIds the primary keys of the user groups
763            * @param userId the primary key of the user
764            * @throws PortalException if a user with the primary key could not be
765            found or if a portal exception occurred
766            * @throws SystemException if a system exception occurred
767            * @deprecated As of 6.1.0
768            */
769            public static void copyUserGroupLayouts(long[] userGroupIds, long userId)
770                    throws com.liferay.portal.kernel.exception.PortalException,
771                            com.liferay.portal.kernel.exception.SystemException {
772                    getService().copyUserGroupLayouts(userGroupIds, userId);
773            }
774    
775            public static com.liferay.portal.model.UserGroup fetchUserGroup(
776                    long companyId, java.lang.String name)
777                    throws com.liferay.portal.kernel.exception.SystemException {
778                    return getService().fetchUserGroup(companyId, name);
779            }
780    
781            public static com.liferay.portal.model.UserGroup fetchUserGroupByUuidAndCompanyId(
782                    java.lang.String uuid, long companyId)
783                    throws com.liferay.portal.kernel.exception.SystemException {
784                    return getService().fetchUserGroupByUuidAndCompanyId(uuid, companyId);
785            }
786    
787            /**
788            * Returns the user group with the name.
789            *
790            * @param companyId the primary key of the user group's company
791            * @param name the user group's name
792            * @return Returns the user group with the name
793            * @throws PortalException if a user group with the name could not be found
794            * @throws SystemException if a system exception occurred
795            */
796            public static com.liferay.portal.model.UserGroup getUserGroup(
797                    long companyId, java.lang.String name)
798                    throws com.liferay.portal.kernel.exception.PortalException,
799                            com.liferay.portal.kernel.exception.SystemException {
800                    return getService().getUserGroup(companyId, name);
801            }
802    
803            /**
804            * Returns all the user groups belonging to the company.
805            *
806            * @param companyId the primary key of the user groups' company
807            * @return the user groups belonging to the company
808            * @throws SystemException if a system exception occurred
809            */
810            public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
811                    long companyId)
812                    throws com.liferay.portal.kernel.exception.SystemException {
813                    return getService().getUserGroups(companyId);
814            }
815    
816            /**
817            * Returns all the user groups with the primary keys.
818            *
819            * @param userGroupIds the primary keys of the user groups
820            * @return the user groups with the primary keys
821            * @throws PortalException if any one of the user groups could not be found
822            * @throws SystemException if a system exception occurred
823            */
824            public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
825                    long[] userGroupIds)
826                    throws com.liferay.portal.kernel.exception.PortalException,
827                            com.liferay.portal.kernel.exception.SystemException {
828                    return getService().getUserGroups(userGroupIds);
829            }
830    
831            /**
832            * Returns an ordered range of all the user groups that match the keywords.
833            *
834            * <p>
835            * Useful when paginating results. Returns a maximum of <code>end -
836            * start</code> instances. <code>start</code> and <code>end</code> are not
837            * primary keys, they are indexes in the result set. Thus, <code>0</code>
838            * refers to the first result in the set. Setting both <code>start</code>
839            * and <code>end</code> to {@link
840            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
841            * result set.
842            * </p>
843            *
844            * @param companyId the primary key of the user group's company
845            * @param keywords the keywords (space separated), which may occur in the
846            user group's name or description (optionally <code>null</code>)
847            * @param params the finder params (optionally <code>null</code>). For more
848            information see {@link
849            com.liferay.portal.service.persistence.UserGroupFinder}
850            * @param start the lower bound of the range of user groups to return
851            * @param end the upper bound of the range of user groups to return (not
852            inclusive)
853            * @param obc the comparator to order the user groups (optionally
854            <code>null</code>)
855            * @return the matching user groups ordered by comparator <code>obc</code>
856            * @throws SystemException if a system exception occurred
857            * @see com.liferay.portal.service.persistence.UserGroupFinder
858            */
859            public static java.util.List<com.liferay.portal.model.UserGroup> search(
860                    long companyId, java.lang.String keywords,
861                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
862                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
863                    throws com.liferay.portal.kernel.exception.SystemException {
864                    return getService().search(companyId, keywords, params, start, end, obc);
865            }
866    
867            /**
868            * Returns an ordered range of all the user groups that match the keywords,
869            * using the indexer. It is preferable to use this method instead of the
870            * non-indexed version whenever possible for performance reasons.
871            *
872            * <p>
873            * Useful when paginating results. Returns a maximum of <code>end -
874            * start</code> instances. <code>start</code> and <code>end</code> are not
875            * primary keys, they are indexes in the result set. Thus, <code>0</code>
876            * refers to the first result in the set. Setting both <code>start</code>
877            * and <code>end</code> to {@link
878            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
879            * result set.
880            * </p>
881            *
882            * @param companyId the primary key of the user group's company
883            * @param keywords the keywords (space separated), which may occur in the
884            user group's name or description (optionally <code>null</code>)
885            * @param params the finder params (optionally <code>null</code>). For more
886            information see {@link
887            com.liferay.portlet.usergroupsadmin.util.UserGroupIndexer}
888            * @param start the lower bound of the range of user groups to return
889            * @param end the upper bound of the range of user groups to return (not
890            inclusive)
891            * @param sort the field and direction by which to sort (optionally
892            <code>null</code>)
893            * @return the matching user groups ordered by sort
894            * @throws SystemException if a system exception occurred
895            * @see com.liferay.portlet.usergroupsadmin.util.UserGroupIndexer
896            */
897            public static com.liferay.portal.kernel.search.Hits search(long companyId,
898                    java.lang.String keywords,
899                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
900                    int start, int end, com.liferay.portal.kernel.search.Sort sort)
901                    throws com.liferay.portal.kernel.exception.SystemException {
902                    return getService().search(companyId, keywords, params, start, end, sort);
903            }
904    
905            /**
906            * Returns an ordered range of all the user groups that match the name and
907            * description. It is preferable to use this method instead of the
908            * non-indexed version whenever possible for performance reasons.
909            *
910            * <p>
911            * Useful when paginating results. Returns a maximum of <code>end -
912            * start</code> instances. <code>start</code> and <code>end</code> are not
913            * primary keys, they are indexes in the result set. Thus, <code>0</code>
914            * refers to the first result in the set. Setting both <code>start</code>
915            * and <code>end</code> to {@link
916            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
917            * result set.
918            * </p>
919            *
920            * @param companyId the primary key of the user group's company
921            * @param name the user group's name (optionally <code>null</code>)
922            * @param description the user group's description (optionally
923            <code>null</code>)
924            * @param params the finder params (optionally <code>null</code>). For more
925            information see {@link
926            com.liferay.portlet.usergroupsadmin.util.UserGroupIndexer}
927            * @param andSearch whether every field must match its keywords or just one
928            field
929            * @param start the lower bound of the range of user groups to return
930            * @param end the upper bound of the range of user groups to return (not
931            inclusive)
932            * @param sort the field and direction by which to sort (optionally
933            <code>null</code>)
934            * @return the matching user groups ordered by sort
935            * @throws SystemException if a system exception occurred
936            * @see com.liferay.portal.service.persistence.UserGroupFinder
937            */
938            public static com.liferay.portal.kernel.search.Hits search(long companyId,
939                    java.lang.String name, java.lang.String description,
940                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
941                    boolean andSearch, int start, int end,
942                    com.liferay.portal.kernel.search.Sort sort)
943                    throws com.liferay.portal.kernel.exception.SystemException {
944                    return getService()
945                                       .search(companyId, name, description, params, andSearch,
946                            start, end, sort);
947            }
948    
949            /**
950            * Returns the number of user groups that match the keywords
951            *
952            * @param companyId the primary key of the user group's company
953            * @param keywords the keywords (space separated), which may occur in the
954            user group's name or description (optionally <code>null</code>)
955            * @param params the finder params (optionally <code>null</code>). For more
956            information see {@link
957            com.liferay.portal.service.persistence.UserGroupFinder}
958            * @return the number of matching user groups
959            * @throws SystemException if a system exception occurred
960            * @see com.liferay.portal.service.persistence.UserGroupFinder
961            */
962            public static int searchCount(long companyId, java.lang.String keywords,
963                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
964                    throws com.liferay.portal.kernel.exception.SystemException {
965                    return getService().searchCount(companyId, keywords, params);
966            }
967    
968            /**
969            * Removes the user groups from the group.
970            *
971            * @param groupId the primary key of the group
972            * @param userGroupIds the primary keys of the user groups
973            * @throws SystemException if a system exception occurred
974            */
975            public static void unsetGroupUserGroups(long groupId, long[] userGroupIds)
976                    throws com.liferay.portal.kernel.exception.SystemException {
977                    getService().unsetGroupUserGroups(groupId, userGroupIds);
978            }
979    
980            /**
981            * Removes the user groups from the team.
982            *
983            * @param teamId the primary key of the team
984            * @param userGroupIds the primary keys of the user groups
985            * @throws SystemException if a system exception occurred
986            */
987            public static void unsetTeamUserGroups(long teamId, long[] userGroupIds)
988                    throws com.liferay.portal.kernel.exception.SystemException {
989                    getService().unsetTeamUserGroups(teamId, userGroupIds);
990            }
991    
992            /**
993            * Updates the user group.
994            *
995            * @param companyId the primary key of the user group's company
996            * @param userGroupId the primary key of the user group
997            * @param name the user group's name
998            * @param description the user group's description
999            * @return the user group
1000            * @throws PortalException if a user group with the primary key could
1001            not be found or if the new information was invalid
1002            * @throws SystemException if a system exception occurred
1003            * @deprecated As of 6.2.0, replaced by {@link #updateUserGroup(long, long,
1004            String, String, ServiceContext)}
1005            */
1006            public static com.liferay.portal.model.UserGroup updateUserGroup(
1007                    long companyId, long userGroupId, java.lang.String name,
1008                    java.lang.String description)
1009                    throws com.liferay.portal.kernel.exception.PortalException,
1010                            com.liferay.portal.kernel.exception.SystemException {
1011                    return getService()
1012                                       .updateUserGroup(companyId, userGroupId, name, description);
1013            }
1014    
1015            /**
1016            * Updates the user group.
1017            *
1018            * @param companyId the primary key of the user group's company
1019            * @param userGroupId the primary key of the user group
1020            * @param name the user group's name
1021            * @param description the user group's description
1022            * @param serviceContext the service context to be applied (optionally
1023            <code>null</code>). Can set expando bridge attributes for the
1024            user group.
1025            * @return the user group
1026            * @throws PortalException if a user group with the primary key could not be
1027            found or if the new information was invalid
1028            * @throws SystemException if a system exception occurred
1029            */
1030            public static com.liferay.portal.model.UserGroup updateUserGroup(
1031                    long companyId, long userGroupId, java.lang.String name,
1032                    java.lang.String description,
1033                    com.liferay.portal.service.ServiceContext serviceContext)
1034                    throws com.liferay.portal.kernel.exception.PortalException,
1035                            com.liferay.portal.kernel.exception.SystemException {
1036                    return getService()
1037                                       .updateUserGroup(companyId, userGroupId, name, description,
1038                            serviceContext);
1039            }
1040    
1041            public static UserGroupLocalService getService() {
1042                    if (_service == null) {
1043                            _service = (UserGroupLocalService)PortalBeanLocatorUtil.locate(UserGroupLocalService.class.getName());
1044    
1045                            ReferenceRegistry.registerReference(UserGroupLocalServiceUtil.class,
1046                                    "_service");
1047                    }
1048    
1049                    return _service;
1050            }
1051    
1052            /**
1053             * @deprecated As of 6.2.0
1054             */
1055            public void setService(UserGroupLocalService service) {
1056            }
1057    
1058            private static UserGroupLocalService _service;
1059    }