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