001    /**
002     * Copyright (c) 2000-2012 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    /**
018     * <p>
019     * This class is a wrapper for {@link UserGroupLocalService}.
020     * </p>
021     *
022     * @author    Brian Wing Shun Chan
023     * @see       UserGroupLocalService
024     * @generated
025     */
026    public class UserGroupLocalServiceWrapper implements UserGroupLocalService,
027            ServiceWrapper<UserGroupLocalService> {
028            public UserGroupLocalServiceWrapper(
029                    UserGroupLocalService userGroupLocalService) {
030                    _userGroupLocalService = userGroupLocalService;
031            }
032    
033            /**
034            * Adds the user group to the database. Also notifies the appropriate model listeners.
035            *
036            * @param userGroup the user group
037            * @return the user group that was added
038            * @throws SystemException if a system exception occurred
039            */
040            public com.liferay.portal.model.UserGroup addUserGroup(
041                    com.liferay.portal.model.UserGroup userGroup)
042                    throws com.liferay.portal.kernel.exception.SystemException {
043                    return _userGroupLocalService.addUserGroup(userGroup);
044            }
045    
046            /**
047            * Creates a new user group with the primary key. Does not add the user group to the database.
048            *
049            * @param userGroupId the primary key for the new user group
050            * @return the new user group
051            */
052            public com.liferay.portal.model.UserGroup createUserGroup(long userGroupId) {
053                    return _userGroupLocalService.createUserGroup(userGroupId);
054            }
055    
056            /**
057            * Deletes the user group with the primary key from the database. Also notifies the appropriate model listeners.
058            *
059            * @param userGroupId the primary key of the user group
060            * @return the user group that was removed
061            * @throws PortalException if a user group with the primary key could not be found
062            * @throws SystemException if a system exception occurred
063            */
064            public com.liferay.portal.model.UserGroup deleteUserGroup(long userGroupId)
065                    throws com.liferay.portal.kernel.exception.PortalException,
066                            com.liferay.portal.kernel.exception.SystemException {
067                    return _userGroupLocalService.deleteUserGroup(userGroupId);
068            }
069    
070            /**
071            * Deletes the user group from the database. Also notifies the appropriate model listeners.
072            *
073            * @param userGroup the user group
074            * @return the user group that was removed
075            * @throws PortalException
076            * @throws SystemException if a system exception occurred
077            */
078            public com.liferay.portal.model.UserGroup deleteUserGroup(
079                    com.liferay.portal.model.UserGroup userGroup)
080                    throws com.liferay.portal.kernel.exception.PortalException,
081                            com.liferay.portal.kernel.exception.SystemException {
082                    return _userGroupLocalService.deleteUserGroup(userGroup);
083            }
084    
085            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
086                    return _userGroupLocalService.dynamicQuery();
087            }
088    
089            /**
090            * Performs a dynamic query on the database and returns the matching rows.
091            *
092            * @param dynamicQuery the dynamic query
093            * @return the matching rows
094            * @throws SystemException if a system exception occurred
095            */
096            @SuppressWarnings("rawtypes")
097            public java.util.List dynamicQuery(
098                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
099                    throws com.liferay.portal.kernel.exception.SystemException {
100                    return _userGroupLocalService.dynamicQuery(dynamicQuery);
101            }
102    
103            /**
104            * Performs a dynamic query on the database and returns a range of the matching rows.
105            *
106            * <p>
107            * 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.
108            * </p>
109            *
110            * @param dynamicQuery the dynamic query
111            * @param start the lower bound of the range of model instances
112            * @param end the upper bound of the range of model instances (not inclusive)
113            * @return the range of matching rows
114            * @throws SystemException if a system exception occurred
115            */
116            @SuppressWarnings("rawtypes")
117            public java.util.List dynamicQuery(
118                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
119                    int end) throws com.liferay.portal.kernel.exception.SystemException {
120                    return _userGroupLocalService.dynamicQuery(dynamicQuery, start, end);
121            }
122    
123            /**
124            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
125            *
126            * <p>
127            * 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.
128            * </p>
129            *
130            * @param dynamicQuery the dynamic query
131            * @param start the lower bound of the range of model instances
132            * @param end the upper bound of the range of model instances (not inclusive)
133            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
134            * @return the ordered range of matching rows
135            * @throws SystemException if a system exception occurred
136            */
137            @SuppressWarnings("rawtypes")
138            public java.util.List dynamicQuery(
139                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
140                    int end,
141                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
142                    throws com.liferay.portal.kernel.exception.SystemException {
143                    return _userGroupLocalService.dynamicQuery(dynamicQuery, start, end,
144                            orderByComparator);
145            }
146    
147            /**
148            * Returns the number of rows that match the dynamic query.
149            *
150            * @param dynamicQuery the dynamic query
151            * @return the number of rows that match the dynamic query
152            * @throws SystemException if a system exception occurred
153            */
154            public long dynamicQueryCount(
155                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
156                    throws com.liferay.portal.kernel.exception.SystemException {
157                    return _userGroupLocalService.dynamicQueryCount(dynamicQuery);
158            }
159    
160            public com.liferay.portal.model.UserGroup fetchUserGroup(long userGroupId)
161                    throws com.liferay.portal.kernel.exception.SystemException {
162                    return _userGroupLocalService.fetchUserGroup(userGroupId);
163            }
164    
165            /**
166            * Returns the user group with the primary key.
167            *
168            * @param userGroupId the primary key of the user group
169            * @return the user group
170            * @throws PortalException if a user group with the primary key could not be found
171            * @throws SystemException if a system exception occurred
172            */
173            public com.liferay.portal.model.UserGroup getUserGroup(long userGroupId)
174                    throws com.liferay.portal.kernel.exception.PortalException,
175                            com.liferay.portal.kernel.exception.SystemException {
176                    return _userGroupLocalService.getUserGroup(userGroupId);
177            }
178    
179            public com.liferay.portal.model.PersistedModel getPersistedModel(
180                    java.io.Serializable primaryKeyObj)
181                    throws com.liferay.portal.kernel.exception.PortalException,
182                            com.liferay.portal.kernel.exception.SystemException {
183                    return _userGroupLocalService.getPersistedModel(primaryKeyObj);
184            }
185    
186            /**
187            * Returns a range of all the user groups.
188            *
189            * <p>
190            * 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.
191            * </p>
192            *
193            * @param start the lower bound of the range of user groups
194            * @param end the upper bound of the range of user groups (not inclusive)
195            * @return the range of user groups
196            * @throws SystemException if a system exception occurred
197            */
198            public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
199                    int start, int end)
200                    throws com.liferay.portal.kernel.exception.SystemException {
201                    return _userGroupLocalService.getUserGroups(start, end);
202            }
203    
204            /**
205            * Returns the number of user groups.
206            *
207            * @return the number of user groups
208            * @throws SystemException if a system exception occurred
209            */
210            public int getUserGroupsCount()
211                    throws com.liferay.portal.kernel.exception.SystemException {
212                    return _userGroupLocalService.getUserGroupsCount();
213            }
214    
215            /**
216            * Updates the user group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
217            *
218            * @param userGroup the user group
219            * @return the user group that was updated
220            * @throws SystemException if a system exception occurred
221            */
222            public com.liferay.portal.model.UserGroup updateUserGroup(
223                    com.liferay.portal.model.UserGroup userGroup)
224                    throws com.liferay.portal.kernel.exception.SystemException {
225                    return _userGroupLocalService.updateUserGroup(userGroup);
226            }
227    
228            /**
229            * Returns the Spring bean ID for this bean.
230            *
231            * @return the Spring bean ID for this bean
232            */
233            public java.lang.String getBeanIdentifier() {
234                    return _userGroupLocalService.getBeanIdentifier();
235            }
236    
237            /**
238            * Sets the Spring bean ID for this bean.
239            *
240            * @param beanIdentifier the Spring bean ID for this bean
241            */
242            public void setBeanIdentifier(java.lang.String beanIdentifier) {
243                    _userGroupLocalService.setBeanIdentifier(beanIdentifier);
244            }
245    
246            /**
247            * Adds the user groups to the group.
248            *
249            * @param groupId the primary key of the group
250            * @param userGroupIds the primary keys of the user groups
251            * @throws SystemException if a system exception occurred
252            */
253            public void addGroupUserGroups(long groupId, long[] userGroupIds)
254                    throws com.liferay.portal.kernel.exception.SystemException {
255                    _userGroupLocalService.addGroupUserGroups(groupId, userGroupIds);
256            }
257    
258            /**
259            * Adds the user groups to the team.
260            *
261            * @param teamId the primary key of the team
262            * @param userGroupIds the primary keys of the user groups
263            * @throws SystemException if a system exception occurred
264            */
265            public void addTeamUserGroups(long teamId, long[] userGroupIds)
266                    throws com.liferay.portal.kernel.exception.SystemException {
267                    _userGroupLocalService.addTeamUserGroups(teamId, userGroupIds);
268            }
269    
270            /**
271            * Adds a user group.
272            *
273            * <p>
274            * This method handles the creation and bookkeeping of the user group,
275            * including its resources, metadata, and internal data structures. It is
276            * not necessary to make subsequent calls to setup default groups and
277            * resources for the user group.
278            * </p>
279            *
280            * @param userId the primary key of the user
281            * @param companyId the primary key of the user group's company
282            * @param name the user group's name
283            * @param description the user group's description
284            * @return the user group
285            * @throws PortalException if the user group's information was invalid
286            * @throws SystemException if a system exception occurred
287            * @deprecated {@link #addUserGroup(long, long, String, String,
288            ServiceContext)}
289            */
290            public com.liferay.portal.model.UserGroup addUserGroup(long userId,
291                    long companyId, java.lang.String name, java.lang.String description)
292                    throws com.liferay.portal.kernel.exception.PortalException,
293                            com.liferay.portal.kernel.exception.SystemException {
294                    return _userGroupLocalService.addUserGroup(userId, companyId, name,
295                            description);
296            }
297    
298            /**
299            * Adds a user group.
300            *
301            * <p>
302            * This method handles the creation and bookkeeping of the user group,
303            * including its resources, metadata, and internal data structures. It is
304            * not necessary to make subsequent calls to setup default groups and
305            * resources for the user group.
306            * </p>
307            *
308            * @param userId the primary key of the user
309            * @param companyId the primary key of the user group's company
310            * @param name the user group's name
311            * @param description the user group's description
312            * @param serviceContext the user group's service context (optionally
313            <code>null</code>). Can set expando bridge attributes for the
314            user group.
315            * @return the user group
316            * @throws PortalException if the user group's information was invalid
317            * @throws SystemException if a system exception occurred
318            */
319            public com.liferay.portal.model.UserGroup addUserGroup(long userId,
320                    long companyId, java.lang.String name, java.lang.String description,
321                    com.liferay.portal.service.ServiceContext serviceContext)
322                    throws com.liferay.portal.kernel.exception.PortalException,
323                            com.liferay.portal.kernel.exception.SystemException {
324                    return _userGroupLocalService.addUserGroup(userId, companyId, name,
325                            description, serviceContext);
326            }
327    
328            /**
329            * Removes the user from any forbidden user groups and adds the user to all
330            * mandatory user groups, if the user does not belong to them.
331            *
332            * @param user the user
333            * @throws PortalException if the user cannot be added or removed from any
334            user groups.
335            * @throws SystemException if a system exception occurred
336            * @see com.liferay.portal.events.MembershipPolicyAction
337            */
338            public void checkMembershipPolicy(com.liferay.portal.model.User user)
339                    throws com.liferay.portal.kernel.exception.PortalException,
340                            com.liferay.portal.kernel.exception.SystemException {
341                    _userGroupLocalService.checkMembershipPolicy(user);
342            }
343    
344            /**
345            * Clears all associations between the user and its user groups and clears
346            * the permissions cache.
347            *
348            * <p>
349            * This method is called from {@link #deleteUserGroup(UserGroup)}.
350            * </p>
351            *
352            * @param userId the primary key of the user
353            * @throws SystemException if a system exception occurred
354            */
355            public void clearUserUserGroups(long userId)
356                    throws com.liferay.portal.kernel.exception.SystemException {
357                    _userGroupLocalService.clearUserUserGroups(userId);
358            }
359    
360            /**
361            * Copies the user group's layouts to the users who are not already members
362            * of the user group.
363            *
364            * @param userGroupId the primary key of the user group
365            * @param userIds the primary keys of the users
366            * @throws PortalException if any one of the users could not be found or
367            if a portal exception occurred
368            * @throws SystemException if a system exception occurred
369            * @deprecated
370            */
371            public void copyUserGroupLayouts(long userGroupId, long[] userIds)
372                    throws com.liferay.portal.kernel.exception.PortalException,
373                            com.liferay.portal.kernel.exception.SystemException {
374                    _userGroupLocalService.copyUserGroupLayouts(userGroupId, userIds);
375            }
376    
377            /**
378            * Copies the user groups' layouts to the user.
379            *
380            * @param userGroupIds the primary keys of the user groups
381            * @param userId the primary key of the user
382            * @throws PortalException if a user with the primary key could not be
383            found or if a portal exception occurred
384            * @throws SystemException if a system exception occurred
385            * @deprecated
386            */
387            public void copyUserGroupLayouts(long[] userGroupIds, long userId)
388                    throws com.liferay.portal.kernel.exception.PortalException,
389                            com.liferay.portal.kernel.exception.SystemException {
390                    _userGroupLocalService.copyUserGroupLayouts(userGroupIds, userId);
391            }
392    
393            /**
394            * Copies the user group's layout to the user.
395            *
396            * @param userGroupId the primary key of the user group
397            * @param userId the primary key of the user
398            * @throws PortalException if a user with the primary key could not be
399            found or if a portal exception occurred
400            * @throws SystemException if a system exception occurred
401            * @deprecated
402            */
403            public void copyUserGroupLayouts(long userGroupId, long userId)
404                    throws com.liferay.portal.kernel.exception.PortalException,
405                            com.liferay.portal.kernel.exception.SystemException {
406                    _userGroupLocalService.copyUserGroupLayouts(userGroupId, userId);
407            }
408    
409            /**
410            * Returns the user group with the name.
411            *
412            * @param companyId the primary key of the user group's company
413            * @param name the user group's name
414            * @return Returns the user group with the name
415            * @throws PortalException if a user group with the name could not be found
416            * @throws SystemException if a system exception occurred
417            */
418            public com.liferay.portal.model.UserGroup getUserGroup(long companyId,
419                    java.lang.String name)
420                    throws com.liferay.portal.kernel.exception.PortalException,
421                            com.liferay.portal.kernel.exception.SystemException {
422                    return _userGroupLocalService.getUserGroup(companyId, name);
423            }
424    
425            /**
426            * Returns all the user groups belonging to the company.
427            *
428            * @param companyId the primary key of the user groups' company
429            * @return the user groups belonging to the company
430            * @throws SystemException if a system exception occurred
431            */
432            public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
433                    long companyId)
434                    throws com.liferay.portal.kernel.exception.SystemException {
435                    return _userGroupLocalService.getUserGroups(companyId);
436            }
437    
438            /**
439            * Returns all the user groups with the primary keys.
440            *
441            * @param userGroupIds the primary keys of the user groups
442            * @return the user groups with the primary keys
443            * @throws PortalException if any one of the user groups could not be found
444            * @throws SystemException if a system exception occurred
445            */
446            public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
447                    long[] userGroupIds)
448                    throws com.liferay.portal.kernel.exception.PortalException,
449                            com.liferay.portal.kernel.exception.SystemException {
450                    return _userGroupLocalService.getUserGroups(userGroupIds);
451            }
452    
453            /**
454            * Returns all the user groups to which the user belongs.
455            *
456            * @param userId the primary key of the user
457            * @return the user groups to which the user belongs
458            * @throws SystemException if a system exception occurred
459            */
460            public java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups(
461                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
462                    return _userGroupLocalService.getUserUserGroups(userId);
463            }
464    
465            /**
466            * Returns <code>true</code> if the user group is associated with the group.
467            *
468            * @param groupId the primary key of the group
469            * @param userGroupId the primary key of the user group
470            * @return <code>true</code> if the user group belongs to the group;
471            <code>false</code> otherwise
472            * @throws SystemException if a system exception occurred
473            */
474            public boolean hasGroupUserGroup(long groupId, long userGroupId)
475                    throws com.liferay.portal.kernel.exception.SystemException {
476                    return _userGroupLocalService.hasGroupUserGroup(groupId, userGroupId);
477            }
478    
479            /**
480            * Returns <code>true</code> if the user group belongs to the team.
481            *
482            * @param teamId the primary key of the team
483            * @param userGroupId the primary key of the user group
484            * @return <code>true</code> if the user group belongs to the team;
485            <code>false</code> otherwise
486            * @throws SystemException if a system exception occurred
487            */
488            public boolean hasTeamUserGroup(long teamId, long userGroupId)
489                    throws com.liferay.portal.kernel.exception.SystemException {
490                    return _userGroupLocalService.hasTeamUserGroup(teamId, userGroupId);
491            }
492    
493            /**
494            * Returns an ordered range of all the user groups that match the keywords.
495            *
496            * <p>
497            * Useful when paginating results. Returns a maximum of <code>end -
498            * start</code> instances. <code>start</code> and <code>end</code> are not
499            * primary keys, they are indexes in the result set. Thus, <code>0</code>
500            * refers to the first result in the set. Setting both <code>start</code>
501            * and <code>end</code> to {@link
502            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
503            * result set.
504            * </p>
505            *
506            * @param companyId the primary key of the user group's company
507            * @param keywords the keywords (space separated), which may occur in the
508            user group's name or description (optionally <code>null</code>)
509            * @param params the finder params (optionally <code>null</code>). For more
510            information see {@link
511            com.liferay.portal.service.persistence.UserGroupFinder}
512            * @param start the lower bound of the range of user groups to return
513            * @param end the upper bound of the range of user groups to return (not
514            inclusive)
515            * @param obc the comparator to order the user groups (optionally
516            <code>null</code>)
517            * @return the matching user groups ordered by comparator <code>obc</code>
518            * @throws SystemException if a system exception occurred
519            * @see com.liferay.portal.service.persistence.UserGroupFinder
520            */
521            public java.util.List<com.liferay.portal.model.UserGroup> search(
522                    long companyId, java.lang.String keywords,
523                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
524                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
525                    throws com.liferay.portal.kernel.exception.SystemException {
526                    return _userGroupLocalService.search(companyId, keywords, params,
527                            start, end, obc);
528            }
529    
530            /**
531            * Returns an ordered range of all the user groups that match the keywords,
532            * using the indexer. It is preferable to use this method instead of the
533            * non-indexed version whenever possible for performance reasons.
534            *
535            * <p>
536            * Useful when paginating results. Returns a maximum of <code>end -
537            * start</code> instances. <code>start</code> and <code>end</code> are not
538            * primary keys, they are indexes in the result set. Thus, <code>0</code>
539            * refers to the first result in the set. Setting both <code>start</code>
540            * and <code>end</code> to {@link
541            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
542            * result set.
543            * </p>
544            *
545            * @param companyId the primary key of the user group's company
546            * @param keywords the keywords (space separated), which may occur in the
547            user group's name or description (optionally <code>null</code>)
548            * @param params the finder params (optionally <code>null</code>). For more
549            information see {@link
550            com.liferay.portlet.usergroupsadmin.util.UserGroupIndexer}
551            * @param start the lower bound of the range of user groups to return
552            * @param end the upper bound of the range of user groups to return (not
553            inclusive)
554            * @param sort the field and direction by which to sort (optionally
555            <code>null</code>)
556            * @return the matching user groups ordered by sort
557            * @throws SystemException if a system exception occurred
558            * @see com.liferay.portlet.usergroupsadmin.util.UserGroupIndexer
559            */
560            public com.liferay.portal.kernel.search.Hits search(long companyId,
561                    java.lang.String keywords,
562                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
563                    int start, int end, com.liferay.portal.kernel.search.Sort sort)
564                    throws com.liferay.portal.kernel.exception.SystemException {
565                    return _userGroupLocalService.search(companyId, keywords, params,
566                            start, end, sort);
567            }
568    
569            /**
570            * Returns an ordered range of all the user groups that match the name and
571            * description. It is preferable to use this method instead of the
572            * non-indexed version whenever possible for performance reasons.
573            *
574            * <p>
575            * Useful when paginating results. Returns a maximum of <code>end -
576            * start</code> instances. <code>start</code> and <code>end</code> are not
577            * primary keys, they are indexes in the result set. Thus, <code>0</code>
578            * refers to the first result in the set. Setting both <code>start</code>
579            * and <code>end</code> to {@link
580            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
581            * result set.
582            * </p>
583            *
584            * @param companyId the primary key of the user group's company
585            * @param name the user group's name (optionally <code>null</code>)
586            * @param description the user group's description (optionally
587            <code>null</code>)
588            * @param params the finder params (optionally <code>null</code>). For more
589            information see {@link
590            com.liferay.portlet.usergroupsadmin.util.UserGroupIndexer}
591            * @param andSearch whether every field must match its keywords or just one
592            field
593            * @param start the lower bound of the range of user groups to return
594            * @param end the upper bound of the range of user groups to return (not
595            inclusive)
596            * @param sort the field and direction by which to sort (optionally
597            <code>null</code>)
598            * @return the matching user groups ordered by sort
599            * @throws SystemException if a system exception occurred
600            * @see com.liferay.portal.service.persistence.UserGroupFinder
601            */
602            public com.liferay.portal.kernel.search.Hits search(long companyId,
603                    java.lang.String name, java.lang.String description,
604                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
605                    boolean andSearch, int start, int end,
606                    com.liferay.portal.kernel.search.Sort sort)
607                    throws com.liferay.portal.kernel.exception.SystemException {
608                    return _userGroupLocalService.search(companyId, name, description,
609                            params, andSearch, start, end, sort);
610            }
611    
612            /**
613            * Returns the number of user groups that match the keywords
614            *
615            * @param companyId the primary key of the user group's company
616            * @param keywords the keywords (space separated), which may occur in the
617            user group's name or description (optionally <code>null</code>)
618            * @param params the finder params (optionally <code>null</code>). For more
619            information see {@link
620            com.liferay.portal.service.persistence.UserGroupFinder}
621            * @return the number of matching user groups
622            * @throws SystemException if a system exception occurred
623            * @see com.liferay.portal.service.persistence.UserGroupFinder
624            */
625            public int searchCount(long companyId, java.lang.String keywords,
626                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
627                    throws com.liferay.portal.kernel.exception.SystemException {
628                    return _userGroupLocalService.searchCount(companyId, keywords, params);
629            }
630    
631            /**
632            * Sets the user groups associated with the user copying the user group
633            * layouts and removing and adding user group associations for the user as
634            * necessary.
635            *
636            * @param userId the primary key of the user
637            * @param userGroupIds the primary keys of the user groups
638            * @throws PortalException if a portal exception occurred
639            * @throws SystemException if a system exception occurred
640            */
641            public void setUserUserGroups(long userId, long[] userGroupIds)
642                    throws com.liferay.portal.kernel.exception.PortalException,
643                            com.liferay.portal.kernel.exception.SystemException {
644                    _userGroupLocalService.setUserUserGroups(userId, userGroupIds);
645            }
646    
647            /**
648            * Removes the user groups from the group.
649            *
650            * @param groupId the primary key of the group
651            * @param userGroupIds the primary keys of the user groups
652            * @throws SystemException if a system exception occurred
653            */
654            public void unsetGroupUserGroups(long groupId, long[] userGroupIds)
655                    throws com.liferay.portal.kernel.exception.SystemException {
656                    _userGroupLocalService.unsetGroupUserGroups(groupId, userGroupIds);
657            }
658    
659            /**
660            * Removes the user groups from the team.
661            *
662            * @param teamId the primary key of the team
663            * @param userGroupIds the primary keys of the user groups
664            * @throws SystemException if a system exception occurred
665            */
666            public void unsetTeamUserGroups(long teamId, long[] userGroupIds)
667                    throws com.liferay.portal.kernel.exception.SystemException {
668                    _userGroupLocalService.unsetTeamUserGroups(teamId, userGroupIds);
669            }
670    
671            /**
672            * Updates the user group.
673            *
674            * @param companyId the primary key of the user group's company
675            * @param userGroupId the primary key of the user group
676            * @param name the user group's name
677            * @param description the user group's description
678            * @return the user group
679            * @throws PortalException if a user group with the primary key could
680            not be found or if the new information was invalid
681            * @throws SystemException if a system exception occurred
682            * @deprecated {@link #updateUserGroup(long, long, String, String,
683            ServiceContext)}
684            */
685            public com.liferay.portal.model.UserGroup updateUserGroup(long companyId,
686                    long userGroupId, java.lang.String name, java.lang.String description)
687                    throws com.liferay.portal.kernel.exception.PortalException,
688                            com.liferay.portal.kernel.exception.SystemException {
689                    return _userGroupLocalService.updateUserGroup(companyId, userGroupId,
690                            name, description);
691            }
692    
693            /**
694            * Updates the user group.
695            *
696            * @param companyId the primary key of the user group's company
697            * @param userGroupId the primary key of the user group
698            * @param name the user group's name
699            * @param description the user group's description
700            * @param serviceContext the user group's service context (optionally
701            <code>null</code>). Can set expando bridge attributes for the
702            user group.
703            * @return the user group
704            * @throws PortalException if a user group with the primary key could not be
705            found or if the new information was invalid
706            * @throws SystemException if a system exception occurred
707            */
708            public com.liferay.portal.model.UserGroup updateUserGroup(long companyId,
709                    long userGroupId, java.lang.String name, java.lang.String description,
710                    com.liferay.portal.service.ServiceContext serviceContext)
711                    throws com.liferay.portal.kernel.exception.PortalException,
712                            com.liferay.portal.kernel.exception.SystemException {
713                    return _userGroupLocalService.updateUserGroup(companyId, userGroupId,
714                            name, description, serviceContext);
715            }
716    
717            /**
718             * @deprecated Renamed to {@link #getWrappedService}
719             */
720            public UserGroupLocalService getWrappedUserGroupLocalService() {
721                    return _userGroupLocalService;
722            }
723    
724            /**
725             * @deprecated Renamed to {@link #setWrappedService}
726             */
727            public void setWrappedUserGroupLocalService(
728                    UserGroupLocalService userGroupLocalService) {
729                    _userGroupLocalService = userGroupLocalService;
730            }
731    
732            public UserGroupLocalService getWrappedService() {
733                    return _userGroupLocalService;
734            }
735    
736            public void setWrappedService(UserGroupLocalService userGroupLocalService) {
737                    _userGroupLocalService = userGroupLocalService;
738            }
739    
740            private UserGroupLocalService _userGroupLocalService;
741    }