001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.model.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            * @param scope the scope
251            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
252            * @return the first matching resource permission
253            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
254            * @throws SystemException if a system exception occurred
255            */
256            public static com.liferay.portal.model.ResourcePermission findByScope_First(
257                    int scope,
258                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
259                    throws com.liferay.portal.NoSuchResourcePermissionException,
260                            com.liferay.portal.kernel.exception.SystemException {
261                    return getPersistence().findByScope_First(scope, orderByComparator);
262            }
263    
264            /**
265            * Returns the first resource permission in the ordered set where scope = &#63;.
266            *
267            * @param scope the scope
268            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
269            * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found
270            * @throws SystemException if a system exception occurred
271            */
272            public static com.liferay.portal.model.ResourcePermission fetchByScope_First(
273                    int scope,
274                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
275                    throws com.liferay.portal.kernel.exception.SystemException {
276                    return getPersistence().fetchByScope_First(scope, orderByComparator);
277            }
278    
279            /**
280            * Returns the last resource permission in the ordered set where scope = &#63;.
281            *
282            * @param scope the scope
283            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
284            * @return the last matching resource permission
285            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
286            * @throws SystemException if a system exception occurred
287            */
288            public static com.liferay.portal.model.ResourcePermission findByScope_Last(
289                    int scope,
290                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
291                    throws com.liferay.portal.NoSuchResourcePermissionException,
292                            com.liferay.portal.kernel.exception.SystemException {
293                    return getPersistence().findByScope_Last(scope, orderByComparator);
294            }
295    
296            /**
297            * Returns the last resource permission in the ordered set where scope = &#63;.
298            *
299            * @param scope the scope
300            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
301            * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found
302            * @throws SystemException if a system exception occurred
303            */
304            public static com.liferay.portal.model.ResourcePermission fetchByScope_Last(
305                    int scope,
306                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
307                    throws com.liferay.portal.kernel.exception.SystemException {
308                    return getPersistence().fetchByScope_Last(scope, orderByComparator);
309            }
310    
311            /**
312            * Returns the resource permissions before and after the current resource permission in the ordered set where scope = &#63;.
313            *
314            * @param resourcePermissionId the primary key of the current resource permission
315            * @param scope the scope
316            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
317            * @return the previous, current, and next resource permission
318            * @throws com.liferay.portal.NoSuchResourcePermissionException if a resource permission with the primary key could not be found
319            * @throws SystemException if a system exception occurred
320            */
321            public static com.liferay.portal.model.ResourcePermission[] findByScope_PrevAndNext(
322                    long resourcePermissionId, int scope,
323                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
324                    throws com.liferay.portal.NoSuchResourcePermissionException,
325                            com.liferay.portal.kernel.exception.SystemException {
326                    return getPersistence()
327                                       .findByScope_PrevAndNext(resourcePermissionId, scope,
328                            orderByComparator);
329            }
330    
331            /**
332            * Returns all the resource permissions where scope = any &#63;.
333            *
334            * <p>
335            * 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.
336            * </p>
337            *
338            * @param scopes the scopes
339            * @return the matching resource permissions
340            * @throws SystemException if a system exception occurred
341            */
342            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByScope(
343                    int[] scopes)
344                    throws com.liferay.portal.kernel.exception.SystemException {
345                    return getPersistence().findByScope(scopes);
346            }
347    
348            /**
349            * Returns a range of all the resource permissions where scope = any &#63;.
350            *
351            * <p>
352            * 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.
353            * </p>
354            *
355            * @param scopes the scopes
356            * @param start the lower bound of the range of resource permissions
357            * @param end the upper bound of the range of resource permissions (not inclusive)
358            * @return the range of matching resource permissions
359            * @throws SystemException if a system exception occurred
360            */
361            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByScope(
362                    int[] scopes, int start, int end)
363                    throws com.liferay.portal.kernel.exception.SystemException {
364                    return getPersistence().findByScope(scopes, start, end);
365            }
366    
367            /**
368            * Returns an ordered range of all the resource permissions where scope = any &#63;.
369            *
370            * <p>
371            * 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.
372            * </p>
373            *
374            * @param scopes the scopes
375            * @param start the lower bound of the range of resource permissions
376            * @param end the upper bound of the range of resource permissions (not inclusive)
377            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
378            * @return the ordered range of matching resource permissions
379            * @throws SystemException if a system exception occurred
380            */
381            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByScope(
382                    int[] scopes, int start, int end,
383                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
384                    throws com.liferay.portal.kernel.exception.SystemException {
385                    return getPersistence()
386                                       .findByScope(scopes, start, end, orderByComparator);
387            }
388    
389            /**
390            * Returns all the resource permissions where roleId = &#63;.
391            *
392            * @param roleId the role ID
393            * @return the 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) throws com.liferay.portal.kernel.exception.SystemException {
398                    return getPersistence().findByRoleId(roleId);
399            }
400    
401            /**
402            * Returns a range of all the resource permissions where roleId = &#63;.
403            *
404            * <p>
405            * 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.
406            * </p>
407            *
408            * @param roleId the role ID
409            * @param start the lower bound of the range of resource permissions
410            * @param end the upper bound of the range of resource permissions (not inclusive)
411            * @return the range of matching resource permissions
412            * @throws SystemException if a system exception occurred
413            */
414            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByRoleId(
415                    long roleId, int start, int end)
416                    throws com.liferay.portal.kernel.exception.SystemException {
417                    return getPersistence().findByRoleId(roleId, start, end);
418            }
419    
420            /**
421            * Returns an ordered range of all the resource permissions where roleId = &#63;.
422            *
423            * <p>
424            * 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.
425            * </p>
426            *
427            * @param roleId the role ID
428            * @param start the lower bound of the range of resource permissions
429            * @param end the upper bound of the range of resource permissions (not inclusive)
430            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
431            * @return the ordered range of matching resource permissions
432            * @throws SystemException if a system exception occurred
433            */
434            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByRoleId(
435                    long roleId, int start, int end,
436                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
437                    throws com.liferay.portal.kernel.exception.SystemException {
438                    return getPersistence()
439                                       .findByRoleId(roleId, start, end, orderByComparator);
440            }
441    
442            /**
443            * Returns the first resource permission in the ordered set where roleId = &#63;.
444            *
445            * @param roleId the role ID
446            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
447            * @return the first matching resource permission
448            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
449            * @throws SystemException if a system exception occurred
450            */
451            public static com.liferay.portal.model.ResourcePermission findByRoleId_First(
452                    long roleId,
453                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
454                    throws com.liferay.portal.NoSuchResourcePermissionException,
455                            com.liferay.portal.kernel.exception.SystemException {
456                    return getPersistence().findByRoleId_First(roleId, orderByComparator);
457            }
458    
459            /**
460            * Returns the first resource permission in the ordered set where roleId = &#63;.
461            *
462            * @param roleId the role ID
463            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
464            * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found
465            * @throws SystemException if a system exception occurred
466            */
467            public static com.liferay.portal.model.ResourcePermission fetchByRoleId_First(
468                    long roleId,
469                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
470                    throws com.liferay.portal.kernel.exception.SystemException {
471                    return getPersistence().fetchByRoleId_First(roleId, orderByComparator);
472            }
473    
474            /**
475            * Returns the last resource permission in the ordered set where roleId = &#63;.
476            *
477            * @param roleId the role ID
478            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
479            * @return the last matching resource permission
480            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
481            * @throws SystemException if a system exception occurred
482            */
483            public static com.liferay.portal.model.ResourcePermission findByRoleId_Last(
484                    long roleId,
485                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
486                    throws com.liferay.portal.NoSuchResourcePermissionException,
487                            com.liferay.portal.kernel.exception.SystemException {
488                    return getPersistence().findByRoleId_Last(roleId, orderByComparator);
489            }
490    
491            /**
492            * Returns the last resource permission in the ordered set where roleId = &#63;.
493            *
494            * @param roleId the role ID
495            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
496            * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found
497            * @throws SystemException if a system exception occurred
498            */
499            public static com.liferay.portal.model.ResourcePermission fetchByRoleId_Last(
500                    long roleId,
501                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
502                    throws com.liferay.portal.kernel.exception.SystemException {
503                    return getPersistence().fetchByRoleId_Last(roleId, orderByComparator);
504            }
505    
506            /**
507            * Returns the resource permissions before and after the current resource permission in the ordered set where roleId = &#63;.
508            *
509            * @param resourcePermissionId the primary key of the current resource permission
510            * @param roleId the role ID
511            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
512            * @return the previous, current, and next resource permission
513            * @throws com.liferay.portal.NoSuchResourcePermissionException if a resource permission with the primary key could not be found
514            * @throws SystemException if a system exception occurred
515            */
516            public static com.liferay.portal.model.ResourcePermission[] findByRoleId_PrevAndNext(
517                    long resourcePermissionId, long roleId,
518                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
519                    throws com.liferay.portal.NoSuchResourcePermissionException,
520                            com.liferay.portal.kernel.exception.SystemException {
521                    return getPersistence()
522                                       .findByRoleId_PrevAndNext(resourcePermissionId, roleId,
523                            orderByComparator);
524            }
525    
526            /**
527            * Returns all the resource permissions where companyId = &#63; and primKey LIKE &#63;.
528            *
529            * @param companyId the company ID
530            * @param primKey the prim key
531            * @return the matching resource permissions
532            * @throws SystemException if a system exception occurred
533            */
534            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_P(
535                    long companyId, java.lang.String primKey)
536                    throws com.liferay.portal.kernel.exception.SystemException {
537                    return getPersistence().findByC_P(companyId, primKey);
538            }
539    
540            /**
541            * Returns a range of all the resource permissions where companyId = &#63; and primKey LIKE &#63;.
542            *
543            * <p>
544            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
545            * </p>
546            *
547            * @param companyId the company ID
548            * @param primKey the prim key
549            * @param start the lower bound of the range of resource permissions
550            * @param end the upper bound of the range of resource permissions (not inclusive)
551            * @return the range of matching resource permissions
552            * @throws SystemException if a system exception occurred
553            */
554            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_P(
555                    long companyId, java.lang.String primKey, int start, int end)
556                    throws com.liferay.portal.kernel.exception.SystemException {
557                    return getPersistence().findByC_P(companyId, primKey, start, end);
558            }
559    
560            /**
561            * Returns an ordered range of all the resource permissions where companyId = &#63; and primKey LIKE &#63;.
562            *
563            * <p>
564            * 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.
565            * </p>
566            *
567            * @param companyId the company ID
568            * @param primKey the prim key
569            * @param start the lower bound of the range of resource permissions
570            * @param end the upper bound of the range of resource permissions (not inclusive)
571            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
572            * @return the ordered range of matching resource permissions
573            * @throws SystemException if a system exception occurred
574            */
575            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_P(
576                    long companyId, java.lang.String primKey, int start, int end,
577                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
578                    throws com.liferay.portal.kernel.exception.SystemException {
579                    return getPersistence()
580                                       .findByC_P(companyId, primKey, start, end, orderByComparator);
581            }
582    
583            /**
584            * Returns the first resource permission in the ordered set where companyId = &#63; and primKey LIKE &#63;.
585            *
586            * @param companyId the company ID
587            * @param primKey the prim key
588            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
589            * @return the first matching resource permission
590            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
591            * @throws SystemException if a system exception occurred
592            */
593            public static com.liferay.portal.model.ResourcePermission findByC_P_First(
594                    long companyId, java.lang.String primKey,
595                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
596                    throws com.liferay.portal.NoSuchResourcePermissionException,
597                            com.liferay.portal.kernel.exception.SystemException {
598                    return getPersistence()
599                                       .findByC_P_First(companyId, primKey, orderByComparator);
600            }
601    
602            /**
603            * Returns the first resource permission in the ordered set where companyId = &#63; and primKey LIKE &#63;.
604            *
605            * @param companyId the company ID
606            * @param primKey the prim key
607            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
608            * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found
609            * @throws SystemException if a system exception occurred
610            */
611            public static com.liferay.portal.model.ResourcePermission fetchByC_P_First(
612                    long companyId, java.lang.String primKey,
613                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
614                    throws com.liferay.portal.kernel.exception.SystemException {
615                    return getPersistence()
616                                       .fetchByC_P_First(companyId, primKey, orderByComparator);
617            }
618    
619            /**
620            * Returns the last resource permission in the ordered set where companyId = &#63; and primKey LIKE &#63;.
621            *
622            * @param companyId the company ID
623            * @param primKey the prim key
624            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
625            * @return the last matching resource permission
626            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
627            * @throws SystemException if a system exception occurred
628            */
629            public static com.liferay.portal.model.ResourcePermission findByC_P_Last(
630                    long companyId, java.lang.String primKey,
631                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
632                    throws com.liferay.portal.NoSuchResourcePermissionException,
633                            com.liferay.portal.kernel.exception.SystemException {
634                    return getPersistence()
635                                       .findByC_P_Last(companyId, primKey, orderByComparator);
636            }
637    
638            /**
639            * Returns the last resource permission in the ordered set where companyId = &#63; and primKey LIKE &#63;.
640            *
641            * @param companyId the company ID
642            * @param primKey the prim key
643            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
644            * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found
645            * @throws SystemException if a system exception occurred
646            */
647            public static com.liferay.portal.model.ResourcePermission fetchByC_P_Last(
648                    long companyId, java.lang.String primKey,
649                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
650                    throws com.liferay.portal.kernel.exception.SystemException {
651                    return getPersistence()
652                                       .fetchByC_P_Last(companyId, primKey, orderByComparator);
653            }
654    
655            /**
656            * Returns the resource permissions before and after the current resource permission in the ordered set where companyId = &#63; and primKey LIKE &#63;.
657            *
658            * @param resourcePermissionId the primary key of the current resource permission
659            * @param companyId the company ID
660            * @param primKey the prim key
661            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
662            * @return the previous, current, and next resource permission
663            * @throws com.liferay.portal.NoSuchResourcePermissionException if a resource permission with the primary key could not be found
664            * @throws SystemException if a system exception occurred
665            */
666            public static com.liferay.portal.model.ResourcePermission[] findByC_P_PrevAndNext(
667                    long resourcePermissionId, long companyId, java.lang.String primKey,
668                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
669                    throws com.liferay.portal.NoSuchResourcePermissionException,
670                            com.liferay.portal.kernel.exception.SystemException {
671                    return getPersistence()
672                                       .findByC_P_PrevAndNext(resourcePermissionId, companyId,
673                            primKey, orderByComparator);
674            }
675    
676            /**
677            * Returns all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63;.
678            *
679            * @param companyId the company ID
680            * @param name the name
681            * @param scope the scope
682            * @return the matching resource permissions
683            * @throws SystemException if a system exception occurred
684            */
685            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S(
686                    long companyId, java.lang.String name, int scope)
687                    throws com.liferay.portal.kernel.exception.SystemException {
688                    return getPersistence().findByC_N_S(companyId, name, scope);
689            }
690    
691            /**
692            * Returns a range of all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63;.
693            *
694            * <p>
695            * 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.
696            * </p>
697            *
698            * @param companyId the company ID
699            * @param name the name
700            * @param scope the scope
701            * @param start the lower bound of the range of resource permissions
702            * @param end the upper bound of the range of resource permissions (not inclusive)
703            * @return the range of matching resource permissions
704            * @throws SystemException if a system exception occurred
705            */
706            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S(
707                    long companyId, java.lang.String name, int scope, int start, int end)
708                    throws com.liferay.portal.kernel.exception.SystemException {
709                    return getPersistence().findByC_N_S(companyId, name, scope, start, end);
710            }
711    
712            /**
713            * Returns an ordered range of all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63;.
714            *
715            * <p>
716            * 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.
717            * </p>
718            *
719            * @param companyId the company ID
720            * @param name the name
721            * @param scope the scope
722            * @param start the lower bound of the range of resource permissions
723            * @param end the upper bound of the range of resource permissions (not inclusive)
724            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
725            * @return the ordered range of matching resource permissions
726            * @throws SystemException if a system exception occurred
727            */
728            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S(
729                    long companyId, java.lang.String name, int scope, int start, int end,
730                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
731                    throws com.liferay.portal.kernel.exception.SystemException {
732                    return getPersistence()
733                                       .findByC_N_S(companyId, name, scope, start, end,
734                            orderByComparator);
735            }
736    
737            /**
738            * Returns the first resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63;.
739            *
740            * @param companyId the company ID
741            * @param name the name
742            * @param scope the scope
743            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
744            * @return the first matching resource permission
745            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
746            * @throws SystemException if a system exception occurred
747            */
748            public static com.liferay.portal.model.ResourcePermission findByC_N_S_First(
749                    long companyId, java.lang.String name, int scope,
750                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
751                    throws com.liferay.portal.NoSuchResourcePermissionException,
752                            com.liferay.portal.kernel.exception.SystemException {
753                    return getPersistence()
754                                       .findByC_N_S_First(companyId, name, scope, orderByComparator);
755            }
756    
757            /**
758            * Returns the first resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63;.
759            *
760            * @param companyId the company ID
761            * @param name the name
762            * @param scope the scope
763            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
764            * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found
765            * @throws SystemException if a system exception occurred
766            */
767            public static com.liferay.portal.model.ResourcePermission fetchByC_N_S_First(
768                    long companyId, java.lang.String name, int scope,
769                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
770                    throws com.liferay.portal.kernel.exception.SystemException {
771                    return getPersistence()
772                                       .fetchByC_N_S_First(companyId, name, scope, orderByComparator);
773            }
774    
775            /**
776            * Returns the last resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63;.
777            *
778            * @param companyId the company ID
779            * @param name the name
780            * @param scope the scope
781            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
782            * @return the last matching resource permission
783            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
784            * @throws SystemException if a system exception occurred
785            */
786            public static com.liferay.portal.model.ResourcePermission findByC_N_S_Last(
787                    long companyId, java.lang.String name, int scope,
788                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
789                    throws com.liferay.portal.NoSuchResourcePermissionException,
790                            com.liferay.portal.kernel.exception.SystemException {
791                    return getPersistence()
792                                       .findByC_N_S_Last(companyId, name, scope, orderByComparator);
793            }
794    
795            /**
796            * Returns the last resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63;.
797            *
798            * @param companyId the company ID
799            * @param name the name
800            * @param scope the scope
801            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
802            * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found
803            * @throws SystemException if a system exception occurred
804            */
805            public static com.liferay.portal.model.ResourcePermission fetchByC_N_S_Last(
806                    long companyId, java.lang.String name, int scope,
807                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
808                    throws com.liferay.portal.kernel.exception.SystemException {
809                    return getPersistence()
810                                       .fetchByC_N_S_Last(companyId, name, scope, orderByComparator);
811            }
812    
813            /**
814            * Returns the resource permissions before and after the current resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63;.
815            *
816            * @param resourcePermissionId the primary key of the current resource permission
817            * @param companyId the company ID
818            * @param name the name
819            * @param scope the scope
820            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
821            * @return the previous, current, and next resource permission
822            * @throws com.liferay.portal.NoSuchResourcePermissionException if a resource permission with the primary key could not be found
823            * @throws SystemException if a system exception occurred
824            */
825            public static com.liferay.portal.model.ResourcePermission[] findByC_N_S_PrevAndNext(
826                    long resourcePermissionId, long companyId, java.lang.String name,
827                    int scope,
828                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
829                    throws com.liferay.portal.NoSuchResourcePermissionException,
830                            com.liferay.portal.kernel.exception.SystemException {
831                    return getPersistence()
832                                       .findByC_N_S_PrevAndNext(resourcePermissionId, companyId,
833                            name, scope, orderByComparator);
834            }
835    
836            /**
837            * Returns all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
838            *
839            * @param companyId the company ID
840            * @param name the name
841            * @param scope the scope
842            * @param primKey the prim key
843            * @return the matching resource permissions
844            * @throws SystemException if a system exception occurred
845            */
846            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P(
847                    long companyId, java.lang.String name, int scope,
848                    java.lang.String primKey)
849                    throws com.liferay.portal.kernel.exception.SystemException {
850                    return getPersistence().findByC_N_S_P(companyId, name, scope, primKey);
851            }
852    
853            /**
854            * Returns a range of all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
855            *
856            * <p>
857            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
858            * </p>
859            *
860            * @param companyId the company ID
861            * @param name the name
862            * @param scope the scope
863            * @param primKey the prim key
864            * @param start the lower bound of the range of resource permissions
865            * @param end the upper bound of the range of resource permissions (not inclusive)
866            * @return the range of matching resource permissions
867            * @throws SystemException if a system exception occurred
868            */
869            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P(
870                    long companyId, java.lang.String name, int scope,
871                    java.lang.String primKey, int start, int end)
872                    throws com.liferay.portal.kernel.exception.SystemException {
873                    return getPersistence()
874                                       .findByC_N_S_P(companyId, name, scope, primKey, start, end);
875            }
876    
877            /**
878            * Returns an ordered range of all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
879            *
880            * <p>
881            * 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.
882            * </p>
883            *
884            * @param companyId the company ID
885            * @param name the name
886            * @param scope the scope
887            * @param primKey the prim key
888            * @param start the lower bound of the range of resource permissions
889            * @param end the upper bound of the range of resource permissions (not inclusive)
890            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
891            * @return the ordered range of matching resource permissions
892            * @throws SystemException if a system exception occurred
893            */
894            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P(
895                    long companyId, java.lang.String name, int scope,
896                    java.lang.String primKey, int start, int end,
897                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
898                    throws com.liferay.portal.kernel.exception.SystemException {
899                    return getPersistence()
900                                       .findByC_N_S_P(companyId, name, scope, primKey, start, end,
901                            orderByComparator);
902            }
903    
904            /**
905            * Returns the first resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
906            *
907            * @param companyId the company ID
908            * @param name the name
909            * @param scope the scope
910            * @param primKey the prim key
911            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
912            * @return the first matching resource permission
913            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
914            * @throws SystemException if a system exception occurred
915            */
916            public static com.liferay.portal.model.ResourcePermission findByC_N_S_P_First(
917                    long companyId, java.lang.String name, int scope,
918                    java.lang.String primKey,
919                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
920                    throws com.liferay.portal.NoSuchResourcePermissionException,
921                            com.liferay.portal.kernel.exception.SystemException {
922                    return getPersistence()
923                                       .findByC_N_S_P_First(companyId, name, scope, primKey,
924                            orderByComparator);
925            }
926    
927            /**
928            * Returns the first resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
929            *
930            * @param companyId the company ID
931            * @param name the name
932            * @param scope the scope
933            * @param primKey the prim key
934            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
935            * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found
936            * @throws SystemException if a system exception occurred
937            */
938            public static com.liferay.portal.model.ResourcePermission fetchByC_N_S_P_First(
939                    long companyId, java.lang.String name, int scope,
940                    java.lang.String primKey,
941                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
942                    throws com.liferay.portal.kernel.exception.SystemException {
943                    return getPersistence()
944                                       .fetchByC_N_S_P_First(companyId, name, scope, primKey,
945                            orderByComparator);
946            }
947    
948            /**
949            * Returns the last resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
950            *
951            * @param companyId the company ID
952            * @param name the name
953            * @param scope the scope
954            * @param primKey the prim key
955            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
956            * @return the last matching resource permission
957            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
958            * @throws SystemException if a system exception occurred
959            */
960            public static com.liferay.portal.model.ResourcePermission findByC_N_S_P_Last(
961                    long companyId, java.lang.String name, int scope,
962                    java.lang.String primKey,
963                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
964                    throws com.liferay.portal.NoSuchResourcePermissionException,
965                            com.liferay.portal.kernel.exception.SystemException {
966                    return getPersistence()
967                                       .findByC_N_S_P_Last(companyId, name, scope, primKey,
968                            orderByComparator);
969            }
970    
971            /**
972            * Returns the last resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
973            *
974            * @param companyId the company ID
975            * @param name the name
976            * @param scope the scope
977            * @param primKey the prim key
978            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
979            * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found
980            * @throws SystemException if a system exception occurred
981            */
982            public static com.liferay.portal.model.ResourcePermission fetchByC_N_S_P_Last(
983                    long companyId, java.lang.String name, int scope,
984                    java.lang.String primKey,
985                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
986                    throws com.liferay.portal.kernel.exception.SystemException {
987                    return getPersistence()
988                                       .fetchByC_N_S_P_Last(companyId, name, scope, primKey,
989                            orderByComparator);
990            }
991    
992            /**
993            * 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;.
994            *
995            * @param resourcePermissionId the primary key of the current resource permission
996            * @param companyId the company ID
997            * @param name the name
998            * @param scope the scope
999            * @param primKey the prim key
1000            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1001            * @return the previous, current, and next resource permission
1002            * @throws com.liferay.portal.NoSuchResourcePermissionException if a resource permission with the primary key could not be found
1003            * @throws SystemException if a system exception occurred
1004            */
1005            public static com.liferay.portal.model.ResourcePermission[] findByC_N_S_P_PrevAndNext(
1006                    long resourcePermissionId, long companyId, java.lang.String name,
1007                    int scope, java.lang.String primKey,
1008                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1009                    throws com.liferay.portal.NoSuchResourcePermissionException,
1010                            com.liferay.portal.kernel.exception.SystemException {
1011                    return getPersistence()
1012                                       .findByC_N_S_P_PrevAndNext(resourcePermissionId, companyId,
1013                            name, scope, primKey, orderByComparator);
1014            }
1015    
1016            /**
1017            * Returns all the resource permissions where companyId = &#63; and name = &#63; and primKey = &#63; and ownerId = &#63;.
1018            *
1019            * @param companyId the company ID
1020            * @param name the name
1021            * @param primKey the prim key
1022            * @param ownerId the owner ID
1023            * @return the matching resource permissions
1024            * @throws SystemException if a system exception occurred
1025            */
1026            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_P_O(
1027                    long companyId, java.lang.String name, java.lang.String primKey,
1028                    long ownerId)
1029                    throws com.liferay.portal.kernel.exception.SystemException {
1030                    return getPersistence().findByC_N_P_O(companyId, name, primKey, ownerId);
1031            }
1032    
1033            /**
1034            * Returns a range of all the resource permissions where companyId = &#63; and name = &#63; and primKey = &#63; and ownerId = &#63;.
1035            *
1036            * <p>
1037            * 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.
1038            * </p>
1039            *
1040            * @param companyId the company ID
1041            * @param name the name
1042            * @param primKey the prim key
1043            * @param ownerId the owner ID
1044            * @param start the lower bound of the range of resource permissions
1045            * @param end the upper bound of the range of resource permissions (not inclusive)
1046            * @return the range of matching resource permissions
1047            * @throws SystemException if a system exception occurred
1048            */
1049            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_P_O(
1050                    long companyId, java.lang.String name, java.lang.String primKey,
1051                    long ownerId, int start, int end)
1052                    throws com.liferay.portal.kernel.exception.SystemException {
1053                    return getPersistence()
1054                                       .findByC_N_P_O(companyId, name, primKey, ownerId, start, end);
1055            }
1056    
1057            /**
1058            * Returns an ordered range of all the resource permissions where companyId = &#63; and name = &#63; and primKey = &#63; and ownerId = &#63;.
1059            *
1060            * <p>
1061            * 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.
1062            * </p>
1063            *
1064            * @param companyId the company ID
1065            * @param name the name
1066            * @param primKey the prim key
1067            * @param ownerId the owner ID
1068            * @param start the lower bound of the range of resource permissions
1069            * @param end the upper bound of the range of resource permissions (not inclusive)
1070            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1071            * @return the ordered range of matching resource permissions
1072            * @throws SystemException if a system exception occurred
1073            */
1074            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_P_O(
1075                    long companyId, java.lang.String name, java.lang.String primKey,
1076                    long ownerId, int start, int end,
1077                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1078                    throws com.liferay.portal.kernel.exception.SystemException {
1079                    return getPersistence()
1080                                       .findByC_N_P_O(companyId, name, primKey, ownerId, start,
1081                            end, orderByComparator);
1082            }
1083    
1084            /**
1085            * Returns the first resource permission in the ordered set where companyId = &#63; and name = &#63; and primKey = &#63; and ownerId = &#63;.
1086            *
1087            * @param companyId the company ID
1088            * @param name the name
1089            * @param primKey the prim key
1090            * @param ownerId the owner ID
1091            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1092            * @return the first matching resource permission
1093            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
1094            * @throws SystemException if a system exception occurred
1095            */
1096            public static com.liferay.portal.model.ResourcePermission findByC_N_P_O_First(
1097                    long companyId, java.lang.String name, java.lang.String primKey,
1098                    long ownerId,
1099                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1100                    throws com.liferay.portal.NoSuchResourcePermissionException,
1101                            com.liferay.portal.kernel.exception.SystemException {
1102                    return getPersistence()
1103                                       .findByC_N_P_O_First(companyId, name, primKey, ownerId,
1104                            orderByComparator);
1105            }
1106    
1107            /**
1108            * Returns the first resource permission in the ordered set where companyId = &#63; and name = &#63; and primKey = &#63; and ownerId = &#63;.
1109            *
1110            * @param companyId the company ID
1111            * @param name the name
1112            * @param primKey the prim key
1113            * @param ownerId the owner ID
1114            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1115            * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found
1116            * @throws SystemException if a system exception occurred
1117            */
1118            public static com.liferay.portal.model.ResourcePermission fetchByC_N_P_O_First(
1119                    long companyId, java.lang.String name, java.lang.String primKey,
1120                    long ownerId,
1121                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1122                    throws com.liferay.portal.kernel.exception.SystemException {
1123                    return getPersistence()
1124                                       .fetchByC_N_P_O_First(companyId, name, primKey, ownerId,
1125                            orderByComparator);
1126            }
1127    
1128            /**
1129            * Returns the last resource permission in the ordered set where companyId = &#63; and name = &#63; and primKey = &#63; and ownerId = &#63;.
1130            *
1131            * @param companyId the company ID
1132            * @param name the name
1133            * @param primKey the prim key
1134            * @param ownerId the owner ID
1135            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1136            * @return the last matching resource permission
1137            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
1138            * @throws SystemException if a system exception occurred
1139            */
1140            public static com.liferay.portal.model.ResourcePermission findByC_N_P_O_Last(
1141                    long companyId, java.lang.String name, java.lang.String primKey,
1142                    long ownerId,
1143                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1144                    throws com.liferay.portal.NoSuchResourcePermissionException,
1145                            com.liferay.portal.kernel.exception.SystemException {
1146                    return getPersistence()
1147                                       .findByC_N_P_O_Last(companyId, name, primKey, ownerId,
1148                            orderByComparator);
1149            }
1150    
1151            /**
1152            * Returns the last resource permission in the ordered set where companyId = &#63; and name = &#63; and primKey = &#63; and ownerId = &#63;.
1153            *
1154            * @param companyId the company ID
1155            * @param name the name
1156            * @param primKey the prim key
1157            * @param ownerId the owner ID
1158            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1159            * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found
1160            * @throws SystemException if a system exception occurred
1161            */
1162            public static com.liferay.portal.model.ResourcePermission fetchByC_N_P_O_Last(
1163                    long companyId, java.lang.String name, java.lang.String primKey,
1164                    long ownerId,
1165                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1166                    throws com.liferay.portal.kernel.exception.SystemException {
1167                    return getPersistence()
1168                                       .fetchByC_N_P_O_Last(companyId, name, primKey, ownerId,
1169                            orderByComparator);
1170            }
1171    
1172            /**
1173            * 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;.
1174            *
1175            * @param resourcePermissionId the primary key of the current resource permission
1176            * @param companyId the company ID
1177            * @param name the name
1178            * @param primKey the prim key
1179            * @param ownerId the owner ID
1180            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1181            * @return the previous, current, and next resource permission
1182            * @throws com.liferay.portal.NoSuchResourcePermissionException if a resource permission with the primary key could not be found
1183            * @throws SystemException if a system exception occurred
1184            */
1185            public static com.liferay.portal.model.ResourcePermission[] findByC_N_P_O_PrevAndNext(
1186                    long resourcePermissionId, long companyId, java.lang.String name,
1187                    java.lang.String primKey, long ownerId,
1188                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1189                    throws com.liferay.portal.NoSuchResourcePermissionException,
1190                            com.liferay.portal.kernel.exception.SystemException {
1191                    return getPersistence()
1192                                       .findByC_N_P_O_PrevAndNext(resourcePermissionId, companyId,
1193                            name, primKey, ownerId, orderByComparator);
1194            }
1195    
1196            /**
1197            * Returns all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = &#63;.
1198            *
1199            * @param companyId the company ID
1200            * @param name the name
1201            * @param scope the scope
1202            * @param primKey the prim key
1203            * @param roleId the role ID
1204            * @return the matching resource permissions
1205            * @throws SystemException if a system exception occurred
1206            */
1207            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P_R(
1208                    long companyId, java.lang.String name, int scope,
1209                    java.lang.String primKey, long roleId)
1210                    throws com.liferay.portal.kernel.exception.SystemException {
1211                    return getPersistence()
1212                                       .findByC_N_S_P_R(companyId, name, scope, primKey, roleId);
1213            }
1214    
1215            /**
1216            * Returns a range of all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = &#63;.
1217            *
1218            * <p>
1219            * 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.
1220            * </p>
1221            *
1222            * @param companyId the company ID
1223            * @param name the name
1224            * @param scope the scope
1225            * @param primKey the prim key
1226            * @param roleId the role ID
1227            * @param start the lower bound of the range of resource permissions
1228            * @param end the upper bound of the range of resource permissions (not inclusive)
1229            * @return the range of matching resource permissions
1230            * @throws SystemException if a system exception occurred
1231            */
1232            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P_R(
1233                    long companyId, java.lang.String name, int scope,
1234                    java.lang.String primKey, long roleId, int start, int end)
1235                    throws com.liferay.portal.kernel.exception.SystemException {
1236                    return getPersistence()
1237                                       .findByC_N_S_P_R(companyId, name, scope, primKey, roleId,
1238                            start, end);
1239            }
1240    
1241            /**
1242            * Returns an ordered range of all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = &#63;.
1243            *
1244            * <p>
1245            * 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.
1246            * </p>
1247            *
1248            * @param companyId the company ID
1249            * @param name the name
1250            * @param scope the scope
1251            * @param primKey the prim key
1252            * @param roleId the role ID
1253            * @param start the lower bound of the range of resource permissions
1254            * @param end the upper bound of the range of resource permissions (not inclusive)
1255            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1256            * @return the ordered range of matching resource permissions
1257            * @throws SystemException if a system exception occurred
1258            */
1259            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P_R(
1260                    long companyId, java.lang.String name, int scope,
1261                    java.lang.String primKey, long roleId, int start, int end,
1262                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1263                    throws com.liferay.portal.kernel.exception.SystemException {
1264                    return getPersistence()
1265                                       .findByC_N_S_P_R(companyId, name, scope, primKey, roleId,
1266                            start, end, orderByComparator);
1267            }
1268    
1269            /**
1270            * Returns the first resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = &#63;.
1271            *
1272            * @param companyId the company ID
1273            * @param name the name
1274            * @param scope the scope
1275            * @param primKey the prim key
1276            * @param roleId the role ID
1277            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1278            * @return the first matching resource permission
1279            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
1280            * @throws SystemException if a system exception occurred
1281            */
1282            public static com.liferay.portal.model.ResourcePermission findByC_N_S_P_R_First(
1283                    long companyId, java.lang.String name, int scope,
1284                    java.lang.String primKey, long roleId,
1285                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1286                    throws com.liferay.portal.NoSuchResourcePermissionException,
1287                            com.liferay.portal.kernel.exception.SystemException {
1288                    return getPersistence()
1289                                       .findByC_N_S_P_R_First(companyId, name, scope, primKey,
1290                            roleId, orderByComparator);
1291            }
1292    
1293            /**
1294            * Returns the first resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = &#63;.
1295            *
1296            * @param companyId the company ID
1297            * @param name the name
1298            * @param scope the scope
1299            * @param primKey the prim key
1300            * @param roleId the role ID
1301            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1302            * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found
1303            * @throws SystemException if a system exception occurred
1304            */
1305            public static com.liferay.portal.model.ResourcePermission fetchByC_N_S_P_R_First(
1306                    long companyId, java.lang.String name, int scope,
1307                    java.lang.String primKey, long roleId,
1308                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1309                    throws com.liferay.portal.kernel.exception.SystemException {
1310                    return getPersistence()
1311                                       .fetchByC_N_S_P_R_First(companyId, name, scope, primKey,
1312                            roleId, orderByComparator);
1313            }
1314    
1315            /**
1316            * Returns the last resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = &#63;.
1317            *
1318            * @param companyId the company ID
1319            * @param name the name
1320            * @param scope the scope
1321            * @param primKey the prim key
1322            * @param roleId the role ID
1323            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1324            * @return the last matching resource permission
1325            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
1326            * @throws SystemException if a system exception occurred
1327            */
1328            public static com.liferay.portal.model.ResourcePermission findByC_N_S_P_R_Last(
1329                    long companyId, java.lang.String name, int scope,
1330                    java.lang.String primKey, long roleId,
1331                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1332                    throws com.liferay.portal.NoSuchResourcePermissionException,
1333                            com.liferay.portal.kernel.exception.SystemException {
1334                    return getPersistence()
1335                                       .findByC_N_S_P_R_Last(companyId, name, scope, primKey,
1336                            roleId, orderByComparator);
1337            }
1338    
1339            /**
1340            * Returns the last resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = &#63;.
1341            *
1342            * @param companyId the company ID
1343            * @param name the name
1344            * @param scope the scope
1345            * @param primKey the prim key
1346            * @param roleId the role ID
1347            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1348            * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found
1349            * @throws SystemException if a system exception occurred
1350            */
1351            public static com.liferay.portal.model.ResourcePermission fetchByC_N_S_P_R_Last(
1352                    long companyId, java.lang.String name, int scope,
1353                    java.lang.String primKey, long roleId,
1354                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1355                    throws com.liferay.portal.kernel.exception.SystemException {
1356                    return getPersistence()
1357                                       .fetchByC_N_S_P_R_Last(companyId, name, scope, primKey,
1358                            roleId, orderByComparator);
1359            }
1360    
1361            /**
1362            * 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;.
1363            *
1364            * @param resourcePermissionId the primary key of the current resource permission
1365            * @param companyId the company ID
1366            * @param name the name
1367            * @param scope the scope
1368            * @param primKey the prim key
1369            * @param roleId the role ID
1370            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1371            * @return the previous, current, and next resource permission
1372            * @throws com.liferay.portal.NoSuchResourcePermissionException if a resource permission with the primary key could not be found
1373            * @throws SystemException if a system exception occurred
1374            */
1375            public static com.liferay.portal.model.ResourcePermission[] findByC_N_S_P_R_PrevAndNext(
1376                    long resourcePermissionId, long companyId, java.lang.String name,
1377                    int scope, java.lang.String primKey, long roleId,
1378                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1379                    throws com.liferay.portal.NoSuchResourcePermissionException,
1380                            com.liferay.portal.kernel.exception.SystemException {
1381                    return getPersistence()
1382                                       .findByC_N_S_P_R_PrevAndNext(resourcePermissionId,
1383                            companyId, name, scope, primKey, roleId, orderByComparator);
1384            }
1385    
1386            /**
1387            * Returns all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = any &#63;.
1388            *
1389            * <p>
1390            * 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.
1391            * </p>
1392            *
1393            * @param companyId the company ID
1394            * @param name the name
1395            * @param scope the scope
1396            * @param primKey the prim key
1397            * @param roleIds the role IDs
1398            * @return the matching resource permissions
1399            * @throws SystemException if a system exception occurred
1400            */
1401            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P_R(
1402                    long companyId, java.lang.String name, int scope,
1403                    java.lang.String primKey, long[] roleIds)
1404                    throws com.liferay.portal.kernel.exception.SystemException {
1405                    return getPersistence()
1406                                       .findByC_N_S_P_R(companyId, name, scope, primKey, roleIds);
1407            }
1408    
1409            /**
1410            * Returns a range of all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = any &#63;.
1411            *
1412            * <p>
1413            * 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.
1414            * </p>
1415            *
1416            * @param companyId the company ID
1417            * @param name the name
1418            * @param scope the scope
1419            * @param primKey the prim key
1420            * @param roleIds the role IDs
1421            * @param start the lower bound of the range of resource permissions
1422            * @param end the upper bound of the range of resource permissions (not inclusive)
1423            * @return the range of matching resource permissions
1424            * @throws SystemException if a system exception occurred
1425            */
1426            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P_R(
1427                    long companyId, java.lang.String name, int scope,
1428                    java.lang.String primKey, long[] roleIds, int start, int end)
1429                    throws com.liferay.portal.kernel.exception.SystemException {
1430                    return getPersistence()
1431                                       .findByC_N_S_P_R(companyId, name, scope, primKey, roleIds,
1432                            start, end);
1433            }
1434    
1435            /**
1436            * 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;.
1437            *
1438            * <p>
1439            * 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.
1440            * </p>
1441            *
1442            * @param companyId the company ID
1443            * @param name the name
1444            * @param scope the scope
1445            * @param primKey the prim key
1446            * @param roleIds the role IDs
1447            * @param start the lower bound of the range of resource permissions
1448            * @param end the upper bound of the range of resource permissions (not inclusive)
1449            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1450            * @return the ordered range of matching resource permissions
1451            * @throws SystemException if a system exception occurred
1452            */
1453            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P_R(
1454                    long companyId, java.lang.String name, int scope,
1455                    java.lang.String primKey, long[] roleIds, int start, int end,
1456                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1457                    throws com.liferay.portal.kernel.exception.SystemException {
1458                    return getPersistence()
1459                                       .findByC_N_S_P_R(companyId, name, scope, primKey, roleIds,
1460                            start, end, orderByComparator);
1461            }
1462    
1463            /**
1464            * Returns all the resource permissions where companyId = &#63; and name = &#63; and primKey = &#63; and roleId = &#63; and actionIds = &#63;.
1465            *
1466            * @param companyId the company ID
1467            * @param name the name
1468            * @param primKey the prim key
1469            * @param roleId the role ID
1470            * @param actionIds the action IDs
1471            * @return the matching resource permissions
1472            * @throws SystemException if a system exception occurred
1473            */
1474            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_P_R_A(
1475                    long companyId, java.lang.String name, java.lang.String primKey,
1476                    long roleId, long actionIds)
1477                    throws com.liferay.portal.kernel.exception.SystemException {
1478                    return getPersistence()
1479                                       .findByC_N_P_R_A(companyId, name, primKey, roleId, actionIds);
1480            }
1481    
1482            /**
1483            * Returns a range of all the resource permissions where companyId = &#63; and name = &#63; and primKey = &#63; and roleId = &#63; and actionIds = &#63;.
1484            *
1485            * <p>
1486            * 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.
1487            * </p>
1488            *
1489            * @param companyId the company ID
1490            * @param name the name
1491            * @param primKey the prim key
1492            * @param roleId the role ID
1493            * @param actionIds the action IDs
1494            * @param start the lower bound of the range of resource permissions
1495            * @param end the upper bound of the range of resource permissions (not inclusive)
1496            * @return the range of matching resource permissions
1497            * @throws SystemException if a system exception occurred
1498            */
1499            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_P_R_A(
1500                    long companyId, java.lang.String name, java.lang.String primKey,
1501                    long roleId, long actionIds, int start, int end)
1502                    throws com.liferay.portal.kernel.exception.SystemException {
1503                    return getPersistence()
1504                                       .findByC_N_P_R_A(companyId, name, primKey, roleId,
1505                            actionIds, start, end);
1506            }
1507    
1508            /**
1509            * Returns an ordered range of all the resource permissions where companyId = &#63; and name = &#63; and primKey = &#63; and roleId = &#63; and actionIds = &#63;.
1510            *
1511            * <p>
1512            * 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.
1513            * </p>
1514            *
1515            * @param companyId the company ID
1516            * @param name the name
1517            * @param primKey the prim key
1518            * @param roleId the role ID
1519            * @param actionIds the action IDs
1520            * @param start the lower bound of the range of resource permissions
1521            * @param end the upper bound of the range of resource permissions (not inclusive)
1522            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1523            * @return the ordered range of matching resource permissions
1524            * @throws SystemException if a system exception occurred
1525            */
1526            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_P_R_A(
1527                    long companyId, java.lang.String name, java.lang.String primKey,
1528                    long roleId, long actionIds, int start, int end,
1529                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1530                    throws com.liferay.portal.kernel.exception.SystemException {
1531                    return getPersistence()
1532                                       .findByC_N_P_R_A(companyId, name, primKey, roleId,
1533                            actionIds, start, end, orderByComparator);
1534            }
1535    
1536            /**
1537            * Returns the first resource permission in the ordered set where companyId = &#63; and name = &#63; and primKey = &#63; and roleId = &#63; and actionIds = &#63;.
1538            *
1539            * @param companyId the company ID
1540            * @param name the name
1541            * @param primKey the prim key
1542            * @param roleId the role ID
1543            * @param actionIds the action IDs
1544            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1545            * @return the first matching resource permission
1546            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
1547            * @throws SystemException if a system exception occurred
1548            */
1549            public static com.liferay.portal.model.ResourcePermission findByC_N_P_R_A_First(
1550                    long companyId, java.lang.String name, java.lang.String primKey,
1551                    long roleId, long actionIds,
1552                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1553                    throws com.liferay.portal.NoSuchResourcePermissionException,
1554                            com.liferay.portal.kernel.exception.SystemException {
1555                    return getPersistence()
1556                                       .findByC_N_P_R_A_First(companyId, name, primKey, roleId,
1557                            actionIds, orderByComparator);
1558            }
1559    
1560            /**
1561            * Returns the first resource permission in the ordered set where companyId = &#63; and name = &#63; and primKey = &#63; and roleId = &#63; and actionIds = &#63;.
1562            *
1563            * @param companyId the company ID
1564            * @param name the name
1565            * @param primKey the prim key
1566            * @param roleId the role ID
1567            * @param actionIds the action IDs
1568            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1569            * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found
1570            * @throws SystemException if a system exception occurred
1571            */
1572            public static com.liferay.portal.model.ResourcePermission fetchByC_N_P_R_A_First(
1573                    long companyId, java.lang.String name, java.lang.String primKey,
1574                    long roleId, long actionIds,
1575                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1576                    throws com.liferay.portal.kernel.exception.SystemException {
1577                    return getPersistence()
1578                                       .fetchByC_N_P_R_A_First(companyId, name, primKey, roleId,
1579                            actionIds, orderByComparator);
1580            }
1581    
1582            /**
1583            * Returns the last resource permission in the ordered set where companyId = &#63; and name = &#63; and primKey = &#63; and roleId = &#63; and actionIds = &#63;.
1584            *
1585            * @param companyId the company ID
1586            * @param name the name
1587            * @param primKey the prim key
1588            * @param roleId the role ID
1589            * @param actionIds the action IDs
1590            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1591            * @return the last matching resource permission
1592            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
1593            * @throws SystemException if a system exception occurred
1594            */
1595            public static com.liferay.portal.model.ResourcePermission findByC_N_P_R_A_Last(
1596                    long companyId, java.lang.String name, java.lang.String primKey,
1597                    long roleId, long actionIds,
1598                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1599                    throws com.liferay.portal.NoSuchResourcePermissionException,
1600                            com.liferay.portal.kernel.exception.SystemException {
1601                    return getPersistence()
1602                                       .findByC_N_P_R_A_Last(companyId, name, primKey, roleId,
1603                            actionIds, orderByComparator);
1604            }
1605    
1606            /**
1607            * Returns the last resource permission in the ordered set where companyId = &#63; and name = &#63; and primKey = &#63; and roleId = &#63; and actionIds = &#63;.
1608            *
1609            * @param companyId the company ID
1610            * @param name the name
1611            * @param primKey the prim key
1612            * @param roleId the role ID
1613            * @param actionIds the action IDs
1614            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1615            * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found
1616            * @throws SystemException if a system exception occurred
1617            */
1618            public static com.liferay.portal.model.ResourcePermission fetchByC_N_P_R_A_Last(
1619                    long companyId, java.lang.String name, java.lang.String primKey,
1620                    long roleId, long actionIds,
1621                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1622                    throws com.liferay.portal.kernel.exception.SystemException {
1623                    return getPersistence()
1624                                       .fetchByC_N_P_R_A_Last(companyId, name, primKey, roleId,
1625                            actionIds, orderByComparator);
1626            }
1627    
1628            /**
1629            * 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;.
1630            *
1631            * @param resourcePermissionId the primary key of the current resource permission
1632            * @param companyId the company ID
1633            * @param name the name
1634            * @param primKey the prim key
1635            * @param roleId the role ID
1636            * @param actionIds the action IDs
1637            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1638            * @return the previous, current, and next resource permission
1639            * @throws com.liferay.portal.NoSuchResourcePermissionException if a resource permission with the primary key could not be found
1640            * @throws SystemException if a system exception occurred
1641            */
1642            public static com.liferay.portal.model.ResourcePermission[] findByC_N_P_R_A_PrevAndNext(
1643                    long resourcePermissionId, long companyId, java.lang.String name,
1644                    java.lang.String primKey, long roleId, long actionIds,
1645                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1646                    throws com.liferay.portal.NoSuchResourcePermissionException,
1647                            com.liferay.portal.kernel.exception.SystemException {
1648                    return getPersistence()
1649                                       .findByC_N_P_R_A_PrevAndNext(resourcePermissionId,
1650                            companyId, name, primKey, roleId, actionIds, orderByComparator);
1651            }
1652    
1653            /**
1654            * Returns all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = &#63; and actionIds = &#63;.
1655            *
1656            * @param companyId the company ID
1657            * @param name the name
1658            * @param scope the scope
1659            * @param primKey the prim key
1660            * @param roleId the role ID
1661            * @param actionIds the action IDs
1662            * @return the matching resource permissions
1663            * @throws SystemException if a system exception occurred
1664            */
1665            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P_R_A(
1666                    long companyId, java.lang.String name, int scope,
1667                    java.lang.String primKey, long roleId, long actionIds)
1668                    throws com.liferay.portal.kernel.exception.SystemException {
1669                    return getPersistence()
1670                                       .findByC_N_S_P_R_A(companyId, name, scope, primKey, roleId,
1671                            actionIds);
1672            }
1673    
1674            /**
1675            * 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;.
1676            *
1677            * <p>
1678            * 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.
1679            * </p>
1680            *
1681            * @param companyId the company ID
1682            * @param name the name
1683            * @param scope the scope
1684            * @param primKey the prim key
1685            * @param roleId the role ID
1686            * @param actionIds the action IDs
1687            * @param start the lower bound of the range of resource permissions
1688            * @param end the upper bound of the range of resource permissions (not inclusive)
1689            * @return the range of matching resource permissions
1690            * @throws SystemException if a system exception occurred
1691            */
1692            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P_R_A(
1693                    long companyId, java.lang.String name, int scope,
1694                    java.lang.String primKey, long roleId, long actionIds, int start,
1695                    int end) throws com.liferay.portal.kernel.exception.SystemException {
1696                    return getPersistence()
1697                                       .findByC_N_S_P_R_A(companyId, name, scope, primKey, roleId,
1698                            actionIds, start, end);
1699            }
1700    
1701            /**
1702            * 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;.
1703            *
1704            * <p>
1705            * 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.
1706            * </p>
1707            *
1708            * @param companyId the company ID
1709            * @param name the name
1710            * @param scope the scope
1711            * @param primKey the prim key
1712            * @param roleId the role ID
1713            * @param actionIds the action IDs
1714            * @param start the lower bound of the range of resource permissions
1715            * @param end the upper bound of the range of resource permissions (not inclusive)
1716            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1717            * @return the ordered range of matching resource permissions
1718            * @throws SystemException if a system exception occurred
1719            */
1720            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P_R_A(
1721                    long companyId, java.lang.String name, int scope,
1722                    java.lang.String primKey, long roleId, long actionIds, int start,
1723                    int end,
1724                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1725                    throws com.liferay.portal.kernel.exception.SystemException {
1726                    return getPersistence()
1727                                       .findByC_N_S_P_R_A(companyId, name, scope, primKey, roleId,
1728                            actionIds, start, end, orderByComparator);
1729            }
1730    
1731            /**
1732            * 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;.
1733            *
1734            * @param companyId the company ID
1735            * @param name the name
1736            * @param scope the scope
1737            * @param primKey the prim key
1738            * @param roleId the role ID
1739            * @param actionIds the action IDs
1740            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1741            * @return the first matching resource permission
1742            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
1743            * @throws SystemException if a system exception occurred
1744            */
1745            public static com.liferay.portal.model.ResourcePermission findByC_N_S_P_R_A_First(
1746                    long companyId, java.lang.String name, int scope,
1747                    java.lang.String primKey, long roleId, long actionIds,
1748                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1749                    throws com.liferay.portal.NoSuchResourcePermissionException,
1750                            com.liferay.portal.kernel.exception.SystemException {
1751                    return getPersistence()
1752                                       .findByC_N_S_P_R_A_First(companyId, name, scope, primKey,
1753                            roleId, actionIds, orderByComparator);
1754            }
1755    
1756            /**
1757            * 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;.
1758            *
1759            * @param companyId the company ID
1760            * @param name the name
1761            * @param scope the scope
1762            * @param primKey the prim key
1763            * @param roleId the role ID
1764            * @param actionIds the action IDs
1765            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1766            * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found
1767            * @throws SystemException if a system exception occurred
1768            */
1769            public static com.liferay.portal.model.ResourcePermission fetchByC_N_S_P_R_A_First(
1770                    long companyId, java.lang.String name, int scope,
1771                    java.lang.String primKey, long roleId, long actionIds,
1772                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1773                    throws com.liferay.portal.kernel.exception.SystemException {
1774                    return getPersistence()
1775                                       .fetchByC_N_S_P_R_A_First(companyId, name, scope, primKey,
1776                            roleId, actionIds, orderByComparator);
1777            }
1778    
1779            /**
1780            * 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;.
1781            *
1782            * @param companyId the company ID
1783            * @param name the name
1784            * @param scope the scope
1785            * @param primKey the prim key
1786            * @param roleId the role ID
1787            * @param actionIds the action IDs
1788            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1789            * @return the last matching resource permission
1790            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
1791            * @throws SystemException if a system exception occurred
1792            */
1793            public static com.liferay.portal.model.ResourcePermission findByC_N_S_P_R_A_Last(
1794                    long companyId, java.lang.String name, int scope,
1795                    java.lang.String primKey, long roleId, long actionIds,
1796                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1797                    throws com.liferay.portal.NoSuchResourcePermissionException,
1798                            com.liferay.portal.kernel.exception.SystemException {
1799                    return getPersistence()
1800                                       .findByC_N_S_P_R_A_Last(companyId, name, scope, primKey,
1801                            roleId, actionIds, orderByComparator);
1802            }
1803    
1804            /**
1805            * 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;.
1806            *
1807            * @param companyId the company ID
1808            * @param name the name
1809            * @param scope the scope
1810            * @param primKey the prim key
1811            * @param roleId the role ID
1812            * @param actionIds the action IDs
1813            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1814            * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found
1815            * @throws SystemException if a system exception occurred
1816            */
1817            public static com.liferay.portal.model.ResourcePermission fetchByC_N_S_P_R_A_Last(
1818                    long companyId, java.lang.String name, int scope,
1819                    java.lang.String primKey, long roleId, long actionIds,
1820                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1821                    throws com.liferay.portal.kernel.exception.SystemException {
1822                    return getPersistence()
1823                                       .fetchByC_N_S_P_R_A_Last(companyId, name, scope, primKey,
1824                            roleId, actionIds, orderByComparator);
1825            }
1826    
1827            /**
1828            * 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;.
1829            *
1830            * @param resourcePermissionId the primary key of the current resource permission
1831            * @param companyId the company ID
1832            * @param name the name
1833            * @param scope the scope
1834            * @param primKey the prim key
1835            * @param roleId the role ID
1836            * @param actionIds the action IDs
1837            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1838            * @return the previous, current, and next resource permission
1839            * @throws com.liferay.portal.NoSuchResourcePermissionException if a resource permission with the primary key could not be found
1840            * @throws SystemException if a system exception occurred
1841            */
1842            public static com.liferay.portal.model.ResourcePermission[] findByC_N_S_P_R_A_PrevAndNext(
1843                    long resourcePermissionId, long companyId, java.lang.String name,
1844                    int scope, java.lang.String primKey, long roleId, long actionIds,
1845                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1846                    throws com.liferay.portal.NoSuchResourcePermissionException,
1847                            com.liferay.portal.kernel.exception.SystemException {
1848                    return getPersistence()
1849                                       .findByC_N_S_P_R_A_PrevAndNext(resourcePermissionId,
1850                            companyId, name, scope, primKey, roleId, actionIds,
1851                            orderByComparator);
1852            }
1853    
1854            /**
1855            * Returns all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = any &#63; and actionIds = &#63;.
1856            *
1857            * <p>
1858            * 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.
1859            * </p>
1860            *
1861            * @param companyId the company ID
1862            * @param name the name
1863            * @param scope the scope
1864            * @param primKey the prim key
1865            * @param roleIds the role IDs
1866            * @param actionIds the action IDs
1867            * @return the matching resource permissions
1868            * @throws SystemException if a system exception occurred
1869            */
1870            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P_R_A(
1871                    long companyId, java.lang.String name, int scope,
1872                    java.lang.String primKey, long[] roleIds, long actionIds)
1873                    throws com.liferay.portal.kernel.exception.SystemException {
1874                    return getPersistence()
1875                                       .findByC_N_S_P_R_A(companyId, name, scope, primKey, roleIds,
1876                            actionIds);
1877            }
1878    
1879            /**
1880            * 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;.
1881            *
1882            * <p>
1883            * 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.
1884            * </p>
1885            *
1886            * @param companyId the company ID
1887            * @param name the name
1888            * @param scope the scope
1889            * @param primKey the prim key
1890            * @param roleIds the role IDs
1891            * @param actionIds the action IDs
1892            * @param start the lower bound of the range of resource permissions
1893            * @param end the upper bound of the range of resource permissions (not inclusive)
1894            * @return the range of matching resource permissions
1895            * @throws SystemException if a system exception occurred
1896            */
1897            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P_R_A(
1898                    long companyId, java.lang.String name, int scope,
1899                    java.lang.String primKey, long[] roleIds, long actionIds, int start,
1900                    int end) throws com.liferay.portal.kernel.exception.SystemException {
1901                    return getPersistence()
1902                                       .findByC_N_S_P_R_A(companyId, name, scope, primKey, roleIds,
1903                            actionIds, start, end);
1904            }
1905    
1906            /**
1907            * 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;.
1908            *
1909            * <p>
1910            * 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.
1911            * </p>
1912            *
1913            * @param companyId the company ID
1914            * @param name the name
1915            * @param scope the scope
1916            * @param primKey the prim key
1917            * @param roleIds the role IDs
1918            * @param actionIds the action IDs
1919            * @param start the lower bound of the range of resource permissions
1920            * @param end the upper bound of the range of resource permissions (not inclusive)
1921            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1922            * @return the ordered range of matching resource permissions
1923            * @throws SystemException if a system exception occurred
1924            */
1925            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P_R_A(
1926                    long companyId, java.lang.String name, int scope,
1927                    java.lang.String primKey, long[] roleIds, long actionIds, int start,
1928                    int end,
1929                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1930                    throws com.liferay.portal.kernel.exception.SystemException {
1931                    return getPersistence()
1932                                       .findByC_N_S_P_R_A(companyId, name, scope, primKey, roleIds,
1933                            actionIds, start, end, orderByComparator);
1934            }
1935    
1936            /**
1937            * 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.
1938            *
1939            * @param companyId the company ID
1940            * @param name the name
1941            * @param scope the scope
1942            * @param primKey the prim key
1943            * @param roleId the role ID
1944            * @param ownerId the owner ID
1945            * @param actionIds the action IDs
1946            * @return the matching resource permission
1947            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
1948            * @throws SystemException if a system exception occurred
1949            */
1950            public static com.liferay.portal.model.ResourcePermission findByC_N_S_P_R_O_A(
1951                    long companyId, java.lang.String name, int scope,
1952                    java.lang.String primKey, long roleId, long ownerId, long actionIds)
1953                    throws com.liferay.portal.NoSuchResourcePermissionException,
1954                            com.liferay.portal.kernel.exception.SystemException {
1955                    return getPersistence()
1956                                       .findByC_N_S_P_R_O_A(companyId, name, scope, primKey,
1957                            roleId, ownerId, actionIds);
1958            }
1959    
1960            /**
1961            * 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.
1962            *
1963            * @param companyId the company ID
1964            * @param name the name
1965            * @param scope the scope
1966            * @param primKey the prim key
1967            * @param roleId the role ID
1968            * @param ownerId the owner ID
1969            * @param actionIds the action IDs
1970            * @return the matching resource permission, or <code>null</code> if a matching resource permission could not be found
1971            * @throws SystemException if a system exception occurred
1972            */
1973            public static com.liferay.portal.model.ResourcePermission fetchByC_N_S_P_R_O_A(
1974                    long companyId, java.lang.String name, int scope,
1975                    java.lang.String primKey, long roleId, long ownerId, long actionIds)
1976                    throws com.liferay.portal.kernel.exception.SystemException {
1977                    return getPersistence()
1978                                       .fetchByC_N_S_P_R_O_A(companyId, name, scope, primKey,
1979                            roleId, ownerId, actionIds);
1980            }
1981    
1982            /**
1983            * 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.
1984            *
1985            * @param companyId the company ID
1986            * @param name the name
1987            * @param scope the scope
1988            * @param primKey the prim key
1989            * @param roleId the role ID
1990            * @param ownerId the owner ID
1991            * @param actionIds the action IDs
1992            * @param retrieveFromCache whether to use the finder cache
1993            * @return the matching resource permission, or <code>null</code> if a matching resource permission could not be found
1994            * @throws SystemException if a system exception occurred
1995            */
1996            public static com.liferay.portal.model.ResourcePermission fetchByC_N_S_P_R_O_A(
1997                    long companyId, java.lang.String name, int scope,
1998                    java.lang.String primKey, long roleId, long ownerId, long actionIds,
1999                    boolean retrieveFromCache)
2000                    throws com.liferay.portal.kernel.exception.SystemException {
2001                    return getPersistence()
2002                                       .fetchByC_N_S_P_R_O_A(companyId, name, scope, primKey,
2003                            roleId, ownerId, actionIds, retrieveFromCache);
2004            }
2005    
2006            /**
2007            * Returns all the resource permissions.
2008            *
2009            * @return the resource permissions
2010            * @throws SystemException if a system exception occurred
2011            */
2012            public static java.util.List<com.liferay.portal.model.ResourcePermission> findAll()
2013                    throws com.liferay.portal.kernel.exception.SystemException {
2014                    return getPersistence().findAll();
2015            }
2016    
2017            /**
2018            * Returns a range of all the resource permissions.
2019            *
2020            * <p>
2021            * 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.
2022            * </p>
2023            *
2024            * @param start the lower bound of the range of resource permissions
2025            * @param end the upper bound of the range of resource permissions (not inclusive)
2026            * @return the range of resource permissions
2027            * @throws SystemException if a system exception occurred
2028            */
2029            public static java.util.List<com.liferay.portal.model.ResourcePermission> findAll(
2030                    int start, int end)
2031                    throws com.liferay.portal.kernel.exception.SystemException {
2032                    return getPersistence().findAll(start, end);
2033            }
2034    
2035            /**
2036            * Returns an ordered range of all the resource permissions.
2037            *
2038            * <p>
2039            * 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.
2040            * </p>
2041            *
2042            * @param start the lower bound of the range of resource permissions
2043            * @param end the upper bound of the range of resource permissions (not inclusive)
2044            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
2045            * @return the ordered range of resource permissions
2046            * @throws SystemException if a system exception occurred
2047            */
2048            public static java.util.List<com.liferay.portal.model.ResourcePermission> findAll(
2049                    int start, int end,
2050                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
2051                    throws com.liferay.portal.kernel.exception.SystemException {
2052                    return getPersistence().findAll(start, end, orderByComparator);
2053            }
2054    
2055            /**
2056            * Removes all the resource permissions where scope = &#63; from the database.
2057            *
2058            * @param scope the scope
2059            * @throws SystemException if a system exception occurred
2060            */
2061            public static void removeByScope(int scope)
2062                    throws com.liferay.portal.kernel.exception.SystemException {
2063                    getPersistence().removeByScope(scope);
2064            }
2065    
2066            /**
2067            * Removes all the resource permissions where roleId = &#63; from the database.
2068            *
2069            * @param roleId the role ID
2070            * @throws SystemException if a system exception occurred
2071            */
2072            public static void removeByRoleId(long roleId)
2073                    throws com.liferay.portal.kernel.exception.SystemException {
2074                    getPersistence().removeByRoleId(roleId);
2075            }
2076    
2077            /**
2078            * Removes all the resource permissions where companyId = &#63; and primKey LIKE &#63; from the database.
2079            *
2080            * @param companyId the company ID
2081            * @param primKey the prim key
2082            * @throws SystemException if a system exception occurred
2083            */
2084            public static void removeByC_P(long companyId, java.lang.String primKey)
2085                    throws com.liferay.portal.kernel.exception.SystemException {
2086                    getPersistence().removeByC_P(companyId, primKey);
2087            }
2088    
2089            /**
2090            * Removes all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; from the database.
2091            *
2092            * @param companyId the company ID
2093            * @param name the name
2094            * @param scope the scope
2095            * @throws SystemException if a system exception occurred
2096            */
2097            public static void removeByC_N_S(long companyId, java.lang.String name,
2098                    int scope) throws com.liferay.portal.kernel.exception.SystemException {
2099                    getPersistence().removeByC_N_S(companyId, name, scope);
2100            }
2101    
2102            /**
2103            * Removes all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; from the database.
2104            *
2105            * @param companyId the company ID
2106            * @param name the name
2107            * @param scope the scope
2108            * @param primKey the prim key
2109            * @throws SystemException if a system exception occurred
2110            */
2111            public static void removeByC_N_S_P(long companyId, java.lang.String name,
2112                    int scope, java.lang.String primKey)
2113                    throws com.liferay.portal.kernel.exception.SystemException {
2114                    getPersistence().removeByC_N_S_P(companyId, name, scope, primKey);
2115            }
2116    
2117            /**
2118            * Removes all the resource permissions where companyId = &#63; and name = &#63; and primKey = &#63; and ownerId = &#63; from the database.
2119            *
2120            * @param companyId the company ID
2121            * @param name the name
2122            * @param primKey the prim key
2123            * @param ownerId the owner ID
2124            * @throws SystemException if a system exception occurred
2125            */
2126            public static void removeByC_N_P_O(long companyId, java.lang.String name,
2127                    java.lang.String primKey, long ownerId)
2128                    throws com.liferay.portal.kernel.exception.SystemException {
2129                    getPersistence().removeByC_N_P_O(companyId, name, primKey, ownerId);
2130            }
2131    
2132            /**
2133            * Removes all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = &#63; from the database.
2134            *
2135            * @param companyId the company ID
2136            * @param name the name
2137            * @param scope the scope
2138            * @param primKey the prim key
2139            * @param roleId the role ID
2140            * @throws SystemException if a system exception occurred
2141            */
2142            public static void removeByC_N_S_P_R(long companyId, java.lang.String name,
2143                    int scope, java.lang.String primKey, long roleId)
2144                    throws com.liferay.portal.kernel.exception.SystemException {
2145                    getPersistence()
2146                            .removeByC_N_S_P_R(companyId, name, scope, primKey, roleId);
2147            }
2148    
2149            /**
2150            * Removes all the resource permissions where companyId = &#63; and name = &#63; and primKey = &#63; and roleId = &#63; and actionIds = &#63; from the database.
2151            *
2152            * @param companyId the company ID
2153            * @param name the name
2154            * @param primKey the prim key
2155            * @param roleId the role ID
2156            * @param actionIds the action IDs
2157            * @throws SystemException if a system exception occurred
2158            */
2159            public static void removeByC_N_P_R_A(long companyId, java.lang.String name,
2160                    java.lang.String primKey, long roleId, long actionIds)
2161                    throws com.liferay.portal.kernel.exception.SystemException {
2162                    getPersistence()
2163                            .removeByC_N_P_R_A(companyId, name, primKey, roleId, actionIds);
2164            }
2165    
2166            /**
2167            * 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.
2168            *
2169            * @param companyId the company ID
2170            * @param name the name
2171            * @param scope the scope
2172            * @param primKey the prim key
2173            * @param roleId the role ID
2174            * @param actionIds the action IDs
2175            * @throws SystemException if a system exception occurred
2176            */
2177            public static void removeByC_N_S_P_R_A(long companyId,
2178                    java.lang.String name, int scope, java.lang.String primKey,
2179                    long roleId, long actionIds)
2180                    throws com.liferay.portal.kernel.exception.SystemException {
2181                    getPersistence()
2182                            .removeByC_N_S_P_R_A(companyId, name, scope, primKey, roleId,
2183                            actionIds);
2184            }
2185    
2186            /**
2187            * 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.
2188            *
2189            * @param companyId the company ID
2190            * @param name the name
2191            * @param scope the scope
2192            * @param primKey the prim key
2193            * @param roleId the role ID
2194            * @param ownerId the owner ID
2195            * @param actionIds the action IDs
2196            * @return the resource permission that was removed
2197            * @throws SystemException if a system exception occurred
2198            */
2199            public static com.liferay.portal.model.ResourcePermission removeByC_N_S_P_R_O_A(
2200                    long companyId, java.lang.String name, int scope,
2201                    java.lang.String primKey, long roleId, long ownerId, long actionIds)
2202                    throws com.liferay.portal.NoSuchResourcePermissionException,
2203                            com.liferay.portal.kernel.exception.SystemException {
2204                    return getPersistence()
2205                                       .removeByC_N_S_P_R_O_A(companyId, name, scope, primKey,
2206                            roleId, ownerId, actionIds);
2207            }
2208    
2209            /**
2210            * Removes all the resource permissions from the database.
2211            *
2212            * @throws SystemException if a system exception occurred
2213            */
2214            public static void removeAll()
2215                    throws com.liferay.portal.kernel.exception.SystemException {
2216                    getPersistence().removeAll();
2217            }
2218    
2219            /**
2220            * Returns the number of resource permissions where scope = &#63;.
2221            *
2222            * @param scope the scope
2223            * @return the number of matching resource permissions
2224            * @throws SystemException if a system exception occurred
2225            */
2226            public static int countByScope(int scope)
2227                    throws com.liferay.portal.kernel.exception.SystemException {
2228                    return getPersistence().countByScope(scope);
2229            }
2230    
2231            /**
2232            * Returns the number of resource permissions where scope = any &#63;.
2233            *
2234            * @param scopes the scopes
2235            * @return the number of matching resource permissions
2236            * @throws SystemException if a system exception occurred
2237            */
2238            public static int countByScope(int[] scopes)
2239                    throws com.liferay.portal.kernel.exception.SystemException {
2240                    return getPersistence().countByScope(scopes);
2241            }
2242    
2243            /**
2244            * Returns the number of resource permissions where roleId = &#63;.
2245            *
2246            * @param roleId the role ID
2247            * @return the number of matching resource permissions
2248            * @throws SystemException if a system exception occurred
2249            */
2250            public static int countByRoleId(long roleId)
2251                    throws com.liferay.portal.kernel.exception.SystemException {
2252                    return getPersistence().countByRoleId(roleId);
2253            }
2254    
2255            /**
2256            * Returns the number of resource permissions where companyId = &#63; and primKey LIKE &#63;.
2257            *
2258            * @param companyId the company ID
2259            * @param primKey the prim key
2260            * @return the number of matching resource permissions
2261            * @throws SystemException if a system exception occurred
2262            */
2263            public static int countByC_P(long companyId, java.lang.String primKey)
2264                    throws com.liferay.portal.kernel.exception.SystemException {
2265                    return getPersistence().countByC_P(companyId, primKey);
2266            }
2267    
2268            /**
2269            * Returns the number of resource permissions where companyId = &#63; and name = &#63; and scope = &#63;.
2270            *
2271            * @param companyId the company ID
2272            * @param name the name
2273            * @param scope the scope
2274            * @return the number of matching resource permissions
2275            * @throws SystemException if a system exception occurred
2276            */
2277            public static int countByC_N_S(long companyId, java.lang.String name,
2278                    int scope) throws com.liferay.portal.kernel.exception.SystemException {
2279                    return getPersistence().countByC_N_S(companyId, name, scope);
2280            }
2281    
2282            /**
2283            * Returns the number of resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
2284            *
2285            * @param companyId the company ID
2286            * @param name the name
2287            * @param scope the scope
2288            * @param primKey the prim key
2289            * @return the number of matching resource permissions
2290            * @throws SystemException if a system exception occurred
2291            */
2292            public static int countByC_N_S_P(long companyId, java.lang.String name,
2293                    int scope, java.lang.String primKey)
2294                    throws com.liferay.portal.kernel.exception.SystemException {
2295                    return getPersistence().countByC_N_S_P(companyId, name, scope, primKey);
2296            }
2297    
2298            /**
2299            * Returns the number of resource permissions where companyId = &#63; and name = &#63; and primKey = &#63; and ownerId = &#63;.
2300            *
2301            * @param companyId the company ID
2302            * @param name the name
2303            * @param primKey the prim key
2304            * @param ownerId the owner ID
2305            * @return the number of matching resource permissions
2306            * @throws SystemException if a system exception occurred
2307            */
2308            public static int countByC_N_P_O(long companyId, java.lang.String name,
2309                    java.lang.String primKey, long ownerId)
2310                    throws com.liferay.portal.kernel.exception.SystemException {
2311                    return getPersistence().countByC_N_P_O(companyId, name, primKey, ownerId);
2312            }
2313    
2314            /**
2315            * Returns the number of resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = &#63;.
2316            *
2317            * @param companyId the company ID
2318            * @param name the name
2319            * @param scope the scope
2320            * @param primKey the prim key
2321            * @param roleId the role ID
2322            * @return the number of matching resource permissions
2323            * @throws SystemException if a system exception occurred
2324            */
2325            public static int countByC_N_S_P_R(long companyId, java.lang.String name,
2326                    int scope, java.lang.String primKey, long roleId)
2327                    throws com.liferay.portal.kernel.exception.SystemException {
2328                    return getPersistence()
2329                                       .countByC_N_S_P_R(companyId, name, scope, primKey, roleId);
2330            }
2331    
2332            /**
2333            * Returns the number of resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = any &#63;.
2334            *
2335            * @param companyId the company ID
2336            * @param name the name
2337            * @param scope the scope
2338            * @param primKey the prim key
2339            * @param roleIds the role IDs
2340            * @return the number of matching resource permissions
2341            * @throws SystemException if a system exception occurred
2342            */
2343            public static int countByC_N_S_P_R(long companyId, java.lang.String name,
2344                    int scope, java.lang.String primKey, long[] roleIds)
2345                    throws com.liferay.portal.kernel.exception.SystemException {
2346                    return getPersistence()
2347                                       .countByC_N_S_P_R(companyId, name, scope, primKey, roleIds);
2348            }
2349    
2350            /**
2351            * Returns the number of resource permissions where companyId = &#63; and name = &#63; and primKey = &#63; and roleId = &#63; and actionIds = &#63;.
2352            *
2353            * @param companyId the company ID
2354            * @param name the name
2355            * @param primKey the prim key
2356            * @param roleId the role ID
2357            * @param actionIds the action IDs
2358            * @return the number of matching resource permissions
2359            * @throws SystemException if a system exception occurred
2360            */
2361            public static int countByC_N_P_R_A(long companyId, java.lang.String name,
2362                    java.lang.String primKey, long roleId, long actionIds)
2363                    throws com.liferay.portal.kernel.exception.SystemException {
2364                    return getPersistence()
2365                                       .countByC_N_P_R_A(companyId, name, primKey, roleId, actionIds);
2366            }
2367    
2368            /**
2369            * Returns the number of resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = &#63; and actionIds = &#63;.
2370            *
2371            * @param companyId the company ID
2372            * @param name the name
2373            * @param scope the scope
2374            * @param primKey the prim key
2375            * @param roleId the role ID
2376            * @param actionIds the action IDs
2377            * @return the number of matching resource permissions
2378            * @throws SystemException if a system exception occurred
2379            */
2380            public static int countByC_N_S_P_R_A(long companyId, java.lang.String name,
2381                    int scope, java.lang.String primKey, long roleId, long actionIds)
2382                    throws com.liferay.portal.kernel.exception.SystemException {
2383                    return getPersistence()
2384                                       .countByC_N_S_P_R_A(companyId, name, scope, primKey, roleId,
2385                            actionIds);
2386            }
2387    
2388            /**
2389            * 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;.
2390            *
2391            * @param companyId the company ID
2392            * @param name the name
2393            * @param scope the scope
2394            * @param primKey the prim key
2395            * @param roleIds the role IDs
2396            * @param actionIds the action IDs
2397            * @return the number of matching resource permissions
2398            * @throws SystemException if a system exception occurred
2399            */
2400            public static int countByC_N_S_P_R_A(long companyId, java.lang.String name,
2401                    int scope, java.lang.String primKey, long[] roleIds, long actionIds)
2402                    throws com.liferay.portal.kernel.exception.SystemException {
2403                    return getPersistence()
2404                                       .countByC_N_S_P_R_A(companyId, name, scope, primKey,
2405                            roleIds, actionIds);
2406            }
2407    
2408            /**
2409            * 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;.
2410            *
2411            * @param companyId the company ID
2412            * @param name the name
2413            * @param scope the scope
2414            * @param primKey the prim key
2415            * @param roleId the role ID
2416            * @param ownerId the owner ID
2417            * @param actionIds the action IDs
2418            * @return the number of matching resource permissions
2419            * @throws SystemException if a system exception occurred
2420            */
2421            public static int countByC_N_S_P_R_O_A(long companyId,
2422                    java.lang.String name, int scope, java.lang.String primKey,
2423                    long roleId, long ownerId, long actionIds)
2424                    throws com.liferay.portal.kernel.exception.SystemException {
2425                    return getPersistence()
2426                                       .countByC_N_S_P_R_O_A(companyId, name, scope, primKey,
2427                            roleId, ownerId, actionIds);
2428            }
2429    
2430            /**
2431            * Returns the number of resource permissions.
2432            *
2433            * @return the number of resource permissions
2434            * @throws SystemException if a system exception occurred
2435            */
2436            public static int countAll()
2437                    throws com.liferay.portal.kernel.exception.SystemException {
2438                    return getPersistence().countAll();
2439            }
2440    
2441            public static ResourcePermissionPersistence getPersistence() {
2442                    if (_persistence == null) {
2443                            _persistence = (ResourcePermissionPersistence)PortalBeanLocatorUtil.locate(ResourcePermissionPersistence.class.getName());
2444    
2445                            ReferenceRegistry.registerReference(ResourcePermissionUtil.class,
2446                                    "_persistence");
2447                    }
2448    
2449                    return _persistence;
2450            }
2451    
2452            /**
2453             * @deprecated
2454             */
2455            public void setPersistence(ResourcePermissionPersistence persistence) {
2456            }
2457    
2458            private static ResourcePermissionPersistence _persistence;
2459    }