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