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