001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.model.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#remove(com.liferay.portal.model.BaseModel)
098             */
099            public static ResourcePermission remove(
100                    ResourcePermission resourcePermission) throws SystemException {
101                    return getPersistence().remove(resourcePermission);
102            }
103    
104            /**
105             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
106             */
107            public static ResourcePermission update(
108                    ResourcePermission resourcePermission, boolean merge)
109                    throws SystemException {
110                    return getPersistence().update(resourcePermission, merge);
111            }
112    
113            /**
114             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
115             */
116            public static ResourcePermission update(
117                    ResourcePermission resourcePermission, boolean merge,
118                    ServiceContext serviceContext) throws SystemException {
119                    return getPersistence().update(resourcePermission, merge, serviceContext);
120            }
121    
122            /**
123            * Caches the resource permission in the entity cache if it is enabled.
124            *
125            * @param resourcePermission the resource permission to cache
126            */
127            public static void cacheResult(
128                    com.liferay.portal.model.ResourcePermission resourcePermission) {
129                    getPersistence().cacheResult(resourcePermission);
130            }
131    
132            /**
133            * Caches the resource permissions in the entity cache if it is enabled.
134            *
135            * @param resourcePermissions the resource permissions to cache
136            */
137            public static void cacheResult(
138                    java.util.List<com.liferay.portal.model.ResourcePermission> resourcePermissions) {
139                    getPersistence().cacheResult(resourcePermissions);
140            }
141    
142            /**
143            * Creates a new resource permission with the primary key. Does not add the resource permission to the database.
144            *
145            * @param resourcePermissionId the primary key for the new resource permission
146            * @return the new resource permission
147            */
148            public static com.liferay.portal.model.ResourcePermission create(
149                    long resourcePermissionId) {
150                    return getPersistence().create(resourcePermissionId);
151            }
152    
153            /**
154            * Removes the resource permission with the primary key from the database. Also notifies the appropriate model listeners.
155            *
156            * @param resourcePermissionId the primary key of the resource permission to remove
157            * @return the resource permission that was removed
158            * @throws com.liferay.portal.NoSuchResourcePermissionException if a resource permission with the primary key could not be found
159            * @throws SystemException if a system exception occurred
160            */
161            public static com.liferay.portal.model.ResourcePermission remove(
162                    long resourcePermissionId)
163                    throws com.liferay.portal.NoSuchResourcePermissionException,
164                            com.liferay.portal.kernel.exception.SystemException {
165                    return getPersistence().remove(resourcePermissionId);
166            }
167    
168            public static com.liferay.portal.model.ResourcePermission updateImpl(
169                    com.liferay.portal.model.ResourcePermission resourcePermission,
170                    boolean merge)
171                    throws com.liferay.portal.kernel.exception.SystemException {
172                    return getPersistence().updateImpl(resourcePermission, merge);
173            }
174    
175            /**
176            * Finds the resource permission with the primary key or throws a {@link com.liferay.portal.NoSuchResourcePermissionException} if it could not be found.
177            *
178            * @param resourcePermissionId the primary key of the resource permission to find
179            * @return the resource permission
180            * @throws com.liferay.portal.NoSuchResourcePermissionException if a resource permission with the primary key could not be found
181            * @throws SystemException if a system exception occurred
182            */
183            public static com.liferay.portal.model.ResourcePermission findByPrimaryKey(
184                    long resourcePermissionId)
185                    throws com.liferay.portal.NoSuchResourcePermissionException,
186                            com.liferay.portal.kernel.exception.SystemException {
187                    return getPersistence().findByPrimaryKey(resourcePermissionId);
188            }
189    
190            /**
191            * Finds the resource permission with the primary key or returns <code>null</code> if it could not be found.
192            *
193            * @param resourcePermissionId the primary key of the resource permission to find
194            * @return the resource permission, or <code>null</code> if a resource permission with the primary key could not be found
195            * @throws SystemException if a system exception occurred
196            */
197            public static com.liferay.portal.model.ResourcePermission fetchByPrimaryKey(
198                    long resourcePermissionId)
199                    throws com.liferay.portal.kernel.exception.SystemException {
200                    return getPersistence().fetchByPrimaryKey(resourcePermissionId);
201            }
202    
203            /**
204            * Finds all the resource permissions where roleId = &#63;.
205            *
206            * @param roleId the role ID to search with
207            * @return the matching resource permissions
208            * @throws SystemException if a system exception occurred
209            */
210            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByRoleId(
211                    long roleId) throws com.liferay.portal.kernel.exception.SystemException {
212                    return getPersistence().findByRoleId(roleId);
213            }
214    
215            /**
216            * Finds a range of all the resource permissions where roleId = &#63;.
217            *
218            * <p>
219            * 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.
220            * </p>
221            *
222            * @param roleId the role ID to search with
223            * @param start the lower bound of the range of resource permissions to return
224            * @param end the upper bound of the range of resource permissions to return (not inclusive)
225            * @return the range of matching resource permissions
226            * @throws SystemException if a system exception occurred
227            */
228            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByRoleId(
229                    long roleId, int start, int end)
230                    throws com.liferay.portal.kernel.exception.SystemException {
231                    return getPersistence().findByRoleId(roleId, start, end);
232            }
233    
234            /**
235            * Finds an ordered range of all the resource permissions where roleId = &#63;.
236            *
237            * <p>
238            * 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.
239            * </p>
240            *
241            * @param roleId the role ID to search with
242            * @param start the lower bound of the range of resource permissions to return
243            * @param end the upper bound of the range of resource permissions to return (not inclusive)
244            * @param orderByComparator the comparator to order the results by
245            * @return the ordered range of matching resource permissions
246            * @throws SystemException if a system exception occurred
247            */
248            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByRoleId(
249                    long roleId, int start, int end,
250                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
251                    throws com.liferay.portal.kernel.exception.SystemException {
252                    return getPersistence()
253                                       .findByRoleId(roleId, start, end, orderByComparator);
254            }
255    
256            /**
257            * Finds the first resource permission in the ordered set where roleId = &#63;.
258            *
259            * <p>
260            * 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.
261            * </p>
262            *
263            * @param roleId the role ID to search with
264            * @param orderByComparator the comparator to order the set by
265            * @return the first matching resource permission
266            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
267            * @throws SystemException if a system exception occurred
268            */
269            public static com.liferay.portal.model.ResourcePermission findByRoleId_First(
270                    long roleId,
271                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
272                    throws com.liferay.portal.NoSuchResourcePermissionException,
273                            com.liferay.portal.kernel.exception.SystemException {
274                    return getPersistence().findByRoleId_First(roleId, orderByComparator);
275            }
276    
277            /**
278            * Finds the last resource permission in the ordered set where roleId = &#63;.
279            *
280            * <p>
281            * 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.
282            * </p>
283            *
284            * @param roleId the role ID to search with
285            * @param orderByComparator the comparator to order the set by
286            * @return the last matching resource permission
287            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
288            * @throws SystemException if a system exception occurred
289            */
290            public static com.liferay.portal.model.ResourcePermission findByRoleId_Last(
291                    long roleId,
292                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
293                    throws com.liferay.portal.NoSuchResourcePermissionException,
294                            com.liferay.portal.kernel.exception.SystemException {
295                    return getPersistence().findByRoleId_Last(roleId, orderByComparator);
296            }
297    
298            /**
299            * Finds the resource permissions before and after the current resource permission in the ordered set where roleId = &#63;.
300            *
301            * <p>
302            * 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.
303            * </p>
304            *
305            * @param resourcePermissionId the primary key of the current resource permission
306            * @param roleId the role ID to search with
307            * @param orderByComparator the comparator to order the set by
308            * @return the previous, current, and next resource permission
309            * @throws com.liferay.portal.NoSuchResourcePermissionException if a resource permission with the primary key could not be found
310            * @throws SystemException if a system exception occurred
311            */
312            public static com.liferay.portal.model.ResourcePermission[] findByRoleId_PrevAndNext(
313                    long resourcePermissionId, long roleId,
314                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
315                    throws com.liferay.portal.NoSuchResourcePermissionException,
316                            com.liferay.portal.kernel.exception.SystemException {
317                    return getPersistence()
318                                       .findByRoleId_PrevAndNext(resourcePermissionId, roleId,
319                            orderByComparator);
320            }
321    
322            /**
323            * Finds all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63;.
324            *
325            * @param companyId the company ID to search with
326            * @param name the name to search with
327            * @param scope the scope to search with
328            * @return the matching resource permissions
329            * @throws SystemException if a system exception occurred
330            */
331            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S(
332                    long companyId, java.lang.String name, int scope)
333                    throws com.liferay.portal.kernel.exception.SystemException {
334                    return getPersistence().findByC_N_S(companyId, name, scope);
335            }
336    
337            /**
338            * Finds a range of all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63;.
339            *
340            * <p>
341            * 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.
342            * </p>
343            *
344            * @param companyId the company ID to search with
345            * @param name the name to search with
346            * @param scope the scope to search with
347            * @param start the lower bound of the range of resource permissions to return
348            * @param end the upper bound of the range of resource permissions to return (not inclusive)
349            * @return the range of matching resource permissions
350            * @throws SystemException if a system exception occurred
351            */
352            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S(
353                    long companyId, java.lang.String name, int scope, int start, int end)
354                    throws com.liferay.portal.kernel.exception.SystemException {
355                    return getPersistence().findByC_N_S(companyId, name, scope, start, end);
356            }
357    
358            /**
359            * Finds an ordered range of all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63;.
360            *
361            * <p>
362            * 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.
363            * </p>
364            *
365            * @param companyId the company ID to search with
366            * @param name the name to search with
367            * @param scope the scope to search with
368            * @param start the lower bound of the range of resource permissions to return
369            * @param end the upper bound of the range of resource permissions to return (not inclusive)
370            * @param orderByComparator the comparator to order the results by
371            * @return the ordered range of matching resource permissions
372            * @throws SystemException if a system exception occurred
373            */
374            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S(
375                    long companyId, java.lang.String name, int scope, int start, int end,
376                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
377                    throws com.liferay.portal.kernel.exception.SystemException {
378                    return getPersistence()
379                                       .findByC_N_S(companyId, name, scope, start, end,
380                            orderByComparator);
381            }
382    
383            /**
384            * Finds the first resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#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 companyId the company ID to search with
391            * @param name the name to search with
392            * @param scope the scope to search with
393            * @param orderByComparator the comparator to order the set by
394            * @return the first matching resource permission
395            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
396            * @throws SystemException if a system exception occurred
397            */
398            public static com.liferay.portal.model.ResourcePermission findByC_N_S_First(
399                    long companyId, java.lang.String name, int scope,
400                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
401                    throws com.liferay.portal.NoSuchResourcePermissionException,
402                            com.liferay.portal.kernel.exception.SystemException {
403                    return getPersistence()
404                                       .findByC_N_S_First(companyId, name, scope, orderByComparator);
405            }
406    
407            /**
408            * Finds the last resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63;.
409            *
410            * <p>
411            * 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.
412            * </p>
413            *
414            * @param companyId the company ID to search with
415            * @param name the name to search with
416            * @param scope the scope to search with
417            * @param orderByComparator the comparator to order the set by
418            * @return the last matching resource permission
419            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
420            * @throws SystemException if a system exception occurred
421            */
422            public static com.liferay.portal.model.ResourcePermission findByC_N_S_Last(
423                    long companyId, java.lang.String name, int scope,
424                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
425                    throws com.liferay.portal.NoSuchResourcePermissionException,
426                            com.liferay.portal.kernel.exception.SystemException {
427                    return getPersistence()
428                                       .findByC_N_S_Last(companyId, name, scope, orderByComparator);
429            }
430    
431            /**
432            * Finds the resource permissions before and after the current resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63;.
433            *
434            * <p>
435            * 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.
436            * </p>
437            *
438            * @param resourcePermissionId the primary key of the current resource permission
439            * @param companyId the company ID to search with
440            * @param name the name to search with
441            * @param scope the scope to search with
442            * @param orderByComparator the comparator to order the set by
443            * @return the previous, current, and next resource permission
444            * @throws com.liferay.portal.NoSuchResourcePermissionException if a resource permission with the primary key could not be found
445            * @throws SystemException if a system exception occurred
446            */
447            public static com.liferay.portal.model.ResourcePermission[] findByC_N_S_PrevAndNext(
448                    long resourcePermissionId, long companyId, java.lang.String name,
449                    int scope,
450                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
451                    throws com.liferay.portal.NoSuchResourcePermissionException,
452                            com.liferay.portal.kernel.exception.SystemException {
453                    return getPersistence()
454                                       .findByC_N_S_PrevAndNext(resourcePermissionId, companyId,
455                            name, scope, orderByComparator);
456            }
457    
458            /**
459            * Finds all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
460            *
461            * @param companyId the company ID to search with
462            * @param name the name to search with
463            * @param scope the scope to search with
464            * @param primKey the prim key to search with
465            * @return the matching resource permissions
466            * @throws SystemException if a system exception occurred
467            */
468            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P(
469                    long companyId, java.lang.String name, int scope,
470                    java.lang.String primKey)
471                    throws com.liferay.portal.kernel.exception.SystemException {
472                    return getPersistence().findByC_N_S_P(companyId, name, scope, primKey);
473            }
474    
475            /**
476            * Finds a range of all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
477            *
478            * <p>
479            * 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.
480            * </p>
481            *
482            * @param companyId the company ID to search with
483            * @param name the name to search with
484            * @param scope the scope to search with
485            * @param primKey the prim key to search with
486            * @param start the lower bound of the range of resource permissions to return
487            * @param end the upper bound of the range of resource permissions to return (not inclusive)
488            * @return the range of matching resource permissions
489            * @throws SystemException if a system exception occurred
490            */
491            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P(
492                    long companyId, java.lang.String name, int scope,
493                    java.lang.String primKey, int start, int end)
494                    throws com.liferay.portal.kernel.exception.SystemException {
495                    return getPersistence()
496                                       .findByC_N_S_P(companyId, name, scope, primKey, start, end);
497            }
498    
499            /**
500            * Finds an ordered range of all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
501            *
502            * <p>
503            * 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.
504            * </p>
505            *
506            * @param companyId the company ID to search with
507            * @param name the name to search with
508            * @param scope the scope to search with
509            * @param primKey the prim key to search with
510            * @param start the lower bound of the range of resource permissions to return
511            * @param end the upper bound of the range of resource permissions to return (not inclusive)
512            * @param orderByComparator the comparator to order the results by
513            * @return the ordered range of matching resource permissions
514            * @throws SystemException if a system exception occurred
515            */
516            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_S_P(
517                    long companyId, java.lang.String name, int scope,
518                    java.lang.String primKey, int start, int end,
519                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
520                    throws com.liferay.portal.kernel.exception.SystemException {
521                    return getPersistence()
522                                       .findByC_N_S_P(companyId, name, scope, primKey, start, end,
523                            orderByComparator);
524            }
525    
526            /**
527            * Finds the first resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
528            *
529            * <p>
530            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
531            * </p>
532            *
533            * @param companyId the company ID to search with
534            * @param name the name to search with
535            * @param scope the scope to search with
536            * @param primKey the prim key to search with
537            * @param orderByComparator the comparator to order the set by
538            * @return the first matching resource permission
539            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
540            * @throws SystemException if a system exception occurred
541            */
542            public static com.liferay.portal.model.ResourcePermission findByC_N_S_P_First(
543                    long companyId, java.lang.String name, int scope,
544                    java.lang.String primKey,
545                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
546                    throws com.liferay.portal.NoSuchResourcePermissionException,
547                            com.liferay.portal.kernel.exception.SystemException {
548                    return getPersistence()
549                                       .findByC_N_S_P_First(companyId, name, scope, primKey,
550                            orderByComparator);
551            }
552    
553            /**
554            * Finds the last resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
555            *
556            * <p>
557            * 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.
558            * </p>
559            *
560            * @param companyId the company ID to search with
561            * @param name the name to search with
562            * @param scope the scope to search with
563            * @param primKey the prim key to search with
564            * @param orderByComparator the comparator to order the set by
565            * @return the last matching resource permission
566            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
567            * @throws SystemException if a system exception occurred
568            */
569            public static com.liferay.portal.model.ResourcePermission findByC_N_S_P_Last(
570                    long companyId, java.lang.String name, int scope,
571                    java.lang.String primKey,
572                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
573                    throws com.liferay.portal.NoSuchResourcePermissionException,
574                            com.liferay.portal.kernel.exception.SystemException {
575                    return getPersistence()
576                                       .findByC_N_S_P_Last(companyId, name, scope, primKey,
577                            orderByComparator);
578            }
579    
580            /**
581            * Finds 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;.
582            *
583            * <p>
584            * 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.
585            * </p>
586            *
587            * @param resourcePermissionId the primary key of the current resource permission
588            * @param companyId the company ID to search with
589            * @param name the name to search with
590            * @param scope the scope to search with
591            * @param primKey the prim key to search with
592            * @param orderByComparator the comparator to order the set by
593            * @return the previous, current, and next resource permission
594            * @throws com.liferay.portal.NoSuchResourcePermissionException if a resource permission with the primary key could not be found
595            * @throws SystemException if a system exception occurred
596            */
597            public static com.liferay.portal.model.ResourcePermission[] findByC_N_S_P_PrevAndNext(
598                    long resourcePermissionId, long companyId, java.lang.String name,
599                    int scope, java.lang.String primKey,
600                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
601                    throws com.liferay.portal.NoSuchResourcePermissionException,
602                            com.liferay.portal.kernel.exception.SystemException {
603                    return getPersistence()
604                                       .findByC_N_S_P_PrevAndNext(resourcePermissionId, companyId,
605                            name, scope, primKey, orderByComparator);
606            }
607    
608            /**
609            * Finds all the resource permissions where companyId = &#63; and name = &#63; and primKey = &#63; and ownerId = &#63;.
610            *
611            * @param companyId the company ID to search with
612            * @param name the name to search with
613            * @param primKey the prim key to search with
614            * @param ownerId the owner ID to search with
615            * @return the matching resource permissions
616            * @throws SystemException if a system exception occurred
617            */
618            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_P_O(
619                    long companyId, java.lang.String name, java.lang.String primKey,
620                    long ownerId)
621                    throws com.liferay.portal.kernel.exception.SystemException {
622                    return getPersistence().findByC_N_P_O(companyId, name, primKey, ownerId);
623            }
624    
625            /**
626            * Finds a range of all the resource permissions where companyId = &#63; and name = &#63; and primKey = &#63; and ownerId = &#63;.
627            *
628            * <p>
629            * 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.
630            * </p>
631            *
632            * @param companyId the company ID to search with
633            * @param name the name to search with
634            * @param primKey the prim key to search with
635            * @param ownerId the owner ID to search with
636            * @param start the lower bound of the range of resource permissions to return
637            * @param end the upper bound of the range of resource permissions to return (not inclusive)
638            * @return the range of matching resource permissions
639            * @throws SystemException if a system exception occurred
640            */
641            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_P_O(
642                    long companyId, java.lang.String name, java.lang.String primKey,
643                    long ownerId, int start, int end)
644                    throws com.liferay.portal.kernel.exception.SystemException {
645                    return getPersistence()
646                                       .findByC_N_P_O(companyId, name, primKey, ownerId, start, end);
647            }
648    
649            /**
650            * Finds an ordered range of all the resource permissions where companyId = &#63; and name = &#63; and primKey = &#63; and ownerId = &#63;.
651            *
652            * <p>
653            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
654            * </p>
655            *
656            * @param companyId the company ID to search with
657            * @param name the name to search with
658            * @param primKey the prim key to search with
659            * @param ownerId the owner ID to search with
660            * @param start the lower bound of the range of resource permissions to return
661            * @param end the upper bound of the range of resource permissions to return (not inclusive)
662            * @param orderByComparator the comparator to order the results by
663            * @return the ordered range of matching resource permissions
664            * @throws SystemException if a system exception occurred
665            */
666            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_P_O(
667                    long companyId, java.lang.String name, java.lang.String primKey,
668                    long ownerId, int start, int end,
669                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
670                    throws com.liferay.portal.kernel.exception.SystemException {
671                    return getPersistence()
672                                       .findByC_N_P_O(companyId, name, primKey, ownerId, start,
673                            end, orderByComparator);
674            }
675    
676            /**
677            * Finds the first resource permission in the ordered set where companyId = &#63; and name = &#63; and primKey = &#63; and ownerId = &#63;.
678            *
679            * <p>
680            * 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.
681            * </p>
682            *
683            * @param companyId the company ID to search with
684            * @param name the name to search with
685            * @param primKey the prim key to search with
686            * @param ownerId the owner ID to search with
687            * @param orderByComparator the comparator to order the set by
688            * @return the first matching resource permission
689            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
690            * @throws SystemException if a system exception occurred
691            */
692            public static com.liferay.portal.model.ResourcePermission findByC_N_P_O_First(
693                    long companyId, java.lang.String name, java.lang.String primKey,
694                    long ownerId,
695                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
696                    throws com.liferay.portal.NoSuchResourcePermissionException,
697                            com.liferay.portal.kernel.exception.SystemException {
698                    return getPersistence()
699                                       .findByC_N_P_O_First(companyId, name, primKey, ownerId,
700                            orderByComparator);
701            }
702    
703            /**
704            * Finds the last resource permission in the ordered set where companyId = &#63; and name = &#63; and primKey = &#63; and ownerId = &#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 to search with
711            * @param name the name to search with
712            * @param primKey the prim key to search with
713            * @param ownerId the owner ID to search with
714            * @param orderByComparator the comparator to order the set by
715            * @return the last matching resource permission
716            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
717            * @throws SystemException if a system exception occurred
718            */
719            public static com.liferay.portal.model.ResourcePermission findByC_N_P_O_Last(
720                    long companyId, java.lang.String name, java.lang.String primKey,
721                    long ownerId,
722                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
723                    throws com.liferay.portal.NoSuchResourcePermissionException,
724                            com.liferay.portal.kernel.exception.SystemException {
725                    return getPersistence()
726                                       .findByC_N_P_O_Last(companyId, name, primKey, ownerId,
727                            orderByComparator);
728            }
729    
730            /**
731            * Finds 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;.
732            *
733            * <p>
734            * 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.
735            * </p>
736            *
737            * @param resourcePermissionId the primary key of the current resource permission
738            * @param companyId the company ID to search with
739            * @param name the name to search with
740            * @param primKey the prim key to search with
741            * @param ownerId the owner ID to search with
742            * @param orderByComparator the comparator to order the set by
743            * @return the previous, current, and next resource permission
744            * @throws com.liferay.portal.NoSuchResourcePermissionException if a resource permission with the primary key could not be found
745            * @throws SystemException if a system exception occurred
746            */
747            public static com.liferay.portal.model.ResourcePermission[] findByC_N_P_O_PrevAndNext(
748                    long resourcePermissionId, long companyId, java.lang.String name,
749                    java.lang.String primKey, long ownerId,
750                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
751                    throws com.liferay.portal.NoSuchResourcePermissionException,
752                            com.liferay.portal.kernel.exception.SystemException {
753                    return getPersistence()
754                                       .findByC_N_P_O_PrevAndNext(resourcePermissionId, companyId,
755                            name, primKey, ownerId, orderByComparator);
756            }
757    
758            /**
759            * Finds the resource permission where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = &#63; or throws a {@link com.liferay.portal.NoSuchResourcePermissionException} if it could not be found.
760            *
761            * @param companyId the company ID to search with
762            * @param name the name to search with
763            * @param scope the scope to search with
764            * @param primKey the prim key to search with
765            * @param roleId the role ID to search with
766            * @return the matching resource permission
767            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
768            * @throws SystemException if a system exception occurred
769            */
770            public static com.liferay.portal.model.ResourcePermission findByC_N_S_P_R(
771                    long companyId, java.lang.String name, int scope,
772                    java.lang.String primKey, long roleId)
773                    throws com.liferay.portal.NoSuchResourcePermissionException,
774                            com.liferay.portal.kernel.exception.SystemException {
775                    return getPersistence()
776                                       .findByC_N_S_P_R(companyId, name, scope, primKey, roleId);
777            }
778    
779            /**
780            * Finds the resource permission where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
781            *
782            * @param companyId the company ID to search with
783            * @param name the name to search with
784            * @param scope the scope to search with
785            * @param primKey the prim key to search with
786            * @param roleId the role ID to search with
787            * @return the matching resource permission, or <code>null</code> if a matching resource permission could not be found
788            * @throws SystemException if a system exception occurred
789            */
790            public static com.liferay.portal.model.ResourcePermission fetchByC_N_S_P_R(
791                    long companyId, java.lang.String name, int scope,
792                    java.lang.String primKey, long roleId)
793                    throws com.liferay.portal.kernel.exception.SystemException {
794                    return getPersistence()
795                                       .fetchByC_N_S_P_R(companyId, name, scope, primKey, roleId);
796            }
797    
798            /**
799            * Finds the resource permission where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
800            *
801            * @param companyId the company ID to search with
802            * @param name the name to search with
803            * @param scope the scope to search with
804            * @param primKey the prim key to search with
805            * @param roleId the role ID to search with
806            * @return the matching resource permission, or <code>null</code> if a matching resource permission could not be found
807            * @throws SystemException if a system exception occurred
808            */
809            public static com.liferay.portal.model.ResourcePermission fetchByC_N_S_P_R(
810                    long companyId, java.lang.String name, int scope,
811                    java.lang.String primKey, long roleId, boolean retrieveFromCache)
812                    throws com.liferay.portal.kernel.exception.SystemException {
813                    return getPersistence()
814                                       .fetchByC_N_S_P_R(companyId, name, scope, primKey, roleId,
815                            retrieveFromCache);
816            }
817    
818            /**
819            * Finds all the resource permissions where companyId = &#63; and name = &#63; and primKey = &#63; and roleId = &#63; and actionIds = &#63;.
820            *
821            * @param companyId the company ID to search with
822            * @param name the name to search with
823            * @param primKey the prim key to search with
824            * @param roleId the role ID to search with
825            * @param actionIds the action IDs to search with
826            * @return the matching resource permissions
827            * @throws SystemException if a system exception occurred
828            */
829            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_P_R_A(
830                    long companyId, java.lang.String name, java.lang.String primKey,
831                    long roleId, long actionIds)
832                    throws com.liferay.portal.kernel.exception.SystemException {
833                    return getPersistence()
834                                       .findByC_N_P_R_A(companyId, name, primKey, roleId, actionIds);
835            }
836    
837            /**
838            * Finds a range of all the resource permissions where companyId = &#63; and name = &#63; and primKey = &#63; and roleId = &#63; and actionIds = &#63;.
839            *
840            * <p>
841            * 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.
842            * </p>
843            *
844            * @param companyId the company ID to search with
845            * @param name the name to search with
846            * @param primKey the prim key to search with
847            * @param roleId the role ID to search with
848            * @param actionIds the action IDs to search with
849            * @param start the lower bound of the range of resource permissions to return
850            * @param end the upper bound of the range of resource permissions to return (not inclusive)
851            * @return the range of matching resource permissions
852            * @throws SystemException if a system exception occurred
853            */
854            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_P_R_A(
855                    long companyId, java.lang.String name, java.lang.String primKey,
856                    long roleId, long actionIds, int start, int end)
857                    throws com.liferay.portal.kernel.exception.SystemException {
858                    return getPersistence()
859                                       .findByC_N_P_R_A(companyId, name, primKey, roleId,
860                            actionIds, start, end);
861            }
862    
863            /**
864            * Finds an ordered range of all the resource permissions where companyId = &#63; and name = &#63; and primKey = &#63; and roleId = &#63; and actionIds = &#63;.
865            *
866            * <p>
867            * 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.
868            * </p>
869            *
870            * @param companyId the company ID to search with
871            * @param name the name to search with
872            * @param primKey the prim key to search with
873            * @param roleId the role ID to search with
874            * @param actionIds the action IDs to search with
875            * @param start the lower bound of the range of resource permissions to return
876            * @param end the upper bound of the range of resource permissions to return (not inclusive)
877            * @param orderByComparator the comparator to order the results by
878            * @return the ordered range of matching resource permissions
879            * @throws SystemException if a system exception occurred
880            */
881            public static java.util.List<com.liferay.portal.model.ResourcePermission> findByC_N_P_R_A(
882                    long companyId, java.lang.String name, java.lang.String primKey,
883                    long roleId, long actionIds, int start, int end,
884                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
885                    throws com.liferay.portal.kernel.exception.SystemException {
886                    return getPersistence()
887                                       .findByC_N_P_R_A(companyId, name, primKey, roleId,
888                            actionIds, start, end, orderByComparator);
889            }
890    
891            /**
892            * Finds the first resource permission in the ordered set where companyId = &#63; and name = &#63; and primKey = &#63; and roleId = &#63; and actionIds = &#63;.
893            *
894            * <p>
895            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
896            * </p>
897            *
898            * @param companyId the company ID to search with
899            * @param name the name to search with
900            * @param primKey the prim key to search with
901            * @param roleId the role ID to search with
902            * @param actionIds the action IDs to search with
903            * @param orderByComparator the comparator to order the set by
904            * @return the first matching resource permission
905            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
906            * @throws SystemException if a system exception occurred
907            */
908            public static com.liferay.portal.model.ResourcePermission findByC_N_P_R_A_First(
909                    long companyId, java.lang.String name, java.lang.String primKey,
910                    long roleId, long actionIds,
911                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
912                    throws com.liferay.portal.NoSuchResourcePermissionException,
913                            com.liferay.portal.kernel.exception.SystemException {
914                    return getPersistence()
915                                       .findByC_N_P_R_A_First(companyId, name, primKey, roleId,
916                            actionIds, orderByComparator);
917            }
918    
919            /**
920            * Finds the last resource permission in the ordered set where companyId = &#63; and name = &#63; and primKey = &#63; and roleId = &#63; and actionIds = &#63;.
921            *
922            * <p>
923            * 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.
924            * </p>
925            *
926            * @param companyId the company ID to search with
927            * @param name the name to search with
928            * @param primKey the prim key to search with
929            * @param roleId the role ID to search with
930            * @param actionIds the action IDs to search with
931            * @param orderByComparator the comparator to order the set by
932            * @return the last matching resource permission
933            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
934            * @throws SystemException if a system exception occurred
935            */
936            public static com.liferay.portal.model.ResourcePermission findByC_N_P_R_A_Last(
937                    long companyId, java.lang.String name, java.lang.String primKey,
938                    long roleId, long actionIds,
939                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
940                    throws com.liferay.portal.NoSuchResourcePermissionException,
941                            com.liferay.portal.kernel.exception.SystemException {
942                    return getPersistence()
943                                       .findByC_N_P_R_A_Last(companyId, name, primKey, roleId,
944                            actionIds, orderByComparator);
945            }
946    
947            /**
948            * Finds 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;.
949            *
950            * <p>
951            * 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.
952            * </p>
953            *
954            * @param resourcePermissionId the primary key of the current resource permission
955            * @param companyId the company ID to search with
956            * @param name the name to search with
957            * @param primKey the prim key to search with
958            * @param roleId the role ID to search with
959            * @param actionIds the action IDs to search with
960            * @param orderByComparator the comparator to order the set by
961            * @return the previous, current, and next resource permission
962            * @throws com.liferay.portal.NoSuchResourcePermissionException if a resource permission with the primary key could not be found
963            * @throws SystemException if a system exception occurred
964            */
965            public static com.liferay.portal.model.ResourcePermission[] findByC_N_P_R_A_PrevAndNext(
966                    long resourcePermissionId, long companyId, java.lang.String name,
967                    java.lang.String primKey, long roleId, long actionIds,
968                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
969                    throws com.liferay.portal.NoSuchResourcePermissionException,
970                            com.liferay.portal.kernel.exception.SystemException {
971                    return getPersistence()
972                                       .findByC_N_P_R_A_PrevAndNext(resourcePermissionId,
973                            companyId, name, primKey, roleId, actionIds, orderByComparator);
974            }
975    
976            /**
977            * Finds 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.
978            *
979            * @param companyId the company ID to search with
980            * @param name the name to search with
981            * @param scope the scope to search with
982            * @param primKey the prim key to search with
983            * @param roleId the role ID to search with
984            * @param ownerId the owner ID to search with
985            * @param actionIds the action IDs to search with
986            * @return the matching resource permission
987            * @throws com.liferay.portal.NoSuchResourcePermissionException if a matching resource permission could not be found
988            * @throws SystemException if a system exception occurred
989            */
990            public static com.liferay.portal.model.ResourcePermission findByC_N_S_P_R_O_A(
991                    long companyId, java.lang.String name, int scope,
992                    java.lang.String primKey, long roleId, long ownerId, long actionIds)
993                    throws com.liferay.portal.NoSuchResourcePermissionException,
994                            com.liferay.portal.kernel.exception.SystemException {
995                    return getPersistence()
996                                       .findByC_N_S_P_R_O_A(companyId, name, scope, primKey,
997                            roleId, ownerId, actionIds);
998            }
999    
1000            /**
1001            * Finds 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.
1002            *
1003            * @param companyId the company ID to search with
1004            * @param name the name to search with
1005            * @param scope the scope to search with
1006            * @param primKey the prim key to search with
1007            * @param roleId the role ID to search with
1008            * @param ownerId the owner ID to search with
1009            * @param actionIds the action IDs to search with
1010            * @return the matching resource permission, or <code>null</code> if a matching resource permission could not be found
1011            * @throws SystemException if a system exception occurred
1012            */
1013            public static com.liferay.portal.model.ResourcePermission fetchByC_N_S_P_R_O_A(
1014                    long companyId, java.lang.String name, int scope,
1015                    java.lang.String primKey, long roleId, long ownerId, long actionIds)
1016                    throws com.liferay.portal.kernel.exception.SystemException {
1017                    return getPersistence()
1018                                       .fetchByC_N_S_P_R_O_A(companyId, name, scope, primKey,
1019                            roleId, ownerId, actionIds);
1020            }
1021    
1022            /**
1023            * Finds 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.
1024            *
1025            * @param companyId the company ID to search with
1026            * @param name the name to search with
1027            * @param scope the scope to search with
1028            * @param primKey the prim key to search with
1029            * @param roleId the role ID to search with
1030            * @param ownerId the owner ID to search with
1031            * @param actionIds the action IDs to search with
1032            * @return the matching resource permission, or <code>null</code> if a matching resource permission could not be found
1033            * @throws SystemException if a system exception occurred
1034            */
1035            public static com.liferay.portal.model.ResourcePermission fetchByC_N_S_P_R_O_A(
1036                    long companyId, java.lang.String name, int scope,
1037                    java.lang.String primKey, long roleId, long ownerId, long actionIds,
1038                    boolean retrieveFromCache)
1039                    throws com.liferay.portal.kernel.exception.SystemException {
1040                    return getPersistence()
1041                                       .fetchByC_N_S_P_R_O_A(companyId, name, scope, primKey,
1042                            roleId, ownerId, actionIds, retrieveFromCache);
1043            }
1044    
1045            /**
1046            * Finds all the resource permissions.
1047            *
1048            * @return the resource permissions
1049            * @throws SystemException if a system exception occurred
1050            */
1051            public static java.util.List<com.liferay.portal.model.ResourcePermission> findAll()
1052                    throws com.liferay.portal.kernel.exception.SystemException {
1053                    return getPersistence().findAll();
1054            }
1055    
1056            /**
1057            * Finds a range of all the resource permissions.
1058            *
1059            * <p>
1060            * 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.
1061            * </p>
1062            *
1063            * @param start the lower bound of the range of resource permissions to return
1064            * @param end the upper bound of the range of resource permissions to return (not inclusive)
1065            * @return the range of resource permissions
1066            * @throws SystemException if a system exception occurred
1067            */
1068            public static java.util.List<com.liferay.portal.model.ResourcePermission> findAll(
1069                    int start, int end)
1070                    throws com.liferay.portal.kernel.exception.SystemException {
1071                    return getPersistence().findAll(start, end);
1072            }
1073    
1074            /**
1075            * Finds an ordered range of all the resource permissions.
1076            *
1077            * <p>
1078            * 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.
1079            * </p>
1080            *
1081            * @param start the lower bound of the range of resource permissions to return
1082            * @param end the upper bound of the range of resource permissions to return (not inclusive)
1083            * @param orderByComparator the comparator to order the results by
1084            * @return the ordered range of resource permissions
1085            * @throws SystemException if a system exception occurred
1086            */
1087            public static java.util.List<com.liferay.portal.model.ResourcePermission> findAll(
1088                    int start, int end,
1089                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1090                    throws com.liferay.portal.kernel.exception.SystemException {
1091                    return getPersistence().findAll(start, end, orderByComparator);
1092            }
1093    
1094            /**
1095            * Removes all the resource permissions where roleId = &#63; from the database.
1096            *
1097            * @param roleId the role ID to search with
1098            * @throws SystemException if a system exception occurred
1099            */
1100            public static void removeByRoleId(long roleId)
1101                    throws com.liferay.portal.kernel.exception.SystemException {
1102                    getPersistence().removeByRoleId(roleId);
1103            }
1104    
1105            /**
1106            * Removes all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; from the database.
1107            *
1108            * @param companyId the company ID to search with
1109            * @param name the name to search with
1110            * @param scope the scope to search with
1111            * @throws SystemException if a system exception occurred
1112            */
1113            public static void removeByC_N_S(long companyId, java.lang.String name,
1114                    int scope) throws com.liferay.portal.kernel.exception.SystemException {
1115                    getPersistence().removeByC_N_S(companyId, name, scope);
1116            }
1117    
1118            /**
1119            * Removes all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; from the database.
1120            *
1121            * @param companyId the company ID to search with
1122            * @param name the name to search with
1123            * @param scope the scope to search with
1124            * @param primKey the prim key to search with
1125            * @throws SystemException if a system exception occurred
1126            */
1127            public static void removeByC_N_S_P(long companyId, java.lang.String name,
1128                    int scope, java.lang.String primKey)
1129                    throws com.liferay.portal.kernel.exception.SystemException {
1130                    getPersistence().removeByC_N_S_P(companyId, name, scope, primKey);
1131            }
1132    
1133            /**
1134            * Removes all the resource permissions where companyId = &#63; and name = &#63; and primKey = &#63; and ownerId = &#63; from the database.
1135            *
1136            * @param companyId the company ID to search with
1137            * @param name the name to search with
1138            * @param primKey the prim key to search with
1139            * @param ownerId the owner ID to search with
1140            * @throws SystemException if a system exception occurred
1141            */
1142            public static void removeByC_N_P_O(long companyId, java.lang.String name,
1143                    java.lang.String primKey, long ownerId)
1144                    throws com.liferay.portal.kernel.exception.SystemException {
1145                    getPersistence().removeByC_N_P_O(companyId, name, primKey, ownerId);
1146            }
1147    
1148            /**
1149            * Removes the resource permission where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = &#63; from the database.
1150            *
1151            * @param companyId the company ID to search with
1152            * @param name the name to search with
1153            * @param scope the scope to search with
1154            * @param primKey the prim key to search with
1155            * @param roleId the role ID to search with
1156            * @throws SystemException if a system exception occurred
1157            */
1158            public static void removeByC_N_S_P_R(long companyId, java.lang.String name,
1159                    int scope, java.lang.String primKey, long roleId)
1160                    throws com.liferay.portal.NoSuchResourcePermissionException,
1161                            com.liferay.portal.kernel.exception.SystemException {
1162                    getPersistence()
1163                            .removeByC_N_S_P_R(companyId, name, scope, primKey, roleId);
1164            }
1165    
1166            /**
1167            * Removes all the resource permissions where companyId = &#63; and name = &#63; and primKey = &#63; and roleId = &#63; and actionIds = &#63; from the database.
1168            *
1169            * @param companyId the company ID to search with
1170            * @param name the name to search with
1171            * @param primKey the prim key to search with
1172            * @param roleId the role ID to search with
1173            * @param actionIds the action IDs to search with
1174            * @throws SystemException if a system exception occurred
1175            */
1176            public static void removeByC_N_P_R_A(long companyId, java.lang.String name,
1177                    java.lang.String primKey, long roleId, long actionIds)
1178                    throws com.liferay.portal.kernel.exception.SystemException {
1179                    getPersistence()
1180                            .removeByC_N_P_R_A(companyId, name, primKey, roleId, actionIds);
1181            }
1182    
1183            /**
1184            * 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.
1185            *
1186            * @param companyId the company ID to search with
1187            * @param name the name to search with
1188            * @param scope the scope to search with
1189            * @param primKey the prim key to search with
1190            * @param roleId the role ID to search with
1191            * @param ownerId the owner ID to search with
1192            * @param actionIds the action IDs to search with
1193            * @throws SystemException if a system exception occurred
1194            */
1195            public static void removeByC_N_S_P_R_O_A(long companyId,
1196                    java.lang.String name, int scope, java.lang.String primKey,
1197                    long roleId, long ownerId, long actionIds)
1198                    throws com.liferay.portal.NoSuchResourcePermissionException,
1199                            com.liferay.portal.kernel.exception.SystemException {
1200                    getPersistence()
1201                            .removeByC_N_S_P_R_O_A(companyId, name, scope, primKey, roleId,
1202                            ownerId, actionIds);
1203            }
1204    
1205            /**
1206            * Removes all the resource permissions from the database.
1207            *
1208            * @throws SystemException if a system exception occurred
1209            */
1210            public static void removeAll()
1211                    throws com.liferay.portal.kernel.exception.SystemException {
1212                    getPersistence().removeAll();
1213            }
1214    
1215            /**
1216            * Counts all the resource permissions where roleId = &#63;.
1217            *
1218            * @param roleId the role ID to search with
1219            * @return the number of matching resource permissions
1220            * @throws SystemException if a system exception occurred
1221            */
1222            public static int countByRoleId(long roleId)
1223                    throws com.liferay.portal.kernel.exception.SystemException {
1224                    return getPersistence().countByRoleId(roleId);
1225            }
1226    
1227            /**
1228            * Counts all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63;.
1229            *
1230            * @param companyId the company ID to search with
1231            * @param name the name to search with
1232            * @param scope the scope to search with
1233            * @return the number of matching resource permissions
1234            * @throws SystemException if a system exception occurred
1235            */
1236            public static int countByC_N_S(long companyId, java.lang.String name,
1237                    int scope) throws com.liferay.portal.kernel.exception.SystemException {
1238                    return getPersistence().countByC_N_S(companyId, name, scope);
1239            }
1240    
1241            /**
1242            * Counts all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
1243            *
1244            * @param companyId the company ID to search with
1245            * @param name the name to search with
1246            * @param scope the scope to search with
1247            * @param primKey the prim key to search with
1248            * @return the number of matching resource permissions
1249            * @throws SystemException if a system exception occurred
1250            */
1251            public static int countByC_N_S_P(long companyId, java.lang.String name,
1252                    int scope, java.lang.String primKey)
1253                    throws com.liferay.portal.kernel.exception.SystemException {
1254                    return getPersistence().countByC_N_S_P(companyId, name, scope, primKey);
1255            }
1256    
1257            /**
1258            * Counts all the resource permissions where companyId = &#63; and name = &#63; and primKey = &#63; and ownerId = &#63;.
1259            *
1260            * @param companyId the company ID to search with
1261            * @param name the name to search with
1262            * @param primKey the prim key to search with
1263            * @param ownerId the owner ID to search with
1264            * @return the number of matching resource permissions
1265            * @throws SystemException if a system exception occurred
1266            */
1267            public static int countByC_N_P_O(long companyId, java.lang.String name,
1268                    java.lang.String primKey, long ownerId)
1269                    throws com.liferay.portal.kernel.exception.SystemException {
1270                    return getPersistence().countByC_N_P_O(companyId, name, primKey, ownerId);
1271            }
1272    
1273            /**
1274            * Counts all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = &#63;.
1275            *
1276            * @param companyId the company ID to search with
1277            * @param name the name to search with
1278            * @param scope the scope to search with
1279            * @param primKey the prim key to search with
1280            * @param roleId the role ID to search with
1281            * @return the number of matching resource permissions
1282            * @throws SystemException if a system exception occurred
1283            */
1284            public static int countByC_N_S_P_R(long companyId, java.lang.String name,
1285                    int scope, java.lang.String primKey, long roleId)
1286                    throws com.liferay.portal.kernel.exception.SystemException {
1287                    return getPersistence()
1288                                       .countByC_N_S_P_R(companyId, name, scope, primKey, roleId);
1289            }
1290    
1291            /**
1292            * Counts all the resource permissions where companyId = &#63; and name = &#63; and primKey = &#63; and roleId = &#63; and actionIds = &#63;.
1293            *
1294            * @param companyId the company ID to search with
1295            * @param name the name to search with
1296            * @param primKey the prim key to search with
1297            * @param roleId the role ID to search with
1298            * @param actionIds the action IDs to search with
1299            * @return the number of matching resource permissions
1300            * @throws SystemException if a system exception occurred
1301            */
1302            public static int countByC_N_P_R_A(long companyId, java.lang.String name,
1303                    java.lang.String primKey, long roleId, long actionIds)
1304                    throws com.liferay.portal.kernel.exception.SystemException {
1305                    return getPersistence()
1306                                       .countByC_N_P_R_A(companyId, name, primKey, roleId, actionIds);
1307            }
1308    
1309            /**
1310            * Counts all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = &#63; and ownerId = &#63; and actionIds = &#63;.
1311            *
1312            * @param companyId the company ID to search with
1313            * @param name the name to search with
1314            * @param scope the scope to search with
1315            * @param primKey the prim key to search with
1316            * @param roleId the role ID to search with
1317            * @param ownerId the owner ID to search with
1318            * @param actionIds the action IDs to search with
1319            * @return the number of matching resource permissions
1320            * @throws SystemException if a system exception occurred
1321            */
1322            public static int countByC_N_S_P_R_O_A(long companyId,
1323                    java.lang.String name, int scope, java.lang.String primKey,
1324                    long roleId, long ownerId, long actionIds)
1325                    throws com.liferay.portal.kernel.exception.SystemException {
1326                    return getPersistence()
1327                                       .countByC_N_S_P_R_O_A(companyId, name, scope, primKey,
1328                            roleId, ownerId, actionIds);
1329            }
1330    
1331            /**
1332            * Counts all the resource permissions.
1333            *
1334            * @return the number of resource permissions
1335            * @throws SystemException if a system exception occurred
1336            */
1337            public static int countAll()
1338                    throws com.liferay.portal.kernel.exception.SystemException {
1339                    return getPersistence().countAll();
1340            }
1341    
1342            public static ResourcePermissionPersistence getPersistence() {
1343                    if (_persistence == null) {
1344                            _persistence = (ResourcePermissionPersistence)PortalBeanLocatorUtil.locate(ResourcePermissionPersistence.class.getName());
1345    
1346                            ReferenceRegistry.registerReference(ResourcePermissionUtil.class,
1347                                    "_persistence");
1348                    }
1349    
1350                    return _persistence;
1351            }
1352    
1353            public void setPersistence(ResourcePermissionPersistence persistence) {
1354                    _persistence = persistence;
1355    
1356                    ReferenceRegistry.registerReference(ResourcePermissionUtil.class,
1357                            "_persistence");
1358            }
1359    
1360            private static ResourcePermissionPersistence _persistence;
1361    }