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