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            /**
905            * Returns all the roles with the primary keys.
906            *
907            * @param roleIds the primary keys of the roles
908            * @return the roles with the primary keys
909            * @throws PortalException if any one of the roles with the primary keys
910            could not be found
911            * @throws SystemException if a system exception occurred
912            */
913            @Override
914            public java.util.List<com.liferay.portal.model.Role> getRoles(
915                    long[] roleIds)
916                    throws com.liferay.portal.kernel.exception.PortalException,
917                            com.liferay.portal.kernel.exception.SystemException {
918                    return _roleLocalService.getRoles(roleIds);
919            }
920    
921            /**
922            * Returns all the roles of the subtype.
923            *
924            * @param subtype the role's subtype (optionally <code>null</code>)
925            * @return the roles of the subtype
926            * @throws SystemException if a system exception occurred
927            */
928            @Override
929            public java.util.List<com.liferay.portal.model.Role> getSubtypeRoles(
930                    java.lang.String subtype)
931                    throws com.liferay.portal.kernel.exception.SystemException {
932                    return _roleLocalService.getSubtypeRoles(subtype);
933            }
934    
935            /**
936            * Returns the number of roles of the subtype.
937            *
938            * @param subtype the role's subtype (optionally <code>null</code>)
939            * @return the number of roles of the subtype
940            * @throws SystemException if a system exception occurred
941            */
942            @Override
943            public int getSubtypeRolesCount(java.lang.String subtype)
944                    throws com.liferay.portal.kernel.exception.SystemException {
945                    return _roleLocalService.getSubtypeRolesCount(subtype);
946            }
947    
948            /**
949            * Returns the team role in the company.
950            *
951            * @param companyId the primary key of the company
952            * @param teamId the primary key of the team
953            * @return the team role in the company
954            * @throws PortalException if a role could not be found in the team and
955            company
956            * @throws SystemException if a system exception occurred
957            */
958            @Override
959            public com.liferay.portal.model.Role getTeamRole(long companyId, long teamId)
960                    throws com.liferay.portal.kernel.exception.PortalException,
961                            com.liferay.portal.kernel.exception.SystemException {
962                    return _roleLocalService.getTeamRole(companyId, teamId);
963            }
964    
965            /**
966            * Returns all the roles of the type.
967            *
968            * @param type the role's type (optionally <code>0</code>)
969            * @return the range of the roles of the type
970            * @throws SystemException if a system exception occurred
971            */
972            @Override
973            public java.util.List<com.liferay.portal.model.Role> getTypeRoles(int type)
974                    throws com.liferay.portal.kernel.exception.SystemException {
975                    return _roleLocalService.getTypeRoles(type);
976            }
977    
978            /**
979            * Returns a range of all the roles of the type.
980            *
981            * @param type the role's type (optionally <code>0</code>)
982            * @param start the lower bound of the range of roles to return
983            * @param end the upper bound of the range of roles to return (not
984            inclusive)
985            * @return the range of the roles of the type
986            * @throws SystemException if a system exception occurred
987            */
988            @Override
989            public java.util.List<com.liferay.portal.model.Role> getTypeRoles(
990                    int type, int start, int end)
991                    throws com.liferay.portal.kernel.exception.SystemException {
992                    return _roleLocalService.getTypeRoles(type, start, end);
993            }
994    
995            /**
996            * Returns the number of roles of the type.
997            *
998            * @param type the role's type (optionally <code>0</code>)
999            * @return the number of roles of the type
1000            * @throws SystemException if a system exception occurred
1001            */
1002            @Override
1003            public int getTypeRolesCount(int type)
1004                    throws com.liferay.portal.kernel.exception.SystemException {
1005                    return _roleLocalService.getTypeRolesCount(type);
1006            }
1007    
1008            /**
1009            * Returns all the user's roles within the user group.
1010            *
1011            * @param userId the primary key of the user
1012            * @param groupId the primary key of the group
1013            * @return the user's roles within the user group
1014            * @throws SystemException if a system exception occurred
1015            * @see com.liferay.portal.service.persistence.RoleFinder#findByUserGroupGroupRole(
1016            long, long)
1017            */
1018            @Override
1019            public java.util.List<com.liferay.portal.model.Role> getUserGroupGroupRoles(
1020                    long userId, long groupId)
1021                    throws com.liferay.portal.kernel.exception.SystemException {
1022                    return _roleLocalService.getUserGroupGroupRoles(userId, groupId);
1023            }
1024    
1025            /**
1026            * Returns all the user's roles within the user group.
1027            *
1028            * @param userId the primary key of the user
1029            * @param groupId the primary key of the group
1030            * @return the user's roles within the user group
1031            * @throws SystemException if a system exception occurred
1032            * @see com.liferay.portal.service.persistence.RoleFinder#findByUserGroupRole(
1033            long, long)
1034            */
1035            @Override
1036            public java.util.List<com.liferay.portal.model.Role> getUserGroupRoles(
1037                    long userId, long groupId)
1038                    throws com.liferay.portal.kernel.exception.SystemException {
1039                    return _roleLocalService.getUserGroupRoles(userId, groupId);
1040            }
1041    
1042            /**
1043            * Returns the union of all the user's roles within the groups.
1044            *
1045            * @param userId the primary key of the user
1046            * @param groups the groups (optionally <code>null</code>)
1047            * @return the union of all the user's roles within the groups
1048            * @throws SystemException if a system exception occurred
1049            * @see com.liferay.portal.service.persistence.RoleFinder#findByU_G(
1050            long, List)
1051            */
1052            @Override
1053            public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
1054                    long userId, java.util.List<com.liferay.portal.model.Group> groups)
1055                    throws com.liferay.portal.kernel.exception.SystemException {
1056                    return _roleLocalService.getUserRelatedRoles(userId, groups);
1057            }
1058    
1059            /**
1060            * Returns all the user's roles within the group.
1061            *
1062            * @param userId the primary key of the user
1063            * @param groupId the primary key of the group
1064            * @return the user's roles within the group
1065            * @throws SystemException if a system exception occurred
1066            * @see com.liferay.portal.service.persistence.RoleFinder#findByU_G(
1067            long, long)
1068            */
1069            @Override
1070            public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
1071                    long userId, long groupId)
1072                    throws com.liferay.portal.kernel.exception.SystemException {
1073                    return _roleLocalService.getUserRelatedRoles(userId, groupId);
1074            }
1075    
1076            /**
1077            * Returns the union of all the user's roles within the groups.
1078            *
1079            * @param userId the primary key of the user
1080            * @param groupIds the primary keys of the groups
1081            * @return the union of all the user's roles within the groups
1082            * @throws SystemException if a system exception occurred
1083            * @see com.liferay.portal.service.persistence.RoleFinder#findByU_G(
1084            long, long[])
1085            */
1086            @Override
1087            public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
1088                    long userId, long[] groupIds)
1089                    throws com.liferay.portal.kernel.exception.SystemException {
1090                    return _roleLocalService.getUserRelatedRoles(userId, groupIds);
1091            }
1092    
1093            /**
1094            * Returns <code>true</code> if the user is associated with the named
1095            * regular role.
1096            *
1097            * @param userId the primary key of the user
1098            * @param companyId the primary key of the company
1099            * @param name the name of the role
1100            * @param inherited whether to include the user's inherited roles in the
1101            search
1102            * @return <code>true</code> if the user is associated with the regular
1103            role; <code>false</code> otherwise
1104            * @throws PortalException if a default user for the company could not be
1105            found
1106            * @throws SystemException if a system exception occurred
1107            */
1108            @Override
1109            public boolean hasUserRole(long userId, long companyId,
1110                    java.lang.String name, boolean inherited)
1111                    throws com.liferay.portal.kernel.exception.PortalException,
1112                            com.liferay.portal.kernel.exception.SystemException {
1113                    return _roleLocalService.hasUserRole(userId, companyId, name, inherited);
1114            }
1115    
1116            /**
1117            * Returns <code>true</code> if the user has any one of the named regular
1118            * roles.
1119            *
1120            * @param userId the primary key of the user
1121            * @param companyId the primary key of the company
1122            * @param names the names of the roles
1123            * @param inherited whether to include the user's inherited roles in the
1124            search
1125            * @return <code>true</code> if the user has any one of the regular roles;
1126            <code>false</code> otherwise
1127            * @throws PortalException if any one of the roles with the names could not
1128            be found in the company or if the default user for the company
1129            could not be found
1130            * @throws SystemException if a system exception occurred
1131            */
1132            @Override
1133            public boolean hasUserRoles(long userId, long companyId,
1134                    java.lang.String[] names, boolean inherited)
1135                    throws com.liferay.portal.kernel.exception.PortalException,
1136                            com.liferay.portal.kernel.exception.SystemException {
1137                    return _roleLocalService.hasUserRoles(userId, companyId, names,
1138                            inherited);
1139            }
1140    
1141            /**
1142            * Returns a role with the name in the company.
1143            *
1144            * @param companyId the primary key of the company
1145            * @param name the role's name (optionally <code>null</code>)
1146            * @return the role with the name, or <code>null</code> if a role with the
1147            name could not be found in the company
1148            * @throws SystemException if a system exception occurred
1149            */
1150            @Override
1151            public com.liferay.portal.model.Role loadFetchRole(long companyId,
1152                    java.lang.String name)
1153                    throws com.liferay.portal.kernel.exception.SystemException {
1154                    return _roleLocalService.loadFetchRole(companyId, name);
1155            }
1156    
1157            /**
1158            * Returns a role with the name in the company.
1159            *
1160            * @param companyId the primary key of the company
1161            * @param name the role's name
1162            * @return the role with the name in the company
1163            * @throws PortalException if a role with the name could not be found in the
1164            company
1165            * @throws SystemException if a system exception occurred
1166            */
1167            @Override
1168            public com.liferay.portal.model.Role loadGetRole(long companyId,
1169                    java.lang.String name)
1170                    throws com.liferay.portal.kernel.exception.PortalException,
1171                            com.liferay.portal.kernel.exception.SystemException {
1172                    return _roleLocalService.loadGetRole(companyId, name);
1173            }
1174    
1175            /**
1176            * Returns an ordered range of all the roles that match the keywords and
1177            * types.
1178            *
1179            * <p>
1180            * Useful when paginating results. Returns a maximum of <code>end -
1181            * start</code> instances. <code>start</code> and <code>end</code> are not
1182            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1183            * refers to the first result in the set. Setting both <code>start</code>
1184            * and <code>end</code> to {@link
1185            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1186            * result set.
1187            * </p>
1188            *
1189            * @param companyId the primary key of the company
1190            * @param keywords the keywords (space separated), which may occur in the
1191            role's name or description (optionally <code>null</code>)
1192            * @param types the role types (optionally <code>null</code>)
1193            * @param start the lower bound of the range of roles to return
1194            * @param end the upper bound of the range of roles to return (not
1195            inclusive)
1196            * @param obc the comparator to order the roles (optionally
1197            <code>null</code>)
1198            * @return the ordered range of the matching roles, ordered by
1199            <code>obc</code>
1200            * @throws SystemException if a system exception occurred
1201            * @see com.liferay.portal.service.persistence.RoleFinder
1202            */
1203            @Override
1204            public java.util.List<com.liferay.portal.model.Role> search(
1205                    long companyId, java.lang.String keywords, java.lang.Integer[] types,
1206                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
1207                    throws com.liferay.portal.kernel.exception.SystemException {
1208                    return _roleLocalService.search(companyId, keywords, types, start, end,
1209                            obc);
1210            }
1211    
1212            /**
1213            * Returns an ordered range of all the roles that match the keywords, types,
1214            * and params.
1215            *
1216            * <p>
1217            * Useful when paginating results. Returns a maximum of <code>end -
1218            * start</code> instances. <code>start</code> and <code>end</code> are not
1219            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1220            * refers to the first result in the set. Setting both <code>start</code>
1221            * and <code>end</code> to {@link
1222            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1223            * result set.
1224            * </p>
1225            *
1226            * @param companyId the primary key of the company
1227            * @param keywords the keywords (space separated), which may occur in the
1228            role's name or description (optionally <code>null</code>)
1229            * @param types the role types (optionally <code>null</code>)
1230            * @param params the finder parameters. Can specify values for the
1231            "usersRoles" key. For more information, see {@link
1232            com.liferay.portal.service.persistence.RoleFinder}
1233            * @param start the lower bound of the range of roles to return
1234            * @param end the upper bound of the range of roles to return (not
1235            inclusive)
1236            * @param obc the comparator to order the roles (optionally
1237            <code>null</code>)
1238            * @return the ordered range of the matching roles, ordered by
1239            <code>obc</code>
1240            * @throws SystemException if a system exception occurred
1241            * @see com.liferay.portal.service.persistence.RoleFinder
1242            */
1243            @Override
1244            public java.util.List<com.liferay.portal.model.Role> search(
1245                    long companyId, java.lang.String keywords, java.lang.Integer[] types,
1246                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1247                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
1248                    throws com.liferay.portal.kernel.exception.SystemException {
1249                    return _roleLocalService.search(companyId, keywords, types, params,
1250                            start, end, obc);
1251            }
1252    
1253            /**
1254            * Returns an ordered range of all the roles that match the name,
1255            * description, and types.
1256            *
1257            * <p>
1258            * Useful when paginating results. Returns a maximum of <code>end -
1259            * start</code> instances. <code>start</code> and <code>end</code> are not
1260            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1261            * refers to the first result in the set. Setting both <code>start</code>
1262            * and <code>end</code> to {@link
1263            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1264            * result set.
1265            * </p>
1266            *
1267            * @param companyId the primary key of the company
1268            * @param name the role's name (optionally <code>null</code>)
1269            * @param description the role's description (optionally <code>null</code>)
1270            * @param types the role types (optionally <code>null</code>)
1271            * @param start the lower bound of the range of the roles to return
1272            * @param end the upper bound of the range of the roles to return (not
1273            inclusive)
1274            * @param obc the comparator to order the roles (optionally
1275            <code>null</code>)
1276            * @return the ordered range of the matching roles, ordered by
1277            <code>obc</code>
1278            * @throws SystemException if a system exception occurred
1279            * @see com.liferay.portal.service.persistence.RoleFinder
1280            */
1281            @Override
1282            public java.util.List<com.liferay.portal.model.Role> search(
1283                    long companyId, java.lang.String name, java.lang.String description,
1284                    java.lang.Integer[] types, int start, int end,
1285                    com.liferay.portal.kernel.util.OrderByComparator obc)
1286                    throws com.liferay.portal.kernel.exception.SystemException {
1287                    return _roleLocalService.search(companyId, name, description, types,
1288                            start, end, obc);
1289            }
1290    
1291            /**
1292            * Returns an ordered range of all the roles that match the name,
1293            * description, types, and params.
1294            *
1295            * <p>
1296            * Useful when paginating results. Returns a maximum of <code>end -
1297            * start</code> instances. <code>start</code> and <code>end</code> are not
1298            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1299            * refers to the first result in the set. Setting both <code>start</code>
1300            * and <code>end</code> to {@link
1301            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1302            * result set.
1303            * </p>
1304            *
1305            * @param companyId the primary key of the company
1306            * @param name the role's name (optionally <code>null</code>)
1307            * @param description the role's description (optionally <code>null</code>)
1308            * @param types the role types (optionally <code>null</code>)
1309            * @param params the finder's parameters. Can specify values for the
1310            "usersRoles" key. For more information, see {@link
1311            com.liferay.portal.service.persistence.RoleFinder}
1312            * @param start the lower bound of the range of the roles to return
1313            * @param end the upper bound of the range of the roles to return (not
1314            inclusive)
1315            * @param obc the comparator to order the roles (optionally
1316            <code>null</code>)
1317            * @return the ordered range of the matching roles, ordered by
1318            <code>obc</code>
1319            * @throws SystemException if a system exception occurred
1320            * @see com.liferay.portal.service.persistence.RoleFinder
1321            */
1322            @Override
1323            public java.util.List<com.liferay.portal.model.Role> search(
1324                    long companyId, java.lang.String name, java.lang.String description,
1325                    java.lang.Integer[] types,
1326                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1327                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
1328                    throws com.liferay.portal.kernel.exception.SystemException {
1329                    return _roleLocalService.search(companyId, name, description, types,
1330                            params, start, end, obc);
1331            }
1332    
1333            /**
1334            * Returns the number of roles that match the keywords and types.
1335            *
1336            * @param companyId the primary key of the company
1337            * @param keywords the keywords (space separated), which may occur in the
1338            role's name or description (optionally <code>null</code>)
1339            * @param types the role types (optionally <code>null</code>)
1340            * @return the number of matching roles
1341            * @throws SystemException if a system exception occurred
1342            */
1343            @Override
1344            public int searchCount(long companyId, java.lang.String keywords,
1345                    java.lang.Integer[] types)
1346                    throws com.liferay.portal.kernel.exception.SystemException {
1347                    return _roleLocalService.searchCount(companyId, keywords, types);
1348            }
1349    
1350            /**
1351            * Returns the number of roles that match the keywords, types and params.
1352            *
1353            * @param companyId the primary key of the company
1354            * @param keywords the keywords (space separated), which may occur in the
1355            role's name or description (optionally <code>null</code>)
1356            * @param types the role types (optionally <code>null</code>)
1357            * @param params the finder parameters. For more information, see {@link
1358            com.liferay.portal.service.persistence.RoleFinder}
1359            * @return the number of matching roles
1360            * @throws SystemException if a system exception occurred
1361            */
1362            @Override
1363            public int searchCount(long companyId, java.lang.String keywords,
1364                    java.lang.Integer[] types,
1365                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
1366                    throws com.liferay.portal.kernel.exception.SystemException {
1367                    return _roleLocalService.searchCount(companyId, keywords, types, params);
1368            }
1369    
1370            /**
1371            * Returns the number of roles that match the name, description, and types.
1372            *
1373            * @param companyId the primary key of the company
1374            * @param name the role's name (optionally <code>null</code>)
1375            * @param description the role's description (optionally <code>null</code>)
1376            * @param types the role types (optionally <code>null</code>)
1377            * @return the number of matching roles
1378            * @throws SystemException if a system exception occurred
1379            */
1380            @Override
1381            public int searchCount(long companyId, java.lang.String name,
1382                    java.lang.String description, java.lang.Integer[] types)
1383                    throws com.liferay.portal.kernel.exception.SystemException {
1384                    return _roleLocalService.searchCount(companyId, name, description, types);
1385            }
1386    
1387            /**
1388            * Returns the number of roles that match the name, description, types, and
1389            * params.
1390            *
1391            * @param companyId the primary key of the company
1392            * @param name the role's name (optionally <code>null</code>)
1393            * @param description the role's description (optionally <code>null</code>)
1394            * @param types the role types (optionally <code>null</code>)
1395            * @param params the finder parameters. Can specify values for the
1396            "usersRoles" key. For more information, see {@link
1397            com.liferay.portal.service.persistence.RoleFinder}
1398            * @return the number of matching roles
1399            * @throws SystemException if a system exception occurred
1400            */
1401            @Override
1402            public int searchCount(long companyId, java.lang.String name,
1403                    java.lang.String description, java.lang.Integer[] types,
1404                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
1405                    throws com.liferay.portal.kernel.exception.SystemException {
1406                    return _roleLocalService.searchCount(companyId, name, description,
1407                            types, params);
1408            }
1409    
1410            /**
1411            * Removes the matching roles associated with the user. The user is
1412            * reindexed after the roles are removed.
1413            *
1414            * @param userId the primary key of the user
1415            * @param roleIds the primary keys of the roles
1416            * @throws PortalException if a user with the primary key could not be found
1417            or if a role with any one of the primary keys could not be found
1418            * @throws SystemException if a system exception occurred
1419            */
1420            @Override
1421            public void unsetUserRoles(long userId, long[] roleIds)
1422                    throws com.liferay.portal.kernel.exception.PortalException,
1423                            com.liferay.portal.kernel.exception.SystemException {
1424                    _roleLocalService.unsetUserRoles(userId, roleIds);
1425            }
1426    
1427            /**
1428            * Updates the role with the primary key.
1429            *
1430            * @param roleId the primary key of the role
1431            * @param name the role's new name
1432            * @param titleMap the new localized titles (optionally <code>null</code>)
1433            to replace those existing for the role
1434            * @param descriptionMap the new localized descriptions (optionally
1435            <code>null</code>) to replace those existing for the role
1436            * @param subtype the role's new subtype (optionally <code>null</code>)
1437            * @param serviceContext the service context to be applied (optionally
1438            <code>null</code>). Can set expando bridge attributes for the
1439            role.
1440            * @return the role with the primary key
1441            * @throws PortalException if a role with the primary could not be found or
1442            if the role's name was invalid
1443            * @throws SystemException if a system exception occurred
1444            */
1445            @Override
1446            public com.liferay.portal.model.Role updateRole(long roleId,
1447                    java.lang.String name,
1448                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
1449                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
1450                    java.lang.String subtype,
1451                    com.liferay.portal.service.ServiceContext serviceContext)
1452                    throws com.liferay.portal.kernel.exception.PortalException,
1453                            com.liferay.portal.kernel.exception.SystemException {
1454                    return _roleLocalService.updateRole(roleId, name, titleMap,
1455                            descriptionMap, subtype, serviceContext);
1456            }
1457    
1458            /**
1459             * @deprecated As of 6.1.0, replaced by {@link #getWrappedService}
1460             */
1461            public RoleLocalService getWrappedRoleLocalService() {
1462                    return _roleLocalService;
1463            }
1464    
1465            /**
1466             * @deprecated As of 6.1.0, replaced by {@link #setWrappedService}
1467             */
1468            public void setWrappedRoleLocalService(RoleLocalService roleLocalService) {
1469                    _roleLocalService = roleLocalService;
1470            }
1471    
1472            @Override
1473            public RoleLocalService getWrappedService() {
1474                    return _roleLocalService;
1475            }
1476    
1477            @Override
1478            public void setWrappedService(RoleLocalService roleLocalService) {
1479                    _roleLocalService = roleLocalService;
1480            }
1481    
1482            private RoleLocalService _roleLocalService;
1483    }