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            * @throws PortalException if a user group with the primary key could not be found
061            * @throws SystemException if a system exception occurred
062            */
063            public void deleteUserGroup(long userGroupId)
064                    throws com.liferay.portal.kernel.exception.PortalException,
065                            com.liferay.portal.kernel.exception.SystemException {
066                    _userGroupLocalService.deleteUserGroup(userGroupId);
067            }
068    
069            /**
070            * Deletes the user group from the database. Also notifies the appropriate model listeners.
071            *
072            * @param userGroup the user group
073            * @throws PortalException
074            * @throws SystemException if a system exception occurred
075            */
076            public void deleteUserGroup(com.liferay.portal.model.UserGroup userGroup)
077                    throws com.liferay.portal.kernel.exception.PortalException,
078                            com.liferay.portal.kernel.exception.SystemException {
079                    _userGroupLocalService.deleteUserGroup(userGroup);
080            }
081    
082            /**
083            * Performs a dynamic query on the database and returns the matching rows.
084            *
085            * @param dynamicQuery the dynamic query
086            * @return the matching rows
087            * @throws SystemException if a system exception occurred
088            */
089            @SuppressWarnings("rawtypes")
090            public java.util.List dynamicQuery(
091                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
092                    throws com.liferay.portal.kernel.exception.SystemException {
093                    return _userGroupLocalService.dynamicQuery(dynamicQuery);
094            }
095    
096            /**
097            * Performs a dynamic query on the database and returns a range of the matching rows.
098            *
099            * <p>
100            * 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.
101            * </p>
102            *
103            * @param dynamicQuery the dynamic query
104            * @param start the lower bound of the range of model instances
105            * @param end the upper bound of the range of model instances (not inclusive)
106            * @return the range of matching rows
107            * @throws SystemException if a system exception occurred
108            */
109            @SuppressWarnings("rawtypes")
110            public java.util.List dynamicQuery(
111                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
112                    int end) throws com.liferay.portal.kernel.exception.SystemException {
113                    return _userGroupLocalService.dynamicQuery(dynamicQuery, start, end);
114            }
115    
116            /**
117            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
118            *
119            * <p>
120            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
121            * </p>
122            *
123            * @param dynamicQuery the dynamic query
124            * @param start the lower bound of the range of model instances
125            * @param end the upper bound of the range of model instances (not inclusive)
126            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
127            * @return the ordered range of matching rows
128            * @throws SystemException if a system exception occurred
129            */
130            @SuppressWarnings("rawtypes")
131            public java.util.List dynamicQuery(
132                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
133                    int end,
134                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
135                    throws com.liferay.portal.kernel.exception.SystemException {
136                    return _userGroupLocalService.dynamicQuery(dynamicQuery, start, end,
137                            orderByComparator);
138            }
139    
140            /**
141            * Returns the number of rows that match the dynamic query.
142            *
143            * @param dynamicQuery the dynamic query
144            * @return the number of rows that match the dynamic query
145            * @throws SystemException if a system exception occurred
146            */
147            public long dynamicQueryCount(
148                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
149                    throws com.liferay.portal.kernel.exception.SystemException {
150                    return _userGroupLocalService.dynamicQueryCount(dynamicQuery);
151            }
152    
153            public com.liferay.portal.model.UserGroup fetchUserGroup(long userGroupId)
154                    throws com.liferay.portal.kernel.exception.SystemException {
155                    return _userGroupLocalService.fetchUserGroup(userGroupId);
156            }
157    
158            /**
159            * Returns the user group with the primary key.
160            *
161            * @param userGroupId the primary key of the user group
162            * @return the user group
163            * @throws PortalException if a user group with the primary key could not be found
164            * @throws SystemException if a system exception occurred
165            */
166            public com.liferay.portal.model.UserGroup getUserGroup(long userGroupId)
167                    throws com.liferay.portal.kernel.exception.PortalException,
168                            com.liferay.portal.kernel.exception.SystemException {
169                    return _userGroupLocalService.getUserGroup(userGroupId);
170            }
171    
172            public com.liferay.portal.model.PersistedModel getPersistedModel(
173                    java.io.Serializable primaryKeyObj)
174                    throws com.liferay.portal.kernel.exception.PortalException,
175                            com.liferay.portal.kernel.exception.SystemException {
176                    return _userGroupLocalService.getPersistedModel(primaryKeyObj);
177            }
178    
179            /**
180            * Returns a range of all the user groups.
181            *
182            * <p>
183            * 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.
184            * </p>
185            *
186            * @param start the lower bound of the range of user groups
187            * @param end the upper bound of the range of user groups (not inclusive)
188            * @return the range of user groups
189            * @throws SystemException if a system exception occurred
190            */
191            public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
192                    int start, int end)
193                    throws com.liferay.portal.kernel.exception.SystemException {
194                    return _userGroupLocalService.getUserGroups(start, end);
195            }
196    
197            /**
198            * Returns the number of user groups.
199            *
200            * @return the number of user groups
201            * @throws SystemException if a system exception occurred
202            */
203            public int getUserGroupsCount()
204                    throws com.liferay.portal.kernel.exception.SystemException {
205                    return _userGroupLocalService.getUserGroupsCount();
206            }
207    
208            /**
209            * Updates the user group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
210            *
211            * @param userGroup the user group
212            * @return the user group that was updated
213            * @throws SystemException if a system exception occurred
214            */
215            public com.liferay.portal.model.UserGroup updateUserGroup(
216                    com.liferay.portal.model.UserGroup userGroup)
217                    throws com.liferay.portal.kernel.exception.SystemException {
218                    return _userGroupLocalService.updateUserGroup(userGroup);
219            }
220    
221            /**
222            * Updates the user group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
223            *
224            * @param userGroup the user group
225            * @param merge whether to merge the user group with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
226            * @return the user group that was updated
227            * @throws SystemException if a system exception occurred
228            */
229            public com.liferay.portal.model.UserGroup updateUserGroup(
230                    com.liferay.portal.model.UserGroup userGroup, boolean merge)
231                    throws com.liferay.portal.kernel.exception.SystemException {
232                    return _userGroupLocalService.updateUserGroup(userGroup, merge);
233            }
234    
235            /**
236            * Returns the Spring bean ID for this bean.
237            *
238            * @return the Spring bean ID for this bean
239            */
240            public java.lang.String getBeanIdentifier() {
241                    return _userGroupLocalService.getBeanIdentifier();
242            }
243    
244            /**
245            * Sets the Spring bean ID for this bean.
246            *
247            * @param beanIdentifier the Spring bean ID for this bean
248            */
249            public void setBeanIdentifier(java.lang.String beanIdentifier) {
250                    _userGroupLocalService.setBeanIdentifier(beanIdentifier);
251            }
252    
253            /**
254            * Adds the user groups to the group.
255            *
256            * @param groupId the primary key of the group
257            * @param userGroupIds the primary keys of the user groups
258            * @throws SystemException if a system exception occurred
259            */
260            public void addGroupUserGroups(long groupId, long[] userGroupIds)
261                    throws com.liferay.portal.kernel.exception.SystemException {
262                    _userGroupLocalService.addGroupUserGroups(groupId, userGroupIds);
263            }
264    
265            /**
266            * Adds the user groups to the team.
267            *
268            * @param teamId the primary key of the team
269            * @param userGroupIds the primary keys of the user groups
270            * @throws SystemException if a system exception occurred
271            */
272            public void addTeamUserGroups(long teamId, long[] userGroupIds)
273                    throws com.liferay.portal.kernel.exception.SystemException {
274                    _userGroupLocalService.addTeamUserGroups(teamId, userGroupIds);
275            }
276    
277            /**
278            * Adds a user group.
279            *
280            * <p>
281            * This method handles the creation and bookkeeping of the user group,
282            * including its resources, metadata, and internal data structures. It is
283            * not necessary to make subsequent calls to setup default groups and
284            * resources for the user group.
285            * </p>
286            *
287            * @param userId the primary key of the user
288            * @param companyId the primary key of the user group's company
289            * @param name the user group's name
290            * @param description the user group's description
291            * @return the user group
292            * @throws PortalException if the user group's information was invalid
293            * @throws SystemException if a system exception occurred
294            */
295            public com.liferay.portal.model.UserGroup addUserGroup(long userId,
296                    long companyId, java.lang.String name, java.lang.String description)
297                    throws com.liferay.portal.kernel.exception.PortalException,
298                            com.liferay.portal.kernel.exception.SystemException {
299                    return _userGroupLocalService.addUserGroup(userId, companyId, name,
300                            description);
301            }
302    
303            /**
304            * Clears all associations between the user and its user groups and clears
305            * the permissions cache.
306            *
307            * <p>
308            * This method is called from {@link #deleteUserGroup(UserGroup)}.
309            * </p>
310            *
311            * @param userId the primary key of the user
312            * @throws SystemException if a system exception occurred
313            */
314            public void clearUserUserGroups(long userId)
315                    throws com.liferay.portal.kernel.exception.SystemException {
316                    _userGroupLocalService.clearUserUserGroups(userId);
317            }
318    
319            /**
320            * Copies the user group's layouts to the users who are not already members
321            * of the user group.
322            *
323            * @param userGroupId the primary key of the user group
324            * @param userIds the primary keys of the users
325            * @throws PortalException if any one of the users could not be found or
326            if a portal exception occurred
327            * @throws SystemException if a system exception occurred
328            * @deprecated
329            */
330            public void copyUserGroupLayouts(long userGroupId, long[] userIds)
331                    throws com.liferay.portal.kernel.exception.PortalException,
332                            com.liferay.portal.kernel.exception.SystemException {
333                    _userGroupLocalService.copyUserGroupLayouts(userGroupId, userIds);
334            }
335    
336            /**
337            * Copies the user groups' layouts to the user.
338            *
339            * @param userGroupIds the primary keys of the user groups
340            * @param userId the primary key of the user
341            * @throws PortalException if a user with the primary key could not be
342            found or if a portal exception occurred
343            * @throws SystemException if a system exception occurred
344            * @deprecated
345            */
346            public void copyUserGroupLayouts(long[] userGroupIds, long userId)
347                    throws com.liferay.portal.kernel.exception.PortalException,
348                            com.liferay.portal.kernel.exception.SystemException {
349                    _userGroupLocalService.copyUserGroupLayouts(userGroupIds, userId);
350            }
351    
352            /**
353            * Copies the user group's layout to the user.
354            *
355            * @param userGroupId the primary key of the user group
356            * @param userId the primary key of the user
357            * @throws PortalException if a user with the primary key could not be
358            found or if a portal exception occurred
359            * @throws SystemException if a system exception occurred
360            * @deprecated
361            */
362            public void copyUserGroupLayouts(long userGroupId, long userId)
363                    throws com.liferay.portal.kernel.exception.PortalException,
364                            com.liferay.portal.kernel.exception.SystemException {
365                    _userGroupLocalService.copyUserGroupLayouts(userGroupId, userId);
366            }
367    
368            /**
369            * Returns the user group with the name.
370            *
371            * @param companyId the primary key of the user group's company
372            * @param name the user group's name
373            * @return Returns the user group with the name
374            * @throws PortalException if a user group with the name could not be found
375            * @throws SystemException if a system exception occurred
376            */
377            public com.liferay.portal.model.UserGroup getUserGroup(long companyId,
378                    java.lang.String name)
379                    throws com.liferay.portal.kernel.exception.PortalException,
380                            com.liferay.portal.kernel.exception.SystemException {
381                    return _userGroupLocalService.getUserGroup(companyId, name);
382            }
383    
384            /**
385            * Returns all the user groups belonging to the company.
386            *
387            * @param companyId the primary key of the user groups' company
388            * @return the user groups belonging to the company
389            * @throws SystemException if a system exception occurred
390            */
391            public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
392                    long companyId)
393                    throws com.liferay.portal.kernel.exception.SystemException {
394                    return _userGroupLocalService.getUserGroups(companyId);
395            }
396    
397            /**
398            * Returns all the user groups with the primary keys.
399            *
400            * @param userGroupIds the primary keys of the user groups
401            * @return the user groups with the primary keys
402            * @throws PortalException if any one of the user groups could not be found
403            * @throws SystemException if a system exception occurred
404            */
405            public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
406                    long[] userGroupIds)
407                    throws com.liferay.portal.kernel.exception.PortalException,
408                            com.liferay.portal.kernel.exception.SystemException {
409                    return _userGroupLocalService.getUserGroups(userGroupIds);
410            }
411    
412            /**
413            * Returns all the user groups to which the user belongs.
414            *
415            * @param userId the primary key of the user
416            * @return the user groups to which the user belongs
417            * @throws SystemException if a system exception occurred
418            */
419            public java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups(
420                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
421                    return _userGroupLocalService.getUserUserGroups(userId);
422            }
423    
424            /**
425            * Returns <code>true</code> if the user group is associated with the group.
426            *
427            * @param groupId the primary key of the group
428            * @param userGroupId the primary key of the user group
429            * @return <code>true</code> if the user group belongs to the group;
430            <code>false</code> otherwise
431            * @throws SystemException if a system exception occurred
432            */
433            public boolean hasGroupUserGroup(long groupId, long userGroupId)
434                    throws com.liferay.portal.kernel.exception.SystemException {
435                    return _userGroupLocalService.hasGroupUserGroup(groupId, userGroupId);
436            }
437    
438            /**
439            * Returns <code>true</code> if the user group belongs to the team.
440            *
441            * @param teamId the primary key of the team
442            * @param userGroupId the primary key of the user group
443            * @return <code>true</code> if the user group belongs to the team;
444            <code>false</code> otherwise
445            * @throws SystemException if a system exception occurred
446            */
447            public boolean hasTeamUserGroup(long teamId, long userGroupId)
448                    throws com.liferay.portal.kernel.exception.SystemException {
449                    return _userGroupLocalService.hasTeamUserGroup(teamId, userGroupId);
450            }
451    
452            public java.util.List<com.liferay.portal.model.UserGroup> search(
453                    long companyId, java.lang.String keywords,
454                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
455                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
456                    throws com.liferay.portal.kernel.exception.SystemException {
457                    return _userGroupLocalService.search(companyId, keywords, params,
458                            start, end, obc);
459            }
460    
461            /**
462            * Returns an ordered range of all the user groups that match the name and
463            * description.
464            *
465            * <p>
466            * Useful when paginating results. Returns a maximum of <code>end -
467            * start</code> instances. <code>start</code> and <code>end</code> are not
468            * primary keys, they are indexes in the result set. Thus, <code>0</code>
469            * refers to the first result in the set. Setting both <code>start</code>
470            * and <code>end</code> to {@link
471            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
472            * result set.
473            * </p>
474            *
475            * @param companyId the primary key of the user group's company
476            * @param name the user group's name (optionally <code>null</code>)
477            * @param description the user group's description (optionally
478            <code>null</code>)
479            * @param params the finder params (optionally <code>null</code>). For more
480            information see {@link
481            com.liferay.portal.service.persistence.UserGroupFinder}
482            * @param start the lower bound of the range of user groups to return
483            * @param end the upper bound of the range of user groups to return (not
484            inclusive)
485            * @param obc the comparator to order the user groups (optionally
486            <code>null</code>)
487            * @return the matching user groups ordered by comparator <code>obc</code>
488            * @throws SystemException if a system exception occurred
489            * @see com.liferay.portal.service.persistence.UserGroupFinder
490            */
491            public java.util.List<com.liferay.portal.model.UserGroup> search(
492                    long companyId, java.lang.String name, java.lang.String description,
493                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
494                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
495                    throws com.liferay.portal.kernel.exception.SystemException {
496                    return _userGroupLocalService.search(companyId, name, description,
497                            params, start, end, obc);
498            }
499    
500            public int searchCount(long companyId, java.lang.String keywords,
501                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
502                    throws com.liferay.portal.kernel.exception.SystemException {
503                    return _userGroupLocalService.searchCount(companyId, keywords, params);
504            }
505    
506            /**
507            * Returns the number of user groups that match the name and description.
508            *
509            * @param companyId the primary key of the user group's company
510            * @param name the user group's name (optionally <code>null</code>)
511            * @param description the user group's description (optionally
512            <code>null</code>)
513            * @param params the finder params (optionally <code>null</code>). For more
514            information see {@link
515            com.liferay.portal.service.persistence.UserGroupFinder}
516            * @return the number of matching user groups
517            * @throws SystemException if a system exception occurred
518            * @see com.liferay.portal.service.persistence.UserGroupFinder
519            */
520            public int searchCount(long companyId, java.lang.String name,
521                    java.lang.String description,
522                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
523                    throws com.liferay.portal.kernel.exception.SystemException {
524                    return _userGroupLocalService.searchCount(companyId, name, description,
525                            params);
526            }
527    
528            /**
529            * Sets the user groups associated with the user copying the user group
530            * layouts and removing and adding user group associations for the user as
531            * necessary.
532            *
533            * @param userId the primary key of the user
534            * @param userGroupIds the primary keys of the user groups
535            * @throws PortalException if a portal exception occurred
536            * @throws SystemException if a system exception occurred
537            */
538            public void setUserUserGroups(long userId, long[] userGroupIds)
539                    throws com.liferay.portal.kernel.exception.PortalException,
540                            com.liferay.portal.kernel.exception.SystemException {
541                    _userGroupLocalService.setUserUserGroups(userId, userGroupIds);
542            }
543    
544            /**
545            * Removes the user groups from the group.
546            *
547            * @param groupId the primary key of the group
548            * @param userGroupIds the primary keys of the user groups
549            * @throws SystemException if a system exception occurred
550            */
551            public void unsetGroupUserGroups(long groupId, long[] userGroupIds)
552                    throws com.liferay.portal.kernel.exception.SystemException {
553                    _userGroupLocalService.unsetGroupUserGroups(groupId, userGroupIds);
554            }
555    
556            /**
557            * Removes the user groups from the team.
558            *
559            * @param teamId the primary key of the team
560            * @param userGroupIds the primary keys of the user groups
561            * @throws SystemException if a system exception occurred
562            */
563            public void unsetTeamUserGroups(long teamId, long[] userGroupIds)
564                    throws com.liferay.portal.kernel.exception.SystemException {
565                    _userGroupLocalService.unsetTeamUserGroups(teamId, userGroupIds);
566            }
567    
568            /**
569            * Updates the user group.
570            *
571            * @param companyId the primary key of the user group's company
572            * @param userGroupId the primary key of the user group
573            * @param name the user group's name
574            * @param description the user group's description
575            * @return the user group
576            * @throws PortalException if a user group with the primary key could not be
577            found or if the new information was invalid
578            * @throws SystemException if a system exception occurred
579            */
580            public com.liferay.portal.model.UserGroup updateUserGroup(long companyId,
581                    long userGroupId, java.lang.String name, java.lang.String description)
582                    throws com.liferay.portal.kernel.exception.PortalException,
583                            com.liferay.portal.kernel.exception.SystemException {
584                    return _userGroupLocalService.updateUserGroup(companyId, userGroupId,
585                            name, description);
586            }
587    
588            /**
589             * @deprecated Renamed to {@link #getWrappedService}
590             */
591            public UserGroupLocalService getWrappedUserGroupLocalService() {
592                    return _userGroupLocalService;
593            }
594    
595            /**
596             * @deprecated Renamed to {@link #setWrappedService}
597             */
598            public void setWrappedUserGroupLocalService(
599                    UserGroupLocalService userGroupLocalService) {
600                    _userGroupLocalService = userGroupLocalService;
601            }
602    
603            public UserGroupLocalService getWrappedService() {
604                    return _userGroupLocalService;
605            }
606    
607            public void setWrappedService(UserGroupLocalService userGroupLocalService) {
608                    _userGroupLocalService = userGroupLocalService;
609            }
610    
611            private UserGroupLocalService _userGroupLocalService;
612    }