001    /**
002     * Copyright (c) 2000-2011 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.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.model.Role;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import java.util.List;
025    
026    /**
027     * The persistence utility for the role service. This utility wraps {@link RolePersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
028     *
029     * <p>
030     * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
031     * </p>
032     *
033     * <p>
034     * Caching information and settings can be found in <code>portal.properties</code>
035     * </p>
036     *
037     * @author Brian Wing Shun Chan
038     * @see RolePersistence
039     * @see RolePersistenceImpl
040     * @generated
041     */
042    public class RoleUtil {
043            /**
044             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
045             */
046            public static void clearCache() {
047                    getPersistence().clearCache();
048            }
049    
050            /**
051             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
052             */
053            public static void clearCache(Role role) {
054                    getPersistence().clearCache(role);
055            }
056    
057            /**
058             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
059             */
060            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
061                    throws SystemException {
062                    return getPersistence().countWithDynamicQuery(dynamicQuery);
063            }
064    
065            /**
066             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
067             */
068            public static List<Role> findWithDynamicQuery(DynamicQuery dynamicQuery)
069                    throws SystemException {
070                    return getPersistence().findWithDynamicQuery(dynamicQuery);
071            }
072    
073            /**
074             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
075             */
076            public static List<Role> findWithDynamicQuery(DynamicQuery dynamicQuery,
077                    int start, int end) throws SystemException {
078                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
079            }
080    
081            /**
082             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
083             */
084            public static List<Role> findWithDynamicQuery(DynamicQuery dynamicQuery,
085                    int start, int end, OrderByComparator orderByComparator)
086                    throws SystemException {
087                    return getPersistence()
088                                       .findWithDynamicQuery(dynamicQuery, start, end,
089                            orderByComparator);
090            }
091    
092            /**
093             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
094             */
095            public static Role remove(Role role) throws SystemException {
096                    return getPersistence().remove(role);
097            }
098    
099            /**
100             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
101             */
102            public static Role update(Role role, boolean merge)
103                    throws SystemException {
104                    return getPersistence().update(role, merge);
105            }
106    
107            /**
108             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
109             */
110            public static Role update(Role role, boolean merge,
111                    ServiceContext serviceContext) throws SystemException {
112                    return getPersistence().update(role, merge, serviceContext);
113            }
114    
115            /**
116            * Caches the role in the entity cache if it is enabled.
117            *
118            * @param role the role to cache
119            */
120            public static void cacheResult(com.liferay.portal.model.Role role) {
121                    getPersistence().cacheResult(role);
122            }
123    
124            /**
125            * Caches the roles in the entity cache if it is enabled.
126            *
127            * @param roles the roles to cache
128            */
129            public static void cacheResult(
130                    java.util.List<com.liferay.portal.model.Role> roles) {
131                    getPersistence().cacheResult(roles);
132            }
133    
134            /**
135            * Creates a new role with the primary key. Does not add the role to the database.
136            *
137            * @param roleId the primary key for the new role
138            * @return the new role
139            */
140            public static com.liferay.portal.model.Role create(long roleId) {
141                    return getPersistence().create(roleId);
142            }
143    
144            /**
145            * Removes the role with the primary key from the database. Also notifies the appropriate model listeners.
146            *
147            * @param roleId the primary key of the role to remove
148            * @return the role that was removed
149            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
150            * @throws SystemException if a system exception occurred
151            */
152            public static com.liferay.portal.model.Role remove(long roleId)
153                    throws com.liferay.portal.NoSuchRoleException,
154                            com.liferay.portal.kernel.exception.SystemException {
155                    return getPersistence().remove(roleId);
156            }
157    
158            public static com.liferay.portal.model.Role updateImpl(
159                    com.liferay.portal.model.Role role, boolean merge)
160                    throws com.liferay.portal.kernel.exception.SystemException {
161                    return getPersistence().updateImpl(role, merge);
162            }
163    
164            /**
165            * Finds the role with the primary key or throws a {@link com.liferay.portal.NoSuchRoleException} if it could not be found.
166            *
167            * @param roleId the primary key of the role to find
168            * @return the role
169            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
170            * @throws SystemException if a system exception occurred
171            */
172            public static com.liferay.portal.model.Role findByPrimaryKey(long roleId)
173                    throws com.liferay.portal.NoSuchRoleException,
174                            com.liferay.portal.kernel.exception.SystemException {
175                    return getPersistence().findByPrimaryKey(roleId);
176            }
177    
178            /**
179            * Finds the role with the primary key or returns <code>null</code> if it could not be found.
180            *
181            * @param roleId the primary key of the role to find
182            * @return the role, or <code>null</code> if a role with the primary key could not be found
183            * @throws SystemException if a system exception occurred
184            */
185            public static com.liferay.portal.model.Role fetchByPrimaryKey(long roleId)
186                    throws com.liferay.portal.kernel.exception.SystemException {
187                    return getPersistence().fetchByPrimaryKey(roleId);
188            }
189    
190            /**
191            * Finds all the roles where companyId = &#63;.
192            *
193            * @param companyId the company id to search with
194            * @return the matching roles
195            * @throws SystemException if a system exception occurred
196            */
197            public static java.util.List<com.liferay.portal.model.Role> findByCompanyId(
198                    long companyId)
199                    throws com.liferay.portal.kernel.exception.SystemException {
200                    return getPersistence().findByCompanyId(companyId);
201            }
202    
203            /**
204            * Finds a range of all the roles where companyId = &#63;.
205            *
206            * <p>
207            * 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.
208            * </p>
209            *
210            * @param companyId the company id to search with
211            * @param start the lower bound of the range of roles to return
212            * @param end the upper bound of the range of roles to return (not inclusive)
213            * @return the range of matching roles
214            * @throws SystemException if a system exception occurred
215            */
216            public static java.util.List<com.liferay.portal.model.Role> findByCompanyId(
217                    long companyId, int start, int end)
218                    throws com.liferay.portal.kernel.exception.SystemException {
219                    return getPersistence().findByCompanyId(companyId, start, end);
220            }
221    
222            /**
223            * Finds an ordered range of all the roles where companyId = &#63;.
224            *
225            * <p>
226            * 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.
227            * </p>
228            *
229            * @param companyId the company id to search with
230            * @param start the lower bound of the range of roles to return
231            * @param end the upper bound of the range of roles to return (not inclusive)
232            * @param orderByComparator the comparator to order the results by
233            * @return the ordered range of matching roles
234            * @throws SystemException if a system exception occurred
235            */
236            public static java.util.List<com.liferay.portal.model.Role> findByCompanyId(
237                    long companyId, int start, int end,
238                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
239                    throws com.liferay.portal.kernel.exception.SystemException {
240                    return getPersistence()
241                                       .findByCompanyId(companyId, start, end, orderByComparator);
242            }
243    
244            /**
245            * Finds the first role in the ordered set where companyId = &#63;.
246            *
247            * <p>
248            * 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.
249            * </p>
250            *
251            * @param companyId the company id to search with
252            * @param orderByComparator the comparator to order the set by
253            * @return the first matching role
254            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
255            * @throws SystemException if a system exception occurred
256            */
257            public static com.liferay.portal.model.Role findByCompanyId_First(
258                    long companyId,
259                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
260                    throws com.liferay.portal.NoSuchRoleException,
261                            com.liferay.portal.kernel.exception.SystemException {
262                    return getPersistence()
263                                       .findByCompanyId_First(companyId, orderByComparator);
264            }
265    
266            /**
267            * Finds the last role in the ordered set where companyId = &#63;.
268            *
269            * <p>
270            * 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.
271            * </p>
272            *
273            * @param companyId the company id to search with
274            * @param orderByComparator the comparator to order the set by
275            * @return the last matching role
276            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
277            * @throws SystemException if a system exception occurred
278            */
279            public static com.liferay.portal.model.Role findByCompanyId_Last(
280                    long companyId,
281                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
282                    throws com.liferay.portal.NoSuchRoleException,
283                            com.liferay.portal.kernel.exception.SystemException {
284                    return getPersistence()
285                                       .findByCompanyId_Last(companyId, orderByComparator);
286            }
287    
288            /**
289            * Finds the roles before and after the current role in the ordered set where companyId = &#63;.
290            *
291            * <p>
292            * 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.
293            * </p>
294            *
295            * @param roleId the primary key of the current role
296            * @param companyId the company id to search with
297            * @param orderByComparator the comparator to order the set by
298            * @return the previous, current, and next role
299            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
300            * @throws SystemException if a system exception occurred
301            */
302            public static com.liferay.portal.model.Role[] findByCompanyId_PrevAndNext(
303                    long roleId, long companyId,
304                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
305                    throws com.liferay.portal.NoSuchRoleException,
306                            com.liferay.portal.kernel.exception.SystemException {
307                    return getPersistence()
308                                       .findByCompanyId_PrevAndNext(roleId, companyId,
309                            orderByComparator);
310            }
311    
312            /**
313            * Filters by the user's permissions and finds all the roles where companyId = &#63;.
314            *
315            * @param companyId the company id to search with
316            * @return the matching roles that the user has permission to view
317            * @throws SystemException if a system exception occurred
318            */
319            public static java.util.List<com.liferay.portal.model.Role> filterFindByCompanyId(
320                    long companyId)
321                    throws com.liferay.portal.kernel.exception.SystemException {
322                    return getPersistence().filterFindByCompanyId(companyId);
323            }
324    
325            /**
326            * Filters by the user's permissions and finds a range of all the roles where companyId = &#63;.
327            *
328            * <p>
329            * 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.
330            * </p>
331            *
332            * @param companyId the company id to search with
333            * @param start the lower bound of the range of roles to return
334            * @param end the upper bound of the range of roles to return (not inclusive)
335            * @return the range of matching roles that the user has permission to view
336            * @throws SystemException if a system exception occurred
337            */
338            public static java.util.List<com.liferay.portal.model.Role> filterFindByCompanyId(
339                    long companyId, int start, int end)
340                    throws com.liferay.portal.kernel.exception.SystemException {
341                    return getPersistence().filterFindByCompanyId(companyId, start, end);
342            }
343    
344            /**
345            * Filters by the user's permissions and finds an ordered range of all the roles where companyId = &#63;.
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.
349            * </p>
350            *
351            * @param companyId the company id to search with
352            * @param start the lower bound of the range of roles to return
353            * @param end the upper bound of the range of roles to return (not inclusive)
354            * @param orderByComparator the comparator to order the results by
355            * @return the ordered range of matching roles that the user has permission to view
356            * @throws SystemException if a system exception occurred
357            */
358            public static java.util.List<com.liferay.portal.model.Role> filterFindByCompanyId(
359                    long companyId, int start, int end,
360                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
361                    throws com.liferay.portal.kernel.exception.SystemException {
362                    return getPersistence()
363                                       .filterFindByCompanyId(companyId, start, end,
364                            orderByComparator);
365            }
366    
367            /**
368            * Finds all the roles where subtype = &#63;.
369            *
370            * @param subtype the subtype to search with
371            * @return the matching roles
372            * @throws SystemException if a system exception occurred
373            */
374            public static java.util.List<com.liferay.portal.model.Role> findBySubtype(
375                    java.lang.String subtype)
376                    throws com.liferay.portal.kernel.exception.SystemException {
377                    return getPersistence().findBySubtype(subtype);
378            }
379    
380            /**
381            * Finds a range of all the roles where subtype = &#63;.
382            *
383            * <p>
384            * 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.
385            * </p>
386            *
387            * @param subtype the subtype to search with
388            * @param start the lower bound of the range of roles to return
389            * @param end the upper bound of the range of roles to return (not inclusive)
390            * @return the range of matching roles
391            * @throws SystemException if a system exception occurred
392            */
393            public static java.util.List<com.liferay.portal.model.Role> findBySubtype(
394                    java.lang.String subtype, int start, int end)
395                    throws com.liferay.portal.kernel.exception.SystemException {
396                    return getPersistence().findBySubtype(subtype, start, end);
397            }
398    
399            /**
400            * Finds an ordered range of all the roles where subtype = &#63;.
401            *
402            * <p>
403            * 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.
404            * </p>
405            *
406            * @param subtype the subtype to search with
407            * @param start the lower bound of the range of roles to return
408            * @param end the upper bound of the range of roles to return (not inclusive)
409            * @param orderByComparator the comparator to order the results by
410            * @return the ordered range of matching roles
411            * @throws SystemException if a system exception occurred
412            */
413            public static java.util.List<com.liferay.portal.model.Role> findBySubtype(
414                    java.lang.String subtype, int start, int end,
415                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
416                    throws com.liferay.portal.kernel.exception.SystemException {
417                    return getPersistence()
418                                       .findBySubtype(subtype, start, end, orderByComparator);
419            }
420    
421            /**
422            * Finds the first role in the ordered set where subtype = &#63;.
423            *
424            * <p>
425            * 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.
426            * </p>
427            *
428            * @param subtype the subtype to search with
429            * @param orderByComparator the comparator to order the set by
430            * @return the first matching role
431            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
432            * @throws SystemException if a system exception occurred
433            */
434            public static com.liferay.portal.model.Role findBySubtype_First(
435                    java.lang.String subtype,
436                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
437                    throws com.liferay.portal.NoSuchRoleException,
438                            com.liferay.portal.kernel.exception.SystemException {
439                    return getPersistence().findBySubtype_First(subtype, orderByComparator);
440            }
441    
442            /**
443            * Finds the last role in the ordered set where subtype = &#63;.
444            *
445            * <p>
446            * 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.
447            * </p>
448            *
449            * @param subtype the subtype to search with
450            * @param orderByComparator the comparator to order the set by
451            * @return the last matching role
452            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
453            * @throws SystemException if a system exception occurred
454            */
455            public static com.liferay.portal.model.Role findBySubtype_Last(
456                    java.lang.String subtype,
457                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
458                    throws com.liferay.portal.NoSuchRoleException,
459                            com.liferay.portal.kernel.exception.SystemException {
460                    return getPersistence().findBySubtype_Last(subtype, orderByComparator);
461            }
462    
463            /**
464            * Finds the roles before and after the current role in the ordered set where subtype = &#63;.
465            *
466            * <p>
467            * 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.
468            * </p>
469            *
470            * @param roleId the primary key of the current role
471            * @param subtype the subtype to search with
472            * @param orderByComparator the comparator to order the set by
473            * @return the previous, current, and next role
474            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
475            * @throws SystemException if a system exception occurred
476            */
477            public static com.liferay.portal.model.Role[] findBySubtype_PrevAndNext(
478                    long roleId, java.lang.String subtype,
479                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
480                    throws com.liferay.portal.NoSuchRoleException,
481                            com.liferay.portal.kernel.exception.SystemException {
482                    return getPersistence()
483                                       .findBySubtype_PrevAndNext(roleId, subtype, orderByComparator);
484            }
485    
486            /**
487            * Filters by the user's permissions and finds all the roles where subtype = &#63;.
488            *
489            * @param subtype the subtype to search with
490            * @return the matching roles that the user has permission to view
491            * @throws SystemException if a system exception occurred
492            */
493            public static java.util.List<com.liferay.portal.model.Role> filterFindBySubtype(
494                    java.lang.String subtype)
495                    throws com.liferay.portal.kernel.exception.SystemException {
496                    return getPersistence().filterFindBySubtype(subtype);
497            }
498    
499            /**
500            * Filters by the user's permissions and finds a range of all the roles where subtype = &#63;.
501            *
502            * <p>
503            * 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.
504            * </p>
505            *
506            * @param subtype the subtype to search with
507            * @param start the lower bound of the range of roles to return
508            * @param end the upper bound of the range of roles to return (not inclusive)
509            * @return the range of matching roles that the user has permission to view
510            * @throws SystemException if a system exception occurred
511            */
512            public static java.util.List<com.liferay.portal.model.Role> filterFindBySubtype(
513                    java.lang.String subtype, int start, int end)
514                    throws com.liferay.portal.kernel.exception.SystemException {
515                    return getPersistence().filterFindBySubtype(subtype, start, end);
516            }
517    
518            /**
519            * Filters by the user's permissions and finds an ordered range of all the roles where subtype = &#63;.
520            *
521            * <p>
522            * 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.
523            * </p>
524            *
525            * @param subtype the subtype to search with
526            * @param start the lower bound of the range of roles to return
527            * @param end the upper bound of the range of roles to return (not inclusive)
528            * @param orderByComparator the comparator to order the results by
529            * @return the ordered range of matching roles that the user has permission to view
530            * @throws SystemException if a system exception occurred
531            */
532            public static java.util.List<com.liferay.portal.model.Role> filterFindBySubtype(
533                    java.lang.String subtype, int start, int end,
534                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
535                    throws com.liferay.portal.kernel.exception.SystemException {
536                    return getPersistence()
537                                       .filterFindBySubtype(subtype, start, end, orderByComparator);
538            }
539    
540            /**
541            * Finds the role where companyId = &#63; and name = &#63; or throws a {@link com.liferay.portal.NoSuchRoleException} if it could not be found.
542            *
543            * @param companyId the company id to search with
544            * @param name the name to search with
545            * @return the matching role
546            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
547            * @throws SystemException if a system exception occurred
548            */
549            public static com.liferay.portal.model.Role findByC_N(long companyId,
550                    java.lang.String name)
551                    throws com.liferay.portal.NoSuchRoleException,
552                            com.liferay.portal.kernel.exception.SystemException {
553                    return getPersistence().findByC_N(companyId, name);
554            }
555    
556            /**
557            * Finds the role where companyId = &#63; and name = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
558            *
559            * @param companyId the company id to search with
560            * @param name the name to search with
561            * @return the matching role, or <code>null</code> if a matching role could not be found
562            * @throws SystemException if a system exception occurred
563            */
564            public static com.liferay.portal.model.Role fetchByC_N(long companyId,
565                    java.lang.String name)
566                    throws com.liferay.portal.kernel.exception.SystemException {
567                    return getPersistence().fetchByC_N(companyId, name);
568            }
569    
570            /**
571            * Finds the role where companyId = &#63; and name = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
572            *
573            * @param companyId the company id to search with
574            * @param name the name to search with
575            * @return the matching role, or <code>null</code> if a matching role could not be found
576            * @throws SystemException if a system exception occurred
577            */
578            public static com.liferay.portal.model.Role fetchByC_N(long companyId,
579                    java.lang.String name, boolean retrieveFromCache)
580                    throws com.liferay.portal.kernel.exception.SystemException {
581                    return getPersistence().fetchByC_N(companyId, name, retrieveFromCache);
582            }
583    
584            /**
585            * Finds all the roles where type = &#63; and subtype = &#63;.
586            *
587            * @param type the type to search with
588            * @param subtype the subtype to search with
589            * @return the matching roles
590            * @throws SystemException if a system exception occurred
591            */
592            public static java.util.List<com.liferay.portal.model.Role> findByT_S(
593                    int type, java.lang.String subtype)
594                    throws com.liferay.portal.kernel.exception.SystemException {
595                    return getPersistence().findByT_S(type, subtype);
596            }
597    
598            /**
599            * Finds a range of all the roles where type = &#63; and subtype = &#63;.
600            *
601            * <p>
602            * 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.
603            * </p>
604            *
605            * @param type the type to search with
606            * @param subtype the subtype to search with
607            * @param start the lower bound of the range of roles to return
608            * @param end the upper bound of the range of roles to return (not inclusive)
609            * @return the range of matching roles
610            * @throws SystemException if a system exception occurred
611            */
612            public static java.util.List<com.liferay.portal.model.Role> findByT_S(
613                    int type, java.lang.String subtype, int start, int end)
614                    throws com.liferay.portal.kernel.exception.SystemException {
615                    return getPersistence().findByT_S(type, subtype, start, end);
616            }
617    
618            /**
619            * Finds an ordered range of all the roles where type = &#63; and subtype = &#63;.
620            *
621            * <p>
622            * 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.
623            * </p>
624            *
625            * @param type the type to search with
626            * @param subtype the subtype to search with
627            * @param start the lower bound of the range of roles to return
628            * @param end the upper bound of the range of roles to return (not inclusive)
629            * @param orderByComparator the comparator to order the results by
630            * @return the ordered range of matching roles
631            * @throws SystemException if a system exception occurred
632            */
633            public static java.util.List<com.liferay.portal.model.Role> findByT_S(
634                    int type, java.lang.String subtype, int start, int end,
635                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
636                    throws com.liferay.portal.kernel.exception.SystemException {
637                    return getPersistence()
638                                       .findByT_S(type, subtype, start, end, orderByComparator);
639            }
640    
641            /**
642            * Finds the first role in the ordered set where type = &#63; and subtype = &#63;.
643            *
644            * <p>
645            * 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.
646            * </p>
647            *
648            * @param type the type to search with
649            * @param subtype the subtype to search with
650            * @param orderByComparator the comparator to order the set by
651            * @return the first matching role
652            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
653            * @throws SystemException if a system exception occurred
654            */
655            public static com.liferay.portal.model.Role findByT_S_First(int type,
656                    java.lang.String subtype,
657                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
658                    throws com.liferay.portal.NoSuchRoleException,
659                            com.liferay.portal.kernel.exception.SystemException {
660                    return getPersistence().findByT_S_First(type, subtype, orderByComparator);
661            }
662    
663            /**
664            * Finds the last role in the ordered set where type = &#63; and subtype = &#63;.
665            *
666            * <p>
667            * 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.
668            * </p>
669            *
670            * @param type the type to search with
671            * @param subtype the subtype to search with
672            * @param orderByComparator the comparator to order the set by
673            * @return the last matching role
674            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
675            * @throws SystemException if a system exception occurred
676            */
677            public static com.liferay.portal.model.Role findByT_S_Last(int type,
678                    java.lang.String subtype,
679                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
680                    throws com.liferay.portal.NoSuchRoleException,
681                            com.liferay.portal.kernel.exception.SystemException {
682                    return getPersistence().findByT_S_Last(type, subtype, orderByComparator);
683            }
684    
685            /**
686            * Finds the roles before and after the current role in the ordered set where type = &#63; and subtype = &#63;.
687            *
688            * <p>
689            * 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.
690            * </p>
691            *
692            * @param roleId the primary key of the current role
693            * @param type the type to search with
694            * @param subtype the subtype to search with
695            * @param orderByComparator the comparator to order the set by
696            * @return the previous, current, and next role
697            * @throws com.liferay.portal.NoSuchRoleException if a role with the primary key could not be found
698            * @throws SystemException if a system exception occurred
699            */
700            public static com.liferay.portal.model.Role[] findByT_S_PrevAndNext(
701                    long roleId, int type, java.lang.String subtype,
702                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
703                    throws com.liferay.portal.NoSuchRoleException,
704                            com.liferay.portal.kernel.exception.SystemException {
705                    return getPersistence()
706                                       .findByT_S_PrevAndNext(roleId, type, subtype,
707                            orderByComparator);
708            }
709    
710            /**
711            * Filters by the user's permissions and finds all the roles where type = &#63; and subtype = &#63;.
712            *
713            * @param type the type to search with
714            * @param subtype the subtype to search with
715            * @return the matching roles that the user has permission to view
716            * @throws SystemException if a system exception occurred
717            */
718            public static java.util.List<com.liferay.portal.model.Role> filterFindByT_S(
719                    int type, java.lang.String subtype)
720                    throws com.liferay.portal.kernel.exception.SystemException {
721                    return getPersistence().filterFindByT_S(type, subtype);
722            }
723    
724            /**
725            * Filters by the user's permissions and finds a range of all the roles where type = &#63; and subtype = &#63;.
726            *
727            * <p>
728            * 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.
729            * </p>
730            *
731            * @param type the type to search with
732            * @param subtype the subtype to search with
733            * @param start the lower bound of the range of roles to return
734            * @param end the upper bound of the range of roles to return (not inclusive)
735            * @return the range of matching roles that the user has permission to view
736            * @throws SystemException if a system exception occurred
737            */
738            public static java.util.List<com.liferay.portal.model.Role> filterFindByT_S(
739                    int type, java.lang.String subtype, int start, int end)
740                    throws com.liferay.portal.kernel.exception.SystemException {
741                    return getPersistence().filterFindByT_S(type, subtype, start, end);
742            }
743    
744            /**
745            * Filters by the user's permissions and finds an ordered range of all the roles where type = &#63; and subtype = &#63;.
746            *
747            * <p>
748            * 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.
749            * </p>
750            *
751            * @param type the type to search with
752            * @param subtype the subtype to search with
753            * @param start the lower bound of the range of roles to return
754            * @param end the upper bound of the range of roles to return (not inclusive)
755            * @param orderByComparator the comparator to order the results by
756            * @return the ordered range of matching roles that the user has permission to view
757            * @throws SystemException if a system exception occurred
758            */
759            public static java.util.List<com.liferay.portal.model.Role> filterFindByT_S(
760                    int type, java.lang.String subtype, int start, int end,
761                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
762                    throws com.liferay.portal.kernel.exception.SystemException {
763                    return getPersistence()
764                                       .filterFindByT_S(type, subtype, start, end, orderByComparator);
765            }
766    
767            /**
768            * Finds the role where companyId = &#63; and classNameId = &#63; and classPK = &#63; or throws a {@link com.liferay.portal.NoSuchRoleException} if it could not be found.
769            *
770            * @param companyId the company id to search with
771            * @param classNameId the class name id to search with
772            * @param classPK the class p k to search with
773            * @return the matching role
774            * @throws com.liferay.portal.NoSuchRoleException if a matching role could not be found
775            * @throws SystemException if a system exception occurred
776            */
777            public static com.liferay.portal.model.Role findByC_C_C(long companyId,
778                    long classNameId, long classPK)
779                    throws com.liferay.portal.NoSuchRoleException,
780                            com.liferay.portal.kernel.exception.SystemException {
781                    return getPersistence().findByC_C_C(companyId, classNameId, classPK);
782            }
783    
784            /**
785            * Finds the role where companyId = &#63; and classNameId = &#63; and classPK = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
786            *
787            * @param companyId the company id to search with
788            * @param classNameId the class name id to search with
789            * @param classPK the class p k to search with
790            * @return the matching role, or <code>null</code> if a matching role could not be found
791            * @throws SystemException if a system exception occurred
792            */
793            public static com.liferay.portal.model.Role fetchByC_C_C(long companyId,
794                    long classNameId, long classPK)
795                    throws com.liferay.portal.kernel.exception.SystemException {
796                    return getPersistence().fetchByC_C_C(companyId, classNameId, classPK);
797            }
798    
799            /**
800            * Finds the role where companyId = &#63; and classNameId = &#63; and classPK = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
801            *
802            * @param companyId the company id to search with
803            * @param classNameId the class name id to search with
804            * @param classPK the class p k to search with
805            * @return the matching role, or <code>null</code> if a matching role could not be found
806            * @throws SystemException if a system exception occurred
807            */
808            public static com.liferay.portal.model.Role fetchByC_C_C(long companyId,
809                    long classNameId, long classPK, boolean retrieveFromCache)
810                    throws com.liferay.portal.kernel.exception.SystemException {
811                    return getPersistence()
812                                       .fetchByC_C_C(companyId, classNameId, classPK,
813                            retrieveFromCache);
814            }
815    
816            /**
817            * Finds all the roles.
818            *
819            * @return the roles
820            * @throws SystemException if a system exception occurred
821            */
822            public static java.util.List<com.liferay.portal.model.Role> findAll()
823                    throws com.liferay.portal.kernel.exception.SystemException {
824                    return getPersistence().findAll();
825            }
826    
827            /**
828            * Finds a range of all the roles.
829            *
830            * <p>
831            * 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.
832            * </p>
833            *
834            * @param start the lower bound of the range of roles to return
835            * @param end the upper bound of the range of roles to return (not inclusive)
836            * @return the range of roles
837            * @throws SystemException if a system exception occurred
838            */
839            public static java.util.List<com.liferay.portal.model.Role> findAll(
840                    int start, int end)
841                    throws com.liferay.portal.kernel.exception.SystemException {
842                    return getPersistence().findAll(start, end);
843            }
844    
845            /**
846            * Finds an ordered range of all the roles.
847            *
848            * <p>
849            * 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.
850            * </p>
851            *
852            * @param start the lower bound of the range of roles to return
853            * @param end the upper bound of the range of roles to return (not inclusive)
854            * @param orderByComparator the comparator to order the results by
855            * @return the ordered range of roles
856            * @throws SystemException if a system exception occurred
857            */
858            public static java.util.List<com.liferay.portal.model.Role> findAll(
859                    int start, int end,
860                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
861                    throws com.liferay.portal.kernel.exception.SystemException {
862                    return getPersistence().findAll(start, end, orderByComparator);
863            }
864    
865            /**
866            * Removes all the roles where companyId = &#63; from the database.
867            *
868            * @param companyId the company id to search with
869            * @throws SystemException if a system exception occurred
870            */
871            public static void removeByCompanyId(long companyId)
872                    throws com.liferay.portal.kernel.exception.SystemException {
873                    getPersistence().removeByCompanyId(companyId);
874            }
875    
876            /**
877            * Removes all the roles where subtype = &#63; from the database.
878            *
879            * @param subtype the subtype to search with
880            * @throws SystemException if a system exception occurred
881            */
882            public static void removeBySubtype(java.lang.String subtype)
883                    throws com.liferay.portal.kernel.exception.SystemException {
884                    getPersistence().removeBySubtype(subtype);
885            }
886    
887            /**
888            * Removes the role where companyId = &#63; and name = &#63; from the database.
889            *
890            * @param companyId the company id to search with
891            * @param name the name to search with
892            * @throws SystemException if a system exception occurred
893            */
894            public static void removeByC_N(long companyId, java.lang.String name)
895                    throws com.liferay.portal.NoSuchRoleException,
896                            com.liferay.portal.kernel.exception.SystemException {
897                    getPersistence().removeByC_N(companyId, name);
898            }
899    
900            /**
901            * Removes all the roles where type = &#63; and subtype = &#63; from the database.
902            *
903            * @param type the type to search with
904            * @param subtype the subtype to search with
905            * @throws SystemException if a system exception occurred
906            */
907            public static void removeByT_S(int type, java.lang.String subtype)
908                    throws com.liferay.portal.kernel.exception.SystemException {
909                    getPersistence().removeByT_S(type, subtype);
910            }
911    
912            /**
913            * Removes the role where companyId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
914            *
915            * @param companyId the company id to search with
916            * @param classNameId the class name id to search with
917            * @param classPK the class p k to search with
918            * @throws SystemException if a system exception occurred
919            */
920            public static void removeByC_C_C(long companyId, long classNameId,
921                    long classPK)
922                    throws com.liferay.portal.NoSuchRoleException,
923                            com.liferay.portal.kernel.exception.SystemException {
924                    getPersistence().removeByC_C_C(companyId, classNameId, classPK);
925            }
926    
927            /**
928            * Removes all the roles from the database.
929            *
930            * @throws SystemException if a system exception occurred
931            */
932            public static void removeAll()
933                    throws com.liferay.portal.kernel.exception.SystemException {
934                    getPersistence().removeAll();
935            }
936    
937            /**
938            * Counts all the roles where companyId = &#63;.
939            *
940            * @param companyId the company id to search with
941            * @return the number of matching roles
942            * @throws SystemException if a system exception occurred
943            */
944            public static int countByCompanyId(long companyId)
945                    throws com.liferay.portal.kernel.exception.SystemException {
946                    return getPersistence().countByCompanyId(companyId);
947            }
948    
949            /**
950            * Filters by the user's permissions and counts all the roles where companyId = &#63;.
951            *
952            * @param companyId the company id to search with
953            * @return the number of matching roles that the user has permission to view
954            * @throws SystemException if a system exception occurred
955            */
956            public static int filterCountByCompanyId(long companyId)
957                    throws com.liferay.portal.kernel.exception.SystemException {
958                    return getPersistence().filterCountByCompanyId(companyId);
959            }
960    
961            /**
962            * Counts all the roles where subtype = &#63;.
963            *
964            * @param subtype the subtype to search with
965            * @return the number of matching roles
966            * @throws SystemException if a system exception occurred
967            */
968            public static int countBySubtype(java.lang.String subtype)
969                    throws com.liferay.portal.kernel.exception.SystemException {
970                    return getPersistence().countBySubtype(subtype);
971            }
972    
973            /**
974            * Filters by the user's permissions and counts all the roles where subtype = &#63;.
975            *
976            * @param subtype the subtype to search with
977            * @return the number of matching roles that the user has permission to view
978            * @throws SystemException if a system exception occurred
979            */
980            public static int filterCountBySubtype(java.lang.String subtype)
981                    throws com.liferay.portal.kernel.exception.SystemException {
982                    return getPersistence().filterCountBySubtype(subtype);
983            }
984    
985            /**
986            * Counts all the roles where companyId = &#63; and name = &#63;.
987            *
988            * @param companyId the company id to search with
989            * @param name the name to search with
990            * @return the number of matching roles
991            * @throws SystemException if a system exception occurred
992            */
993            public static int countByC_N(long companyId, java.lang.String name)
994                    throws com.liferay.portal.kernel.exception.SystemException {
995                    return getPersistence().countByC_N(companyId, name);
996            }
997    
998            /**
999            * Counts all the roles where type = &#63; and subtype = &#63;.
1000            *
1001            * @param type the type to search with
1002            * @param subtype the subtype to search with
1003            * @return the number of matching roles
1004            * @throws SystemException if a system exception occurred
1005            */
1006            public static int countByT_S(int type, java.lang.String subtype)
1007                    throws com.liferay.portal.kernel.exception.SystemException {
1008                    return getPersistence().countByT_S(type, subtype);
1009            }
1010    
1011            /**
1012            * Filters by the user's permissions and counts all the roles where type = &#63; and subtype = &#63;.
1013            *
1014            * @param type the type to search with
1015            * @param subtype the subtype to search with
1016            * @return the number of matching roles that the user has permission to view
1017            * @throws SystemException if a system exception occurred
1018            */
1019            public static int filterCountByT_S(int type, java.lang.String subtype)
1020                    throws com.liferay.portal.kernel.exception.SystemException {
1021                    return getPersistence().filterCountByT_S(type, subtype);
1022            }
1023    
1024            /**
1025            * Counts all the roles where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
1026            *
1027            * @param companyId the company id to search with
1028            * @param classNameId the class name id to search with
1029            * @param classPK the class p k to search with
1030            * @return the number of matching roles
1031            * @throws SystemException if a system exception occurred
1032            */
1033            public static int countByC_C_C(long companyId, long classNameId,
1034                    long classPK)
1035                    throws com.liferay.portal.kernel.exception.SystemException {
1036                    return getPersistence().countByC_C_C(companyId, classNameId, classPK);
1037            }
1038    
1039            /**
1040            * Counts all the roles.
1041            *
1042            * @return the number of roles
1043            * @throws SystemException if a system exception occurred
1044            */
1045            public static int countAll()
1046                    throws com.liferay.portal.kernel.exception.SystemException {
1047                    return getPersistence().countAll();
1048            }
1049    
1050            /**
1051            * Gets all the groups associated with the role.
1052            *
1053            * @param pk the primary key of the role to get the associated groups for
1054            * @return the groups associated with the role
1055            * @throws SystemException if a system exception occurred
1056            */
1057            public static java.util.List<com.liferay.portal.model.Group> getGroups(
1058                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
1059                    return getPersistence().getGroups(pk);
1060            }
1061    
1062            /**
1063            * Gets a range of all the groups associated with the role.
1064            *
1065            * <p>
1066            * 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.
1067            * </p>
1068            *
1069            * @param pk the primary key of the role to get the associated groups for
1070            * @param start the lower bound of the range of roles to return
1071            * @param end the upper bound of the range of roles to return (not inclusive)
1072            * @return the range of groups associated with the role
1073            * @throws SystemException if a system exception occurred
1074            */
1075            public static java.util.List<com.liferay.portal.model.Group> getGroups(
1076                    long pk, int start, int end)
1077                    throws com.liferay.portal.kernel.exception.SystemException {
1078                    return getPersistence().getGroups(pk, start, end);
1079            }
1080    
1081            /**
1082            * Gets an ordered range of all the groups associated with the role.
1083            *
1084            * <p>
1085            * 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.
1086            * </p>
1087            *
1088            * @param pk the primary key of the role to get the associated groups for
1089            * @param start the lower bound of the range of roles to return
1090            * @param end the upper bound of the range of roles to return (not inclusive)
1091            * @param orderByComparator the comparator to order the results by
1092            * @return the ordered range of groups associated with the role
1093            * @throws SystemException if a system exception occurred
1094            */
1095            public static java.util.List<com.liferay.portal.model.Group> getGroups(
1096                    long pk, int start, int end,
1097                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1098                    throws com.liferay.portal.kernel.exception.SystemException {
1099                    return getPersistence().getGroups(pk, start, end, orderByComparator);
1100            }
1101    
1102            /**
1103            * Gets the number of groups associated with the role.
1104            *
1105            * @param pk the primary key of the role to get the number of associated groups for
1106            * @return the number of groups associated with the role
1107            * @throws SystemException if a system exception occurred
1108            */
1109            public static int getGroupsSize(long pk)
1110                    throws com.liferay.portal.kernel.exception.SystemException {
1111                    return getPersistence().getGroupsSize(pk);
1112            }
1113    
1114            /**
1115            * Determines if the group is associated with the role.
1116            *
1117            * @param pk the primary key of the role
1118            * @param groupPK the primary key of the group
1119            * @return <code>true</code> if the group is associated with the role; <code>false</code> otherwise
1120            * @throws SystemException if a system exception occurred
1121            */
1122            public static boolean containsGroup(long pk, long groupPK)
1123                    throws com.liferay.portal.kernel.exception.SystemException {
1124                    return getPersistence().containsGroup(pk, groupPK);
1125            }
1126    
1127            /**
1128            * Determines if the role has any groups associated with it.
1129            *
1130            * @param pk the primary key of the role to check for associations with groups
1131            * @return <code>true</code> if the role has any groups associated with it; <code>false</code> otherwise
1132            * @throws SystemException if a system exception occurred
1133            */
1134            public static boolean containsGroups(long pk)
1135                    throws com.liferay.portal.kernel.exception.SystemException {
1136                    return getPersistence().containsGroups(pk);
1137            }
1138    
1139            /**
1140            * Adds an association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1141            *
1142            * @param pk the primary key of the role
1143            * @param groupPK the primary key of the group
1144            * @throws SystemException if a system exception occurred
1145            */
1146            public static void addGroup(long pk, long groupPK)
1147                    throws com.liferay.portal.kernel.exception.SystemException {
1148                    getPersistence().addGroup(pk, groupPK);
1149            }
1150    
1151            /**
1152            * Adds an association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1153            *
1154            * @param pk the primary key of the role
1155            * @param group the group
1156            * @throws SystemException if a system exception occurred
1157            */
1158            public static void addGroup(long pk, com.liferay.portal.model.Group group)
1159                    throws com.liferay.portal.kernel.exception.SystemException {
1160                    getPersistence().addGroup(pk, group);
1161            }
1162    
1163            /**
1164            * Adds an association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1165            *
1166            * @param pk the primary key of the role
1167            * @param groupPKs the primary keys of the groups
1168            * @throws SystemException if a system exception occurred
1169            */
1170            public static void addGroups(long pk, long[] groupPKs)
1171                    throws com.liferay.portal.kernel.exception.SystemException {
1172                    getPersistence().addGroups(pk, groupPKs);
1173            }
1174    
1175            /**
1176            * Adds an association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1177            *
1178            * @param pk the primary key of the role
1179            * @param groups the groups
1180            * @throws SystemException if a system exception occurred
1181            */
1182            public static void addGroups(long pk,
1183                    java.util.List<com.liferay.portal.model.Group> groups)
1184                    throws com.liferay.portal.kernel.exception.SystemException {
1185                    getPersistence().addGroups(pk, groups);
1186            }
1187    
1188            /**
1189            * Clears all associations between the role and its groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1190            *
1191            * @param pk the primary key of the role to clear the associated groups from
1192            * @throws SystemException if a system exception occurred
1193            */
1194            public static void clearGroups(long pk)
1195                    throws com.liferay.portal.kernel.exception.SystemException {
1196                    getPersistence().clearGroups(pk);
1197            }
1198    
1199            /**
1200            * Removes the association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1201            *
1202            * @param pk the primary key of the role
1203            * @param groupPK the primary key of the group
1204            * @throws SystemException if a system exception occurred
1205            */
1206            public static void removeGroup(long pk, long groupPK)
1207                    throws com.liferay.portal.kernel.exception.SystemException {
1208                    getPersistence().removeGroup(pk, groupPK);
1209            }
1210    
1211            /**
1212            * Removes the association between the role and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1213            *
1214            * @param pk the primary key of the role
1215            * @param group the group
1216            * @throws SystemException if a system exception occurred
1217            */
1218            public static void removeGroup(long pk, com.liferay.portal.model.Group group)
1219                    throws com.liferay.portal.kernel.exception.SystemException {
1220                    getPersistence().removeGroup(pk, group);
1221            }
1222    
1223            /**
1224            * Removes the association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1225            *
1226            * @param pk the primary key of the role
1227            * @param groupPKs the primary keys of the groups
1228            * @throws SystemException if a system exception occurred
1229            */
1230            public static void removeGroups(long pk, long[] groupPKs)
1231                    throws com.liferay.portal.kernel.exception.SystemException {
1232                    getPersistence().removeGroups(pk, groupPKs);
1233            }
1234    
1235            /**
1236            * Removes the association between the role and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1237            *
1238            * @param pk the primary key of the role
1239            * @param groups the groups
1240            * @throws SystemException if a system exception occurred
1241            */
1242            public static void removeGroups(long pk,
1243                    java.util.List<com.liferay.portal.model.Group> groups)
1244                    throws com.liferay.portal.kernel.exception.SystemException {
1245                    getPersistence().removeGroups(pk, groups);
1246            }
1247    
1248            /**
1249            * Sets the groups associated with the role, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1250            *
1251            * @param pk the primary key of the role to set the associations for
1252            * @param groupPKs the primary keys of the groups to be associated with the role
1253            * @throws SystemException if a system exception occurred
1254            */
1255            public static void setGroups(long pk, long[] groupPKs)
1256                    throws com.liferay.portal.kernel.exception.SystemException {
1257                    getPersistence().setGroups(pk, groupPKs);
1258            }
1259    
1260            /**
1261            * Sets the groups associated with the role, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1262            *
1263            * @param pk the primary key of the role to set the associations for
1264            * @param groups the groups to be associated with the role
1265            * @throws SystemException if a system exception occurred
1266            */
1267            public static void setGroups(long pk,
1268                    java.util.List<com.liferay.portal.model.Group> groups)
1269                    throws com.liferay.portal.kernel.exception.SystemException {
1270                    getPersistence().setGroups(pk, groups);
1271            }
1272    
1273            /**
1274            * Gets all the permissions associated with the role.
1275            *
1276            * @param pk the primary key of the role to get the associated permissions for
1277            * @return the permissions associated with the role
1278            * @throws SystemException if a system exception occurred
1279            */
1280            public static java.util.List<com.liferay.portal.model.Permission> getPermissions(
1281                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
1282                    return getPersistence().getPermissions(pk);
1283            }
1284    
1285            /**
1286            * Gets a range of all the permissions associated with the role.
1287            *
1288            * <p>
1289            * 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.
1290            * </p>
1291            *
1292            * @param pk the primary key of the role to get the associated permissions for
1293            * @param start the lower bound of the range of roles to return
1294            * @param end the upper bound of the range of roles to return (not inclusive)
1295            * @return the range of permissions associated with the role
1296            * @throws SystemException if a system exception occurred
1297            */
1298            public static java.util.List<com.liferay.portal.model.Permission> getPermissions(
1299                    long pk, int start, int end)
1300                    throws com.liferay.portal.kernel.exception.SystemException {
1301                    return getPersistence().getPermissions(pk, start, end);
1302            }
1303    
1304            /**
1305            * Gets an ordered range of all the permissions associated with the role.
1306            *
1307            * <p>
1308            * 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.
1309            * </p>
1310            *
1311            * @param pk the primary key of the role to get the associated permissions for
1312            * @param start the lower bound of the range of roles to return
1313            * @param end the upper bound of the range of roles to return (not inclusive)
1314            * @param orderByComparator the comparator to order the results by
1315            * @return the ordered range of permissions associated with the role
1316            * @throws SystemException if a system exception occurred
1317            */
1318            public static java.util.List<com.liferay.portal.model.Permission> getPermissions(
1319                    long pk, int start, int end,
1320                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1321                    throws com.liferay.portal.kernel.exception.SystemException {
1322                    return getPersistence().getPermissions(pk, start, end, orderByComparator);
1323            }
1324    
1325            /**
1326            * Gets the number of permissions associated with the role.
1327            *
1328            * @param pk the primary key of the role to get the number of associated permissions for
1329            * @return the number of permissions associated with the role
1330            * @throws SystemException if a system exception occurred
1331            */
1332            public static int getPermissionsSize(long pk)
1333                    throws com.liferay.portal.kernel.exception.SystemException {
1334                    return getPersistence().getPermissionsSize(pk);
1335            }
1336    
1337            /**
1338            * Determines if the permission is associated with the role.
1339            *
1340            * @param pk the primary key of the role
1341            * @param permissionPK the primary key of the permission
1342            * @return <code>true</code> if the permission is associated with the role; <code>false</code> otherwise
1343            * @throws SystemException if a system exception occurred
1344            */
1345            public static boolean containsPermission(long pk, long permissionPK)
1346                    throws com.liferay.portal.kernel.exception.SystemException {
1347                    return getPersistence().containsPermission(pk, permissionPK);
1348            }
1349    
1350            /**
1351            * Determines if the role has any permissions associated with it.
1352            *
1353            * @param pk the primary key of the role to check for associations with permissions
1354            * @return <code>true</code> if the role has any permissions associated with it; <code>false</code> otherwise
1355            * @throws SystemException if a system exception occurred
1356            */
1357            public static boolean containsPermissions(long pk)
1358                    throws com.liferay.portal.kernel.exception.SystemException {
1359                    return getPersistence().containsPermissions(pk);
1360            }
1361    
1362            /**
1363            * Adds an association between the role and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1364            *
1365            * @param pk the primary key of the role
1366            * @param permissionPK the primary key of the permission
1367            * @throws SystemException if a system exception occurred
1368            */
1369            public static void addPermission(long pk, long permissionPK)
1370                    throws com.liferay.portal.kernel.exception.SystemException {
1371                    getPersistence().addPermission(pk, permissionPK);
1372            }
1373    
1374            /**
1375            * Adds an association between the role and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1376            *
1377            * @param pk the primary key of the role
1378            * @param permission the permission
1379            * @throws SystemException if a system exception occurred
1380            */
1381            public static void addPermission(long pk,
1382                    com.liferay.portal.model.Permission permission)
1383                    throws com.liferay.portal.kernel.exception.SystemException {
1384                    getPersistence().addPermission(pk, permission);
1385            }
1386    
1387            /**
1388            * Adds an association between the role and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1389            *
1390            * @param pk the primary key of the role
1391            * @param permissionPKs the primary keys of the permissions
1392            * @throws SystemException if a system exception occurred
1393            */
1394            public static void addPermissions(long pk, long[] permissionPKs)
1395                    throws com.liferay.portal.kernel.exception.SystemException {
1396                    getPersistence().addPermissions(pk, permissionPKs);
1397            }
1398    
1399            /**
1400            * Adds an association between the role and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1401            *
1402            * @param pk the primary key of the role
1403            * @param permissions the permissions
1404            * @throws SystemException if a system exception occurred
1405            */
1406            public static void addPermissions(long pk,
1407                    java.util.List<com.liferay.portal.model.Permission> permissions)
1408                    throws com.liferay.portal.kernel.exception.SystemException {
1409                    getPersistence().addPermissions(pk, permissions);
1410            }
1411    
1412            /**
1413            * Clears all associations between the role and its permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1414            *
1415            * @param pk the primary key of the role to clear the associated permissions from
1416            * @throws SystemException if a system exception occurred
1417            */
1418            public static void clearPermissions(long pk)
1419                    throws com.liferay.portal.kernel.exception.SystemException {
1420                    getPersistence().clearPermissions(pk);
1421            }
1422    
1423            /**
1424            * Removes the association between the role and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1425            *
1426            * @param pk the primary key of the role
1427            * @param permissionPK the primary key of the permission
1428            * @throws SystemException if a system exception occurred
1429            */
1430            public static void removePermission(long pk, long permissionPK)
1431                    throws com.liferay.portal.kernel.exception.SystemException {
1432                    getPersistence().removePermission(pk, permissionPK);
1433            }
1434    
1435            /**
1436            * Removes the association between the role and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1437            *
1438            * @param pk the primary key of the role
1439            * @param permission the permission
1440            * @throws SystemException if a system exception occurred
1441            */
1442            public static void removePermission(long pk,
1443                    com.liferay.portal.model.Permission permission)
1444                    throws com.liferay.portal.kernel.exception.SystemException {
1445                    getPersistence().removePermission(pk, permission);
1446            }
1447    
1448            /**
1449            * Removes the association between the role and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1450            *
1451            * @param pk the primary key of the role
1452            * @param permissionPKs the primary keys of the permissions
1453            * @throws SystemException if a system exception occurred
1454            */
1455            public static void removePermissions(long pk, long[] permissionPKs)
1456                    throws com.liferay.portal.kernel.exception.SystemException {
1457                    getPersistence().removePermissions(pk, permissionPKs);
1458            }
1459    
1460            /**
1461            * Removes the association between the role and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1462            *
1463            * @param pk the primary key of the role
1464            * @param permissions the permissions
1465            * @throws SystemException if a system exception occurred
1466            */
1467            public static void removePermissions(long pk,
1468                    java.util.List<com.liferay.portal.model.Permission> permissions)
1469                    throws com.liferay.portal.kernel.exception.SystemException {
1470                    getPersistence().removePermissions(pk, permissions);
1471            }
1472    
1473            /**
1474            * Sets the permissions associated with the role, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1475            *
1476            * @param pk the primary key of the role to set the associations for
1477            * @param permissionPKs the primary keys of the permissions to be associated with the role
1478            * @throws SystemException if a system exception occurred
1479            */
1480            public static void setPermissions(long pk, long[] permissionPKs)
1481                    throws com.liferay.portal.kernel.exception.SystemException {
1482                    getPersistence().setPermissions(pk, permissionPKs);
1483            }
1484    
1485            /**
1486            * Sets the permissions associated with the role, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1487            *
1488            * @param pk the primary key of the role to set the associations for
1489            * @param permissions the permissions to be associated with the role
1490            * @throws SystemException if a system exception occurred
1491            */
1492            public static void setPermissions(long pk,
1493                    java.util.List<com.liferay.portal.model.Permission> permissions)
1494                    throws com.liferay.portal.kernel.exception.SystemException {
1495                    getPersistence().setPermissions(pk, permissions);
1496            }
1497    
1498            /**
1499            * Gets all the users associated with the role.
1500            *
1501            * @param pk the primary key of the role to get the associated users for
1502            * @return the users associated with the role
1503            * @throws SystemException if a system exception occurred
1504            */
1505            public static java.util.List<com.liferay.portal.model.User> getUsers(
1506                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
1507                    return getPersistence().getUsers(pk);
1508            }
1509    
1510            /**
1511            * Gets a range of all the users associated with the role.
1512            *
1513            * <p>
1514            * 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.
1515            * </p>
1516            *
1517            * @param pk the primary key of the role to get the associated users for
1518            * @param start the lower bound of the range of roles to return
1519            * @param end the upper bound of the range of roles to return (not inclusive)
1520            * @return the range of users associated with the role
1521            * @throws SystemException if a system exception occurred
1522            */
1523            public static java.util.List<com.liferay.portal.model.User> getUsers(
1524                    long pk, int start, int end)
1525                    throws com.liferay.portal.kernel.exception.SystemException {
1526                    return getPersistence().getUsers(pk, start, end);
1527            }
1528    
1529            /**
1530            * Gets an ordered range of all the users associated with the role.
1531            *
1532            * <p>
1533            * 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.
1534            * </p>
1535            *
1536            * @param pk the primary key of the role to get the associated users for
1537            * @param start the lower bound of the range of roles to return
1538            * @param end the upper bound of the range of roles to return (not inclusive)
1539            * @param orderByComparator the comparator to order the results by
1540            * @return the ordered range of users associated with the role
1541            * @throws SystemException if a system exception occurred
1542            */
1543            public static java.util.List<com.liferay.portal.model.User> getUsers(
1544                    long pk, int start, int end,
1545                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1546                    throws com.liferay.portal.kernel.exception.SystemException {
1547                    return getPersistence().getUsers(pk, start, end, orderByComparator);
1548            }
1549    
1550            /**
1551            * Gets the number of users associated with the role.
1552            *
1553            * @param pk the primary key of the role to get the number of associated users for
1554            * @return the number of users associated with the role
1555            * @throws SystemException if a system exception occurred
1556            */
1557            public static int getUsersSize(long pk)
1558                    throws com.liferay.portal.kernel.exception.SystemException {
1559                    return getPersistence().getUsersSize(pk);
1560            }
1561    
1562            /**
1563            * Determines if the user is associated with the role.
1564            *
1565            * @param pk the primary key of the role
1566            * @param userPK the primary key of the user
1567            * @return <code>true</code> if the user is associated with the role; <code>false</code> otherwise
1568            * @throws SystemException if a system exception occurred
1569            */
1570            public static boolean containsUser(long pk, long userPK)
1571                    throws com.liferay.portal.kernel.exception.SystemException {
1572                    return getPersistence().containsUser(pk, userPK);
1573            }
1574    
1575            /**
1576            * Determines if the role has any users associated with it.
1577            *
1578            * @param pk the primary key of the role to check for associations with users
1579            * @return <code>true</code> if the role has any users associated with it; <code>false</code> otherwise
1580            * @throws SystemException if a system exception occurred
1581            */
1582            public static boolean containsUsers(long pk)
1583                    throws com.liferay.portal.kernel.exception.SystemException {
1584                    return getPersistence().containsUsers(pk);
1585            }
1586    
1587            /**
1588            * Adds an association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1589            *
1590            * @param pk the primary key of the role
1591            * @param userPK the primary key of the user
1592            * @throws SystemException if a system exception occurred
1593            */
1594            public static void addUser(long pk, long userPK)
1595                    throws com.liferay.portal.kernel.exception.SystemException {
1596                    getPersistence().addUser(pk, userPK);
1597            }
1598    
1599            /**
1600            * Adds an association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1601            *
1602            * @param pk the primary key of the role
1603            * @param user the user
1604            * @throws SystemException if a system exception occurred
1605            */
1606            public static void addUser(long pk, com.liferay.portal.model.User user)
1607                    throws com.liferay.portal.kernel.exception.SystemException {
1608                    getPersistence().addUser(pk, user);
1609            }
1610    
1611            /**
1612            * Adds an association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1613            *
1614            * @param pk the primary key of the role
1615            * @param userPKs the primary keys of the users
1616            * @throws SystemException if a system exception occurred
1617            */
1618            public static void addUsers(long pk, long[] userPKs)
1619                    throws com.liferay.portal.kernel.exception.SystemException {
1620                    getPersistence().addUsers(pk, userPKs);
1621            }
1622    
1623            /**
1624            * Adds an association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1625            *
1626            * @param pk the primary key of the role
1627            * @param users the users
1628            * @throws SystemException if a system exception occurred
1629            */
1630            public static void addUsers(long pk,
1631                    java.util.List<com.liferay.portal.model.User> users)
1632                    throws com.liferay.portal.kernel.exception.SystemException {
1633                    getPersistence().addUsers(pk, users);
1634            }
1635    
1636            /**
1637            * Clears all associations between the role and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1638            *
1639            * @param pk the primary key of the role to clear the associated users from
1640            * @throws SystemException if a system exception occurred
1641            */
1642            public static void clearUsers(long pk)
1643                    throws com.liferay.portal.kernel.exception.SystemException {
1644                    getPersistence().clearUsers(pk);
1645            }
1646    
1647            /**
1648            * Removes the association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1649            *
1650            * @param pk the primary key of the role
1651            * @param userPK the primary key of the user
1652            * @throws SystemException if a system exception occurred
1653            */
1654            public static void removeUser(long pk, long userPK)
1655                    throws com.liferay.portal.kernel.exception.SystemException {
1656                    getPersistence().removeUser(pk, userPK);
1657            }
1658    
1659            /**
1660            * Removes the association between the role and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1661            *
1662            * @param pk the primary key of the role
1663            * @param user the user
1664            * @throws SystemException if a system exception occurred
1665            */
1666            public static void removeUser(long pk, com.liferay.portal.model.User user)
1667                    throws com.liferay.portal.kernel.exception.SystemException {
1668                    getPersistence().removeUser(pk, user);
1669            }
1670    
1671            /**
1672            * Removes the association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1673            *
1674            * @param pk the primary key of the role
1675            * @param userPKs the primary keys of the users
1676            * @throws SystemException if a system exception occurred
1677            */
1678            public static void removeUsers(long pk, long[] userPKs)
1679                    throws com.liferay.portal.kernel.exception.SystemException {
1680                    getPersistence().removeUsers(pk, userPKs);
1681            }
1682    
1683            /**
1684            * Removes the association between the role and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1685            *
1686            * @param pk the primary key of the role
1687            * @param users the users
1688            * @throws SystemException if a system exception occurred
1689            */
1690            public static void removeUsers(long pk,
1691                    java.util.List<com.liferay.portal.model.User> users)
1692                    throws com.liferay.portal.kernel.exception.SystemException {
1693                    getPersistence().removeUsers(pk, users);
1694            }
1695    
1696            /**
1697            * Sets the users associated with the role, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1698            *
1699            * @param pk the primary key of the role to set the associations for
1700            * @param userPKs the primary keys of the users to be associated with the role
1701            * @throws SystemException if a system exception occurred
1702            */
1703            public static void setUsers(long pk, long[] userPKs)
1704                    throws com.liferay.portal.kernel.exception.SystemException {
1705                    getPersistence().setUsers(pk, userPKs);
1706            }
1707    
1708            /**
1709            * Sets the users associated with the role, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1710            *
1711            * @param pk the primary key of the role to set the associations for
1712            * @param users the users to be associated with the role
1713            * @throws SystemException if a system exception occurred
1714            */
1715            public static void setUsers(long pk,
1716                    java.util.List<com.liferay.portal.model.User> users)
1717                    throws com.liferay.portal.kernel.exception.SystemException {
1718                    getPersistence().setUsers(pk, users);
1719            }
1720    
1721            public static RolePersistence getPersistence() {
1722                    if (_persistence == null) {
1723                            _persistence = (RolePersistence)PortalBeanLocatorUtil.locate(RolePersistence.class.getName());
1724                    }
1725    
1726                    return _persistence;
1727            }
1728    
1729            public void setPersistence(RolePersistence persistence) {
1730                    _persistence = persistence;
1731            }
1732    
1733            private static RolePersistence _persistence;
1734    }