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