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