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