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