001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.service;
016    
017    /**
018     * <p>
019     * This class is a wrapper for {@link RoleLocalService}.
020     * </p>
021     *
022     * @author    Brian Wing Shun Chan
023     * @see       RoleLocalService
024     * @generated
025     */
026    public class RoleLocalServiceWrapper implements RoleLocalService {
027            public RoleLocalServiceWrapper(RoleLocalService roleLocalService) {
028                    _roleLocalService = roleLocalService;
029            }
030    
031            /**
032            * Adds the role to the database. Also notifies the appropriate model listeners.
033            *
034            * @param role the role
035            * @return the role that was added
036            * @throws SystemException if a system exception occurred
037            */
038            public com.liferay.portal.model.Role addRole(
039                    com.liferay.portal.model.Role role)
040                    throws com.liferay.portal.kernel.exception.SystemException {
041                    return _roleLocalService.addRole(role);
042            }
043    
044            /**
045            * Creates a new role with the primary key. Does not add the role to the database.
046            *
047            * @param roleId the primary key for the new role
048            * @return the new role
049            */
050            public com.liferay.portal.model.Role createRole(long roleId) {
051                    return _roleLocalService.createRole(roleId);
052            }
053    
054            /**
055            * Deletes the role with the primary key from the database. Also notifies the appropriate model listeners.
056            *
057            * @param roleId the primary key of the role
058            * @throws PortalException if a role with the primary key could not be found
059            * @throws SystemException if a system exception occurred
060            */
061            public void deleteRole(long roleId)
062                    throws com.liferay.portal.kernel.exception.PortalException,
063                            com.liferay.portal.kernel.exception.SystemException {
064                    _roleLocalService.deleteRole(roleId);
065            }
066    
067            /**
068            * Deletes the role from the database. Also notifies the appropriate model listeners.
069            *
070            * @param role the role
071            * @throws PortalException
072            * @throws SystemException if a system exception occurred
073            */
074            public void deleteRole(com.liferay.portal.model.Role role)
075                    throws com.liferay.portal.kernel.exception.PortalException,
076                            com.liferay.portal.kernel.exception.SystemException {
077                    _roleLocalService.deleteRole(role);
078            }
079    
080            /**
081            * Performs a dynamic query on the database and returns the matching rows.
082            *
083            * @param dynamicQuery the dynamic query
084            * @return the matching rows
085            * @throws SystemException if a system exception occurred
086            */
087            @SuppressWarnings("rawtypes")
088            public java.util.List dynamicQuery(
089                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
090                    throws com.liferay.portal.kernel.exception.SystemException {
091                    return _roleLocalService.dynamicQuery(dynamicQuery);
092            }
093    
094            /**
095            * Performs a dynamic query on the database and returns a range of the matching rows.
096            *
097            * <p>
098            * 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.
099            * </p>
100            *
101            * @param dynamicQuery the dynamic query
102            * @param start the lower bound of the range of model instances
103            * @param end the upper bound of the range of model instances (not inclusive)
104            * @return the range of matching rows
105            * @throws SystemException if a system exception occurred
106            */
107            @SuppressWarnings("rawtypes")
108            public java.util.List dynamicQuery(
109                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
110                    int end) throws com.liferay.portal.kernel.exception.SystemException {
111                    return _roleLocalService.dynamicQuery(dynamicQuery, start, end);
112            }
113    
114            /**
115            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
116            *
117            * <p>
118            * 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.
119            * </p>
120            *
121            * @param dynamicQuery the dynamic query
122            * @param start the lower bound of the range of model instances
123            * @param end the upper bound of the range of model instances (not inclusive)
124            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
125            * @return the ordered range of matching rows
126            * @throws SystemException if a system exception occurred
127            */
128            @SuppressWarnings("rawtypes")
129            public java.util.List dynamicQuery(
130                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
131                    int end,
132                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
133                    throws com.liferay.portal.kernel.exception.SystemException {
134                    return _roleLocalService.dynamicQuery(dynamicQuery, start, end,
135                            orderByComparator);
136            }
137    
138            /**
139            * Returns the number of rows that match the dynamic query.
140            *
141            * @param dynamicQuery the dynamic query
142            * @return the number of rows that match the dynamic query
143            * @throws SystemException if a system exception occurred
144            */
145            public long dynamicQueryCount(
146                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
147                    throws com.liferay.portal.kernel.exception.SystemException {
148                    return _roleLocalService.dynamicQueryCount(dynamicQuery);
149            }
150    
151            /**
152            * Returns the role with the primary key.
153            *
154            * @param roleId the primary key of the role
155            * @return the role
156            * @throws PortalException if a role with the primary key could not be found
157            * @throws SystemException if a system exception occurred
158            */
159            public com.liferay.portal.model.Role getRole(long roleId)
160                    throws com.liferay.portal.kernel.exception.PortalException,
161                            com.liferay.portal.kernel.exception.SystemException {
162                    return _roleLocalService.getRole(roleId);
163            }
164    
165            public com.liferay.portal.model.PersistedModel getPersistedModel(
166                    java.io.Serializable primaryKeyObj)
167                    throws com.liferay.portal.kernel.exception.PortalException,
168                            com.liferay.portal.kernel.exception.SystemException {
169                    return _roleLocalService.getPersistedModel(primaryKeyObj);
170            }
171    
172            /**
173            * Returns a range of all the roles.
174            *
175            * <p>
176            * 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.
177            * </p>
178            *
179            * @param start the lower bound of the range of roles
180            * @param end the upper bound of the range of roles (not inclusive)
181            * @return the range of roles
182            * @throws SystemException if a system exception occurred
183            */
184            public java.util.List<com.liferay.portal.model.Role> getRoles(int start,
185                    int end) throws com.liferay.portal.kernel.exception.SystemException {
186                    return _roleLocalService.getRoles(start, end);
187            }
188    
189            /**
190            * Returns the number of roles.
191            *
192            * @return the number of roles
193            * @throws SystemException if a system exception occurred
194            */
195            public int getRolesCount()
196                    throws com.liferay.portal.kernel.exception.SystemException {
197                    return _roleLocalService.getRolesCount();
198            }
199    
200            /**
201            * Updates the role in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
202            *
203            * @param role the role
204            * @return the role that was updated
205            * @throws SystemException if a system exception occurred
206            */
207            public com.liferay.portal.model.Role updateRole(
208                    com.liferay.portal.model.Role role)
209                    throws com.liferay.portal.kernel.exception.SystemException {
210                    return _roleLocalService.updateRole(role);
211            }
212    
213            /**
214            * Updates the role in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
215            *
216            * @param role the role
217            * @param merge whether to merge the role 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.
218            * @return the role that was updated
219            * @throws SystemException if a system exception occurred
220            */
221            public com.liferay.portal.model.Role updateRole(
222                    com.liferay.portal.model.Role role, boolean merge)
223                    throws com.liferay.portal.kernel.exception.SystemException {
224                    return _roleLocalService.updateRole(role, merge);
225            }
226    
227            /**
228            * Returns the Spring bean ID for this bean.
229            *
230            * @return the Spring bean ID for this bean
231            */
232            public java.lang.String getBeanIdentifier() {
233                    return _roleLocalService.getBeanIdentifier();
234            }
235    
236            /**
237            * Sets the Spring bean ID for this bean.
238            *
239            * @param beanIdentifier the Spring bean ID for this bean
240            */
241            public void setBeanIdentifier(java.lang.String beanIdentifier) {
242                    _roleLocalService.setBeanIdentifier(beanIdentifier);
243            }
244    
245            public com.liferay.portal.model.Role addRole(long userId, long companyId,
246                    java.lang.String name,
247                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
248                    java.lang.String description, int type)
249                    throws com.liferay.portal.kernel.exception.PortalException,
250                            com.liferay.portal.kernel.exception.SystemException {
251                    return _roleLocalService.addRole(userId, companyId, name, titleMap,
252                            description, type);
253            }
254    
255            public com.liferay.portal.model.Role addRole(long userId, long companyId,
256                    java.lang.String name,
257                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
258                    java.lang.String description, int type, java.lang.String className,
259                    long classPK)
260                    throws com.liferay.portal.kernel.exception.PortalException,
261                            com.liferay.portal.kernel.exception.SystemException {
262                    return _roleLocalService.addRole(userId, companyId, name, titleMap,
263                            description, type, className, classPK);
264            }
265    
266            public void addUserRoles(long userId, long[] roleIds)
267                    throws com.liferay.portal.kernel.exception.PortalException,
268                            com.liferay.portal.kernel.exception.SystemException {
269                    _roleLocalService.addUserRoles(userId, roleIds);
270            }
271    
272            public void checkSystemRoles()
273                    throws com.liferay.portal.kernel.exception.PortalException,
274                            com.liferay.portal.kernel.exception.SystemException {
275                    _roleLocalService.checkSystemRoles();
276            }
277    
278            public void checkSystemRoles(long companyId)
279                    throws com.liferay.portal.kernel.exception.PortalException,
280                            com.liferay.portal.kernel.exception.SystemException {
281                    _roleLocalService.checkSystemRoles(companyId);
282            }
283    
284            public com.liferay.portal.model.Role getDefaultGroupRole(long groupId)
285                    throws com.liferay.portal.kernel.exception.PortalException,
286                            com.liferay.portal.kernel.exception.SystemException {
287                    return _roleLocalService.getDefaultGroupRole(groupId);
288            }
289    
290            public java.util.List<com.liferay.portal.model.Role> getGroupRoles(
291                    long groupId)
292                    throws com.liferay.portal.kernel.exception.SystemException {
293                    return _roleLocalService.getGroupRoles(groupId);
294            }
295    
296            public java.util.Map<java.lang.String, java.util.List<java.lang.String>> getResourceRoles(
297                    long companyId, java.lang.String name, int scope,
298                    java.lang.String primKey)
299                    throws com.liferay.portal.kernel.exception.SystemException {
300                    return _roleLocalService.getResourceRoles(companyId, name, scope,
301                            primKey);
302            }
303    
304            public java.util.List<com.liferay.portal.model.Role> getResourceRoles(
305                    long companyId, java.lang.String name, int scope,
306                    java.lang.String primKey, java.lang.String actionId)
307                    throws com.liferay.portal.kernel.exception.SystemException {
308                    return _roleLocalService.getResourceRoles(companyId, name, scope,
309                            primKey, actionId);
310            }
311    
312            public com.liferay.portal.model.Role getRole(long companyId,
313                    java.lang.String name)
314                    throws com.liferay.portal.kernel.exception.PortalException,
315                            com.liferay.portal.kernel.exception.SystemException {
316                    return _roleLocalService.getRole(companyId, name);
317            }
318    
319            public java.util.List<com.liferay.portal.model.Role> getRoles(int type,
320                    java.lang.String subtype)
321                    throws com.liferay.portal.kernel.exception.SystemException {
322                    return _roleLocalService.getRoles(type, subtype);
323            }
324    
325            public java.util.List<com.liferay.portal.model.Role> getRoles(
326                    long companyId)
327                    throws com.liferay.portal.kernel.exception.SystemException {
328                    return _roleLocalService.getRoles(companyId);
329            }
330    
331            public java.util.List<com.liferay.portal.model.Role> getRoles(
332                    long[] roleIds)
333                    throws com.liferay.portal.kernel.exception.PortalException,
334                            com.liferay.portal.kernel.exception.SystemException {
335                    return _roleLocalService.getRoles(roleIds);
336            }
337    
338            public java.util.List<com.liferay.portal.model.Role> getSubtypeRoles(
339                    java.lang.String subtype)
340                    throws com.liferay.portal.kernel.exception.SystemException {
341                    return _roleLocalService.getSubtypeRoles(subtype);
342            }
343    
344            public int getSubtypeRolesCount(java.lang.String subtype)
345                    throws com.liferay.portal.kernel.exception.SystemException {
346                    return _roleLocalService.getSubtypeRolesCount(subtype);
347            }
348    
349            public com.liferay.portal.model.Role getTeamRole(long companyId, long teamId)
350                    throws com.liferay.portal.kernel.exception.PortalException,
351                            com.liferay.portal.kernel.exception.SystemException {
352                    return _roleLocalService.getTeamRole(companyId, teamId);
353            }
354    
355            public java.util.List<com.liferay.portal.model.Role> getUserGroupGroupRoles(
356                    long userId, long groupId)
357                    throws com.liferay.portal.kernel.exception.SystemException {
358                    return _roleLocalService.getUserGroupGroupRoles(userId, groupId);
359            }
360    
361            public java.util.List<com.liferay.portal.model.Role> getUserGroupRoles(
362                    long userId, long groupId)
363                    throws com.liferay.portal.kernel.exception.SystemException {
364                    return _roleLocalService.getUserGroupRoles(userId, groupId);
365            }
366    
367            public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
368                    long userId, java.util.List<com.liferay.portal.model.Group> groups)
369                    throws com.liferay.portal.kernel.exception.SystemException {
370                    return _roleLocalService.getUserRelatedRoles(userId, groups);
371            }
372    
373            public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
374                    long userId, long groupId)
375                    throws com.liferay.portal.kernel.exception.SystemException {
376                    return _roleLocalService.getUserRelatedRoles(userId, groupId);
377            }
378    
379            public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
380                    long userId, long[] groupIds)
381                    throws com.liferay.portal.kernel.exception.SystemException {
382                    return _roleLocalService.getUserRelatedRoles(userId, groupIds);
383            }
384    
385            public java.util.List<com.liferay.portal.model.Role> getUserRoles(
386                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
387                    return _roleLocalService.getUserRoles(userId);
388            }
389    
390            public boolean hasUserRole(long userId, long roleId)
391                    throws com.liferay.portal.kernel.exception.SystemException {
392                    return _roleLocalService.hasUserRole(userId, roleId);
393            }
394    
395            /**
396            * Returns <code>true</code> if the user has the regular role.
397            *
398            * @return <code>true</code> if the user has the regular role
399            */
400            public boolean hasUserRole(long userId, long companyId,
401                    java.lang.String name, boolean inherited)
402                    throws com.liferay.portal.kernel.exception.PortalException,
403                            com.liferay.portal.kernel.exception.SystemException {
404                    return _roleLocalService.hasUserRole(userId, companyId, name, inherited);
405            }
406    
407            /**
408            * Returns <code>true</code> if the user has any one of the specified
409            * regular roles.
410            *
411            * @return <code>true</code> if the user has the regular role
412            */
413            public boolean hasUserRoles(long userId, long companyId,
414                    java.lang.String[] names, boolean inherited)
415                    throws com.liferay.portal.kernel.exception.PortalException,
416                            com.liferay.portal.kernel.exception.SystemException {
417                    return _roleLocalService.hasUserRoles(userId, companyId, names,
418                            inherited);
419            }
420    
421            public java.util.List<com.liferay.portal.model.Role> search(
422                    long companyId, java.lang.String keywords, java.lang.Integer[] types,
423                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
424                    throws com.liferay.portal.kernel.exception.SystemException {
425                    return _roleLocalService.search(companyId, keywords, types, start, end,
426                            obc);
427            }
428    
429            public java.util.List<com.liferay.portal.model.Role> search(
430                    long companyId, java.lang.String keywords, java.lang.Integer[] types,
431                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
432                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
433                    throws com.liferay.portal.kernel.exception.SystemException {
434                    return _roleLocalService.search(companyId, keywords, types, params,
435                            start, end, obc);
436            }
437    
438            public java.util.List<com.liferay.portal.model.Role> search(
439                    long companyId, java.lang.String name, java.lang.String description,
440                    java.lang.Integer[] types, int start, int end,
441                    com.liferay.portal.kernel.util.OrderByComparator obc)
442                    throws com.liferay.portal.kernel.exception.SystemException {
443                    return _roleLocalService.search(companyId, name, description, types,
444                            start, end, obc);
445            }
446    
447            public java.util.List<com.liferay.portal.model.Role> search(
448                    long companyId, java.lang.String name, java.lang.String description,
449                    java.lang.Integer[] types,
450                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
451                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
452                    throws com.liferay.portal.kernel.exception.SystemException {
453                    return _roleLocalService.search(companyId, name, description, types,
454                            params, start, end, obc);
455            }
456    
457            public int searchCount(long companyId, java.lang.String keywords,
458                    java.lang.Integer[] types)
459                    throws com.liferay.portal.kernel.exception.SystemException {
460                    return _roleLocalService.searchCount(companyId, keywords, types);
461            }
462    
463            public int searchCount(long companyId, java.lang.String keywords,
464                    java.lang.Integer[] types,
465                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
466                    throws com.liferay.portal.kernel.exception.SystemException {
467                    return _roleLocalService.searchCount(companyId, keywords, types, params);
468            }
469    
470            public int searchCount(long companyId, java.lang.String name,
471                    java.lang.String description, java.lang.Integer[] types)
472                    throws com.liferay.portal.kernel.exception.SystemException {
473                    return _roleLocalService.searchCount(companyId, name, description, types);
474            }
475    
476            public int searchCount(long companyId, java.lang.String name,
477                    java.lang.String description, java.lang.Integer[] types,
478                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
479                    throws com.liferay.portal.kernel.exception.SystemException {
480                    return _roleLocalService.searchCount(companyId, name, description,
481                            types, params);
482            }
483    
484            public void setUserRoles(long userId, long[] roleIds)
485                    throws com.liferay.portal.kernel.exception.PortalException,
486                            com.liferay.portal.kernel.exception.SystemException {
487                    _roleLocalService.setUserRoles(userId, roleIds);
488            }
489    
490            public void unsetUserRoles(long userId, long[] roleIds)
491                    throws com.liferay.portal.kernel.exception.PortalException,
492                            com.liferay.portal.kernel.exception.SystemException {
493                    _roleLocalService.unsetUserRoles(userId, roleIds);
494            }
495    
496            public com.liferay.portal.model.Role updateRole(long roleId,
497                    java.lang.String name,
498                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
499                    java.lang.String description, java.lang.String subtype)
500                    throws com.liferay.portal.kernel.exception.PortalException,
501                            com.liferay.portal.kernel.exception.SystemException {
502                    return _roleLocalService.updateRole(roleId, name, titleMap,
503                            description, subtype);
504            }
505    
506            public RoleLocalService getWrappedRoleLocalService() {
507                    return _roleLocalService;
508            }
509    
510            public void setWrappedRoleLocalService(RoleLocalService roleLocalService) {
511                    _roleLocalService = roleLocalService;
512            }
513    
514            private RoleLocalService _roleLocalService;
515    }