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. 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.
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. 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.
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. 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.
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            * @throws SystemException if a system exception occurred
228            */
229            public void addGroupRole(long groupId, long roleId)
230                    throws com.liferay.portal.kernel.exception.SystemException {
231                    _roleLocalService.addGroupRole(groupId, roleId);
232            }
233    
234            /**
235            * @throws SystemException if a system exception occurred
236            */
237            public void addGroupRole(long groupId, com.liferay.portal.model.Role role)
238                    throws com.liferay.portal.kernel.exception.SystemException {
239                    _roleLocalService.addGroupRole(groupId, role);
240            }
241    
242            /**
243            * @throws SystemException if a system exception occurred
244            */
245            public void addGroupRoles(long groupId, long[] roleIds)
246                    throws com.liferay.portal.kernel.exception.SystemException {
247                    _roleLocalService.addGroupRoles(groupId, roleIds);
248            }
249    
250            /**
251            * @throws SystemException if a system exception occurred
252            */
253            public void addGroupRoles(long groupId,
254                    java.util.List<com.liferay.portal.model.Role> Roles)
255                    throws com.liferay.portal.kernel.exception.SystemException {
256                    _roleLocalService.addGroupRoles(groupId, Roles);
257            }
258    
259            /**
260            * @throws SystemException if a system exception occurred
261            */
262            public void clearGroupRoles(long groupId)
263                    throws com.liferay.portal.kernel.exception.SystemException {
264                    _roleLocalService.clearGroupRoles(groupId);
265            }
266    
267            /**
268            * @throws SystemException if a system exception occurred
269            */
270            public void deleteGroupRole(long groupId, long roleId)
271                    throws com.liferay.portal.kernel.exception.SystemException {
272                    _roleLocalService.deleteGroupRole(groupId, roleId);
273            }
274    
275            /**
276            * @throws SystemException if a system exception occurred
277            */
278            public void deleteGroupRole(long groupId, com.liferay.portal.model.Role role)
279                    throws com.liferay.portal.kernel.exception.SystemException {
280                    _roleLocalService.deleteGroupRole(groupId, role);
281            }
282    
283            /**
284            * @throws SystemException if a system exception occurred
285            */
286            public void deleteGroupRoles(long groupId, long[] roleIds)
287                    throws com.liferay.portal.kernel.exception.SystemException {
288                    _roleLocalService.deleteGroupRoles(groupId, roleIds);
289            }
290    
291            /**
292            * @throws SystemException if a system exception occurred
293            */
294            public void deleteGroupRoles(long groupId,
295                    java.util.List<com.liferay.portal.model.Role> Roles)
296                    throws com.liferay.portal.kernel.exception.SystemException {
297                    _roleLocalService.deleteGroupRoles(groupId, Roles);
298            }
299    
300            /**
301            * @throws SystemException if a system exception occurred
302            */
303            public java.util.List<com.liferay.portal.model.Role> getGroupRoles(
304                    long groupId)
305                    throws com.liferay.portal.kernel.exception.SystemException {
306                    return _roleLocalService.getGroupRoles(groupId);
307            }
308    
309            /**
310            * @throws SystemException if a system exception occurred
311            */
312            public java.util.List<com.liferay.portal.model.Role> getGroupRoles(
313                    long groupId, int start, int end)
314                    throws com.liferay.portal.kernel.exception.SystemException {
315                    return _roleLocalService.getGroupRoles(groupId, start, end);
316            }
317    
318            /**
319            * @throws SystemException if a system exception occurred
320            */
321            public java.util.List<com.liferay.portal.model.Role> getGroupRoles(
322                    long groupId, int start, int end,
323                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
324                    throws com.liferay.portal.kernel.exception.SystemException {
325                    return _roleLocalService.getGroupRoles(groupId, start, end,
326                            orderByComparator);
327            }
328    
329            /**
330            * @throws SystemException if a system exception occurred
331            */
332            public int getGroupRolesCount(long groupId)
333                    throws com.liferay.portal.kernel.exception.SystemException {
334                    return _roleLocalService.getGroupRolesCount(groupId);
335            }
336    
337            /**
338            * @throws SystemException if a system exception occurred
339            */
340            public boolean hasGroupRole(long groupId, long roleId)
341                    throws com.liferay.portal.kernel.exception.SystemException {
342                    return _roleLocalService.hasGroupRole(groupId, roleId);
343            }
344    
345            /**
346            * @throws SystemException if a system exception occurred
347            */
348            public boolean hasGroupRoles(long groupId)
349                    throws com.liferay.portal.kernel.exception.SystemException {
350                    return _roleLocalService.hasGroupRoles(groupId);
351            }
352    
353            /**
354            * @throws SystemException if a system exception occurred
355            */
356            public void setGroupRoles(long groupId, long[] roleIds)
357                    throws com.liferay.portal.kernel.exception.SystemException {
358                    _roleLocalService.setGroupRoles(groupId, roleIds);
359            }
360    
361            /**
362            * @throws SystemException if a system exception occurred
363            */
364            public void addUserRole(long userId, long roleId)
365                    throws com.liferay.portal.kernel.exception.SystemException {
366                    _roleLocalService.addUserRole(userId, roleId);
367            }
368    
369            /**
370            * @throws SystemException if a system exception occurred
371            */
372            public void addUserRole(long userId, com.liferay.portal.model.Role role)
373                    throws com.liferay.portal.kernel.exception.SystemException {
374                    _roleLocalService.addUserRole(userId, role);
375            }
376    
377            /**
378            * @throws PortalException
379            * @throws SystemException if a system exception occurred
380            */
381            public void addUserRoles(long userId, long[] roleIds)
382                    throws com.liferay.portal.kernel.exception.PortalException,
383                            com.liferay.portal.kernel.exception.SystemException {
384                    _roleLocalService.addUserRoles(userId, roleIds);
385            }
386    
387            /**
388            * @throws PortalException
389            * @throws SystemException if a system exception occurred
390            */
391            public void addUserRoles(long userId,
392                    java.util.List<com.liferay.portal.model.Role> Roles)
393                    throws com.liferay.portal.kernel.exception.PortalException,
394                            com.liferay.portal.kernel.exception.SystemException {
395                    _roleLocalService.addUserRoles(userId, Roles);
396            }
397    
398            /**
399            * @throws SystemException if a system exception occurred
400            */
401            public void clearUserRoles(long userId)
402                    throws com.liferay.portal.kernel.exception.SystemException {
403                    _roleLocalService.clearUserRoles(userId);
404            }
405    
406            /**
407            * @throws SystemException if a system exception occurred
408            */
409            public void deleteUserRole(long userId, long roleId)
410                    throws com.liferay.portal.kernel.exception.SystemException {
411                    _roleLocalService.deleteUserRole(userId, roleId);
412            }
413    
414            /**
415            * @throws SystemException if a system exception occurred
416            */
417            public void deleteUserRole(long userId, com.liferay.portal.model.Role role)
418                    throws com.liferay.portal.kernel.exception.SystemException {
419                    _roleLocalService.deleteUserRole(userId, role);
420            }
421    
422            /**
423            * @throws SystemException if a system exception occurred
424            */
425            public void deleteUserRoles(long userId, long[] roleIds)
426                    throws com.liferay.portal.kernel.exception.SystemException {
427                    _roleLocalService.deleteUserRoles(userId, roleIds);
428            }
429    
430            /**
431            * @throws SystemException if a system exception occurred
432            */
433            public void deleteUserRoles(long userId,
434                    java.util.List<com.liferay.portal.model.Role> Roles)
435                    throws com.liferay.portal.kernel.exception.SystemException {
436                    _roleLocalService.deleteUserRoles(userId, Roles);
437            }
438    
439            /**
440            * @throws SystemException if a system exception occurred
441            */
442            public java.util.List<com.liferay.portal.model.Role> getUserRoles(
443                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
444                    return _roleLocalService.getUserRoles(userId);
445            }
446    
447            /**
448            * @throws SystemException if a system exception occurred
449            */
450            public java.util.List<com.liferay.portal.model.Role> getUserRoles(
451                    long userId, int start, int end)
452                    throws com.liferay.portal.kernel.exception.SystemException {
453                    return _roleLocalService.getUserRoles(userId, start, end);
454            }
455    
456            /**
457            * @throws SystemException if a system exception occurred
458            */
459            public java.util.List<com.liferay.portal.model.Role> getUserRoles(
460                    long userId, int start, int end,
461                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
462                    throws com.liferay.portal.kernel.exception.SystemException {
463                    return _roleLocalService.getUserRoles(userId, start, end,
464                            orderByComparator);
465            }
466    
467            /**
468            * @throws SystemException if a system exception occurred
469            */
470            public int getUserRolesCount(long userId)
471                    throws com.liferay.portal.kernel.exception.SystemException {
472                    return _roleLocalService.getUserRolesCount(userId);
473            }
474    
475            /**
476            * @throws SystemException if a system exception occurred
477            */
478            public boolean hasUserRole(long userId, long roleId)
479                    throws com.liferay.portal.kernel.exception.SystemException {
480                    return _roleLocalService.hasUserRole(userId, roleId);
481            }
482    
483            /**
484            * @throws SystemException if a system exception occurred
485            */
486            public boolean hasUserRoles(long userId)
487                    throws com.liferay.portal.kernel.exception.SystemException {
488                    return _roleLocalService.hasUserRoles(userId);
489            }
490    
491            /**
492            * @throws PortalException
493            * @throws SystemException if a system exception occurred
494            */
495            public void setUserRoles(long userId, long[] roleIds)
496                    throws com.liferay.portal.kernel.exception.PortalException,
497                            com.liferay.portal.kernel.exception.SystemException {
498                    _roleLocalService.setUserRoles(userId, roleIds);
499            }
500    
501            /**
502            * Returns the Spring bean ID for this bean.
503            *
504            * @return the Spring bean ID for this bean
505            */
506            public java.lang.String getBeanIdentifier() {
507                    return _roleLocalService.getBeanIdentifier();
508            }
509    
510            /**
511            * Sets the Spring bean ID for this bean.
512            *
513            * @param beanIdentifier the Spring bean ID for this bean
514            */
515            public void setBeanIdentifier(java.lang.String beanIdentifier) {
516                    _roleLocalService.setBeanIdentifier(beanIdentifier);
517            }
518    
519            /**
520            * Adds a role. The user is reindexed after role is added.
521            *
522            * @param userId the primary key of the user
523            * @param companyId the primary key of the company
524            * @param name the role's name
525            * @param titleMap the role's localized titles (optionally
526            <code>null</code>)
527            * @param descriptionMap the role's localized descriptions (optionally
528            <code>null</code>)
529            * @param type the role's type (optionally <code>0</code>)
530            * @return the role
531            * @throws PortalException if the class name or the role name were
532            invalid, if the role is a duplicate, or if a user with the
533            primary key could not be found
534            * @throws SystemException if a system exception occurred
535            * @deprecated As of 6.2.0, replaced by {@link #addRole(long, String, long,
536            String, Map, Map, int, String, ServiceContext)}
537            */
538            public com.liferay.portal.model.Role addRole(long userId, long companyId,
539                    java.lang.String name,
540                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
541                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
542                    int type)
543                    throws com.liferay.portal.kernel.exception.PortalException,
544                            com.liferay.portal.kernel.exception.SystemException {
545                    return _roleLocalService.addRole(userId, companyId, name, titleMap,
546                            descriptionMap, type);
547            }
548    
549            /**
550            * Adds a role with additional parameters. The user is reindexed after role
551            * is added.
552            *
553            * @param userId the primary key of the user
554            * @param companyId the primary key of the company
555            * @param name the role's name
556            * @param titleMap the role's localized titles (optionally
557            <code>null</code>)
558            * @param descriptionMap the role's localized descriptions (optionally
559            <code>null</code>)
560            * @param type the role's type (optionally <code>0</code>)
561            * @param className the name of the class for which the role is created
562            (optionally <code>null</code>)
563            * @param classPK the primary key of the class for which the role is
564            created (optionally <code>0</code>)
565            * @return the role
566            * @throws PortalException if the class name or the role name were
567            invalid, if the role is a duplicate, or if a user with the
568            primary key could not be found
569            * @throws SystemException if a system exception occurred
570            * @deprecated As of 6.2.0, replaced by {@link #addRole(long, String, long,
571            String, Map, Map, int, String, ServiceContext)}
572            */
573            public com.liferay.portal.model.Role addRole(long userId, long companyId,
574                    java.lang.String name,
575                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
576                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
577                    int type, java.lang.String className, long classPK)
578                    throws com.liferay.portal.kernel.exception.PortalException,
579                            com.liferay.portal.kernel.exception.SystemException {
580                    return _roleLocalService.addRole(userId, companyId, name, titleMap,
581                            descriptionMap, type, className, classPK);
582            }
583    
584            /**
585            * Adds a role with additional parameters. The user is reindexed after role
586            * is added.
587            *
588            * @param userId the primary key of the user
589            * @param className the name of the class for which the role is created
590            (optionally <code>null</code>)
591            * @param classPK the primary key of the class for which the role is
592            created (optionally <code>0</code>)
593            * @param name the role's name
594            * @param titleMap the role's localized titles (optionally
595            <code>null</code>)
596            * @param descriptionMap the role's localized descriptions (optionally
597            <code>null</code>)
598            * @param type the role's type (optionally <code>0</code>)
599            * @param subType the role's subtype (optionally <code>null</code>)
600            * @param serviceContext the service context to be applied (optionally
601            <code>null</code>). Can set expando bridge attributes for the
602            role.
603            * @return the role
604            * @throws PortalException if the class name or the role name were invalid,
605            if the role is a duplicate, or if a user with the primary key
606            could not be found
607            * @throws SystemException if a system exception occurred
608            */
609            public com.liferay.portal.model.Role addRole(long userId,
610                    java.lang.String className, long classPK, java.lang.String name,
611                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
612                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
613                    int type, java.lang.String subType,
614                    com.liferay.portal.service.ServiceContext serviceContext)
615                    throws com.liferay.portal.kernel.exception.PortalException,
616                            com.liferay.portal.kernel.exception.SystemException {
617                    return _roleLocalService.addRole(userId, className, classPK, name,
618                            titleMap, descriptionMap, type, subType, serviceContext);
619            }
620    
621            /**
622            * Checks to ensure that the system roles map has appropriate default roles
623            * in each company.
624            *
625            * @throws PortalException if the current user did not have permission to
626            set applicable permissions on a role
627            * @throws SystemException if a system exception occurred
628            */
629            public void checkSystemRoles()
630                    throws com.liferay.portal.kernel.exception.PortalException,
631                            com.liferay.portal.kernel.exception.SystemException {
632                    _roleLocalService.checkSystemRoles();
633            }
634    
635            /**
636            * Checks to ensure that the system roles map has appropriate default roles
637            * in the company.
638            *
639            * @param companyId the primary key of the company
640            * @throws PortalException if the current user did not have permission to
641            set applicable permissions on a role
642            * @throws SystemException if a system exception occurred
643            */
644            public void checkSystemRoles(long companyId)
645                    throws com.liferay.portal.kernel.exception.PortalException,
646                            com.liferay.portal.kernel.exception.SystemException {
647                    _roleLocalService.checkSystemRoles(companyId);
648            }
649    
650            /**
651            * Returns the role with the name in the company.
652            *
653            * <p>
654            * The method searches the system roles map first for default roles. If a
655            * role with the name is not found, then the method will query the database.
656            * </p>
657            *
658            * @param companyId the primary key of the company
659            * @param name the role's name
660            * @return Returns the role with the name or <code>null</code> if a role
661            with the name could not be found in the company
662            * @throws SystemException if a system exception occurred
663            */
664            public com.liferay.portal.model.Role fetchRole(long companyId,
665                    java.lang.String name)
666                    throws com.liferay.portal.kernel.exception.SystemException {
667                    return _roleLocalService.fetchRole(companyId, name);
668            }
669    
670            public com.liferay.portal.model.Role fetchRoleByUuidAndCompanyId(
671                    java.lang.String uuid, long companyId)
672                    throws com.liferay.portal.kernel.exception.SystemException {
673                    return _roleLocalService.fetchRoleByUuidAndCompanyId(uuid, companyId);
674            }
675    
676            /**
677            * Returns the default role for the group with the primary key.
678            *
679            * <p>
680            * If the group is a site, then the default role is {@link
681            * com.liferay.portal.model.RoleConstants#SITE_MEMBER}. If the group is an
682            * organization, then the default role is {@link
683            * com.liferay.portal.model.RoleConstants#ORGANIZATION_USER}. If the group
684            * is a user or user group, then the default role is {@link
685            * com.liferay.portal.model.RoleConstants#POWER_USER}. For all other group
686            * types, the default role is {@link
687            * com.liferay.portal.model.RoleConstants#USER}.
688            * </p>
689            *
690            * @param groupId the primary key of the group
691            * @return the default role for the group with the primary key
692            * @throws PortalException if a group with the primary key could not be
693            found, or if a default role could not be found for the group
694            * @throws SystemException if a system exception occurred
695            */
696            public com.liferay.portal.model.Role getDefaultGroupRole(long groupId)
697                    throws com.liferay.portal.kernel.exception.PortalException,
698                            com.liferay.portal.kernel.exception.SystemException {
699                    return _roleLocalService.getDefaultGroupRole(groupId);
700            }
701    
702            public java.util.List<com.liferay.portal.model.Role> getResourceBlockRoles(
703                    long resourceBlockId, java.lang.String className,
704                    java.lang.String actionId)
705                    throws com.liferay.portal.kernel.exception.SystemException {
706                    return _roleLocalService.getResourceBlockRoles(resourceBlockId,
707                            className, actionId);
708            }
709    
710            /**
711            * Returns a map of role names to associated action IDs for the named
712            * resource in the company within the permission scope.
713            *
714            * @param companyId the primary key of the company
715            * @param name the resource name
716            * @param scope the permission scope
717            * @param primKey the primary key of the resource's class
718            * @return the role names and action IDs
719            * @throws SystemException if a system exception occurred
720            * @see com.liferay.portal.service.persistence.RoleFinder#findByC_N_S_P(
721            long, String, int, String)
722            */
723            public java.util.Map<java.lang.String, java.util.List<java.lang.String>> getResourceRoles(
724                    long companyId, java.lang.String name, int scope,
725                    java.lang.String primKey)
726                    throws com.liferay.portal.kernel.exception.SystemException {
727                    return _roleLocalService.getResourceRoles(companyId, name, scope,
728                            primKey);
729            }
730    
731            /**
732            * Returns all the roles associated with the action ID in the company within
733            * the permission scope.
734            *
735            * @param companyId the primary key of the company
736            * @param name the resource name
737            * @param scope the permission scope
738            * @param primKey the primary key of the resource's class
739            * @param actionId the name of the resource action
740            * @return the roles
741            * @throws SystemException if a system exception occurred
742            * @see com.liferay.portal.service.persistence.RoleFinder#findByC_N_S_P_A(
743            long, String, int, String, String)
744            */
745            public java.util.List<com.liferay.portal.model.Role> getResourceRoles(
746                    long companyId, java.lang.String name, int scope,
747                    java.lang.String primKey, java.lang.String actionId)
748                    throws com.liferay.portal.kernel.exception.SystemException {
749                    return _roleLocalService.getResourceRoles(companyId, name, scope,
750                            primKey, actionId);
751            }
752    
753            /**
754            * Returns the role with the name in the company.
755            *
756            * <p>
757            * The method searches the system roles map first for default roles. If a
758            * role with the name is not found, then the method will query the database.
759            * </p>
760            *
761            * @param companyId the primary key of the company
762            * @param name the role's name
763            * @return the role with the name
764            * @throws PortalException if a role with the name could not be found in the
765            company
766            * @throws SystemException if a system exception occurred
767            */
768            public com.liferay.portal.model.Role getRole(long companyId,
769                    java.lang.String name)
770                    throws com.liferay.portal.kernel.exception.PortalException,
771                            com.liferay.portal.kernel.exception.SystemException {
772                    return _roleLocalService.getRole(companyId, name);
773            }
774    
775            /**
776            * Returns all the roles of the type and subtype.
777            *
778            * @param type the role's type (optionally <code>0</code>)
779            * @param subtype the role's subtype (optionally <code>null</code>)
780            * @return the roles of the type and subtype
781            * @throws SystemException if a system exception occurred
782            */
783            public java.util.List<com.liferay.portal.model.Role> getRoles(int type,
784                    java.lang.String subtype)
785                    throws com.liferay.portal.kernel.exception.SystemException {
786                    return _roleLocalService.getRoles(type, subtype);
787            }
788    
789            /**
790            * Returns all the roles in the company.
791            *
792            * @param companyId the primary key of the company
793            * @return the roles in the company
794            * @throws SystemException if a system exception occurred
795            */
796            public java.util.List<com.liferay.portal.model.Role> getRoles(
797                    long companyId)
798                    throws com.liferay.portal.kernel.exception.SystemException {
799                    return _roleLocalService.getRoles(companyId);
800            }
801    
802            /**
803            * Returns all the roles with the primary keys.
804            *
805            * @param roleIds the primary keys of the roles
806            * @return the roles with the primary keys
807            * @throws PortalException if any one of the roles with the primary keys
808            could not be found
809            * @throws SystemException if a system exception occurred
810            */
811            public java.util.List<com.liferay.portal.model.Role> getRoles(
812                    long[] roleIds)
813                    throws com.liferay.portal.kernel.exception.PortalException,
814                            com.liferay.portal.kernel.exception.SystemException {
815                    return _roleLocalService.getRoles(roleIds);
816            }
817    
818            /**
819            * Returns all the roles of the subtype.
820            *
821            * @param subtype the role's subtype (optionally <code>null</code>)
822            * @return the roles of the subtype
823            * @throws SystemException if a system exception occurred
824            */
825            public java.util.List<com.liferay.portal.model.Role> getSubtypeRoles(
826                    java.lang.String subtype)
827                    throws com.liferay.portal.kernel.exception.SystemException {
828                    return _roleLocalService.getSubtypeRoles(subtype);
829            }
830    
831            /**
832            * Returns the number of roles of the subtype.
833            *
834            * @param subtype the role's subtype (optionally <code>null</code>)
835            * @return the number of roles of the subtype
836            * @throws SystemException if a system exception occurred
837            */
838            public int getSubtypeRolesCount(java.lang.String subtype)
839                    throws com.liferay.portal.kernel.exception.SystemException {
840                    return _roleLocalService.getSubtypeRolesCount(subtype);
841            }
842    
843            /**
844            * Returns the team role in the company.
845            *
846            * @param companyId the primary key of the company
847            * @param teamId the primary key of the team
848            * @return the team role in the company
849            * @throws PortalException if a role could not be found in the team and
850            company
851            * @throws SystemException if a system exception occurred
852            */
853            public com.liferay.portal.model.Role getTeamRole(long companyId, long teamId)
854                    throws com.liferay.portal.kernel.exception.PortalException,
855                            com.liferay.portal.kernel.exception.SystemException {
856                    return _roleLocalService.getTeamRole(companyId, teamId);
857            }
858    
859            /**
860            * Returns all the roles of the type.
861            *
862            * @param type the role's type (optionally <code>0</code>)
863            * @return the range of the roles of the type
864            * @throws SystemException if a system exception occurred
865            */
866            public java.util.List<com.liferay.portal.model.Role> getTypeRoles(int type)
867                    throws com.liferay.portal.kernel.exception.SystemException {
868                    return _roleLocalService.getTypeRoles(type);
869            }
870    
871            /**
872            * Returns a range of all the roles of the type.
873            *
874            * @param type the role's type (optionally <code>0</code>)
875            * @param start the lower bound of the range of roles to return
876            * @param end the upper bound of the range of roles to return (not
877            inclusive)
878            * @return the range of the roles of the type
879            * @throws SystemException if a system exception occurred
880            */
881            public java.util.List<com.liferay.portal.model.Role> getTypeRoles(
882                    int type, int start, int end)
883                    throws com.liferay.portal.kernel.exception.SystemException {
884                    return _roleLocalService.getTypeRoles(type, start, end);
885            }
886    
887            /**
888            * Returns the number of roles of the type.
889            *
890            * @param type the role's type (optionally <code>0</code>)
891            * @return the number of roles of the type
892            * @throws SystemException if a system exception occurred
893            */
894            public int getTypeRolesCount(int type)
895                    throws com.liferay.portal.kernel.exception.SystemException {
896                    return _roleLocalService.getTypeRolesCount(type);
897            }
898    
899            /**
900            * Returns all the user's roles within the user group.
901            *
902            * @param userId the primary key of the user
903            * @param groupId the primary key of the group
904            * @return the user's roles within the user group
905            * @throws SystemException if a system exception occurred
906            * @see com.liferay.portal.service.persistence.RoleFinder#findByUserGroupGroupRole(
907            long, long)
908            */
909            public java.util.List<com.liferay.portal.model.Role> getUserGroupGroupRoles(
910                    long userId, long groupId)
911                    throws com.liferay.portal.kernel.exception.SystemException {
912                    return _roleLocalService.getUserGroupGroupRoles(userId, groupId);
913            }
914    
915            /**
916            * Returns all the user's roles within the user group.
917            *
918            * @param userId the primary key of the user
919            * @param groupId the primary key of the group
920            * @return the user's roles within the user group
921            * @throws SystemException if a system exception occurred
922            * @see com.liferay.portal.service.persistence.RoleFinder#findByUserGroupRole(
923            long, long)
924            */
925            public java.util.List<com.liferay.portal.model.Role> getUserGroupRoles(
926                    long userId, long groupId)
927                    throws com.liferay.portal.kernel.exception.SystemException {
928                    return _roleLocalService.getUserGroupRoles(userId, groupId);
929            }
930    
931            /**
932            * Returns the union of all the user's roles within the groups.
933            *
934            * @param userId the primary key of the user
935            * @param groups the groups (optionally <code>null</code>)
936            * @return the union of all the user's roles within the groups
937            * @throws SystemException if a system exception occurred
938            * @see com.liferay.portal.service.persistence.RoleFinder#findByU_G(
939            long, List)
940            */
941            public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
942                    long userId, java.util.List<com.liferay.portal.model.Group> groups)
943                    throws com.liferay.portal.kernel.exception.SystemException {
944                    return _roleLocalService.getUserRelatedRoles(userId, groups);
945            }
946    
947            /**
948            * Returns all the user's roles within the group.
949            *
950            * @param userId the primary key of the user
951            * @param groupId the primary key of the group
952            * @return the user's roles within the group
953            * @throws SystemException if a system exception occurred
954            * @see com.liferay.portal.service.persistence.RoleFinder#findByU_G(
955            long, long)
956            */
957            public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
958                    long userId, long groupId)
959                    throws com.liferay.portal.kernel.exception.SystemException {
960                    return _roleLocalService.getUserRelatedRoles(userId, groupId);
961            }
962    
963            /**
964            * Returns the union of all the user's roles within the groups.
965            *
966            * @param userId the primary key of the user
967            * @param groupIds the primary keys of the groups
968            * @return the union of all the user's roles within the groups
969            * @throws SystemException if a system exception occurred
970            * @see com.liferay.portal.service.persistence.RoleFinder#findByU_G(
971            long, long[])
972            */
973            public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
974                    long userId, long[] groupIds)
975                    throws com.liferay.portal.kernel.exception.SystemException {
976                    return _roleLocalService.getUserRelatedRoles(userId, groupIds);
977            }
978    
979            /**
980            * Returns <code>true</code> if the user is associated with the named
981            * regular role.
982            *
983            * @param userId the primary key of the user
984            * @param companyId the primary key of the company
985            * @param name the name of the role
986            * @param inherited whether to include the user's inherited roles in the
987            search
988            * @return <code>true</code> if the user is associated with the regular
989            role; <code>false</code> otherwise
990            * @throws PortalException if a default user for the company could not be
991            found
992            * @throws SystemException if a system exception occurred
993            */
994            public boolean hasUserRole(long userId, long companyId,
995                    java.lang.String name, boolean inherited)
996                    throws com.liferay.portal.kernel.exception.PortalException,
997                            com.liferay.portal.kernel.exception.SystemException {
998                    return _roleLocalService.hasUserRole(userId, companyId, name, inherited);
999            }
1000    
1001            /**
1002            * Returns <code>true</code> if the user has any one of the named regular
1003            * roles.
1004            *
1005            * @param userId the primary key of the user
1006            * @param companyId the primary key of the company
1007            * @param names the names of the roles
1008            * @param inherited whether to include the user's inherited roles in the
1009            search
1010            * @return <code>true</code> if the user has any one of the regular roles;
1011            <code>false</code> otherwise
1012            * @throws PortalException if any one of the roles with the names could not
1013            be found in the company or if the default user for the company
1014            could not be found
1015            * @throws SystemException if a system exception occurred
1016            */
1017            public boolean hasUserRoles(long userId, long companyId,
1018                    java.lang.String[] names, boolean inherited)
1019                    throws com.liferay.portal.kernel.exception.PortalException,
1020                            com.liferay.portal.kernel.exception.SystemException {
1021                    return _roleLocalService.hasUserRoles(userId, companyId, names,
1022                            inherited);
1023            }
1024    
1025            /**
1026            * Returns a role with the name in the company.
1027            *
1028            * @param companyId the primary key of the company
1029            * @param name the role's name (optionally <code>null</code>)
1030            * @return the role with the name, or <code>null</code> if a role with the
1031            name could not be found in the company
1032            * @throws SystemException if a system exception occurred
1033            */
1034            public com.liferay.portal.model.Role loadFetchRole(long companyId,
1035                    java.lang.String name)
1036                    throws com.liferay.portal.kernel.exception.SystemException {
1037                    return _roleLocalService.loadFetchRole(companyId, name);
1038            }
1039    
1040            /**
1041            * Returns a role with the name in the company.
1042            *
1043            * @param companyId the primary key of the company
1044            * @param name the role's name
1045            * @return the role with the name in the company
1046            * @throws PortalException if a role with the name could not be found in the
1047            company
1048            * @throws SystemException if a system exception occurred
1049            */
1050            public com.liferay.portal.model.Role loadGetRole(long companyId,
1051                    java.lang.String name)
1052                    throws com.liferay.portal.kernel.exception.PortalException,
1053                            com.liferay.portal.kernel.exception.SystemException {
1054                    return _roleLocalService.loadGetRole(companyId, name);
1055            }
1056    
1057            /**
1058            * Returns an ordered range of all the roles that match the keywords and
1059            * types.
1060            *
1061            * <p>
1062            * Useful when paginating results. Returns a maximum of <code>end -
1063            * start</code> instances. <code>start</code> and <code>end</code> are not
1064            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1065            * refers to the first result in the set. Setting both <code>start</code>
1066            * and <code>end</code> to {@link
1067            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1068            * result set.
1069            * </p>
1070            *
1071            * @param companyId the primary key of the company
1072            * @param keywords the keywords (space separated), which may occur in the
1073            role's name or description (optionally <code>null</code>)
1074            * @param types the role types (optionally <code>null</code>)
1075            * @param start the lower bound of the range of roles to return
1076            * @param end the upper bound of the range of roles to return (not
1077            inclusive)
1078            * @param obc the comparator to order the roles (optionally
1079            <code>null</code>)
1080            * @return the ordered range of the matching roles, ordered by
1081            <code>obc</code>
1082            * @throws SystemException if a system exception occurred
1083            * @see com.liferay.portal.service.persistence.RoleFinder
1084            */
1085            public java.util.List<com.liferay.portal.model.Role> search(
1086                    long companyId, java.lang.String keywords, java.lang.Integer[] types,
1087                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
1088                    throws com.liferay.portal.kernel.exception.SystemException {
1089                    return _roleLocalService.search(companyId, keywords, types, start, end,
1090                            obc);
1091            }
1092    
1093            /**
1094            * Returns an ordered range of all the roles that match the keywords, types,
1095            * and params.
1096            *
1097            * <p>
1098            * Useful when paginating results. Returns a maximum of <code>end -
1099            * start</code> instances. <code>start</code> and <code>end</code> are not
1100            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1101            * refers to the first result in the set. Setting both <code>start</code>
1102            * and <code>end</code> to {@link
1103            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1104            * result set.
1105            * </p>
1106            *
1107            * @param companyId the primary key of the company
1108            * @param keywords the keywords (space separated), which may occur in the
1109            role's name or description (optionally <code>null</code>)
1110            * @param types the role types (optionally <code>null</code>)
1111            * @param params the finder parameters. Can specify values for the
1112            "usersRoles" key. For more information, see {@link
1113            com.liferay.portal.service.persistence.RoleFinder}
1114            * @param start the lower bound of the range of roles to return
1115            * @param end the upper bound of the range of roles to return (not
1116            inclusive)
1117            * @param obc the comparator to order the roles (optionally
1118            <code>null</code>)
1119            * @return the ordered range of the matching roles, ordered by
1120            <code>obc</code>
1121            * @throws SystemException if a system exception occurred
1122            * @see com.liferay.portal.service.persistence.RoleFinder
1123            */
1124            public java.util.List<com.liferay.portal.model.Role> search(
1125                    long companyId, java.lang.String keywords, java.lang.Integer[] types,
1126                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1127                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
1128                    throws com.liferay.portal.kernel.exception.SystemException {
1129                    return _roleLocalService.search(companyId, keywords, types, params,
1130                            start, end, obc);
1131            }
1132    
1133            /**
1134            * Returns an ordered range of all the roles that match the name,
1135            * description, and types.
1136            *
1137            * <p>
1138            * Useful when paginating results. Returns a maximum of <code>end -
1139            * start</code> instances. <code>start</code> and <code>end</code> are not
1140            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1141            * refers to the first result in the set. Setting both <code>start</code>
1142            * and <code>end</code> to {@link
1143            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1144            * result set.
1145            * </p>
1146            *
1147            * @param companyId the primary key of the company
1148            * @param name the role's name (optionally <code>null</code>)
1149            * @param description the role's description (optionally <code>null</code>)
1150            * @param types the role types (optionally <code>null</code>)
1151            * @param start the lower bound of the range of the roles to return
1152            * @param end the upper bound of the range of the roles to return (not
1153            inclusive)
1154            * @param obc the comparator to order the roles (optionally
1155            <code>null</code>)
1156            * @return the ordered range of the matching roles, ordered by
1157            <code>obc</code>
1158            * @throws SystemException if a system exception occurred
1159            * @see com.liferay.portal.service.persistence.RoleFinder
1160            */
1161            public java.util.List<com.liferay.portal.model.Role> search(
1162                    long companyId, java.lang.String name, java.lang.String description,
1163                    java.lang.Integer[] types, int start, int end,
1164                    com.liferay.portal.kernel.util.OrderByComparator obc)
1165                    throws com.liferay.portal.kernel.exception.SystemException {
1166                    return _roleLocalService.search(companyId, name, description, types,
1167                            start, end, obc);
1168            }
1169    
1170            /**
1171            * Returns an ordered range of all the roles that match the name,
1172            * description, types, and params.
1173            *
1174            * <p>
1175            * Useful when paginating results. Returns a maximum of <code>end -
1176            * start</code> instances. <code>start</code> and <code>end</code> are not
1177            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1178            * refers to the first result in the set. Setting both <code>start</code>
1179            * and <code>end</code> to {@link
1180            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1181            * result set.
1182            * </p>
1183            *
1184            * @param companyId the primary key of the company
1185            * @param name the role's name (optionally <code>null</code>)
1186            * @param description the role's description (optionally <code>null</code>)
1187            * @param types the role types (optionally <code>null</code>)
1188            * @param params the finder's parameters. Can specify values for the
1189            "usersRoles" key. For more information, see {@link
1190            com.liferay.portal.service.persistence.RoleFinder}
1191            * @param start the lower bound of the range of the roles to return
1192            * @param end the upper bound of the range of the roles to return (not
1193            inclusive)
1194            * @param obc the comparator to order the roles (optionally
1195            <code>null</code>)
1196            * @return the ordered range of the matching roles, ordered by
1197            <code>obc</code>
1198            * @throws SystemException if a system exception occurred
1199            * @see com.liferay.portal.service.persistence.RoleFinder
1200            */
1201            public java.util.List<com.liferay.portal.model.Role> search(
1202                    long companyId, java.lang.String name, java.lang.String description,
1203                    java.lang.Integer[] types,
1204                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1205                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
1206                    throws com.liferay.portal.kernel.exception.SystemException {
1207                    return _roleLocalService.search(companyId, name, description, types,
1208                            params, start, end, obc);
1209            }
1210    
1211            /**
1212            * Returns the number of roles that match the keywords and types.
1213            *
1214            * @param companyId the primary key of the company
1215            * @param keywords the keywords (space separated), which may occur in the
1216            role's name or description (optionally <code>null</code>)
1217            * @param types the role types (optionally <code>null</code>)
1218            * @return the number of matching roles
1219            * @throws SystemException if a system exception occurred
1220            */
1221            public int searchCount(long companyId, java.lang.String keywords,
1222                    java.lang.Integer[] types)
1223                    throws com.liferay.portal.kernel.exception.SystemException {
1224                    return _roleLocalService.searchCount(companyId, keywords, types);
1225            }
1226    
1227            /**
1228            * Returns the number of roles that match the keywords, types and params.
1229            *
1230            * @param companyId the primary key of the company
1231            * @param keywords the keywords (space separated), which may occur in the
1232            role's name or description (optionally <code>null</code>)
1233            * @param types the role types (optionally <code>null</code>)
1234            * @param params the finder parameters. For more information, see {@link
1235            com.liferay.portal.service.persistence.RoleFinder}
1236            * @return the number of matching roles
1237            * @throws SystemException if a system exception occurred
1238            */
1239            public int searchCount(long companyId, java.lang.String keywords,
1240                    java.lang.Integer[] types,
1241                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
1242                    throws com.liferay.portal.kernel.exception.SystemException {
1243                    return _roleLocalService.searchCount(companyId, keywords, types, params);
1244            }
1245    
1246            /**
1247            * Returns the number of roles that match the name, description, and types.
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            * @return the number of matching roles
1254            * @throws SystemException if a system exception occurred
1255            */
1256            public int searchCount(long companyId, java.lang.String name,
1257                    java.lang.String description, java.lang.Integer[] types)
1258                    throws com.liferay.portal.kernel.exception.SystemException {
1259                    return _roleLocalService.searchCount(companyId, name, description, types);
1260            }
1261    
1262            /**
1263            * Returns the number of roles that match the name, description, types, and
1264            * params.
1265            *
1266            * @param companyId the primary key of the company
1267            * @param name the role's name (optionally <code>null</code>)
1268            * @param description the role's description (optionally <code>null</code>)
1269            * @param types the role types (optionally <code>null</code>)
1270            * @param params the finder parameters. Can specify values for the
1271            "usersRoles" key. For more information, see {@link
1272            com.liferay.portal.service.persistence.RoleFinder}
1273            * @return the number of matching roles
1274            * @throws SystemException if a system exception occurred
1275            */
1276            public int searchCount(long companyId, java.lang.String name,
1277                    java.lang.String description, java.lang.Integer[] types,
1278                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
1279                    throws com.liferay.portal.kernel.exception.SystemException {
1280                    return _roleLocalService.searchCount(companyId, name, description,
1281                            types, params);
1282            }
1283    
1284            /**
1285            * Removes the matching roles associated with the user. The user is
1286            * reindexed after the roles are removed.
1287            *
1288            * @param userId the primary key of the user
1289            * @param roleIds the primary keys of the roles
1290            * @throws PortalException if a user with the primary key could not be found
1291            or if a role with any one of the primary keys could not be found
1292            * @throws SystemException if a system exception occurred
1293            */
1294            public void unsetUserRoles(long userId, long[] roleIds)
1295                    throws com.liferay.portal.kernel.exception.PortalException,
1296                            com.liferay.portal.kernel.exception.SystemException {
1297                    _roleLocalService.unsetUserRoles(userId, roleIds);
1298            }
1299    
1300            /**
1301            * Updates the role with the primary key.
1302            *
1303            * @param roleId the primary key of the role
1304            * @param name the role's new name
1305            * @param titleMap the new localized titles (optionally <code>null</code>)
1306            to replace those existing for the role
1307            * @param descriptionMap the new localized descriptions (optionally
1308            <code>null</code>) to replace those existing for the role
1309            * @param subtype the role's new subtype (optionally <code>null</code>)
1310            * @param serviceContext the service context to be applied (optionally
1311            <code>null</code>). Can set expando bridge attributes for the
1312            role.
1313            * @return the role with the primary key
1314            * @throws PortalException if a role with the primary could not be found or
1315            if the role's name was invalid
1316            * @throws SystemException if a system exception occurred
1317            */
1318            public com.liferay.portal.model.Role updateRole(long roleId,
1319                    java.lang.String name,
1320                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
1321                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
1322                    java.lang.String subtype,
1323                    com.liferay.portal.service.ServiceContext serviceContext)
1324                    throws com.liferay.portal.kernel.exception.PortalException,
1325                            com.liferay.portal.kernel.exception.SystemException {
1326                    return _roleLocalService.updateRole(roleId, name, titleMap,
1327                            descriptionMap, subtype, serviceContext);
1328            }
1329    
1330            /**
1331             * @deprecated As of 6.1.0, replaced by {@link #getWrappedService}
1332             */
1333            public RoleLocalService getWrappedRoleLocalService() {
1334                    return _roleLocalService;
1335            }
1336    
1337            /**
1338             * @deprecated As of 6.1.0, replaced by {@link #setWrappedService}
1339             */
1340            public void setWrappedRoleLocalService(RoleLocalService roleLocalService) {
1341                    _roleLocalService = roleLocalService;
1342            }
1343    
1344            public RoleLocalService getWrappedService() {
1345                    return _roleLocalService;
1346            }
1347    
1348            public void setWrappedService(RoleLocalService roleLocalService) {
1349                    _roleLocalService = roleLocalService;
1350            }
1351    
1352            private RoleLocalService _roleLocalService;
1353    }