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