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