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