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