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