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            /**
453            * Returns an ordered range of all the user groups that match the name and
454            * description.
455            *
456            * <p>
457            * Useful when paginating results. Returns a maximum of <code>end -
458            * start</code> instances. <code>start</code> and <code>end</code> are not
459            * primary keys, they are indexes in the result set. Thus, <code>0</code>
460            * refers to the first result in the set. Setting both <code>start</code>
461            * and <code>end</code> to {@link
462            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
463            * result set.
464            * </p>
465            *
466            * @param companyId the primary key of the user group's company
467            * @param name the user group's name (optionally <code>null</code>)
468            * @param description the user group's description (optionally
469            <code>null</code>)
470            * @param params the finder params (optionally <code>null</code>). For more
471            information see {@link
472            com.liferay.portal.service.persistence.UserGroupFinder}
473            * @param start the lower bound of the range of user groups to return
474            * @param end the upper bound of the range of user groups to return (not
475            inclusive)
476            * @param obc the comparator to order the user groups (optionally
477            <code>null</code>)
478            * @return the matching user groups ordered by comparator <code>obc</code>
479            * @throws SystemException if a system exception occurred
480            * @see com.liferay.portal.service.persistence.UserGroupFinder
481            */
482            public java.util.List<com.liferay.portal.model.UserGroup> search(
483                    long companyId, java.lang.String name, java.lang.String description,
484                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
485                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
486                    throws com.liferay.portal.kernel.exception.SystemException {
487                    return _userGroupLocalService.search(companyId, name, description,
488                            params, start, end, obc);
489            }
490    
491            /**
492            * Returns the number of user groups that match the name and description.
493            *
494            * @param companyId the primary key of the user group's company
495            * @param name the user group's name (optionally <code>null</code>)
496            * @param description the user group's description (optionally
497            <code>null</code>)
498            * @param params the finder params (optionally <code>null</code>). For more
499            information see {@link
500            com.liferay.portal.service.persistence.UserGroupFinder}
501            * @return the number of matching user groups
502            * @throws SystemException if a system exception occurred
503            * @see com.liferay.portal.service.persistence.UserGroupFinder
504            */
505            public int searchCount(long companyId, java.lang.String name,
506                    java.lang.String description,
507                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
508                    throws com.liferay.portal.kernel.exception.SystemException {
509                    return _userGroupLocalService.searchCount(companyId, name, description,
510                            params);
511            }
512    
513            /**
514            * Sets the user groups associated with the user copying the user group
515            * layouts and removing and adding user group associations for the user as
516            * necessary.
517            *
518            * @param userId the primary key of the user
519            * @param userGroupIds the primary keys of the user groups
520            * @throws PortalException if a portal exception occurred
521            * @throws SystemException if a system exception occurred
522            */
523            public void setUserUserGroups(long userId, long[] userGroupIds)
524                    throws com.liferay.portal.kernel.exception.PortalException,
525                            com.liferay.portal.kernel.exception.SystemException {
526                    _userGroupLocalService.setUserUserGroups(userId, userGroupIds);
527            }
528    
529            /**
530            * Removes the user groups from the group.
531            *
532            * @param groupId the primary key of the group
533            * @param userGroupIds the primary keys of the user groups
534            * @throws SystemException if a system exception occurred
535            */
536            public void unsetGroupUserGroups(long groupId, long[] userGroupIds)
537                    throws com.liferay.portal.kernel.exception.SystemException {
538                    _userGroupLocalService.unsetGroupUserGroups(groupId, userGroupIds);
539            }
540    
541            /**
542            * Removes the user groups from the team.
543            *
544            * @param teamId the primary key of the team
545            * @param userGroupIds the primary keys of the user groups
546            * @throws SystemException if a system exception occurred
547            */
548            public void unsetTeamUserGroups(long teamId, long[] userGroupIds)
549                    throws com.liferay.portal.kernel.exception.SystemException {
550                    _userGroupLocalService.unsetTeamUserGroups(teamId, userGroupIds);
551            }
552    
553            /**
554            * Updates the user group.
555            *
556            * @param companyId the primary key of the user group's company
557            * @param userGroupId the primary key of the user group
558            * @param name the user group's name
559            * @param description the user group's description
560            * @return the user group
561            * @throws PortalException if a user group with the primary key could not be
562            found or if the new information was invalid
563            * @throws SystemException if a system exception occurred
564            */
565            public com.liferay.portal.model.UserGroup updateUserGroup(long companyId,
566                    long userGroupId, java.lang.String name, java.lang.String description)
567                    throws com.liferay.portal.kernel.exception.PortalException,
568                            com.liferay.portal.kernel.exception.SystemException {
569                    return _userGroupLocalService.updateUserGroup(companyId, userGroupId,
570                            name, description);
571            }
572    
573            /**
574             * @deprecated Renamed to {@link #getWrappedService}
575             */
576            public UserGroupLocalService getWrappedUserGroupLocalService() {
577                    return _userGroupLocalService;
578            }
579    
580            /**
581             * @deprecated Renamed to {@link #setWrappedService}
582             */
583            public void setWrappedUserGroupLocalService(
584                    UserGroupLocalService userGroupLocalService) {
585                    _userGroupLocalService = userGroupLocalService;
586            }
587    
588            public UserGroupLocalService getWrappedService() {
589                    return _userGroupLocalService;
590            }
591    
592            public void setWrappedService(UserGroupLocalService userGroupLocalService) {
593                    _userGroupLocalService = userGroupLocalService;
594            }
595    
596            private UserGroupLocalService _userGroupLocalService;
597    }