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