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