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