001    /**
002     * Copyright (c) 2000-present 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    import aQute.bnd.annotation.ProviderType;
018    
019    /**
020     * Provides a wrapper for {@link RoleLocalService}.
021     *
022     * @author Brian Wing Shun Chan
023     * @see RoleLocalService
024     * @generated
025     */
026    @ProviderType
027    public class RoleLocalServiceWrapper implements RoleLocalService,
028            ServiceWrapper<RoleLocalService> {
029            public RoleLocalServiceWrapper(RoleLocalService roleLocalService) {
030                    _roleLocalService = roleLocalService;
031            }
032    
033            @Override
034            public void addGroupRole(long groupId, com.liferay.portal.model.Role role) {
035                    _roleLocalService.addGroupRole(groupId, role);
036            }
037    
038            @Override
039            public void addGroupRole(long groupId, long roleId) {
040                    _roleLocalService.addGroupRole(groupId, roleId);
041            }
042    
043            @Override
044            public void addGroupRoles(long groupId,
045                    java.util.List<com.liferay.portal.model.Role> Roles) {
046                    _roleLocalService.addGroupRoles(groupId, Roles);
047            }
048    
049            @Override
050            public void addGroupRoles(long groupId, long[] roleIds) {
051                    _roleLocalService.addGroupRoles(groupId, roleIds);
052            }
053    
054            /**
055            * Adds the role to the database. Also notifies the appropriate model listeners.
056            *
057            * @param role the role
058            * @return the role that was added
059            */
060            @Override
061            public com.liferay.portal.model.Role addRole(
062                    com.liferay.portal.model.Role role) {
063                    return _roleLocalService.addRole(role);
064            }
065    
066            /**
067            * Adds a role with additional parameters. The user is reindexed after role
068            * is added.
069            *
070            * @param userId the primary key of the user
071            * @param className the name of the class for which the role is created
072            (optionally <code>null</code>)
073            * @param classPK the primary key of the class for which the role is
074            created (optionally <code>0</code>)
075            * @param name the role's name
076            * @param titleMap the role's localized titles (optionally
077            <code>null</code>)
078            * @param descriptionMap the role's localized descriptions (optionally
079            <code>null</code>)
080            * @param type the role's type (optionally <code>0</code>)
081            * @param subtype the role's subtype (optionally <code>null</code>)
082            * @param serviceContext the service context to be applied (optionally
083            <code>null</code>). Can set expando bridge attributes for the
084            role.
085            * @return the role
086            * @throws PortalException if the class name or the role name were invalid,
087            if the role is a duplicate, or if a user with the primary key
088            could not be found
089            */
090            @Override
091            public com.liferay.portal.model.Role addRole(long userId,
092                    java.lang.String className, long classPK, java.lang.String name,
093                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
094                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
095                    int type, java.lang.String subtype,
096                    com.liferay.portal.service.ServiceContext serviceContext)
097                    throws com.liferay.portal.kernel.exception.PortalException {
098                    return _roleLocalService.addRole(userId, className, classPK, name,
099                            titleMap, descriptionMap, type, subtype, serviceContext);
100            }
101    
102            /**
103            * Adds a role. The user is reindexed after role is added.
104            *
105            * @param userId the primary key of the user
106            * @param companyId the primary key of the company
107            * @param name the role's name
108            * @param titleMap the role's localized titles (optionally
109            <code>null</code>)
110            * @param descriptionMap the role's localized descriptions (optionally
111            <code>null</code>)
112            * @param type the role's type (optionally <code>0</code>)
113            * @return the role
114            * @throws PortalException if the class name or the role name were
115            invalid, if the role is a duplicate, or if a user with the
116            primary key could not be found
117            * @deprecated As of 6.2.0, replaced by {@link #addRole(long, String, long,
118            String, Map, Map, int, String, ServiceContext)}
119            */
120            @Deprecated
121            @Override
122            public com.liferay.portal.model.Role addRole(long userId, long companyId,
123                    java.lang.String name,
124                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
125                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
126                    int type) throws com.liferay.portal.kernel.exception.PortalException {
127                    return _roleLocalService.addRole(userId, companyId, name, titleMap,
128                            descriptionMap, type);
129            }
130    
131            /**
132            * Adds a role with additional parameters. The user is reindexed after role
133            * is added.
134            *
135            * @param userId the primary key of the user
136            * @param companyId the primary key of the company
137            * @param name the role's name
138            * @param titleMap the role's localized titles (optionally
139            <code>null</code>)
140            * @param descriptionMap the role's localized descriptions (optionally
141            <code>null</code>)
142            * @param type the role's type (optionally <code>0</code>)
143            * @param className the name of the class for which the role is created
144            (optionally <code>null</code>)
145            * @param classPK the primary key of the class for which the role is
146            created (optionally <code>0</code>)
147            * @return the role
148            * @throws PortalException if the class name or the role name were
149            invalid, if the role is a duplicate, or if a user with the
150            primary key could not be found
151            * @deprecated As of 6.2.0, replaced by {@link #addRole(long, String, long,
152            String, Map, Map, int, String, ServiceContext)}
153            */
154            @Deprecated
155            @Override
156            public com.liferay.portal.model.Role addRole(long userId, long companyId,
157                    java.lang.String name,
158                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
159                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
160                    int type, java.lang.String className, long classPK)
161                    throws com.liferay.portal.kernel.exception.PortalException {
162                    return _roleLocalService.addRole(userId, companyId, name, titleMap,
163                            descriptionMap, type, className, classPK);
164            }
165    
166            @Override
167            public void addUserRole(long userId, com.liferay.portal.model.Role role) {
168                    _roleLocalService.addUserRole(userId, role);
169            }
170    
171            @Override
172            public void addUserRole(long userId, long roleId) {
173                    _roleLocalService.addUserRole(userId, roleId);
174            }
175    
176            /**
177            * @throws PortalException
178            */
179            @Override
180            public void addUserRoles(long userId,
181                    java.util.List<com.liferay.portal.model.Role> Roles)
182                    throws com.liferay.portal.kernel.exception.PortalException {
183                    _roleLocalService.addUserRoles(userId, Roles);
184            }
185    
186            /**
187            * @throws PortalException
188            */
189            @Override
190            public void addUserRoles(long userId, long[] roleIds)
191                    throws com.liferay.portal.kernel.exception.PortalException {
192                    _roleLocalService.addUserRoles(userId, roleIds);
193            }
194    
195            /**
196            * Checks to ensure that the system roles map has appropriate default roles
197            * in each company.
198            *
199            * @throws PortalException if the current user did not have permission to
200            set applicable permissions on a role
201            */
202            @Override
203            public void checkSystemRoles()
204                    throws com.liferay.portal.kernel.exception.PortalException {
205                    _roleLocalService.checkSystemRoles();
206            }
207    
208            /**
209            * Checks to ensure that the system roles map has appropriate default roles
210            * in the company.
211            *
212            * @param companyId the primary key of the company
213            * @throws PortalException if the current user did not have permission to
214            set applicable permissions on a role
215            */
216            @Override
217            public void checkSystemRoles(long companyId)
218                    throws com.liferay.portal.kernel.exception.PortalException {
219                    _roleLocalService.checkSystemRoles(companyId);
220            }
221    
222            @Override
223            public void clearGroupRoles(long groupId) {
224                    _roleLocalService.clearGroupRoles(groupId);
225            }
226    
227            @Override
228            public void clearUserRoles(long userId) {
229                    _roleLocalService.clearUserRoles(userId);
230            }
231    
232            /**
233            * Creates a new role with the primary key. Does not add the role to the database.
234            *
235            * @param roleId the primary key for the new role
236            * @return the new role
237            */
238            @Override
239            public com.liferay.portal.model.Role createRole(long roleId) {
240                    return _roleLocalService.createRole(roleId);
241            }
242    
243            @Override
244            public void deleteGroupRole(long groupId, com.liferay.portal.model.Role role) {
245                    _roleLocalService.deleteGroupRole(groupId, role);
246            }
247    
248            @Override
249            public void deleteGroupRole(long groupId, long roleId) {
250                    _roleLocalService.deleteGroupRole(groupId, roleId);
251            }
252    
253            @Override
254            public void deleteGroupRoles(long groupId,
255                    java.util.List<com.liferay.portal.model.Role> Roles) {
256                    _roleLocalService.deleteGroupRoles(groupId, Roles);
257            }
258    
259            @Override
260            public void deleteGroupRoles(long groupId, long[] roleIds) {
261                    _roleLocalService.deleteGroupRoles(groupId, roleIds);
262            }
263    
264            /**
265            * @throws PortalException
266            */
267            @Override
268            public com.liferay.portal.model.PersistedModel deletePersistedModel(
269                    com.liferay.portal.model.PersistedModel persistedModel)
270                    throws com.liferay.portal.kernel.exception.PortalException {
271                    return _roleLocalService.deletePersistedModel(persistedModel);
272            }
273    
274            /**
275            * Deletes the role from the database. Also notifies the appropriate model listeners.
276            *
277            * @param role the role
278            * @return the role that was removed
279            * @throws PortalException
280            */
281            @Override
282            public com.liferay.portal.model.Role deleteRole(
283                    com.liferay.portal.model.Role role)
284                    throws com.liferay.portal.kernel.exception.PortalException {
285                    return _roleLocalService.deleteRole(role);
286            }
287    
288            /**
289            * Deletes the role with the primary key from the database. Also notifies the appropriate model listeners.
290            *
291            * @param roleId the primary key of the role
292            * @return the role that was removed
293            * @throws PortalException if a role with the primary key could not be found
294            */
295            @Override
296            public com.liferay.portal.model.Role deleteRole(long roleId)
297                    throws com.liferay.portal.kernel.exception.PortalException {
298                    return _roleLocalService.deleteRole(roleId);
299            }
300    
301            @Override
302            public void deleteUserRole(long userId, com.liferay.portal.model.Role role) {
303                    _roleLocalService.deleteUserRole(userId, role);
304            }
305    
306            @Override
307            public void deleteUserRole(long userId, long roleId) {
308                    _roleLocalService.deleteUserRole(userId, roleId);
309            }
310    
311            @Override
312            public void deleteUserRoles(long userId,
313                    java.util.List<com.liferay.portal.model.Role> Roles) {
314                    _roleLocalService.deleteUserRoles(userId, Roles);
315            }
316    
317            @Override
318            public void deleteUserRoles(long userId, long[] roleIds) {
319                    _roleLocalService.deleteUserRoles(userId, roleIds);
320            }
321    
322            @Override
323            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
324                    return _roleLocalService.dynamicQuery();
325            }
326    
327            /**
328            * Performs a dynamic query on the database and returns the matching rows.
329            *
330            * @param dynamicQuery the dynamic query
331            * @return the matching rows
332            */
333            @Override
334            public <T> java.util.List<T> dynamicQuery(
335                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
336                    return _roleLocalService.dynamicQuery(dynamicQuery);
337            }
338    
339            /**
340            * Performs a dynamic query on the database and returns a range of the matching rows.
341            *
342            * <p>
343            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
344            * </p>
345            *
346            * @param dynamicQuery the dynamic query
347            * @param start the lower bound of the range of model instances
348            * @param end the upper bound of the range of model instances (not inclusive)
349            * @return the range of matching rows
350            */
351            @Override
352            public <T> java.util.List<T> dynamicQuery(
353                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
354                    int end) {
355                    return _roleLocalService.dynamicQuery(dynamicQuery, start, end);
356            }
357    
358            /**
359            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
360            *
361            * <p>
362            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
363            * </p>
364            *
365            * @param dynamicQuery the dynamic query
366            * @param start the lower bound of the range of model instances
367            * @param end the upper bound of the range of model instances (not inclusive)
368            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
369            * @return the ordered range of matching rows
370            */
371            @Override
372            public <T> java.util.List<T> dynamicQuery(
373                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
374                    int end,
375                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
376                    return _roleLocalService.dynamicQuery(dynamicQuery, start, end,
377                            orderByComparator);
378            }
379    
380            /**
381            * Returns the number of rows that match the dynamic query.
382            *
383            * @param dynamicQuery the dynamic query
384            * @return the number of rows that match the dynamic query
385            */
386            @Override
387            public long dynamicQueryCount(
388                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
389                    return _roleLocalService.dynamicQueryCount(dynamicQuery);
390            }
391    
392            /**
393            * Returns the number of rows that match the dynamic query.
394            *
395            * @param dynamicQuery the dynamic query
396            * @param projection the projection to apply to the query
397            * @return the number of rows that match the dynamic query
398            */
399            @Override
400            public long dynamicQueryCount(
401                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
402                    com.liferay.portal.kernel.dao.orm.Projection projection) {
403                    return _roleLocalService.dynamicQueryCount(dynamicQuery, projection);
404            }
405    
406            /**
407            * Returns the role with the name in the company.
408            *
409            * <p>
410            * The method searches the system roles map first for default roles. If a
411            * role with the name is not found, then the method will query the database.
412            * </p>
413            *
414            * @param companyId the primary key of the company
415            * @param name the role's name
416            * @return Returns the role with the name or <code>null</code> if a role
417            with the name could not be found in the company
418            */
419            @Override
420            public com.liferay.portal.model.Role fetchRole(long companyId,
421                    java.lang.String name) {
422                    return _roleLocalService.fetchRole(companyId, name);
423            }
424    
425            @Override
426            public com.liferay.portal.model.Role fetchRole(long roleId) {
427                    return _roleLocalService.fetchRole(roleId);
428            }
429    
430            /**
431            * Returns the role with the matching UUID and company.
432            *
433            * @param uuid the role's UUID
434            * @param companyId the primary key of the company
435            * @return the matching role, or <code>null</code> if a matching role could not be found
436            */
437            @Override
438            public com.liferay.portal.model.Role fetchRoleByUuidAndCompanyId(
439                    java.lang.String uuid, long companyId) {
440                    return _roleLocalService.fetchRoleByUuidAndCompanyId(uuid, companyId);
441            }
442    
443            @Override
444            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
445                    return _roleLocalService.getActionableDynamicQuery();
446            }
447    
448            /**
449            * Returns the Spring bean ID for this bean.
450            *
451            * @return the Spring bean ID for this bean
452            */
453            @Override
454            public java.lang.String getBeanIdentifier() {
455                    return _roleLocalService.getBeanIdentifier();
456            }
457    
458            /**
459            * Returns the default role for the group with the primary key.
460            *
461            * <p>
462            * If the group is a site, then the default role is {@link
463            * com.liferay.portal.model.RoleConstants#SITE_MEMBER}. If the group is an
464            * organization, then the default role is {@link
465            * com.liferay.portal.model.RoleConstants#ORGANIZATION_USER}. If the group
466            * is a user or user group, then the default role is {@link
467            * com.liferay.portal.model.RoleConstants#POWER_USER}. For all other group
468            * types, the default role is {@link
469            * com.liferay.portal.model.RoleConstants#USER}.
470            * </p>
471            *
472            * @param groupId the primary key of the group
473            * @return the default role for the group with the primary key
474            * @throws PortalException if a group with the primary key could not be
475            found, or if a default role could not be found for the group
476            */
477            @Override
478            public com.liferay.portal.model.Role getDefaultGroupRole(long groupId)
479                    throws com.liferay.portal.kernel.exception.PortalException {
480                    return _roleLocalService.getDefaultGroupRole(groupId);
481            }
482    
483            @Override
484            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
485                    com.liferay.portal.kernel.lar.PortletDataContext portletDataContext) {
486                    return _roleLocalService.getExportActionableDynamicQuery(portletDataContext);
487            }
488    
489            /**
490            * Returns the groupIds of the groups associated with the role.
491            *
492            * @param roleId the roleId of the role
493            * @return long[] the groupIds of groups associated with the role
494            */
495            @Override
496            public long[] getGroupPrimaryKeys(long roleId) {
497                    return _roleLocalService.getGroupPrimaryKeys(roleId);
498            }
499    
500            @Override
501            public java.util.List<com.liferay.portal.model.Role> getGroupRelatedRoles(
502                    long groupId)
503                    throws com.liferay.portal.kernel.exception.PortalException {
504                    return _roleLocalService.getGroupRelatedRoles(groupId);
505            }
506    
507            @Override
508            public java.util.List<com.liferay.portal.model.Role> getGroupRoles(
509                    long groupId) {
510                    return _roleLocalService.getGroupRoles(groupId);
511            }
512    
513            @Override
514            public java.util.List<com.liferay.portal.model.Role> getGroupRoles(
515                    long groupId, int start, int end) {
516                    return _roleLocalService.getGroupRoles(groupId, start, end);
517            }
518    
519            @Override
520            public java.util.List<com.liferay.portal.model.Role> getGroupRoles(
521                    long groupId, int start, int end,
522                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Role> orderByComparator) {
523                    return _roleLocalService.getGroupRoles(groupId, start, end,
524                            orderByComparator);
525            }
526    
527            @Override
528            public int getGroupRolesCount(long groupId) {
529                    return _roleLocalService.getGroupRolesCount(groupId);
530            }
531    
532            @Override
533            public com.liferay.portal.model.PersistedModel getPersistedModel(
534                    java.io.Serializable primaryKeyObj)
535                    throws com.liferay.portal.kernel.exception.PortalException {
536                    return _roleLocalService.getPersistedModel(primaryKeyObj);
537            }
538    
539            @Override
540            public java.util.List<com.liferay.portal.model.Role> getResourceBlockRoles(
541                    long resourceBlockId, java.lang.String className,
542                    java.lang.String actionId) {
543                    return _roleLocalService.getResourceBlockRoles(resourceBlockId,
544                            className, actionId);
545            }
546    
547            /**
548            * Returns a map of role names to associated action IDs for the named
549            * resource in the company within the permission scope.
550            *
551            * @param companyId the primary key of the company
552            * @param name the resource name
553            * @param scope the permission scope
554            * @param primKey the primary key of the resource's class
555            * @return the role names and action IDs
556            * @see com.liferay.portal.service.persistence.RoleFinder#findByC_N_S_P(
557            long, String, int, String)
558            */
559            @Override
560            public java.util.Map<java.lang.String, java.util.List<java.lang.String>> getResourceRoles(
561                    long companyId, java.lang.String name, int scope,
562                    java.lang.String primKey) {
563                    return _roleLocalService.getResourceRoles(companyId, name, scope,
564                            primKey);
565            }
566    
567            /**
568            * Returns all the roles associated with the action ID in the company within
569            * the permission scope.
570            *
571            * @param companyId the primary key of the company
572            * @param name the resource name
573            * @param scope the permission scope
574            * @param primKey the primary key of the resource's class
575            * @param actionId the name of the resource action
576            * @return the roles
577            * @see com.liferay.portal.service.persistence.RoleFinder#findByC_N_S_P_A(
578            long, String, int, String, String)
579            */
580            @Override
581            public java.util.List<com.liferay.portal.model.Role> getResourceRoles(
582                    long companyId, java.lang.String name, int scope,
583                    java.lang.String primKey, java.lang.String actionId) {
584                    return _roleLocalService.getResourceRoles(companyId, name, scope,
585                            primKey, actionId);
586            }
587    
588            /**
589            * Returns the role with the name in the company.
590            *
591            * <p>
592            * The method searches the system roles map first for default roles. If a
593            * role with the name is not found, then the method will query the database.
594            * </p>
595            *
596            * @param companyId the primary key of the company
597            * @param name the role's name
598            * @return the role with the name
599            * @throws PortalException if a role with the name could not be found in the
600            company
601            */
602            @Override
603            public com.liferay.portal.model.Role getRole(long companyId,
604                    java.lang.String name)
605                    throws com.liferay.portal.kernel.exception.PortalException {
606                    return _roleLocalService.getRole(companyId, name);
607            }
608    
609            /**
610            * Returns the role with the primary key.
611            *
612            * @param roleId the primary key of the role
613            * @return the role
614            * @throws PortalException if a role with the primary key could not be found
615            */
616            @Override
617            public com.liferay.portal.model.Role getRole(long roleId)
618                    throws com.liferay.portal.kernel.exception.PortalException {
619                    return _roleLocalService.getRole(roleId);
620            }
621    
622            /**
623            * Returns the role with the matching UUID and company.
624            *
625            * @param uuid the role's UUID
626            * @param companyId the primary key of the company
627            * @return the matching role
628            * @throws PortalException if a matching role could not be found
629            */
630            @Override
631            public com.liferay.portal.model.Role getRoleByUuidAndCompanyId(
632                    java.lang.String uuid, long companyId)
633                    throws com.liferay.portal.kernel.exception.PortalException {
634                    return _roleLocalService.getRoleByUuidAndCompanyId(uuid, companyId);
635            }
636    
637            /**
638            * Returns all the roles in the company.
639            *
640            * @param companyId the primary key of the company
641            * @return the roles in the company
642            */
643            @Override
644            public java.util.List<com.liferay.portal.model.Role> getRoles(
645                    long companyId) {
646                    return _roleLocalService.getRoles(companyId);
647            }
648    
649            /**
650            * Returns all the roles with the types.
651            *
652            * @param companyId the primary key of the company
653            * @param types the role types (optionally <code>null</code>)
654            * @return the roles with the types
655            */
656            @Override
657            public java.util.List<com.liferay.portal.model.Role> getRoles(
658                    long companyId, int[] types) {
659                    return _roleLocalService.getRoles(companyId, types);
660            }
661    
662            /**
663            * Returns all the roles with the primary keys.
664            *
665            * @param roleIds the primary keys of the roles
666            * @return the roles with the primary keys
667            * @throws PortalException if any one of the roles with the primary keys
668            could not be found
669            */
670            @Override
671            public java.util.List<com.liferay.portal.model.Role> getRoles(
672                    long[] roleIds)
673                    throws com.liferay.portal.kernel.exception.PortalException {
674                    return _roleLocalService.getRoles(roleIds);
675            }
676    
677            /**
678            * Returns a range of all the roles.
679            *
680            * <p>
681            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
682            * </p>
683            *
684            * @param start the lower bound of the range of roles
685            * @param end the upper bound of the range of roles (not inclusive)
686            * @return the range of roles
687            */
688            @Override
689            public java.util.List<com.liferay.portal.model.Role> getRoles(int start,
690                    int end) {
691                    return _roleLocalService.getRoles(start, end);
692            }
693    
694            /**
695            * Returns all the roles of the type and subtype.
696            *
697            * @param type the role's type (optionally <code>0</code>)
698            * @param subtype the role's subtype (optionally <code>null</code>)
699            * @return the roles of the type and subtype
700            */
701            @Override
702            public java.util.List<com.liferay.portal.model.Role> getRoles(int type,
703                    java.lang.String subtype) {
704                    return _roleLocalService.getRoles(type, subtype);
705            }
706    
707            /**
708            * Returns the number of roles.
709            *
710            * @return the number of roles
711            */
712            @Override
713            public int getRolesCount() {
714                    return _roleLocalService.getRolesCount();
715            }
716    
717            /**
718            * Returns all the roles of the subtype.
719            *
720            * @param subtype the role's subtype (optionally <code>null</code>)
721            * @return the roles of the subtype
722            */
723            @Override
724            public java.util.List<com.liferay.portal.model.Role> getSubtypeRoles(
725                    java.lang.String subtype) {
726                    return _roleLocalService.getSubtypeRoles(subtype);
727            }
728    
729            /**
730            * Returns the number of roles of the subtype.
731            *
732            * @param subtype the role's subtype (optionally <code>null</code>)
733            * @return the number of roles of the subtype
734            */
735            @Override
736            public int getSubtypeRolesCount(java.lang.String subtype) {
737                    return _roleLocalService.getSubtypeRolesCount(subtype);
738            }
739    
740            /**
741            * Returns the team role in the company.
742            *
743            * @param companyId the primary key of the company
744            * @param teamId the primary key of the team
745            * @return the team role in the company
746            * @throws PortalException if a role could not be found in the team and
747            company
748            */
749            @Override
750            public com.liferay.portal.model.Role getTeamRole(long companyId, long teamId)
751                    throws com.liferay.portal.kernel.exception.PortalException {
752                    return _roleLocalService.getTeamRole(companyId, teamId);
753            }
754    
755            /**
756            * Returns the team role map for the group.
757            *
758            * @param groupId the primary key of the group
759            * @return the team role map for the group
760            * @throws PortalException if a group with the primary key could not be
761            found, if a role could not be found in one of the group's teams,
762            or if a portal exception occurred
763            */
764            @Override
765            public java.util.Map<com.liferay.portal.model.Team, com.liferay.portal.model.Role> getTeamRoleMap(
766                    long groupId)
767                    throws com.liferay.portal.kernel.exception.PortalException {
768                    return _roleLocalService.getTeamRoleMap(groupId);
769            }
770    
771            /**
772            * Returns the team roles in the group.
773            *
774            * @param groupId the primary key of the group
775            * @return the team roles in the group
776            * @throws PortalException if a group with the primary key could not be
777            found, if a role could not be found in one of the group's teams,
778            or if a portal exception occurred
779            */
780            @Override
781            public java.util.List<com.liferay.portal.model.Role> getTeamRoles(
782                    long groupId)
783                    throws com.liferay.portal.kernel.exception.PortalException {
784                    return _roleLocalService.getTeamRoles(groupId);
785            }
786    
787            /**
788            * Returns the team roles in the group, excluding the specified role IDs.
789            *
790            * @param groupId the primary key of the group
791            * @param excludedRoleIds the primary keys of the roles to exclude
792            (optionally <code>null</code>)
793            * @return the team roles in the group, excluding the specified role IDs
794            * @throws PortalException if a group with the primary key could not be
795            found, if a role could not be found in one of the group's teams,
796            or if a portal exception occurred
797            */
798            @Override
799            public java.util.List<com.liferay.portal.model.Role> getTeamRoles(
800                    long groupId, long[] excludedRoleIds)
801                    throws com.liferay.portal.kernel.exception.PortalException {
802                    return _roleLocalService.getTeamRoles(groupId, excludedRoleIds);
803            }
804    
805            /**
806            * Returns all the roles of the type.
807            *
808            * @param type the role's type (optionally <code>0</code>)
809            * @return the range of the roles of the type
810            */
811            @Override
812            public java.util.List<com.liferay.portal.model.Role> getTypeRoles(int type) {
813                    return _roleLocalService.getTypeRoles(type);
814            }
815    
816            /**
817            * Returns a range of all the roles of the type.
818            *
819            * @param type the role's type (optionally <code>0</code>)
820            * @param start the lower bound of the range of roles to return
821            * @param end the upper bound of the range of roles to return (not
822            inclusive)
823            * @return the range of the roles of the type
824            */
825            @Override
826            public java.util.List<com.liferay.portal.model.Role> getTypeRoles(
827                    int type, int start, int end) {
828                    return _roleLocalService.getTypeRoles(type, start, end);
829            }
830    
831            /**
832            * Returns the number of roles of the type.
833            *
834            * @param type the role's type (optionally <code>0</code>)
835            * @return the number of roles of the type
836            */
837            @Override
838            public int getTypeRolesCount(int type) {
839                    return _roleLocalService.getTypeRolesCount(type);
840            }
841    
842            /**
843            * Returns all the user's roles within the user group.
844            *
845            * @param userId the primary key of the user
846            * @param groupId the primary key of the group
847            * @return the user's roles within the user group
848            * @see com.liferay.portal.service.persistence.RoleFinder#findByUserGroupGroupRole(
849            long, long)
850            */
851            @Override
852            public java.util.List<com.liferay.portal.model.Role> getUserGroupGroupRoles(
853                    long userId, long groupId) {
854                    return _roleLocalService.getUserGroupGroupRoles(userId, groupId);
855            }
856    
857            /**
858            * Returns all the user's roles within the user group.
859            *
860            * @param userId the primary key of the user
861            * @param groupId the primary key of the group
862            * @return the user's roles within the user group
863            * @see com.liferay.portal.service.persistence.RoleFinder#findByUserGroupRole(
864            long, long)
865            */
866            @Override
867            public java.util.List<com.liferay.portal.model.Role> getUserGroupRoles(
868                    long userId, long groupId) {
869                    return _roleLocalService.getUserGroupRoles(userId, groupId);
870            }
871    
872            /**
873            * Returns the userIds of the users associated with the role.
874            *
875            * @param roleId the roleId of the role
876            * @return long[] the userIds of users associated with the role
877            */
878            @Override
879            public long[] getUserPrimaryKeys(long roleId) {
880                    return _roleLocalService.getUserPrimaryKeys(roleId);
881            }
882    
883            /**
884            * Returns all the user's roles within the group.
885            *
886            * @param userId the primary key of the user
887            * @param groupId the primary key of the group
888            * @return the user's roles within the group
889            * @see com.liferay.portal.service.persistence.RoleFinder#findByU_G(long,
890            long)
891            */
892            @Override
893            public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
894                    long userId, long groupId) {
895                    return _roleLocalService.getUserRelatedRoles(userId, groupId);
896            }
897    
898            /**
899            * Returns the union of all the user's roles within the groups.
900            *
901            * @param userId the primary key of the user
902            * @param groupIds the primary keys of the groups
903            * @return the union of all the user's roles within the groups
904            * @see com.liferay.portal.service.persistence.RoleFinder#findByU_G(long,
905            long[])
906            */
907            @Override
908            public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
909                    long userId, long[] groupIds) {
910                    return _roleLocalService.getUserRelatedRoles(userId, groupIds);
911            }
912    
913            /**
914            * Returns the union of all the user's roles within the groups.
915            *
916            * @param userId the primary key of the user
917            * @param groups the groups (optionally <code>null</code>)
918            * @return the union of all the user's roles within the groups
919            * @see com.liferay.portal.service.persistence.RoleFinder#findByU_G(long,
920            List)
921            */
922            @Override
923            public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
924                    long userId, java.util.List<com.liferay.portal.model.Group> groups) {
925                    return _roleLocalService.getUserRelatedRoles(userId, groups);
926            }
927    
928            @Override
929            public java.util.List<com.liferay.portal.model.Role> getUserRoles(
930                    long userId) {
931                    return _roleLocalService.getUserRoles(userId);
932            }
933    
934            @Override
935            public java.util.List<com.liferay.portal.model.Role> getUserRoles(
936                    long userId, int start, int end) {
937                    return _roleLocalService.getUserRoles(userId, start, end);
938            }
939    
940            @Override
941            public java.util.List<com.liferay.portal.model.Role> getUserRoles(
942                    long userId, int start, int end,
943                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Role> orderByComparator) {
944                    return _roleLocalService.getUserRoles(userId, start, end,
945                            orderByComparator);
946            }
947    
948            @Override
949            public int getUserRolesCount(long userId) {
950                    return _roleLocalService.getUserRolesCount(userId);
951            }
952    
953            @Override
954            public boolean hasGroupRole(long groupId, long roleId) {
955                    return _roleLocalService.hasGroupRole(groupId, roleId);
956            }
957    
958            @Override
959            public boolean hasGroupRoles(long groupId) {
960                    return _roleLocalService.hasGroupRoles(groupId);
961            }
962    
963            /**
964            * Returns <code>true</code> if the user is associated with the named
965            * regular role.
966            *
967            * @param userId the primary key of the user
968            * @param companyId the primary key of the company
969            * @param name the name of the role
970            * @param inherited whether to include the user's inherited roles in the
971            search
972            * @return <code>true</code> if the user is associated with the regular
973            role; <code>false</code> otherwise
974            * @throws PortalException if a default user for the company could not be
975            found
976            */
977            @Override
978            public boolean hasUserRole(long userId, long companyId,
979                    java.lang.String name, boolean inherited)
980                    throws com.liferay.portal.kernel.exception.PortalException {
981                    return _roleLocalService.hasUserRole(userId, companyId, name, inherited);
982            }
983    
984            @Override
985            public boolean hasUserRole(long userId, long roleId) {
986                    return _roleLocalService.hasUserRole(userId, roleId);
987            }
988    
989            @Override
990            public boolean hasUserRoles(long userId) {
991                    return _roleLocalService.hasUserRoles(userId);
992            }
993    
994            /**
995            * Returns <code>true</code> if the user has any one of the named regular
996            * roles.
997            *
998            * @param userId the primary key of the user
999            * @param companyId the primary key of the company
1000            * @param names the names of the roles
1001            * @param inherited whether to include the user's inherited roles in the
1002            search
1003            * @return <code>true</code> if the user has any one of the regular roles;
1004            <code>false</code> otherwise
1005            * @throws PortalException if any one of the roles with the names could not
1006            be found in the company or if the default user for the company
1007            could not be found
1008            */
1009            @Override
1010            public boolean hasUserRoles(long userId, long companyId,
1011                    java.lang.String[] names, boolean inherited)
1012                    throws com.liferay.portal.kernel.exception.PortalException {
1013                    return _roleLocalService.hasUserRoles(userId, companyId, names,
1014                            inherited);
1015            }
1016    
1017            /**
1018            * Returns a role with the name in the company.
1019            *
1020            * @param companyId the primary key of the company
1021            * @param name the role's name (optionally <code>null</code>)
1022            * @return the role with the name, or <code>null</code> if a role with the
1023            name could not be found in the company
1024            */
1025            @Override
1026            public com.liferay.portal.model.Role loadFetchRole(long companyId,
1027                    java.lang.String name) {
1028                    return _roleLocalService.loadFetchRole(companyId, name);
1029            }
1030    
1031            /**
1032            * Returns a role with the name in the company.
1033            *
1034            * @param companyId the primary key of the company
1035            * @param name the role's name
1036            * @return the role with the name in the company
1037            * @throws PortalException if a role with the name could not be found in the
1038            company
1039            */
1040            @Override
1041            public com.liferay.portal.model.Role loadGetRole(long companyId,
1042                    java.lang.String name)
1043                    throws com.liferay.portal.kernel.exception.PortalException {
1044                    return _roleLocalService.loadGetRole(companyId, name);
1045            }
1046    
1047            /**
1048            * Returns an ordered range of all the roles that match the keywords, types,
1049            * and params.
1050            *
1051            * <p>
1052            * Useful when paginating results. Returns a maximum of <code>end -
1053            * start</code> instances. <code>start</code> and <code>end</code> are not
1054            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1055            * refers to the first result in the set. Setting both <code>start</code>
1056            * and <code>end</code> to {@link
1057            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1058            * result set.
1059            * </p>
1060            *
1061            * @param companyId the primary key of the company
1062            * @param keywords the keywords (space separated), which may occur in the
1063            role's name or description (optionally <code>null</code>)
1064            * @param types the role types (optionally <code>null</code>)
1065            * @param params the finder parameters. Can specify values for the
1066            "usersRoles" key. For more information, see {@link
1067            com.liferay.portal.service.persistence.RoleFinder}
1068            * @param start the lower bound of the range of roles to return
1069            * @param end the upper bound of the range of roles to return (not
1070            inclusive)
1071            * @param obc the comparator to order the roles (optionally
1072            <code>null</code>)
1073            * @return the ordered range of the matching roles, ordered by
1074            <code>obc</code>
1075            * @see com.liferay.portal.service.persistence.RoleFinder
1076            */
1077            @Override
1078            public java.util.List<com.liferay.portal.model.Role> search(
1079                    long companyId, java.lang.String keywords, java.lang.Integer[] types,
1080                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1081                    int start, int end,
1082                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Role> obc) {
1083                    return _roleLocalService.search(companyId, keywords, types, params,
1084                            start, end, obc);
1085            }
1086    
1087            /**
1088            * Returns an ordered range of all the roles that match the keywords and
1089            * types.
1090            *
1091            * <p>
1092            * Useful when paginating results. Returns a maximum of <code>end -
1093            * start</code> instances. <code>start</code> and <code>end</code> are not
1094            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1095            * refers to the first result in the set. Setting both <code>start</code>
1096            * and <code>end</code> to {@link
1097            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1098            * result set.
1099            * </p>
1100            *
1101            * @param companyId the primary key of the company
1102            * @param keywords the keywords (space separated), which may occur in the
1103            role's name or description (optionally <code>null</code>)
1104            * @param types the role types (optionally <code>null</code>)
1105            * @param start the lower bound of the range of roles to return
1106            * @param end the upper bound of the range of roles to return (not
1107            inclusive)
1108            * @param obc the comparator to order the roles (optionally
1109            <code>null</code>)
1110            * @return the ordered range of the matching roles, ordered by
1111            <code>obc</code>
1112            * @see com.liferay.portal.service.persistence.RoleFinder
1113            */
1114            @Override
1115            public java.util.List<com.liferay.portal.model.Role> search(
1116                    long companyId, java.lang.String keywords, java.lang.Integer[] types,
1117                    int start, int end,
1118                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Role> obc) {
1119                    return _roleLocalService.search(companyId, keywords, types, start, end,
1120                            obc);
1121            }
1122    
1123            /**
1124            * Returns an ordered range of all the roles that match the name,
1125            * description, types, and params.
1126            *
1127            * <p>
1128            * Useful when paginating results. Returns a maximum of <code>end -
1129            * start</code> instances. <code>start</code> and <code>end</code> are not
1130            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1131            * refers to the first result in the set. Setting both <code>start</code>
1132            * and <code>end</code> to {@link
1133            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1134            * result set.
1135            * </p>
1136            *
1137            * @param companyId the primary key of the company
1138            * @param name the role's name (optionally <code>null</code>)
1139            * @param description the role's description (optionally <code>null</code>)
1140            * @param types the role types (optionally <code>null</code>)
1141            * @param params the finder's parameters. Can specify values for the
1142            "usersRoles" key. For more information, see {@link
1143            com.liferay.portal.service.persistence.RoleFinder}
1144            * @param start the lower bound of the range of the roles to return
1145            * @param end the upper bound of the range of the roles to return (not
1146            inclusive)
1147            * @param obc the comparator to order the roles (optionally
1148            <code>null</code>)
1149            * @return the ordered range of the matching roles, ordered by
1150            <code>obc</code>
1151            * @see com.liferay.portal.service.persistence.RoleFinder
1152            */
1153            @Override
1154            public java.util.List<com.liferay.portal.model.Role> search(
1155                    long companyId, java.lang.String name, java.lang.String description,
1156                    java.lang.Integer[] types,
1157                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1158                    int start, int end,
1159                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Role> obc) {
1160                    return _roleLocalService.search(companyId, name, description, types,
1161                            params, start, end, obc);
1162            }
1163    
1164            /**
1165            * Returns an ordered range of all the roles that match the name,
1166            * description, and types.
1167            *
1168            * <p>
1169            * Useful when paginating results. Returns a maximum of <code>end -
1170            * start</code> instances. <code>start</code> and <code>end</code> are not
1171            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1172            * refers to the first result in the set. Setting both <code>start</code>
1173            * and <code>end</code> to {@link
1174            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1175            * result set.
1176            * </p>
1177            *
1178            * @param companyId the primary key of the company
1179            * @param name the role's name (optionally <code>null</code>)
1180            * @param description the role's description (optionally <code>null</code>)
1181            * @param types the role types (optionally <code>null</code>)
1182            * @param start the lower bound of the range of the roles to return
1183            * @param end the upper bound of the range of the roles to return (not
1184            inclusive)
1185            * @param obc the comparator to order the roles (optionally
1186            <code>null</code>)
1187            * @return the ordered range of the matching roles, ordered by
1188            <code>obc</code>
1189            * @see com.liferay.portal.service.persistence.RoleFinder
1190            */
1191            @Override
1192            public java.util.List<com.liferay.portal.model.Role> search(
1193                    long companyId, java.lang.String name, java.lang.String description,
1194                    java.lang.Integer[] types, int start, int end,
1195                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Role> obc) {
1196                    return _roleLocalService.search(companyId, name, description, types,
1197                            start, end, obc);
1198            }
1199    
1200            /**
1201            * Returns the number of roles that match the keywords and types.
1202            *
1203            * @param companyId the primary key of the company
1204            * @param keywords the keywords (space separated), which may occur in the
1205            role's name or description (optionally <code>null</code>)
1206            * @param types the role types (optionally <code>null</code>)
1207            * @return the number of matching roles
1208            */
1209            @Override
1210            public int searchCount(long companyId, java.lang.String keywords,
1211                    java.lang.Integer[] types) {
1212                    return _roleLocalService.searchCount(companyId, keywords, types);
1213            }
1214    
1215            /**
1216            * Returns the number of roles that match the keywords, types and params.
1217            *
1218            * @param companyId the primary key of the company
1219            * @param keywords the keywords (space separated), which may occur in the
1220            role's name or description (optionally <code>null</code>)
1221            * @param types the role types (optionally <code>null</code>)
1222            * @param params the finder parameters. For more information, see {@link
1223            com.liferay.portal.service.persistence.RoleFinder}
1224            * @return the number of matching roles
1225            */
1226            @Override
1227            public int searchCount(long companyId, java.lang.String keywords,
1228                    java.lang.Integer[] types,
1229                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) {
1230                    return _roleLocalService.searchCount(companyId, keywords, types, params);
1231            }
1232    
1233            /**
1234            * Returns the number of roles that match the name, description, and types.
1235            *
1236            * @param companyId the primary key of the company
1237            * @param name the role's name (optionally <code>null</code>)
1238            * @param description the role's description (optionally <code>null</code>)
1239            * @param types the role types (optionally <code>null</code>)
1240            * @return the number of matching roles
1241            */
1242            @Override
1243            public int searchCount(long companyId, java.lang.String name,
1244                    java.lang.String description, java.lang.Integer[] types) {
1245                    return _roleLocalService.searchCount(companyId, name, description, types);
1246            }
1247    
1248            /**
1249            * Returns the number of roles that match the name, description, types, and
1250            * params.
1251            *
1252            * @param companyId the primary key of the company
1253            * @param name the role's name (optionally <code>null</code>)
1254            * @param description the role's description (optionally <code>null</code>)
1255            * @param types the role types (optionally <code>null</code>)
1256            * @param params the finder parameters. Can specify values for the
1257            "usersRoles" key. For more information, see {@link
1258            com.liferay.portal.service.persistence.RoleFinder}
1259            * @return the number of matching roles
1260            */
1261            @Override
1262            public int searchCount(long companyId, java.lang.String name,
1263                    java.lang.String description, java.lang.Integer[] types,
1264                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) {
1265                    return _roleLocalService.searchCount(companyId, name, description,
1266                            types, params);
1267            }
1268    
1269            /**
1270            * Sets the Spring bean ID for this bean.
1271            *
1272            * @param beanIdentifier the Spring bean ID for this bean
1273            */
1274            @Override
1275            public void setBeanIdentifier(java.lang.String beanIdentifier) {
1276                    _roleLocalService.setBeanIdentifier(beanIdentifier);
1277            }
1278    
1279            @Override
1280            public void setGroupRoles(long groupId, long[] roleIds) {
1281                    _roleLocalService.setGroupRoles(groupId, roleIds);
1282            }
1283    
1284            /**
1285            * @throws PortalException
1286            */
1287            @Override
1288            public void setUserRoles(long userId, long[] roleIds)
1289                    throws com.liferay.portal.kernel.exception.PortalException {
1290                    _roleLocalService.setUserRoles(userId, roleIds);
1291            }
1292    
1293            /**
1294            * Removes the matching roles associated with the user. The user is
1295            * reindexed after the roles are removed.
1296            *
1297            * @param userId the primary key of the user
1298            * @param roleIds the primary keys of the roles
1299            * @throws PortalException if a user with the primary key could not be found
1300            or if a role with any one of the primary keys could not be found
1301            */
1302            @Override
1303            public void unsetUserRoles(long userId, long[] roleIds)
1304                    throws com.liferay.portal.kernel.exception.PortalException {
1305                    _roleLocalService.unsetUserRoles(userId, roleIds);
1306            }
1307    
1308            /**
1309            * Updates the role in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
1310            *
1311            * @param role the role
1312            * @return the role that was updated
1313            */
1314            @Override
1315            public com.liferay.portal.model.Role updateRole(
1316                    com.liferay.portal.model.Role role) {
1317                    return _roleLocalService.updateRole(role);
1318            }
1319    
1320            /**
1321            * Updates the role with the primary key.
1322            *
1323            * @param roleId the primary key of the role
1324            * @param name the role's new name
1325            * @param titleMap the new localized titles (optionally <code>null</code>)
1326            to replace those existing for the role
1327            * @param descriptionMap the new localized descriptions (optionally
1328            <code>null</code>) to replace those existing for the role
1329            * @param subtype the role's new subtype (optionally <code>null</code>)
1330            * @param serviceContext the service context to be applied (optionally
1331            <code>null</code>). Can set expando bridge attributes for the
1332            role.
1333            * @return the role with the primary key
1334            * @throws PortalException if a role with the primary could not be found or
1335            if the role's name was invalid
1336            */
1337            @Override
1338            public com.liferay.portal.model.Role updateRole(long roleId,
1339                    java.lang.String name,
1340                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
1341                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
1342                    java.lang.String subtype,
1343                    com.liferay.portal.service.ServiceContext serviceContext)
1344                    throws com.liferay.portal.kernel.exception.PortalException {
1345                    return _roleLocalService.updateRole(roleId, name, titleMap,
1346                            descriptionMap, subtype, serviceContext);
1347            }
1348    
1349            /**
1350             * @deprecated As of 6.1.0, replaced by {@link #getWrappedService}
1351             */
1352            @Deprecated
1353            public RoleLocalService getWrappedRoleLocalService() {
1354                    return _roleLocalService;
1355            }
1356    
1357            /**
1358             * @deprecated As of 6.1.0, replaced by {@link #setWrappedService}
1359             */
1360            @Deprecated
1361            public void setWrappedRoleLocalService(RoleLocalService roleLocalService) {
1362                    _roleLocalService = roleLocalService;
1363            }
1364    
1365            @Override
1366            public RoleLocalService getWrappedService() {
1367                    return _roleLocalService;
1368            }
1369    
1370            @Override
1371            public void setWrappedService(RoleLocalService roleLocalService) {
1372                    _roleLocalService = roleLocalService;
1373            }
1374    
1375            private RoleLocalService _roleLocalService;
1376    }