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