001    /**
002     * Copyright (c) 2000-present 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.kernel.service.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.exception.NoSuchResourcePermissionException;
020    import com.liferay.portal.kernel.model.ResourcePermission;
021    
022    /**
023     * The persistence interface for the resource permission service.
024     *
025     * <p>
026     * Caching information and settings can be found in <code>portal.properties</code>
027     * </p>
028     *
029     * @author Brian Wing Shun Chan
030     * @see com.liferay.portal.service.persistence.impl.ResourcePermissionPersistenceImpl
031     * @see ResourcePermissionUtil
032     * @generated
033     */
034    @ProviderType
035    public interface ResourcePermissionPersistence extends BasePersistence<ResourcePermission> {
036            /*
037             * NOTE FOR DEVELOPERS:
038             *
039             * 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.
040             */
041    
042            /**
043            * Returns all the resource permissions where name = &#63;.
044            *
045            * @param name the name
046            * @return the matching resource permissions
047            */
048            public java.util.List<ResourcePermission> findByName(java.lang.String name);
049    
050            /**
051            * Returns a range of all the resource permissions where name = &#63;.
052            *
053            * <p>
054            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
055            * </p>
056            *
057            * @param name the name
058            * @param start the lower bound of the range of resource permissions
059            * @param end the upper bound of the range of resource permissions (not inclusive)
060            * @return the range of matching resource permissions
061            */
062            public java.util.List<ResourcePermission> findByName(
063                    java.lang.String name, int start, int end);
064    
065            /**
066            * Returns an ordered range of all the resource permissions where name = &#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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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 name the name
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            */
078            public java.util.List<ResourcePermission> findByName(
079                    java.lang.String name, int start, int end,
080                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator);
081    
082            /**
083            * Returns an ordered range of all the resource permissions where name = &#63;.
084            *
085            * <p>
086            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
087            * </p>
088            *
089            * @param name the name
090            * @param start the lower bound of the range of resource permissions
091            * @param end the upper bound of the range of resource permissions (not inclusive)
092            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
093            * @param retrieveFromCache whether to retrieve from the finder cache
094            * @return the ordered range of matching resource permissions
095            */
096            public java.util.List<ResourcePermission> findByName(
097                    java.lang.String name, int start, int end,
098                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator,
099                    boolean retrieveFromCache);
100    
101            /**
102            * Returns the first resource permission in the ordered set where name = &#63;.
103            *
104            * @param name the name
105            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
106            * @return the first matching resource permission
107            * @throws NoSuchResourcePermissionException if a matching resource permission could not be found
108            */
109            public ResourcePermission findByName_First(java.lang.String name,
110                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator)
111                    throws NoSuchResourcePermissionException;
112    
113            /**
114            * Returns the first resource permission in the ordered set where name = &#63;.
115            *
116            * @param name the name
117            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
118            * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found
119            */
120            public ResourcePermission fetchByName_First(java.lang.String name,
121                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator);
122    
123            /**
124            * Returns the last resource permission in the ordered set where name = &#63;.
125            *
126            * @param name the name
127            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
128            * @return the last matching resource permission
129            * @throws NoSuchResourcePermissionException if a matching resource permission could not be found
130            */
131            public ResourcePermission findByName_Last(java.lang.String name,
132                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator)
133                    throws NoSuchResourcePermissionException;
134    
135            /**
136            * Returns the last resource permission in the ordered set where name = &#63;.
137            *
138            * @param name the name
139            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
140            * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found
141            */
142            public ResourcePermission fetchByName_Last(java.lang.String name,
143                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator);
144    
145            /**
146            * Returns the resource permissions before and after the current resource permission in the ordered set where name = &#63;.
147            *
148            * @param resourcePermissionId the primary key of the current resource permission
149            * @param name the name
150            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
151            * @return the previous, current, and next resource permission
152            * @throws NoSuchResourcePermissionException if a resource permission with the primary key could not be found
153            */
154            public ResourcePermission[] findByName_PrevAndNext(
155                    long resourcePermissionId, java.lang.String name,
156                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator)
157                    throws NoSuchResourcePermissionException;
158    
159            /**
160            * Removes all the resource permissions where name = &#63; from the database.
161            *
162            * @param name the name
163            */
164            public void removeByName(java.lang.String name);
165    
166            /**
167            * Returns the number of resource permissions where name = &#63;.
168            *
169            * @param name the name
170            * @return the number of matching resource permissions
171            */
172            public int countByName(java.lang.String name);
173    
174            /**
175            * Returns all the resource permissions where scope = &#63;.
176            *
177            * @param scope the scope
178            * @return the matching resource permissions
179            */
180            public java.util.List<ResourcePermission> findByScope(int scope);
181    
182            /**
183            * Returns a range of all the resource permissions where scope = &#63;.
184            *
185            * <p>
186            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
187            * </p>
188            *
189            * @param scope the scope
190            * @param start the lower bound of the range of resource permissions
191            * @param end the upper bound of the range of resource permissions (not inclusive)
192            * @return the range of matching resource permissions
193            */
194            public java.util.List<ResourcePermission> findByScope(int scope, int start,
195                    int end);
196    
197            /**
198            * Returns an ordered range of all the resource permissions where scope = &#63;.
199            *
200            * <p>
201            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
202            * </p>
203            *
204            * @param scope the scope
205            * @param start the lower bound of the range of resource permissions
206            * @param end the upper bound of the range of resource permissions (not inclusive)
207            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
208            * @return the ordered range of matching resource permissions
209            */
210            public java.util.List<ResourcePermission> findByScope(int scope, int start,
211                    int end,
212                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator);
213    
214            /**
215            * Returns an ordered range of all the resource permissions where scope = &#63;.
216            *
217            * <p>
218            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
219            * </p>
220            *
221            * @param scope the scope
222            * @param start the lower bound of the range of resource permissions
223            * @param end the upper bound of the range of resource permissions (not inclusive)
224            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
225            * @param retrieveFromCache whether to retrieve from the finder cache
226            * @return the ordered range of matching resource permissions
227            */
228            public java.util.List<ResourcePermission> findByScope(int scope, int start,
229                    int end,
230                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator,
231                    boolean retrieveFromCache);
232    
233            /**
234            * Returns the first resource permission in the ordered set where scope = &#63;.
235            *
236            * @param scope the scope
237            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
238            * @return the first matching resource permission
239            * @throws NoSuchResourcePermissionException if a matching resource permission could not be found
240            */
241            public ResourcePermission findByScope_First(int scope,
242                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator)
243                    throws NoSuchResourcePermissionException;
244    
245            /**
246            * Returns the first resource permission in the ordered set where scope = &#63;.
247            *
248            * @param scope the scope
249            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
250            * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found
251            */
252            public ResourcePermission fetchByScope_First(int scope,
253                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator);
254    
255            /**
256            * Returns the last resource permission in the ordered set where scope = &#63;.
257            *
258            * @param scope the scope
259            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
260            * @return the last matching resource permission
261            * @throws NoSuchResourcePermissionException if a matching resource permission could not be found
262            */
263            public ResourcePermission findByScope_Last(int scope,
264                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator)
265                    throws NoSuchResourcePermissionException;
266    
267            /**
268            * Returns the last resource permission in the ordered set where scope = &#63;.
269            *
270            * @param scope the scope
271            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
272            * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found
273            */
274            public ResourcePermission fetchByScope_Last(int scope,
275                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator);
276    
277            /**
278            * Returns the resource permissions before and after the current resource permission in the ordered set where scope = &#63;.
279            *
280            * @param resourcePermissionId the primary key of the current resource permission
281            * @param scope the scope
282            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
283            * @return the previous, current, and next resource permission
284            * @throws NoSuchResourcePermissionException if a resource permission with the primary key could not be found
285            */
286            public ResourcePermission[] findByScope_PrevAndNext(
287                    long resourcePermissionId, int scope,
288                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator)
289                    throws NoSuchResourcePermissionException;
290    
291            /**
292            * Returns all the resource permissions where scope = any &#63;.
293            *
294            * <p>
295            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
296            * </p>
297            *
298            * @param scopes the scopes
299            * @return the matching resource permissions
300            */
301            public java.util.List<ResourcePermission> findByScope(int[] scopes);
302    
303            /**
304            * Returns a range of all the resource permissions where scope = any &#63;.
305            *
306            * <p>
307            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
308            * </p>
309            *
310            * @param scopes the scopes
311            * @param start the lower bound of the range of resource permissions
312            * @param end the upper bound of the range of resource permissions (not inclusive)
313            * @return the range of matching resource permissions
314            */
315            public java.util.List<ResourcePermission> findByScope(int[] scopes,
316                    int start, int end);
317    
318            /**
319            * Returns an ordered range of all the resource permissions where scope = any &#63;.
320            *
321            * <p>
322            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
323            * </p>
324            *
325            * @param scopes the scopes
326            * @param start the lower bound of the range of resource permissions
327            * @param end the upper bound of the range of resource permissions (not inclusive)
328            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
329            * @return the ordered range of matching resource permissions
330            */
331            public java.util.List<ResourcePermission> findByScope(int[] scopes,
332                    int start, int end,
333                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator);
334    
335            /**
336            * Returns an ordered range of all the resource permissions where scope = &#63;, optionally using the finder cache.
337            *
338            * <p>
339            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
340            * </p>
341            *
342            * @param scope the scope
343            * @param start the lower bound of the range of resource permissions
344            * @param end the upper bound of the range of resource permissions (not inclusive)
345            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
346            * @param retrieveFromCache whether to retrieve from the finder cache
347            * @return the ordered range of matching resource permissions
348            */
349            public java.util.List<ResourcePermission> findByScope(int[] scopes,
350                    int start, int end,
351                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator,
352                    boolean retrieveFromCache);
353    
354            /**
355            * Removes all the resource permissions where scope = &#63; from the database.
356            *
357            * @param scope the scope
358            */
359            public void removeByScope(int scope);
360    
361            /**
362            * Returns the number of resource permissions where scope = &#63;.
363            *
364            * @param scope the scope
365            * @return the number of matching resource permissions
366            */
367            public int countByScope(int scope);
368    
369            /**
370            * Returns the number of resource permissions where scope = any &#63;.
371            *
372            * @param scopes the scopes
373            * @return the number of matching resource permissions
374            */
375            public int countByScope(int[] scopes);
376    
377            /**
378            * Returns all the resource permissions where roleId = &#63;.
379            *
380            * @param roleId the role ID
381            * @return the matching resource permissions
382            */
383            public java.util.List<ResourcePermission> findByRoleId(long roleId);
384    
385            /**
386            * Returns a range of all the resource permissions where roleId = &#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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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 roleId the role ID
393            * @param start the lower bound of the range of resource permissions
394            * @param end the upper bound of the range of resource permissions (not inclusive)
395            * @return the range of matching resource permissions
396            */
397            public java.util.List<ResourcePermission> findByRoleId(long roleId,
398                    int start, int end);
399    
400            /**
401            * Returns an ordered range of all the resource permissions where roleId = &#63;.
402            *
403            * <p>
404            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
405            * </p>
406            *
407            * @param roleId the role ID
408            * @param start the lower bound of the range of resource permissions
409            * @param end the upper bound of the range of resource permissions (not inclusive)
410            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
411            * @return the ordered range of matching resource permissions
412            */
413            public java.util.List<ResourcePermission> findByRoleId(long roleId,
414                    int start, int end,
415                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator);
416    
417            /**
418            * Returns an ordered range of all the resource permissions where roleId = &#63;.
419            *
420            * <p>
421            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
422            * </p>
423            *
424            * @param roleId the role ID
425            * @param start the lower bound of the range of resource permissions
426            * @param end the upper bound of the range of resource permissions (not inclusive)
427            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
428            * @param retrieveFromCache whether to retrieve from the finder cache
429            * @return the ordered range of matching resource permissions
430            */
431            public java.util.List<ResourcePermission> findByRoleId(long roleId,
432                    int start, int end,
433                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator,
434                    boolean retrieveFromCache);
435    
436            /**
437            * Returns the first resource permission in the ordered set where roleId = &#63;.
438            *
439            * @param roleId the role ID
440            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
441            * @return the first matching resource permission
442            * @throws NoSuchResourcePermissionException if a matching resource permission could not be found
443            */
444            public ResourcePermission findByRoleId_First(long roleId,
445                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator)
446                    throws NoSuchResourcePermissionException;
447    
448            /**
449            * Returns the first resource permission in the ordered set where roleId = &#63;.
450            *
451            * @param roleId the role ID
452            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
453            * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found
454            */
455            public ResourcePermission fetchByRoleId_First(long roleId,
456                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator);
457    
458            /**
459            * Returns the last resource permission in the ordered set where roleId = &#63;.
460            *
461            * @param roleId the role ID
462            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
463            * @return the last matching resource permission
464            * @throws NoSuchResourcePermissionException if a matching resource permission could not be found
465            */
466            public ResourcePermission findByRoleId_Last(long roleId,
467                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator)
468                    throws NoSuchResourcePermissionException;
469    
470            /**
471            * Returns the last resource permission in the ordered set where roleId = &#63;.
472            *
473            * @param roleId the role ID
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            */
477            public ResourcePermission fetchByRoleId_Last(long roleId,
478                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator);
479    
480            /**
481            * Returns the resource permissions before and after the current resource permission in the ordered set where roleId = &#63;.
482            *
483            * @param resourcePermissionId the primary key of the current resource permission
484            * @param roleId the role ID
485            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
486            * @return the previous, current, and next resource permission
487            * @throws NoSuchResourcePermissionException if a resource permission with the primary key could not be found
488            */
489            public ResourcePermission[] findByRoleId_PrevAndNext(
490                    long resourcePermissionId, long roleId,
491                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator)
492                    throws NoSuchResourcePermissionException;
493    
494            /**
495            * Removes all the resource permissions where roleId = &#63; from the database.
496            *
497            * @param roleId the role ID
498            */
499            public void removeByRoleId(long roleId);
500    
501            /**
502            * Returns the number of resource permissions where roleId = &#63;.
503            *
504            * @param roleId the role ID
505            * @return the number of matching resource permissions
506            */
507            public int countByRoleId(long roleId);
508    
509            /**
510            * Returns all the resource permissions where companyId = &#63; and primKey LIKE &#63;.
511            *
512            * @param companyId the company ID
513            * @param primKey the prim key
514            * @return the matching resource permissions
515            */
516            public java.util.List<ResourcePermission> findByC_LikeP(long companyId,
517                    java.lang.String primKey);
518    
519            /**
520            * Returns a range of all the resource permissions where companyId = &#63; and primKey LIKE &#63;.
521            *
522            * <p>
523            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ResourcePermissionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
524            * </p>
525            *
526            * @param companyId the company ID
527            * @param primKey the prim key
528            * @param start the lower bound of the range of resource permissions
529            * @param end the upper bound of the range of resource permissions (not inclusive)
530            * @return the range of matching resource permissions
531            */
532            public java.util.List<ResourcePermission> findByC_LikeP(long companyId,
533                    java.lang.String primKey, int start, int end);
534    
535            /**
536            * Returns an ordered range of all the resource permissions where companyId = &#63; and primKey LIKE &#63;.
537            *
538            * <p>
539            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
540            * </p>
541            *
542            * @param companyId the company ID
543            * @param primKey the prim key
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            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
547            * @return the ordered range of matching resource permissions
548            */
549            public java.util.List<ResourcePermission> findByC_LikeP(long companyId,
550                    java.lang.String primKey, int start, int end,
551                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator);
552    
553            /**
554            * Returns an ordered range of all the resource permissions where companyId = &#63; and primKey LIKE &#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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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 primKey the prim key
562            * @param start the lower bound of the range of resource permissions
563            * @param end the upper bound of the range of resource permissions (not inclusive)
564            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
565            * @param retrieveFromCache whether to retrieve from the finder cache
566            * @return the ordered range of matching resource permissions
567            */
568            public java.util.List<ResourcePermission> findByC_LikeP(long companyId,
569                    java.lang.String primKey, int start, int end,
570                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator,
571                    boolean retrieveFromCache);
572    
573            /**
574            * Returns the first resource permission in the ordered set where companyId = &#63; and primKey LIKE &#63;.
575            *
576            * @param companyId the company ID
577            * @param primKey the prim key
578            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
579            * @return the first matching resource permission
580            * @throws NoSuchResourcePermissionException if a matching resource permission could not be found
581            */
582            public ResourcePermission findByC_LikeP_First(long companyId,
583                    java.lang.String primKey,
584                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator)
585                    throws NoSuchResourcePermissionException;
586    
587            /**
588            * Returns the first resource permission in the ordered set where companyId = &#63; and primKey LIKE &#63;.
589            *
590            * @param companyId the company ID
591            * @param primKey the prim key
592            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
593            * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found
594            */
595            public ResourcePermission fetchByC_LikeP_First(long companyId,
596                    java.lang.String primKey,
597                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator);
598    
599            /**
600            * Returns the last resource permission in the ordered set where companyId = &#63; and primKey LIKE &#63;.
601            *
602            * @param companyId the company ID
603            * @param primKey the prim key
604            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
605            * @return the last matching resource permission
606            * @throws NoSuchResourcePermissionException if a matching resource permission could not be found
607            */
608            public ResourcePermission findByC_LikeP_Last(long companyId,
609                    java.lang.String primKey,
610                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator)
611                    throws NoSuchResourcePermissionException;
612    
613            /**
614            * Returns the last resource permission in the ordered set where companyId = &#63; and primKey LIKE &#63;.
615            *
616            * @param companyId the company ID
617            * @param primKey the prim key
618            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
619            * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found
620            */
621            public ResourcePermission fetchByC_LikeP_Last(long companyId,
622                    java.lang.String primKey,
623                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator);
624    
625            /**
626            * Returns the resource permissions before and after the current resource permission in the ordered set where companyId = &#63; and primKey LIKE &#63;.
627            *
628            * @param resourcePermissionId the primary key of the current resource permission
629            * @param companyId the company ID
630            * @param primKey the prim key
631            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
632            * @return the previous, current, and next resource permission
633            * @throws NoSuchResourcePermissionException if a resource permission with the primary key could not be found
634            */
635            public ResourcePermission[] findByC_LikeP_PrevAndNext(
636                    long resourcePermissionId, long companyId, java.lang.String primKey,
637                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator)
638                    throws NoSuchResourcePermissionException;
639    
640            /**
641            * Removes all the resource permissions where companyId = &#63; and primKey LIKE &#63; from the database.
642            *
643            * @param companyId the company ID
644            * @param primKey the prim key
645            */
646            public void removeByC_LikeP(long companyId, java.lang.String primKey);
647    
648            /**
649            * Returns the number of resource permissions where companyId = &#63; and primKey LIKE &#63;.
650            *
651            * @param companyId the company ID
652            * @param primKey the prim key
653            * @return the number of matching resource permissions
654            */
655            public int countByC_LikeP(long companyId, java.lang.String primKey);
656    
657            /**
658            * Returns all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63;.
659            *
660            * @param companyId the company ID
661            * @param name the name
662            * @param scope the scope
663            * @return the matching resource permissions
664            */
665            public java.util.List<ResourcePermission> findByC_N_S(long companyId,
666                    java.lang.String name, int scope);
667    
668            /**
669            * Returns a range of all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63;.
670            *
671            * <p>
672            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
673            * </p>
674            *
675            * @param companyId the company ID
676            * @param name the name
677            * @param scope the scope
678            * @param start the lower bound of the range of resource permissions
679            * @param end the upper bound of the range of resource permissions (not inclusive)
680            * @return the range of matching resource permissions
681            */
682            public java.util.List<ResourcePermission> findByC_N_S(long companyId,
683                    java.lang.String name, int scope, int start, int end);
684    
685            /**
686            * Returns an ordered range of all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63;.
687            *
688            * <p>
689            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
690            * </p>
691            *
692            * @param companyId the company ID
693            * @param name the name
694            * @param scope the scope
695            * @param start the lower bound of the range of resource permissions
696            * @param end the upper bound of the range of resource permissions (not inclusive)
697            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
698            * @return the ordered range of matching resource permissions
699            */
700            public java.util.List<ResourcePermission> findByC_N_S(long companyId,
701                    java.lang.String name, int scope, int start, int end,
702                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator);
703    
704            /**
705            * Returns an ordered range of all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63;.
706            *
707            * <p>
708            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
709            * </p>
710            *
711            * @param companyId the company ID
712            * @param name the name
713            * @param scope the scope
714            * @param start the lower bound of the range of resource permissions
715            * @param end the upper bound of the range of resource permissions (not inclusive)
716            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
717            * @param retrieveFromCache whether to retrieve from the finder cache
718            * @return the ordered range of matching resource permissions
719            */
720            public java.util.List<ResourcePermission> findByC_N_S(long companyId,
721                    java.lang.String name, int scope, int start, int end,
722                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator,
723                    boolean retrieveFromCache);
724    
725            /**
726            * Returns the first resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63;.
727            *
728            * @param companyId the company ID
729            * @param name the name
730            * @param scope the scope
731            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
732            * @return the first matching resource permission
733            * @throws NoSuchResourcePermissionException if a matching resource permission could not be found
734            */
735            public ResourcePermission findByC_N_S_First(long companyId,
736                    java.lang.String name, int scope,
737                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator)
738                    throws NoSuchResourcePermissionException;
739    
740            /**
741            * Returns the first resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63;.
742            *
743            * @param companyId the company ID
744            * @param name the name
745            * @param scope the scope
746            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
747            * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found
748            */
749            public ResourcePermission fetchByC_N_S_First(long companyId,
750                    java.lang.String name, int scope,
751                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator);
752    
753            /**
754            * Returns the last resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63;.
755            *
756            * @param companyId the company ID
757            * @param name the name
758            * @param scope the scope
759            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
760            * @return the last matching resource permission
761            * @throws NoSuchResourcePermissionException if a matching resource permission could not be found
762            */
763            public ResourcePermission findByC_N_S_Last(long companyId,
764                    java.lang.String name, int scope,
765                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator)
766                    throws NoSuchResourcePermissionException;
767    
768            /**
769            * Returns the last resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63;.
770            *
771            * @param companyId the company ID
772            * @param name the name
773            * @param scope the scope
774            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
775            * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found
776            */
777            public ResourcePermission fetchByC_N_S_Last(long companyId,
778                    java.lang.String name, int scope,
779                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator);
780    
781            /**
782            * Returns the resource permissions before and after the current resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63;.
783            *
784            * @param resourcePermissionId the primary key of the current resource permission
785            * @param companyId the company ID
786            * @param name the name
787            * @param scope the scope
788            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
789            * @return the previous, current, and next resource permission
790            * @throws NoSuchResourcePermissionException if a resource permission with the primary key could not be found
791            */
792            public ResourcePermission[] findByC_N_S_PrevAndNext(
793                    long resourcePermissionId, long companyId, java.lang.String name,
794                    int scope,
795                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator)
796                    throws NoSuchResourcePermissionException;
797    
798            /**
799            * Removes all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; from the database.
800            *
801            * @param companyId the company ID
802            * @param name the name
803            * @param scope the scope
804            */
805            public void removeByC_N_S(long companyId, java.lang.String name, int scope);
806    
807            /**
808            * Returns the number of resource permissions where companyId = &#63; and name = &#63; and scope = &#63;.
809            *
810            * @param companyId the company ID
811            * @param name the name
812            * @param scope the scope
813            * @return the number of matching resource permissions
814            */
815            public int countByC_N_S(long companyId, java.lang.String name, int scope);
816    
817            /**
818            * Returns all the resource permissions where companyId = &#63; and scope = &#63; and primKey = &#63;.
819            *
820            * @param companyId the company ID
821            * @param scope the scope
822            * @param primKey the prim key
823            * @return the matching resource permissions
824            */
825            public java.util.List<ResourcePermission> findByC_S_P(long companyId,
826                    int scope, java.lang.String primKey);
827    
828            /**
829            * Returns a range of all the resource permissions where companyId = &#63; and scope = &#63; and primKey = &#63;.
830            *
831            * <p>
832            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
833            * </p>
834            *
835            * @param companyId the company ID
836            * @param scope the scope
837            * @param primKey the prim key
838            * @param start the lower bound of the range of resource permissions
839            * @param end the upper bound of the range of resource permissions (not inclusive)
840            * @return the range of matching resource permissions
841            */
842            public java.util.List<ResourcePermission> findByC_S_P(long companyId,
843                    int scope, java.lang.String primKey, int start, int end);
844    
845            /**
846            * Returns an ordered range of all the resource permissions where companyId = &#63; and scope = &#63; and primKey = &#63;.
847            *
848            * <p>
849            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
850            * </p>
851            *
852            * @param companyId the company ID
853            * @param scope the scope
854            * @param primKey the prim key
855            * @param start the lower bound of the range of resource permissions
856            * @param end the upper bound of the range of resource permissions (not inclusive)
857            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
858            * @return the ordered range of matching resource permissions
859            */
860            public java.util.List<ResourcePermission> findByC_S_P(long companyId,
861                    int scope, java.lang.String primKey, int start, int end,
862                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator);
863    
864            /**
865            * Returns an ordered range of all the resource permissions where companyId = &#63; and scope = &#63; and primKey = &#63;.
866            *
867            * <p>
868            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
869            * </p>
870            *
871            * @param companyId the company ID
872            * @param scope the scope
873            * @param primKey the prim key
874            * @param start the lower bound of the range of resource permissions
875            * @param end the upper bound of the range of resource permissions (not inclusive)
876            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
877            * @param retrieveFromCache whether to retrieve from the finder cache
878            * @return the ordered range of matching resource permissions
879            */
880            public java.util.List<ResourcePermission> findByC_S_P(long companyId,
881                    int scope, java.lang.String primKey, int start, int end,
882                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator,
883                    boolean retrieveFromCache);
884    
885            /**
886            * Returns the first resource permission in the ordered set where companyId = &#63; and scope = &#63; and primKey = &#63;.
887            *
888            * @param companyId the company ID
889            * @param scope the scope
890            * @param primKey the prim key
891            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
892            * @return the first matching resource permission
893            * @throws NoSuchResourcePermissionException if a matching resource permission could not be found
894            */
895            public ResourcePermission findByC_S_P_First(long companyId, int scope,
896                    java.lang.String primKey,
897                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator)
898                    throws NoSuchResourcePermissionException;
899    
900            /**
901            * Returns the first resource permission in the ordered set where companyId = &#63; and scope = &#63; and primKey = &#63;.
902            *
903            * @param companyId the company ID
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, or <code>null</code> if a matching resource permission could not be found
908            */
909            public ResourcePermission fetchByC_S_P_First(long companyId, int scope,
910                    java.lang.String primKey,
911                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator);
912    
913            /**
914            * Returns the last resource permission in the ordered set where companyId = &#63; and scope = &#63; and primKey = &#63;.
915            *
916            * @param companyId the company ID
917            * @param scope the scope
918            * @param primKey the prim key
919            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
920            * @return the last matching resource permission
921            * @throws NoSuchResourcePermissionException if a matching resource permission could not be found
922            */
923            public ResourcePermission findByC_S_P_Last(long companyId, int scope,
924                    java.lang.String primKey,
925                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator)
926                    throws NoSuchResourcePermissionException;
927    
928            /**
929            * Returns the last resource permission in the ordered set where companyId = &#63; and scope = &#63; and primKey = &#63;.
930            *
931            * @param companyId the company ID
932            * @param scope the scope
933            * @param primKey the prim key
934            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
935            * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found
936            */
937            public ResourcePermission fetchByC_S_P_Last(long companyId, int scope,
938                    java.lang.String primKey,
939                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator);
940    
941            /**
942            * Returns the resource permissions before and after the current resource permission in the ordered set where companyId = &#63; and scope = &#63; and primKey = &#63;.
943            *
944            * @param resourcePermissionId the primary key of the current resource permission
945            * @param companyId the company ID
946            * @param scope the scope
947            * @param primKey the prim key
948            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
949            * @return the previous, current, and next resource permission
950            * @throws NoSuchResourcePermissionException if a resource permission with the primary key could not be found
951            */
952            public ResourcePermission[] findByC_S_P_PrevAndNext(
953                    long resourcePermissionId, long companyId, int scope,
954                    java.lang.String primKey,
955                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator)
956                    throws NoSuchResourcePermissionException;
957    
958            /**
959            * Removes all the resource permissions where companyId = &#63; and scope = &#63; and primKey = &#63; from the database.
960            *
961            * @param companyId the company ID
962            * @param scope the scope
963            * @param primKey the prim key
964            */
965            public void removeByC_S_P(long companyId, int scope,
966                    java.lang.String primKey);
967    
968            /**
969            * Returns the number of resource permissions where companyId = &#63; and scope = &#63; and primKey = &#63;.
970            *
971            * @param companyId the company ID
972            * @param scope the scope
973            * @param primKey the prim key
974            * @return the number of matching resource permissions
975            */
976            public int countByC_S_P(long companyId, int scope, java.lang.String primKey);
977    
978            /**
979            * Returns all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
980            *
981            * @param companyId the company ID
982            * @param name the name
983            * @param scope the scope
984            * @param primKey the prim key
985            * @return the matching resource permissions
986            */
987            public java.util.List<ResourcePermission> findByC_N_S_P(long companyId,
988                    java.lang.String name, int scope, java.lang.String primKey);
989    
990            /**
991            * Returns a range of all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
992            *
993            * <p>
994            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
995            * </p>
996            *
997            * @param companyId the company ID
998            * @param name the name
999            * @param scope the scope
1000            * @param primKey the prim key
1001            * @param start the lower bound of the range of resource permissions
1002            * @param end the upper bound of the range of resource permissions (not inclusive)
1003            * @return the range of matching resource permissions
1004            */
1005            public java.util.List<ResourcePermission> findByC_N_S_P(long companyId,
1006                    java.lang.String name, int scope, java.lang.String primKey, int start,
1007                    int end);
1008    
1009            /**
1010            * Returns an ordered range of all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
1011            *
1012            * <p>
1013            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
1014            * </p>
1015            *
1016            * @param companyId the company ID
1017            * @param name the name
1018            * @param scope the scope
1019            * @param primKey the prim key
1020            * @param start the lower bound of the range of resource permissions
1021            * @param end the upper bound of the range of resource permissions (not inclusive)
1022            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1023            * @return the ordered range of matching resource permissions
1024            */
1025            public java.util.List<ResourcePermission> findByC_N_S_P(long companyId,
1026                    java.lang.String name, int scope, java.lang.String primKey, int start,
1027                    int end,
1028                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator);
1029    
1030            /**
1031            * Returns an ordered range of all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
1032            *
1033            * <p>
1034            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
1035            * </p>
1036            *
1037            * @param companyId the company ID
1038            * @param name the name
1039            * @param scope the scope
1040            * @param primKey the prim key
1041            * @param start the lower bound of the range of resource permissions
1042            * @param end the upper bound of the range of resource permissions (not inclusive)
1043            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1044            * @param retrieveFromCache whether to retrieve from the finder cache
1045            * @return the ordered range of matching resource permissions
1046            */
1047            public java.util.List<ResourcePermission> findByC_N_S_P(long companyId,
1048                    java.lang.String name, int scope, java.lang.String primKey, int start,
1049                    int end,
1050                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator,
1051                    boolean retrieveFromCache);
1052    
1053            /**
1054            * Returns the first resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
1055            *
1056            * @param companyId the company ID
1057            * @param name the name
1058            * @param scope the scope
1059            * @param primKey the prim key
1060            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1061            * @return the first matching resource permission
1062            * @throws NoSuchResourcePermissionException if a matching resource permission could not be found
1063            */
1064            public ResourcePermission findByC_N_S_P_First(long companyId,
1065                    java.lang.String name, int scope, java.lang.String primKey,
1066                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator)
1067                    throws NoSuchResourcePermissionException;
1068    
1069            /**
1070            * Returns the first resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
1071            *
1072            * @param companyId the company ID
1073            * @param name the name
1074            * @param scope the scope
1075            * @param primKey the prim key
1076            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1077            * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found
1078            */
1079            public ResourcePermission fetchByC_N_S_P_First(long companyId,
1080                    java.lang.String name, int scope, java.lang.String primKey,
1081                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator);
1082    
1083            /**
1084            * Returns the last resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
1085            *
1086            * @param companyId the company ID
1087            * @param name the name
1088            * @param scope the scope
1089            * @param primKey the prim key
1090            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1091            * @return the last matching resource permission
1092            * @throws NoSuchResourcePermissionException if a matching resource permission could not be found
1093            */
1094            public ResourcePermission findByC_N_S_P_Last(long companyId,
1095                    java.lang.String name, int scope, java.lang.String primKey,
1096                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator)
1097                    throws NoSuchResourcePermissionException;
1098    
1099            /**
1100            * Returns the last resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
1101            *
1102            * @param companyId the company ID
1103            * @param name the name
1104            * @param scope the scope
1105            * @param primKey the prim key
1106            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1107            * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found
1108            */
1109            public ResourcePermission fetchByC_N_S_P_Last(long companyId,
1110                    java.lang.String name, int scope, java.lang.String primKey,
1111                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator);
1112    
1113            /**
1114            * 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;.
1115            *
1116            * @param resourcePermissionId the primary key of the current resource permission
1117            * @param companyId the company ID
1118            * @param name the name
1119            * @param scope the scope
1120            * @param primKey the prim key
1121            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1122            * @return the previous, current, and next resource permission
1123            * @throws NoSuchResourcePermissionException if a resource permission with the primary key could not be found
1124            */
1125            public ResourcePermission[] findByC_N_S_P_PrevAndNext(
1126                    long resourcePermissionId, long companyId, java.lang.String name,
1127                    int scope, java.lang.String primKey,
1128                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator)
1129                    throws NoSuchResourcePermissionException;
1130    
1131            /**
1132            * Removes all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; from the database.
1133            *
1134            * @param companyId the company ID
1135            * @param name the name
1136            * @param scope the scope
1137            * @param primKey the prim key
1138            */
1139            public void removeByC_N_S_P(long companyId, java.lang.String name,
1140                    int scope, java.lang.String primKey);
1141    
1142            /**
1143            * Returns the number of resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63;.
1144            *
1145            * @param companyId the company ID
1146            * @param name the name
1147            * @param scope the scope
1148            * @param primKey the prim key
1149            * @return the number of matching resource permissions
1150            */
1151            public int countByC_N_S_P(long companyId, java.lang.String name, int scope,
1152                    java.lang.String primKey);
1153    
1154            /**
1155            * Returns all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = any &#63;.
1156            *
1157            * <p>
1158            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
1159            * </p>
1160            *
1161            * @param companyId the company ID
1162            * @param name the name
1163            * @param scope the scope
1164            * @param primKey the prim key
1165            * @param roleIds the role IDs
1166            * @return the matching resource permissions
1167            */
1168            public java.util.List<ResourcePermission> findByC_N_S_P_R(long companyId,
1169                    java.lang.String name, int scope, java.lang.String primKey,
1170                    long[] roleIds);
1171    
1172            /**
1173            * Returns a range of all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = any &#63;.
1174            *
1175            * <p>
1176            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
1177            * </p>
1178            *
1179            * @param companyId the company ID
1180            * @param name the name
1181            * @param scope the scope
1182            * @param primKey the prim key
1183            * @param roleIds the role IDs
1184            * @param start the lower bound of the range of resource permissions
1185            * @param end the upper bound of the range of resource permissions (not inclusive)
1186            * @return the range of matching resource permissions
1187            */
1188            public java.util.List<ResourcePermission> findByC_N_S_P_R(long companyId,
1189                    java.lang.String name, int scope, java.lang.String primKey,
1190                    long[] roleIds, int start, int end);
1191    
1192            /**
1193            * 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;.
1194            *
1195            * <p>
1196            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
1197            * </p>
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 roleIds the role IDs
1204            * @param start the lower bound of the range of resource permissions
1205            * @param end the upper bound of the range of resource permissions (not inclusive)
1206            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1207            * @return the ordered range of matching resource permissions
1208            */
1209            public java.util.List<ResourcePermission> findByC_N_S_P_R(long companyId,
1210                    java.lang.String name, int scope, java.lang.String primKey,
1211                    long[] roleIds, int start, int end,
1212                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator);
1213    
1214            /**
1215            * Returns an ordered range of all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = &#63;, optionally using the finder cache.
1216            *
1217            * <p>
1218            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
1219            * </p>
1220            *
1221            * @param companyId the company ID
1222            * @param name the name
1223            * @param scope the scope
1224            * @param primKey the prim key
1225            * @param roleId the role ID
1226            * @param start the lower bound of the range of resource permissions
1227            * @param end the upper bound of the range of resource permissions (not inclusive)
1228            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1229            * @param retrieveFromCache whether to retrieve from the finder cache
1230            * @return the ordered range of matching resource permissions
1231            */
1232            public java.util.List<ResourcePermission> findByC_N_S_P_R(long companyId,
1233                    java.lang.String name, int scope, java.lang.String primKey,
1234                    long[] roleIds, int start, int end,
1235                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator,
1236                    boolean retrieveFromCache);
1237    
1238            /**
1239            * Returns the resource permission where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = &#63; or throws a {@link NoSuchResourcePermissionException} if it could not be found.
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            * @return the matching resource permission
1247            * @throws NoSuchResourcePermissionException if a matching resource permission could not be found
1248            */
1249            public ResourcePermission findByC_N_S_P_R(long companyId,
1250                    java.lang.String name, int scope, java.lang.String primKey, long roleId)
1251                    throws NoSuchResourcePermissionException;
1252    
1253            /**
1254            * Returns the resource permission where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
1255            *
1256            * @param companyId the company ID
1257            * @param name the name
1258            * @param scope the scope
1259            * @param primKey the prim key
1260            * @param roleId the role ID
1261            * @return the matching resource permission, or <code>null</code> if a matching resource permission could not be found
1262            */
1263            public ResourcePermission fetchByC_N_S_P_R(long companyId,
1264                    java.lang.String name, int scope, java.lang.String primKey, long roleId);
1265    
1266            /**
1267            * Returns the resource permission where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
1268            *
1269            * @param companyId the company ID
1270            * @param name the name
1271            * @param scope the scope
1272            * @param primKey the prim key
1273            * @param roleId the role ID
1274            * @param retrieveFromCache whether to retrieve from the finder cache
1275            * @return the matching resource permission, or <code>null</code> if a matching resource permission could not be found
1276            */
1277            public ResourcePermission fetchByC_N_S_P_R(long companyId,
1278                    java.lang.String name, int scope, java.lang.String primKey,
1279                    long roleId, boolean retrieveFromCache);
1280    
1281            /**
1282            * Removes the resource permission where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = &#63; from the database.
1283            *
1284            * @param companyId the company ID
1285            * @param name the name
1286            * @param scope the scope
1287            * @param primKey the prim key
1288            * @param roleId the role ID
1289            * @return the resource permission that was removed
1290            */
1291            public ResourcePermission removeByC_N_S_P_R(long companyId,
1292                    java.lang.String name, int scope, java.lang.String primKey, long roleId)
1293                    throws NoSuchResourcePermissionException;
1294    
1295            /**
1296            * Returns the number of resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = &#63;.
1297            *
1298            * @param companyId the company ID
1299            * @param name the name
1300            * @param scope the scope
1301            * @param primKey the prim key
1302            * @param roleId the role ID
1303            * @return the number of matching resource permissions
1304            */
1305            public int countByC_N_S_P_R(long companyId, java.lang.String name,
1306                    int scope, java.lang.String primKey, long roleId);
1307    
1308            /**
1309            * Returns the number of resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKey = &#63; and roleId = any &#63;.
1310            *
1311            * @param companyId the company ID
1312            * @param name the name
1313            * @param scope the scope
1314            * @param primKey the prim key
1315            * @param roleIds the role IDs
1316            * @return the number of matching resource permissions
1317            */
1318            public int countByC_N_S_P_R(long companyId, java.lang.String name,
1319                    int scope, java.lang.String primKey, long[] roleIds);
1320    
1321            /**
1322            * Returns all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKeyId = &#63; and roleId = &#63; and viewActionId = &#63;.
1323            *
1324            * @param companyId the company ID
1325            * @param name the name
1326            * @param scope the scope
1327            * @param primKeyId the prim key ID
1328            * @param roleId the role ID
1329            * @param viewActionId the view action ID
1330            * @return the matching resource permissions
1331            */
1332            public java.util.List<ResourcePermission> findByC_N_S_P_R_V(
1333                    long companyId, java.lang.String name, int scope, long primKeyId,
1334                    long roleId, boolean viewActionId);
1335    
1336            /**
1337            * Returns a range of all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKeyId = &#63; and roleId = &#63; and viewActionId = &#63;.
1338            *
1339            * <p>
1340            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
1341            * </p>
1342            *
1343            * @param companyId the company ID
1344            * @param name the name
1345            * @param scope the scope
1346            * @param primKeyId the prim key ID
1347            * @param roleId the role ID
1348            * @param viewActionId the view action ID
1349            * @param start the lower bound of the range of resource permissions
1350            * @param end the upper bound of the range of resource permissions (not inclusive)
1351            * @return the range of matching resource permissions
1352            */
1353            public java.util.List<ResourcePermission> findByC_N_S_P_R_V(
1354                    long companyId, java.lang.String name, int scope, long primKeyId,
1355                    long roleId, boolean viewActionId, int start, int end);
1356    
1357            /**
1358            * Returns an ordered range of all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKeyId = &#63; and roleId = &#63; and viewActionId = &#63;.
1359            *
1360            * <p>
1361            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
1362            * </p>
1363            *
1364            * @param companyId the company ID
1365            * @param name the name
1366            * @param scope the scope
1367            * @param primKeyId the prim key ID
1368            * @param roleId the role ID
1369            * @param viewActionId the view action ID
1370            * @param start the lower bound of the range of resource permissions
1371            * @param end the upper bound of the range of resource permissions (not inclusive)
1372            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1373            * @return the ordered range of matching resource permissions
1374            */
1375            public java.util.List<ResourcePermission> findByC_N_S_P_R_V(
1376                    long companyId, java.lang.String name, int scope, long primKeyId,
1377                    long roleId, boolean viewActionId, int start, int end,
1378                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator);
1379    
1380            /**
1381            * Returns an ordered range of all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKeyId = &#63; and roleId = &#63; and viewActionId = &#63;.
1382            *
1383            * <p>
1384            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
1385            * </p>
1386            *
1387            * @param companyId the company ID
1388            * @param name the name
1389            * @param scope the scope
1390            * @param primKeyId the prim key ID
1391            * @param roleId the role ID
1392            * @param viewActionId the view action ID
1393            * @param start the lower bound of the range of resource permissions
1394            * @param end the upper bound of the range of resource permissions (not inclusive)
1395            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1396            * @param retrieveFromCache whether to retrieve from the finder cache
1397            * @return the ordered range of matching resource permissions
1398            */
1399            public java.util.List<ResourcePermission> findByC_N_S_P_R_V(
1400                    long companyId, java.lang.String name, int scope, long primKeyId,
1401                    long roleId, boolean viewActionId, int start, int end,
1402                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator,
1403                    boolean retrieveFromCache);
1404    
1405            /**
1406            * Returns the first resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63; and primKeyId = &#63; and roleId = &#63; and viewActionId = &#63;.
1407            *
1408            * @param companyId the company ID
1409            * @param name the name
1410            * @param scope the scope
1411            * @param primKeyId the prim key ID
1412            * @param roleId the role ID
1413            * @param viewActionId the view action ID
1414            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1415            * @return the first matching resource permission
1416            * @throws NoSuchResourcePermissionException if a matching resource permission could not be found
1417            */
1418            public ResourcePermission findByC_N_S_P_R_V_First(long companyId,
1419                    java.lang.String name, int scope, long primKeyId, long roleId,
1420                    boolean viewActionId,
1421                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator)
1422                    throws NoSuchResourcePermissionException;
1423    
1424            /**
1425            * Returns the first resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63; and primKeyId = &#63; and roleId = &#63; and viewActionId = &#63;.
1426            *
1427            * @param companyId the company ID
1428            * @param name the name
1429            * @param scope the scope
1430            * @param primKeyId the prim key ID
1431            * @param roleId the role ID
1432            * @param viewActionId the view action ID
1433            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1434            * @return the first matching resource permission, or <code>null</code> if a matching resource permission could not be found
1435            */
1436            public ResourcePermission fetchByC_N_S_P_R_V_First(long companyId,
1437                    java.lang.String name, int scope, long primKeyId, long roleId,
1438                    boolean viewActionId,
1439                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator);
1440    
1441            /**
1442            * Returns the last resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63; and primKeyId = &#63; and roleId = &#63; and viewActionId = &#63;.
1443            *
1444            * @param companyId the company ID
1445            * @param name the name
1446            * @param scope the scope
1447            * @param primKeyId the prim key ID
1448            * @param roleId the role ID
1449            * @param viewActionId the view action ID
1450            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1451            * @return the last matching resource permission
1452            * @throws NoSuchResourcePermissionException if a matching resource permission could not be found
1453            */
1454            public ResourcePermission findByC_N_S_P_R_V_Last(long companyId,
1455                    java.lang.String name, int scope, long primKeyId, long roleId,
1456                    boolean viewActionId,
1457                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator)
1458                    throws NoSuchResourcePermissionException;
1459    
1460            /**
1461            * Returns the last resource permission in the ordered set where companyId = &#63; and name = &#63; and scope = &#63; and primKeyId = &#63; and roleId = &#63; and viewActionId = &#63;.
1462            *
1463            * @param companyId the company ID
1464            * @param name the name
1465            * @param scope the scope
1466            * @param primKeyId the prim key ID
1467            * @param roleId the role ID
1468            * @param viewActionId the view action ID
1469            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1470            * @return the last matching resource permission, or <code>null</code> if a matching resource permission could not be found
1471            */
1472            public ResourcePermission fetchByC_N_S_P_R_V_Last(long companyId,
1473                    java.lang.String name, int scope, long primKeyId, long roleId,
1474                    boolean viewActionId,
1475                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator);
1476    
1477            /**
1478            * 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 primKeyId = &#63; and roleId = &#63; and viewActionId = &#63;.
1479            *
1480            * @param resourcePermissionId the primary key of the current resource permission
1481            * @param companyId the company ID
1482            * @param name the name
1483            * @param scope the scope
1484            * @param primKeyId the prim key ID
1485            * @param roleId the role ID
1486            * @param viewActionId the view action ID
1487            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1488            * @return the previous, current, and next resource permission
1489            * @throws NoSuchResourcePermissionException if a resource permission with the primary key could not be found
1490            */
1491            public ResourcePermission[] findByC_N_S_P_R_V_PrevAndNext(
1492                    long resourcePermissionId, long companyId, java.lang.String name,
1493                    int scope, long primKeyId, long roleId, boolean viewActionId,
1494                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator)
1495                    throws NoSuchResourcePermissionException;
1496    
1497            /**
1498            * Returns all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKeyId = &#63; and roleId = any &#63; and viewActionId = &#63;.
1499            *
1500            * <p>
1501            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
1502            * </p>
1503            *
1504            * @param companyId the company ID
1505            * @param name the name
1506            * @param scope the scope
1507            * @param primKeyId the prim key ID
1508            * @param roleIds the role IDs
1509            * @param viewActionId the view action ID
1510            * @return the matching resource permissions
1511            */
1512            public java.util.List<ResourcePermission> findByC_N_S_P_R_V(
1513                    long companyId, java.lang.String name, int scope, long primKeyId,
1514                    long[] roleIds, boolean viewActionId);
1515    
1516            /**
1517            * Returns a range of all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKeyId = &#63; and roleId = any &#63; and viewActionId = &#63;.
1518            *
1519            * <p>
1520            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
1521            * </p>
1522            *
1523            * @param companyId the company ID
1524            * @param name the name
1525            * @param scope the scope
1526            * @param primKeyId the prim key ID
1527            * @param roleIds the role IDs
1528            * @param viewActionId the view action ID
1529            * @param start the lower bound of the range of resource permissions
1530            * @param end the upper bound of the range of resource permissions (not inclusive)
1531            * @return the range of matching resource permissions
1532            */
1533            public java.util.List<ResourcePermission> findByC_N_S_P_R_V(
1534                    long companyId, java.lang.String name, int scope, long primKeyId,
1535                    long[] roleIds, boolean viewActionId, int start, int end);
1536    
1537            /**
1538            * Returns an ordered range of all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKeyId = &#63; and roleId = any &#63; and viewActionId = &#63;.
1539            *
1540            * <p>
1541            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
1542            * </p>
1543            *
1544            * @param companyId the company ID
1545            * @param name the name
1546            * @param scope the scope
1547            * @param primKeyId the prim key ID
1548            * @param roleIds the role IDs
1549            * @param viewActionId the view action ID
1550            * @param start the lower bound of the range of resource permissions
1551            * @param end the upper bound of the range of resource permissions (not inclusive)
1552            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1553            * @return the ordered range of matching resource permissions
1554            */
1555            public java.util.List<ResourcePermission> findByC_N_S_P_R_V(
1556                    long companyId, java.lang.String name, int scope, long primKeyId,
1557                    long[] roleIds, boolean viewActionId, int start, int end,
1558                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator);
1559    
1560            /**
1561            * Returns an ordered range of all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKeyId = &#63; and roleId = &#63; and viewActionId = &#63;, optionally using the finder cache.
1562            *
1563            * <p>
1564            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
1565            * </p>
1566            *
1567            * @param companyId the company ID
1568            * @param name the name
1569            * @param scope the scope
1570            * @param primKeyId the prim key ID
1571            * @param roleId the role ID
1572            * @param viewActionId the view action ID
1573            * @param start the lower bound of the range of resource permissions
1574            * @param end the upper bound of the range of resource permissions (not inclusive)
1575            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1576            * @param retrieveFromCache whether to retrieve from the finder cache
1577            * @return the ordered range of matching resource permissions
1578            */
1579            public java.util.List<ResourcePermission> findByC_N_S_P_R_V(
1580                    long companyId, java.lang.String name, int scope, long primKeyId,
1581                    long[] roleIds, boolean viewActionId, int start, int end,
1582                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator,
1583                    boolean retrieveFromCache);
1584    
1585            /**
1586            * Removes all the resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKeyId = &#63; and roleId = &#63; and viewActionId = &#63; from the database.
1587            *
1588            * @param companyId the company ID
1589            * @param name the name
1590            * @param scope the scope
1591            * @param primKeyId the prim key ID
1592            * @param roleId the role ID
1593            * @param viewActionId the view action ID
1594            */
1595            public void removeByC_N_S_P_R_V(long companyId, java.lang.String name,
1596                    int scope, long primKeyId, long roleId, boolean viewActionId);
1597    
1598            /**
1599            * Returns the number of resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKeyId = &#63; and roleId = &#63; and viewActionId = &#63;.
1600            *
1601            * @param companyId the company ID
1602            * @param name the name
1603            * @param scope the scope
1604            * @param primKeyId the prim key ID
1605            * @param roleId the role ID
1606            * @param viewActionId the view action ID
1607            * @return the number of matching resource permissions
1608            */
1609            public int countByC_N_S_P_R_V(long companyId, java.lang.String name,
1610                    int scope, long primKeyId, long roleId, boolean viewActionId);
1611    
1612            /**
1613            * Returns the number of resource permissions where companyId = &#63; and name = &#63; and scope = &#63; and primKeyId = &#63; and roleId = any &#63; and viewActionId = &#63;.
1614            *
1615            * @param companyId the company ID
1616            * @param name the name
1617            * @param scope the scope
1618            * @param primKeyId the prim key ID
1619            * @param roleIds the role IDs
1620            * @param viewActionId the view action ID
1621            * @return the number of matching resource permissions
1622            */
1623            public int countByC_N_S_P_R_V(long companyId, java.lang.String name,
1624                    int scope, long primKeyId, long[] roleIds, boolean viewActionId);
1625    
1626            /**
1627            * Caches the resource permission in the entity cache if it is enabled.
1628            *
1629            * @param resourcePermission the resource permission
1630            */
1631            public void cacheResult(ResourcePermission resourcePermission);
1632    
1633            /**
1634            * Caches the resource permissions in the entity cache if it is enabled.
1635            *
1636            * @param resourcePermissions the resource permissions
1637            */
1638            public void cacheResult(
1639                    java.util.List<ResourcePermission> resourcePermissions);
1640    
1641            /**
1642            * Creates a new resource permission with the primary key. Does not add the resource permission to the database.
1643            *
1644            * @param resourcePermissionId the primary key for the new resource permission
1645            * @return the new resource permission
1646            */
1647            public ResourcePermission create(long resourcePermissionId);
1648    
1649            /**
1650            * Removes the resource permission with the primary key from the database. Also notifies the appropriate model listeners.
1651            *
1652            * @param resourcePermissionId the primary key of the resource permission
1653            * @return the resource permission that was removed
1654            * @throws NoSuchResourcePermissionException if a resource permission with the primary key could not be found
1655            */
1656            public ResourcePermission remove(long resourcePermissionId)
1657                    throws NoSuchResourcePermissionException;
1658    
1659            public ResourcePermission updateImpl(ResourcePermission resourcePermission);
1660    
1661            /**
1662            * Returns the resource permission with the primary key or throws a {@link NoSuchResourcePermissionException} if it could not be found.
1663            *
1664            * @param resourcePermissionId the primary key of the resource permission
1665            * @return the resource permission
1666            * @throws NoSuchResourcePermissionException if a resource permission with the primary key could not be found
1667            */
1668            public ResourcePermission findByPrimaryKey(long resourcePermissionId)
1669                    throws NoSuchResourcePermissionException;
1670    
1671            /**
1672            * Returns the resource permission with the primary key or returns <code>null</code> if it could not be found.
1673            *
1674            * @param resourcePermissionId the primary key of the resource permission
1675            * @return the resource permission, or <code>null</code> if a resource permission with the primary key could not be found
1676            */
1677            public ResourcePermission fetchByPrimaryKey(long resourcePermissionId);
1678    
1679            @Override
1680            public java.util.Map<java.io.Serializable, ResourcePermission> fetchByPrimaryKeys(
1681                    java.util.Set<java.io.Serializable> primaryKeys);
1682    
1683            /**
1684            * Returns all the resource permissions.
1685            *
1686            * @return the resource permissions
1687            */
1688            public java.util.List<ResourcePermission> findAll();
1689    
1690            /**
1691            * Returns a range of all the resource permissions.
1692            *
1693            * <p>
1694            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
1695            * </p>
1696            *
1697            * @param start the lower bound of the range of resource permissions
1698            * @param end the upper bound of the range of resource permissions (not inclusive)
1699            * @return the range of resource permissions
1700            */
1701            public java.util.List<ResourcePermission> findAll(int start, int end);
1702    
1703            /**
1704            * Returns an ordered range of all the resource permissions.
1705            *
1706            * <p>
1707            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
1708            * </p>
1709            *
1710            * @param start the lower bound of the range of resource permissions
1711            * @param end the upper bound of the range of resource permissions (not inclusive)
1712            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1713            * @return the ordered range of resource permissions
1714            */
1715            public java.util.List<ResourcePermission> findAll(int start, int end,
1716                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator);
1717    
1718            /**
1719            * Returns an ordered range of all the resource permissions.
1720            *
1721            * <p>
1722            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
1723            * </p>
1724            *
1725            * @param start the lower bound of the range of resource permissions
1726            * @param end the upper bound of the range of resource permissions (not inclusive)
1727            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1728            * @param retrieveFromCache whether to retrieve from the finder cache
1729            * @return the ordered range of resource permissions
1730            */
1731            public java.util.List<ResourcePermission> findAll(int start, int end,
1732                    com.liferay.portal.kernel.util.OrderByComparator<ResourcePermission> orderByComparator,
1733                    boolean retrieveFromCache);
1734    
1735            /**
1736            * Removes all the resource permissions from the database.
1737            */
1738            public void removeAll();
1739    
1740            /**
1741            * Returns the number of resource permissions.
1742            *
1743            * @return the number of resource permissions
1744            */
1745            public int countAll();
1746    }