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 RoleLocalService}.
020     * </p>
021     *
022     * @author    Brian Wing Shun Chan
023     * @see       RoleLocalService
024     * @generated
025     */
026    public class RoleLocalServiceWrapper implements RoleLocalService,
027            ServiceWrapper<RoleLocalService> {
028            public RoleLocalServiceWrapper(RoleLocalService roleLocalService) {
029                    _roleLocalService = roleLocalService;
030            }
031    
032            /**
033            * Adds the role to the database. Also notifies the appropriate model listeners.
034            *
035            * @param role the role
036            * @return the role that was added
037            * @throws SystemException if a system exception occurred
038            */
039            public com.liferay.portal.model.Role addRole(
040                    com.liferay.portal.model.Role role)
041                    throws com.liferay.portal.kernel.exception.SystemException {
042                    return _roleLocalService.addRole(role);
043            }
044    
045            /**
046            * Creates a new role with the primary key. Does not add the role to the database.
047            *
048            * @param roleId the primary key for the new role
049            * @return the new role
050            */
051            public com.liferay.portal.model.Role createRole(long roleId) {
052                    return _roleLocalService.createRole(roleId);
053            }
054    
055            /**
056            * Deletes the role with the primary key from the database. Also notifies the appropriate model listeners.
057            *
058            * @param roleId the primary key of the role
059            * @return the role that was removed
060            * @throws PortalException if a role with the primary key could not be found
061            * @throws SystemException if a system exception occurred
062            */
063            public com.liferay.portal.model.Role deleteRole(long roleId)
064                    throws com.liferay.portal.kernel.exception.PortalException,
065                            com.liferay.portal.kernel.exception.SystemException {
066                    return _roleLocalService.deleteRole(roleId);
067            }
068    
069            /**
070            * Deletes the role from the database. Also notifies the appropriate model listeners.
071            *
072            * @param role the role
073            * @return the role that was removed
074            * @throws PortalException
075            * @throws SystemException if a system exception occurred
076            */
077            public com.liferay.portal.model.Role deleteRole(
078                    com.liferay.portal.model.Role role)
079                    throws com.liferay.portal.kernel.exception.PortalException,
080                            com.liferay.portal.kernel.exception.SystemException {
081                    return _roleLocalService.deleteRole(role);
082            }
083    
084            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
085                    return _roleLocalService.dynamicQuery();
086            }
087    
088            /**
089            * Performs a dynamic query on the database and returns the matching rows.
090            *
091            * @param dynamicQuery the dynamic query
092            * @return the matching rows
093            * @throws SystemException if a system exception occurred
094            */
095            @SuppressWarnings("rawtypes")
096            public java.util.List dynamicQuery(
097                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
098                    throws com.liferay.portal.kernel.exception.SystemException {
099                    return _roleLocalService.dynamicQuery(dynamicQuery);
100            }
101    
102            /**
103            * Performs a dynamic query on the database and returns a range of the matching rows.
104            *
105            * <p>
106            * 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.
107            * </p>
108            *
109            * @param dynamicQuery the dynamic query
110            * @param start the lower bound of the range of model instances
111            * @param end the upper bound of the range of model instances (not inclusive)
112            * @return the range of matching rows
113            * @throws SystemException if a system exception occurred
114            */
115            @SuppressWarnings("rawtypes")
116            public java.util.List dynamicQuery(
117                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
118                    int end) throws com.liferay.portal.kernel.exception.SystemException {
119                    return _roleLocalService.dynamicQuery(dynamicQuery, start, end);
120            }
121    
122            /**
123            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
124            *
125            * <p>
126            * 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.
127            * </p>
128            *
129            * @param dynamicQuery the dynamic query
130            * @param start the lower bound of the range of model instances
131            * @param end the upper bound of the range of model instances (not inclusive)
132            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
133            * @return the ordered range of matching rows
134            * @throws SystemException if a system exception occurred
135            */
136            @SuppressWarnings("rawtypes")
137            public java.util.List dynamicQuery(
138                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
139                    int end,
140                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
141                    throws com.liferay.portal.kernel.exception.SystemException {
142                    return _roleLocalService.dynamicQuery(dynamicQuery, start, end,
143                            orderByComparator);
144            }
145    
146            /**
147            * Returns the number of rows that match the dynamic query.
148            *
149            * @param dynamicQuery the dynamic query
150            * @return the number of rows that match the dynamic query
151            * @throws SystemException if a system exception occurred
152            */
153            public long dynamicQueryCount(
154                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
155                    throws com.liferay.portal.kernel.exception.SystemException {
156                    return _roleLocalService.dynamicQueryCount(dynamicQuery);
157            }
158    
159            public com.liferay.portal.model.Role fetchRole(long roleId)
160                    throws com.liferay.portal.kernel.exception.SystemException {
161                    return _roleLocalService.fetchRole(roleId);
162            }
163    
164            /**
165            * Returns the role with the primary key.
166            *
167            * @param roleId the primary key of the role
168            * @return the role
169            * @throws PortalException if a role with the primary key could not be found
170            * @throws SystemException if a system exception occurred
171            */
172            public com.liferay.portal.model.Role getRole(long roleId)
173                    throws com.liferay.portal.kernel.exception.PortalException,
174                            com.liferay.portal.kernel.exception.SystemException {
175                    return _roleLocalService.getRole(roleId);
176            }
177    
178            public com.liferay.portal.model.PersistedModel getPersistedModel(
179                    java.io.Serializable primaryKeyObj)
180                    throws com.liferay.portal.kernel.exception.PortalException,
181                            com.liferay.portal.kernel.exception.SystemException {
182                    return _roleLocalService.getPersistedModel(primaryKeyObj);
183            }
184    
185            /**
186            * Returns a range of all the roles.
187            *
188            * <p>
189            * 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.
190            * </p>
191            *
192            * @param start the lower bound of the range of roles
193            * @param end the upper bound of the range of roles (not inclusive)
194            * @return the range of roles
195            * @throws SystemException if a system exception occurred
196            */
197            public java.util.List<com.liferay.portal.model.Role> getRoles(int start,
198                    int end) throws com.liferay.portal.kernel.exception.SystemException {
199                    return _roleLocalService.getRoles(start, end);
200            }
201    
202            /**
203            * Returns the number of roles.
204            *
205            * @return the number of roles
206            * @throws SystemException if a system exception occurred
207            */
208            public int getRolesCount()
209                    throws com.liferay.portal.kernel.exception.SystemException {
210                    return _roleLocalService.getRolesCount();
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            * @return the role that was updated
218            * @throws SystemException if a system exception occurred
219            */
220            public com.liferay.portal.model.Role updateRole(
221                    com.liferay.portal.model.Role role)
222                    throws com.liferay.portal.kernel.exception.SystemException {
223                    return _roleLocalService.updateRole(role);
224            }
225    
226            /**
227            * Returns the Spring bean ID for this bean.
228            *
229            * @return the Spring bean ID for this bean
230            */
231            public java.lang.String getBeanIdentifier() {
232                    return _roleLocalService.getBeanIdentifier();
233            }
234    
235            /**
236            * Sets the Spring bean ID for this bean.
237            *
238            * @param beanIdentifier the Spring bean ID for this bean
239            */
240            public void setBeanIdentifier(java.lang.String beanIdentifier) {
241                    _roleLocalService.setBeanIdentifier(beanIdentifier);
242            }
243    
244            /**
245            * Adds a role with additional parameters. The user is reindexed after role
246            * is added.
247            *
248            * @param userId the primary key of the user
249            * @param companyId the primary key of the company
250            * @param className the name of the class for which the role is created
251            (optionally <code>null</code>)
252            * @param classPK the primary key of the class for which the role is
253            created (optionally <code>0</code>)
254            * @param name the role's name
255            * @param titleMap the role's localized titles (optionally
256            <code>null</code>)
257            * @param descriptionMap the role's localized descriptions (optionally
258            <code>null</code>)
259            * @param type the role's type (optionally <code>0</code>)
260            * @param subtype the role's subtype (optionally <code>null</code>)
261            * @return the role
262            * @throws PortalException if the class name or the role name were invalid,
263            if the role is a duplicate, or if a user with the primary key
264            could not be found
265            * @throws SystemException if a system exception occurred
266            */
267            public com.liferay.portal.model.Role addRole(long userId,
268                    java.lang.String className, long classPK, java.lang.String name,
269                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
270                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
271                    int type, java.lang.String subType)
272                    throws com.liferay.portal.kernel.exception.PortalException,
273                            com.liferay.portal.kernel.exception.SystemException {
274                    return _roleLocalService.addRole(userId, className, classPK, name,
275                            titleMap, descriptionMap, type, subType);
276            }
277    
278            /**
279            * Adds a role. The user is reindexed after role is added.
280            *
281            * @param userId the primary key of the user
282            * @param companyId the primary key of the company
283            * @param name the role's name
284            * @param titleMap the role's localized titles (optionally
285            <code>null</code>)
286            * @param descriptionMap the role's localized descriptions (optionally
287            <code>null</code>)
288            * @param type the role's type (optionally <code>0</code>)
289            * @return the role
290            * @throws PortalException if the class name or the role name were invalid,
291            if the role is a duplicate, or if a user with the primary key
292            could not be found
293            * @throws SystemException if a system exception occurred
294            * @deprecated {@link #addRole(long, String, long, String, Map, Map, int, String)}
295            */
296            public com.liferay.portal.model.Role addRole(long userId, long companyId,
297                    java.lang.String name,
298                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
299                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
300                    int type)
301                    throws com.liferay.portal.kernel.exception.PortalException,
302                            com.liferay.portal.kernel.exception.SystemException {
303                    return _roleLocalService.addRole(userId, companyId, name, titleMap,
304                            descriptionMap, type);
305            }
306    
307            /**
308            * Adds a role with additional parameters. The user is reindexed after role
309            * is added.
310            *
311            * @param userId the primary key of the user
312            * @param companyId the primary key of the company
313            * @param name the role's name
314            * @param titleMap the role's localized titles (optionally
315            <code>null</code>)
316            * @param descriptionMap the role's localized descriptions (optionally
317            <code>null</code>)
318            * @param type the role's type (optionally <code>0</code>)
319            * @param className the name of the class for which the role is created
320            (optionally <code>null</code>)
321            * @param classPK the primary key of the class for which the role is
322            created (optionally <code>0</code>)
323            * @return the role
324            * @throws PortalException if the class name or the role name were invalid,
325            if the role is a duplicate, or if a user with the primary key
326            could not be found
327            * @throws SystemException if a system exception occurred
328            * @deprecated {@link #addRole(long, String, long, String, Map, Map, int, String)}
329            */
330            public com.liferay.portal.model.Role addRole(long userId, long companyId,
331                    java.lang.String name,
332                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
333                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
334                    int type, java.lang.String className, long classPK)
335                    throws com.liferay.portal.kernel.exception.PortalException,
336                            com.liferay.portal.kernel.exception.SystemException {
337                    return _roleLocalService.addRole(userId, companyId, name, titleMap,
338                            descriptionMap, type, className, classPK);
339            }
340    
341            /**
342            * Adds the roles to the user. The user is reindexed after the roles are
343            * added.
344            *
345            * @param userId the primary key of the user
346            * @param roleIds the primary keys of the roles
347            * @throws PortalException if a user with the primary key could not be found
348            * @throws SystemException if a system exception occurred
349            * @see com.liferay.portal.service.persistence.UserPersistence#addRoles(
350            long, long[])
351            */
352            public void addUserRoles(long userId, long[] roleIds)
353                    throws com.liferay.portal.kernel.exception.PortalException,
354                            com.liferay.portal.kernel.exception.SystemException {
355                    _roleLocalService.addUserRoles(userId, roleIds);
356            }
357    
358            /**
359            * Checks to ensure that the system roles map has appropriate default roles
360            * in each company.
361            *
362            * @throws PortalException if the current user did not have permission to
363            set applicable permissions on a role
364            * @throws SystemException if a system exception occurred
365            */
366            public void checkSystemRoles()
367                    throws com.liferay.portal.kernel.exception.PortalException,
368                            com.liferay.portal.kernel.exception.SystemException {
369                    _roleLocalService.checkSystemRoles();
370            }
371    
372            /**
373            * Checks to ensure that the system roles map has appropriate default roles
374            * in the company.
375            *
376            * @param companyId the primary key of the company
377            * @throws PortalException if the current user did not have permission to
378            set applicable permissions on a role
379            * @throws SystemException if a system exception occurred
380            */
381            public void checkSystemRoles(long companyId)
382                    throws com.liferay.portal.kernel.exception.PortalException,
383                            com.liferay.portal.kernel.exception.SystemException {
384                    _roleLocalService.checkSystemRoles(companyId);
385            }
386    
387            /**
388            * Returns the role with the name in the company.
389            *
390            * <p>
391            * The method searches the system roles map first for default roles. If a
392            * role with the name is not found, then the method will query the database.
393            * </p>
394            *
395            * @param companyId the primary key of the company
396            * @param name the role's name
397            * @return Returns the role with the name or <code>null</code> if a role
398            with the name could not be found in the company
399            * @throws SystemException if a system exception occurred
400            */
401            public com.liferay.portal.model.Role fetchRole(long companyId,
402                    java.lang.String name)
403                    throws com.liferay.portal.kernel.exception.SystemException {
404                    return _roleLocalService.fetchRole(companyId, name);
405            }
406    
407            /**
408            * Returns the default role for the group with the primary key.
409            *
410            * <p>
411            * If the group is a site, then the default role is {@link
412            * com.liferay.portal.model.RoleConstants#SITE_MEMBER}. If the group is an
413            * organization, then the default role is {@link
414            * com.liferay.portal.model.RoleConstants#ORGANIZATION_USER}. If the group
415            * is a user or user group, then the default role is {@link
416            * com.liferay.portal.model.RoleConstants#POWER_USER}. For all other group
417            * types, the default role is {@link
418            * com.liferay.portal.model.RoleConstants#USER}.
419            * </p>
420            *
421            * @param groupId the primary key of the group
422            * @return the default role for the group with the primary key
423            * @throws PortalException if a group with the primary key could not be
424            found, or if a default role could not be found for the group
425            * @throws SystemException if a system exception occurred
426            */
427            public com.liferay.portal.model.Role getDefaultGroupRole(long groupId)
428                    throws com.liferay.portal.kernel.exception.PortalException,
429                            com.liferay.portal.kernel.exception.SystemException {
430                    return _roleLocalService.getDefaultGroupRole(groupId);
431            }
432    
433            /**
434            * Returns all the roles associated with the group.
435            *
436            * @param groupId the primary key of the group
437            * @return the roles associated with the group
438            * @throws SystemException if a system exception occurred
439            */
440            public java.util.List<com.liferay.portal.model.Role> getGroupRoles(
441                    long groupId)
442                    throws com.liferay.portal.kernel.exception.SystemException {
443                    return _roleLocalService.getGroupRoles(groupId);
444            }
445    
446            public java.util.List<com.liferay.portal.model.Role> getResourceBlockRoles(
447                    long resourceBlockId, java.lang.String className,
448                    java.lang.String actionId)
449                    throws com.liferay.portal.kernel.exception.SystemException {
450                    return _roleLocalService.getResourceBlockRoles(resourceBlockId,
451                            className, actionId);
452            }
453    
454            /**
455            * Returns a map of role names to associated action IDs for the named
456            * resource in the company within the permission scope.
457            *
458            * @param companyId the primary key of the company
459            * @param name the resource name
460            * @param scope the permission scope
461            * @param primKey the primary key of the resource's class
462            * @return the role names and action IDs
463            * @throws SystemException if a system exception occurred
464            * @see com.liferay.portal.service.persistence.RoleFinder#findByC_N_S_P(
465            long, String, int, String)
466            */
467            public java.util.Map<java.lang.String, java.util.List<java.lang.String>> getResourceRoles(
468                    long companyId, java.lang.String name, int scope,
469                    java.lang.String primKey)
470                    throws com.liferay.portal.kernel.exception.SystemException {
471                    return _roleLocalService.getResourceRoles(companyId, name, scope,
472                            primKey);
473            }
474    
475            /**
476            * Returns all the roles associated with the action ID in the company within
477            * the permission scope.
478            *
479            * @param companyId the primary key of the company
480            * @param name the resource name
481            * @param scope the permission scope
482            * @param primKey the primary key of the resource's class
483            * @param actionId the name of the resource action
484            * @return the roles
485            * @throws SystemException if a system exception occurred
486            * @see com.liferay.portal.service.persistence.RoleFinder#findByC_N_S_P_A(
487            long, String, int, String, String)
488            */
489            public java.util.List<com.liferay.portal.model.Role> getResourceRoles(
490                    long companyId, java.lang.String name, int scope,
491                    java.lang.String primKey, java.lang.String actionId)
492                    throws com.liferay.portal.kernel.exception.SystemException {
493                    return _roleLocalService.getResourceRoles(companyId, name, scope,
494                            primKey, actionId);
495            }
496    
497            /**
498            * Returns the role with the name in the company.
499            *
500            * <p>
501            * The method searches the system roles map first for default roles. If a
502            * role with the name is not found, then the method will query the database.
503            * </p>
504            *
505            * @param companyId the primary key of the company
506            * @param name the role's name
507            * @return the role with the name
508            * @throws PortalException if a role with the name could not be found in the
509            company
510            * @throws SystemException if a system exception occurred
511            */
512            public com.liferay.portal.model.Role getRole(long companyId,
513                    java.lang.String name)
514                    throws com.liferay.portal.kernel.exception.PortalException,
515                            com.liferay.portal.kernel.exception.SystemException {
516                    return _roleLocalService.getRole(companyId, name);
517            }
518    
519            /**
520            * Returns all the roles of the type and subtype.
521            *
522            * @param type the role's type (optionally <code>0</code>)
523            * @param subtype the role's subtype (optionally <code>null</code>)
524            * @return the roles of the type and subtype
525            * @throws SystemException if a system exception occurred
526            */
527            public java.util.List<com.liferay.portal.model.Role> getRoles(int type,
528                    java.lang.String subtype)
529                    throws com.liferay.portal.kernel.exception.SystemException {
530                    return _roleLocalService.getRoles(type, subtype);
531            }
532    
533            /**
534            * Returns all the roles in the company.
535            *
536            * @param companyId the primary key of the company
537            * @return the roles in the company
538            * @throws SystemException if a system exception occurred
539            */
540            public java.util.List<com.liferay.portal.model.Role> getRoles(
541                    long companyId)
542                    throws com.liferay.portal.kernel.exception.SystemException {
543                    return _roleLocalService.getRoles(companyId);
544            }
545    
546            /**
547            * Returns all the roles with the primary keys.
548            *
549            * @param roleIds the primary keys of the roles
550            * @return the roles with the primary keys
551            * @throws PortalException if any one of the roles with the primary keys
552            could not be found
553            * @throws SystemException if a system exception occurred
554            */
555            public java.util.List<com.liferay.portal.model.Role> getRoles(
556                    long[] roleIds)
557                    throws com.liferay.portal.kernel.exception.PortalException,
558                            com.liferay.portal.kernel.exception.SystemException {
559                    return _roleLocalService.getRoles(roleIds);
560            }
561    
562            /**
563            * Returns all the roles of the subtype.
564            *
565            * @param subtype the role's subtype (optionally <code>null</code>)
566            * @return the roles of the subtype
567            * @throws SystemException if a system exception occurred
568            */
569            public java.util.List<com.liferay.portal.model.Role> getSubtypeRoles(
570                    java.lang.String subtype)
571                    throws com.liferay.portal.kernel.exception.SystemException {
572                    return _roleLocalService.getSubtypeRoles(subtype);
573            }
574    
575            /**
576            * Returns the number of roles of the subtype.
577            *
578            * @param subtype the role's subtype (optionally <code>null</code>)
579            * @return the number of roles of the subtype
580            * @throws SystemException if a system exception occurred
581            */
582            public int getSubtypeRolesCount(java.lang.String subtype)
583                    throws com.liferay.portal.kernel.exception.SystemException {
584                    return _roleLocalService.getSubtypeRolesCount(subtype);
585            }
586    
587            /**
588            * Returns the team role in the company.
589            *
590            * @param companyId the primary key of the company
591            * @param teamId the primary key of the team
592            * @return the team role in the company
593            * @throws PortalException if a role could not be found in the team and
594            company
595            * @throws SystemException if a system exception occurred
596            */
597            public com.liferay.portal.model.Role getTeamRole(long companyId, long teamId)
598                    throws com.liferay.portal.kernel.exception.PortalException,
599                            com.liferay.portal.kernel.exception.SystemException {
600                    return _roleLocalService.getTeamRole(companyId, teamId);
601            }
602    
603            /**
604            * Returns all the user's roles within the user group.
605            *
606            * @param userId the primary key of the user
607            * @param groupId the primary key of the group
608            * @return the user's roles within the user group
609            * @throws SystemException if a system exception occurred
610            * @see com.liferay.portal.service.persistence.RoleFinder#findByUserGroupGroupRole(
611            long, long)
612            */
613            public java.util.List<com.liferay.portal.model.Role> getUserGroupGroupRoles(
614                    long userId, long groupId)
615                    throws com.liferay.portal.kernel.exception.SystemException {
616                    return _roleLocalService.getUserGroupGroupRoles(userId, groupId);
617            }
618    
619            /**
620            * Returns all the user's roles within the user group.
621            *
622            * @param userId the primary key of the user
623            * @param groupId the primary key of the group
624            * @return the user's roles within the user group
625            * @throws SystemException if a system exception occurred
626            * @see com.liferay.portal.service.persistence.RoleFinder#findByUserGroupRole(
627            long, long)
628            */
629            public java.util.List<com.liferay.portal.model.Role> getUserGroupRoles(
630                    long userId, long groupId)
631                    throws com.liferay.portal.kernel.exception.SystemException {
632                    return _roleLocalService.getUserGroupRoles(userId, groupId);
633            }
634    
635            /**
636            * Returns the union of all the user's roles within the groups.
637            *
638            * @param userId the primary key of the user
639            * @param groups the groups (optionally <code>null</code>)
640            * @return the union of all the user's roles within the groups
641            * @throws SystemException if a system exception occurred
642            * @see com.liferay.portal.service.persistence.RoleFinder#findByU_G(
643            long, List)
644            */
645            public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
646                    long userId, java.util.List<com.liferay.portal.model.Group> groups)
647                    throws com.liferay.portal.kernel.exception.SystemException {
648                    return _roleLocalService.getUserRelatedRoles(userId, groups);
649            }
650    
651            /**
652            * Returns all the user's roles within the group.
653            *
654            * @param userId the primary key of the user
655            * @param groupId the primary key of the group
656            * @return the user's roles within the group
657            * @throws SystemException if a system exception occurred
658            * @see com.liferay.portal.service.persistence.RoleFinder#findByU_G(
659            long, long)
660            */
661            public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
662                    long userId, long groupId)
663                    throws com.liferay.portal.kernel.exception.SystemException {
664                    return _roleLocalService.getUserRelatedRoles(userId, groupId);
665            }
666    
667            /**
668            * Returns the union of all the user's roles within the groups.
669            *
670            * @param userId the primary key of the user
671            * @param groupIds the primary keys of the groups
672            * @return the union of all the user's roles within the groups
673            * @throws SystemException if a system exception occurred
674            * @see com.liferay.portal.service.persistence.RoleFinder#findByU_G(
675            long, long[])
676            */
677            public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
678                    long userId, long[] groupIds)
679                    throws com.liferay.portal.kernel.exception.SystemException {
680                    return _roleLocalService.getUserRelatedRoles(userId, groupIds);
681            }
682    
683            /**
684            * Returns all the roles associated with the user.
685            *
686            * @param userId the primary key of the user
687            * @return the roles associated with the user
688            * @throws SystemException if a system exception occurred
689            */
690            public java.util.List<com.liferay.portal.model.Role> getUserRoles(
691                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
692                    return _roleLocalService.getUserRoles(userId);
693            }
694    
695            /**
696            * Returns <code>true</code> if the user is associated with the role.
697            *
698            * @param userId the primary key of the user
699            * @param roleId the primary key of the role
700            * @return <code>true</code> if the user is associated with the role;
701            <code>false</code> otherwise
702            * @throws SystemException if a system exception occurred
703            */
704            public boolean hasUserRole(long userId, long roleId)
705                    throws com.liferay.portal.kernel.exception.SystemException {
706                    return _roleLocalService.hasUserRole(userId, roleId);
707            }
708    
709            /**
710            * Returns <code>true</code> if the user is associated with the named
711            * regular role.
712            *
713            * @param userId the primary key of the user
714            * @param companyId the primary key of the company
715            * @param name the name of the role
716            * @param inherited whether to include the user's inherited roles in the
717            search
718            * @return <code>true</code> if the user is associated with the regular
719            role; <code>false</code> otherwise
720            * @throws PortalException if a role with the name could not be found in the
721            company or if a default user for the company could not be found
722            * @throws SystemException if a system exception occurred
723            */
724            public boolean hasUserRole(long userId, long companyId,
725                    java.lang.String name, boolean inherited)
726                    throws com.liferay.portal.kernel.exception.PortalException,
727                            com.liferay.portal.kernel.exception.SystemException {
728                    return _roleLocalService.hasUserRole(userId, companyId, name, inherited);
729            }
730    
731            /**
732            * Returns <code>true</code> if the user has any one of the named regular
733            * roles.
734            *
735            * @param userId the primary key of the user
736            * @param companyId the primary key of the company
737            * @param names the names of the roles
738            * @param inherited whether to include the user's inherited roles in the
739            search
740            * @return <code>true</code> if the user has any one of the regular roles;
741            <code>false</code> otherwise
742            * @throws PortalException if any one of the roles with the names could not
743            be found in the company or if the default user for the company
744            could not be found
745            * @throws SystemException if a system exception occurred
746            */
747            public boolean hasUserRoles(long userId, long companyId,
748                    java.lang.String[] names, boolean inherited)
749                    throws com.liferay.portal.kernel.exception.PortalException,
750                            com.liferay.portal.kernel.exception.SystemException {
751                    return _roleLocalService.hasUserRoles(userId, companyId, names,
752                            inherited);
753            }
754    
755            /**
756            * Returns a role with the name in the company.
757            *
758            * @param companyId the primary key of the company
759            * @param name the role's name (optionally <code>null</code>)
760            * @return the role with the name, or <code>null</code> if a role with the
761            name could not be found in the company
762            * @throws SystemException if a system exception occurred
763            */
764            public com.liferay.portal.model.Role loadFetchRole(long companyId,
765                    java.lang.String name)
766                    throws com.liferay.portal.kernel.exception.SystemException {
767                    return _roleLocalService.loadFetchRole(companyId, name);
768            }
769    
770            /**
771            * Returns a role with the name in the company.
772            *
773            * @param companyId the primary key of the company
774            * @param name the role's name
775            * @return the role with the name in the company
776            * @throws PortalException if a role with the name could not be found in the
777            company
778            * @throws SystemException if a system exception occurred
779            */
780            public com.liferay.portal.model.Role loadGetRole(long companyId,
781                    java.lang.String name)
782                    throws com.liferay.portal.kernel.exception.PortalException,
783                            com.liferay.portal.kernel.exception.SystemException {
784                    return _roleLocalService.loadGetRole(companyId, name);
785            }
786    
787            /**
788            * Returns an ordered range of all the roles that match the keywords and
789            * types.
790            *
791            * <p>
792            * Useful when paginating results. Returns a maximum of <code>end -
793            * start</code> instances. <code>start</code> and <code>end</code> are not
794            * primary keys, they are indexes in the result set. Thus, <code>0</code>
795            * refers to the first result in the set. Setting both <code>start</code>
796            * and <code>end</code> to {@link
797            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
798            * result set.
799            * </p>
800            *
801            * @param companyId the primary key of the company
802            * @param keywords the keywords (space separated), which may occur in the
803            role's name or description (optionally <code>null</code>)
804            * @param types the role types (optionally <code>null</code>)
805            * @param start the lower bound of the range of roles to return
806            * @param end the upper bound of the range of roles to return (not
807            inclusive)
808            * @param obc the comparator to order the roles (optionally
809            <code>null</code>)
810            * @return the ordered range of the matching roles, ordered by
811            <code>obc</code>
812            * @throws SystemException if a system exception occurred
813            * @see com.liferay.portal.service.persistence.RoleFinder
814            */
815            public java.util.List<com.liferay.portal.model.Role> search(
816                    long companyId, java.lang.String keywords, java.lang.Integer[] types,
817                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
818                    throws com.liferay.portal.kernel.exception.SystemException {
819                    return _roleLocalService.search(companyId, keywords, types, start, end,
820                            obc);
821            }
822    
823            /**
824            * Returns an ordered range of all the roles that match the keywords, types,
825            * and params.
826            *
827            * <p>
828            * Useful when paginating results. Returns a maximum of <code>end -
829            * start</code> instances. <code>start</code> and <code>end</code> are not
830            * primary keys, they are indexes in the result set. Thus, <code>0</code>
831            * refers to the first result in the set. Setting both <code>start</code>
832            * and <code>end</code> to {@link
833            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
834            * result set.
835            * </p>
836            *
837            * @param companyId the primary key of the company
838            * @param keywords the keywords (space separated), which may occur in the
839            role's name or description (optionally <code>null</code>)
840            * @param types the role types (optionally <code>null</code>)
841            * @param params the finder parameters. Can specify values for the
842            "usersRoles" key. For more information, see {@link
843            com.liferay.portal.service.persistence.RoleFinder}
844            * @param start the lower bound of the range of roles to return
845            * @param end the upper bound of the range of roles to return (not
846            inclusive)
847            * @param obc the comparator to order the roles (optionally
848            <code>null</code>)
849            * @return the ordered range of the matching roles, ordered by
850            <code>obc</code>
851            * @throws SystemException if a system exception occurred
852            * @see com.liferay.portal.service.persistence.RoleFinder
853            */
854            public java.util.List<com.liferay.portal.model.Role> search(
855                    long companyId, java.lang.String keywords, java.lang.Integer[] types,
856                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
857                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
858                    throws com.liferay.portal.kernel.exception.SystemException {
859                    return _roleLocalService.search(companyId, keywords, types, params,
860                            start, end, obc);
861            }
862    
863            /**
864            * Returns an ordered range of all the roles that match the name,
865            * description, and types.
866            *
867            * <p>
868            * Useful when paginating results. Returns a maximum of <code>end -
869            * start</code> instances. <code>start</code> and <code>end</code> are not
870            * primary keys, they are indexes in the result set. Thus, <code>0</code>
871            * refers to the first result in the set. Setting both <code>start</code>
872            * and <code>end</code> to {@link
873            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
874            * result set.
875            * </p>
876            *
877            * @param companyId the primary key of the company
878            * @param name the role's name (optionally <code>null</code>)
879            * @param description the role's description (optionally <code>null</code>)
880            * @param types the role types (optionally <code>null</code>)
881            * @param start the lower bound of the range of the roles to return
882            * @param end the upper bound of the range of the roles to return (not
883            inclusive)
884            * @param obc the comparator to order the roles (optionally
885            <code>null</code>)
886            * @return the ordered range of the matching roles, ordered by
887            <code>obc</code>
888            * @throws SystemException if a system exception occurred
889            * @see com.liferay.portal.service.persistence.RoleFinder
890            */
891            public java.util.List<com.liferay.portal.model.Role> search(
892                    long companyId, java.lang.String name, java.lang.String description,
893                    java.lang.Integer[] types, int start, int end,
894                    com.liferay.portal.kernel.util.OrderByComparator obc)
895                    throws com.liferay.portal.kernel.exception.SystemException {
896                    return _roleLocalService.search(companyId, name, description, types,
897                            start, end, obc);
898            }
899    
900            /**
901            * Returns an ordered range of all the roles that match the name,
902            * description, types, and params.
903            *
904            * <p>
905            * Useful when paginating results. Returns a maximum of <code>end -
906            * start</code> instances. <code>start</code> and <code>end</code> are not
907            * primary keys, they are indexes in the result set. Thus, <code>0</code>
908            * refers to the first result in the set. Setting both <code>start</code>
909            * and <code>end</code> to {@link
910            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
911            * result set.
912            * </p>
913            *
914            * @param companyId the primary key of the company
915            * @param name the role's name (optionally <code>null</code>)
916            * @param description the role's description (optionally <code>null</code>)
917            * @param types the role types (optionally <code>null</code>)
918            * @param params the finder's parameters. Can specify values for the
919            "usersRoles" key. For more information, see {@link
920            com.liferay.portal.service.persistence.RoleFinder}
921            * @param start the lower bound of the range of the roles to return
922            * @param end the upper bound of the range of the roles to return (not
923            inclusive)
924            * @param obc the comparator to order the roles (optionally
925            <code>null</code>)
926            * @return the ordered range of the matching roles, ordered by
927            <code>obc</code>
928            * @throws SystemException if a system exception occurred
929            * @see com.liferay.portal.service.persistence.RoleFinder
930            */
931            public java.util.List<com.liferay.portal.model.Role> search(
932                    long companyId, java.lang.String name, java.lang.String description,
933                    java.lang.Integer[] types,
934                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
935                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
936                    throws com.liferay.portal.kernel.exception.SystemException {
937                    return _roleLocalService.search(companyId, name, description, types,
938                            params, start, end, obc);
939            }
940    
941            /**
942            * Returns the number of roles that match the keywords and types.
943            *
944            * @param companyId the primary key of the company
945            * @param keywords the keywords (space separated), which may occur in the
946            role's name or description (optionally <code>null</code>)
947            * @param types the role types (optionally <code>null</code>)
948            * @return the number of matching roles
949            * @throws SystemException if a system exception occurred
950            */
951            public int searchCount(long companyId, java.lang.String keywords,
952                    java.lang.Integer[] types)
953                    throws com.liferay.portal.kernel.exception.SystemException {
954                    return _roleLocalService.searchCount(companyId, keywords, types);
955            }
956    
957            /**
958            * Returns the number of roles that match the keywords, types and params.
959            *
960            * @param companyId the primary key of the company
961            * @param keywords the keywords (space separated), which may occur in the
962            role's name or description (optionally <code>null</code>)
963            * @param types the role types (optionally <code>null</code>)
964            * @param params the finder parameters. For more information, see {@link
965            com.liferay.portal.service.persistence.RoleFinder}
966            * @return the number of matching roles
967            * @throws SystemException if a system exception occurred
968            */
969            public int searchCount(long companyId, java.lang.String keywords,
970                    java.lang.Integer[] types,
971                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
972                    throws com.liferay.portal.kernel.exception.SystemException {
973                    return _roleLocalService.searchCount(companyId, keywords, types, params);
974            }
975    
976            /**
977            * Returns the number of roles that match the name, description, and types.
978            *
979            * @param companyId the primary key of the company
980            * @param name the role's name (optionally <code>null</code>)
981            * @param description the role's description (optionally <code>null</code>)
982            * @param types the role types (optionally <code>null</code>)
983            * @return the number of matching roles
984            * @throws SystemException if a system exception occurred
985            */
986            public int searchCount(long companyId, java.lang.String name,
987                    java.lang.String description, java.lang.Integer[] types)
988                    throws com.liferay.portal.kernel.exception.SystemException {
989                    return _roleLocalService.searchCount(companyId, name, description, types);
990            }
991    
992            /**
993            * Returns the number of roles that match the name, description, types, and
994            * params.
995            *
996            * @param companyId the primary key of the company
997            * @param name the role's name (optionally <code>null</code>)
998            * @param description the role's description (optionally <code>null</code>)
999            * @param types the role types (optionally <code>null</code>)
1000            * @param params the finder parameters. Can specify values for the
1001            "usersRoles" key. For more information, see {@link
1002            com.liferay.portal.service.persistence.RoleFinder}
1003            * @return the number of matching roles
1004            * @throws SystemException if a system exception occurred
1005            */
1006            public int searchCount(long companyId, java.lang.String name,
1007                    java.lang.String description, java.lang.Integer[] types,
1008                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
1009                    throws com.liferay.portal.kernel.exception.SystemException {
1010                    return _roleLocalService.searchCount(companyId, name, description,
1011                            types, params);
1012            }
1013    
1014            /**
1015            * Sets the roles associated with the user, replacing the user's existing
1016            * roles. The user is reindexed after the roles are set.
1017            *
1018            * @param userId the primary key of the user
1019            * @param roleIds the primary keys of the roles
1020            * @throws PortalException if a user with the primary could not be found or
1021            if any one of the roles with the primary keys could not be found
1022            * @throws SystemException if a system exception occurred
1023            */
1024            public void setUserRoles(long userId, long[] roleIds)
1025                    throws com.liferay.portal.kernel.exception.PortalException,
1026                            com.liferay.portal.kernel.exception.SystemException {
1027                    _roleLocalService.setUserRoles(userId, roleIds);
1028            }
1029    
1030            /**
1031            * Removes the matching roles associated with the user. The user is
1032            * reindexed after the roles are removed.
1033            *
1034            * @param userId the primary key of the user
1035            * @param roleIds the primary keys of the roles
1036            * @throws PortalException if a user with the primary key could not be found
1037            or if a role with any one of the primary keys could not be found
1038            * @throws SystemException if a system exception occurred
1039            */
1040            public void unsetUserRoles(long userId, long[] roleIds)
1041                    throws com.liferay.portal.kernel.exception.PortalException,
1042                            com.liferay.portal.kernel.exception.SystemException {
1043                    _roleLocalService.unsetUserRoles(userId, roleIds);
1044            }
1045    
1046            /**
1047            * Updates the role with the primary key.
1048            *
1049            * @param roleId the primary key of the role
1050            * @param name the role's new name
1051            * @param titleMap the new localized titles (optionally <code>null</code>)
1052            to replace those existing for the role
1053            * @param descriptionMap the new localized descriptions (optionally
1054            <code>null</code>) to replace those existing for the role
1055            * @param subtype the role's new subtype (optionally <code>null</code>)
1056            * @return the role with the primary key
1057            * @throws PortalException if a role with the primary could not be found or
1058            if the role's name was invalid
1059            * @throws SystemException if a system exception occurred
1060            */
1061            public com.liferay.portal.model.Role updateRole(long roleId,
1062                    java.lang.String name,
1063                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
1064                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
1065                    java.lang.String subtype)
1066                    throws com.liferay.portal.kernel.exception.PortalException,
1067                            com.liferay.portal.kernel.exception.SystemException {
1068                    return _roleLocalService.updateRole(roleId, name, titleMap,
1069                            descriptionMap, subtype);
1070            }
1071    
1072            /**
1073             * @deprecated Renamed to {@link #getWrappedService}
1074             */
1075            public RoleLocalService getWrappedRoleLocalService() {
1076                    return _roleLocalService;
1077            }
1078    
1079            /**
1080             * @deprecated Renamed to {@link #setWrappedService}
1081             */
1082            public void setWrappedRoleLocalService(RoleLocalService roleLocalService) {
1083                    _roleLocalService = roleLocalService;
1084            }
1085    
1086            public RoleLocalService getWrappedService() {
1087                    return _roleLocalService;
1088            }
1089    
1090            public void setWrappedService(RoleLocalService roleLocalService) {
1091                    _roleLocalService = roleLocalService;
1092            }
1093    
1094            private RoleLocalService _roleLocalService;
1095    }