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