001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.kernel.service.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.exception.NoSuchResourceBlockPermissionException;
020    import com.liferay.portal.kernel.model.ResourceBlockPermission;
021    
022    /**
023     * The persistence interface for the resource block permission service.
024     *
025     * <p>
026     * Caching information and settings can be found in <code>portal.properties</code>
027     * </p>
028     *
029     * @author Brian Wing Shun Chan
030     * @see com.liferay.portal.service.persistence.impl.ResourceBlockPermissionPersistenceImpl
031     * @see ResourceBlockPermissionUtil
032     * @generated
033     */
034    @ProviderType
035    public interface ResourceBlockPermissionPersistence extends BasePersistence<ResourceBlockPermission> {
036            /*
037             * NOTE FOR DEVELOPERS:
038             *
039             * Never modify or reference this interface directly. Always use {@link ResourceBlockPermissionUtil} to access the resource block permission persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
040             */
041    
042            /**
043            * Returns all the resource block permissions where resourceBlockId = &#63;.
044            *
045            * @param resourceBlockId the resource block ID
046            * @return the matching resource block permissions
047            */
048            public java.util.List<ResourceBlockPermission> findByResourceBlockId(
049                    long resourceBlockId);
050    
051            /**
052            * Returns a range of all the resource block permissions where resourceBlockId = &#63;.
053            *
054            * <p>
055            * 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 ResourceBlockPermissionModelImpl}. 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.
056            * </p>
057            *
058            * @param resourceBlockId the resource block ID
059            * @param start the lower bound of the range of resource block permissions
060            * @param end the upper bound of the range of resource block permissions (not inclusive)
061            * @return the range of matching resource block permissions
062            */
063            public java.util.List<ResourceBlockPermission> findByResourceBlockId(
064                    long resourceBlockId, int start, int end);
065    
066            /**
067            * Returns an ordered range of all the resource block permissions where resourceBlockId = &#63;.
068            *
069            * <p>
070            * 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 ResourceBlockPermissionModelImpl}. 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.
071            * </p>
072            *
073            * @param resourceBlockId the resource block ID
074            * @param start the lower bound of the range of resource block permissions
075            * @param end the upper bound of the range of resource block permissions (not inclusive)
076            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
077            * @return the ordered range of matching resource block permissions
078            */
079            public java.util.List<ResourceBlockPermission> findByResourceBlockId(
080                    long resourceBlockId, int start, int end,
081                    com.liferay.portal.kernel.util.OrderByComparator<ResourceBlockPermission> orderByComparator);
082    
083            /**
084            * Returns an ordered range of all the resource block permissions where resourceBlockId = &#63;.
085            *
086            * <p>
087            * 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 ResourceBlockPermissionModelImpl}. 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.
088            * </p>
089            *
090            * @param resourceBlockId the resource block ID
091            * @param start the lower bound of the range of resource block permissions
092            * @param end the upper bound of the range of resource block permissions (not inclusive)
093            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
094            * @param retrieveFromCache whether to retrieve from the finder cache
095            * @return the ordered range of matching resource block permissions
096            */
097            public java.util.List<ResourceBlockPermission> findByResourceBlockId(
098                    long resourceBlockId, int start, int end,
099                    com.liferay.portal.kernel.util.OrderByComparator<ResourceBlockPermission> orderByComparator,
100                    boolean retrieveFromCache);
101    
102            /**
103            * Returns the first resource block permission in the ordered set where resourceBlockId = &#63;.
104            *
105            * @param resourceBlockId the resource block ID
106            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
107            * @return the first matching resource block permission
108            * @throws NoSuchResourceBlockPermissionException if a matching resource block permission could not be found
109            */
110            public ResourceBlockPermission findByResourceBlockId_First(
111                    long resourceBlockId,
112                    com.liferay.portal.kernel.util.OrderByComparator<ResourceBlockPermission> orderByComparator)
113                    throws NoSuchResourceBlockPermissionException;
114    
115            /**
116            * Returns the first resource block permission in the ordered set where resourceBlockId = &#63;.
117            *
118            * @param resourceBlockId the resource block ID
119            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
120            * @return the first matching resource block permission, or <code>null</code> if a matching resource block permission could not be found
121            */
122            public ResourceBlockPermission fetchByResourceBlockId_First(
123                    long resourceBlockId,
124                    com.liferay.portal.kernel.util.OrderByComparator<ResourceBlockPermission> orderByComparator);
125    
126            /**
127            * Returns the last resource block permission in the ordered set where resourceBlockId = &#63;.
128            *
129            * @param resourceBlockId the resource block ID
130            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
131            * @return the last matching resource block permission
132            * @throws NoSuchResourceBlockPermissionException if a matching resource block permission could not be found
133            */
134            public ResourceBlockPermission findByResourceBlockId_Last(
135                    long resourceBlockId,
136                    com.liferay.portal.kernel.util.OrderByComparator<ResourceBlockPermission> orderByComparator)
137                    throws NoSuchResourceBlockPermissionException;
138    
139            /**
140            * Returns the last resource block permission in the ordered set where resourceBlockId = &#63;.
141            *
142            * @param resourceBlockId the resource block ID
143            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
144            * @return the last matching resource block permission, or <code>null</code> if a matching resource block permission could not be found
145            */
146            public ResourceBlockPermission fetchByResourceBlockId_Last(
147                    long resourceBlockId,
148                    com.liferay.portal.kernel.util.OrderByComparator<ResourceBlockPermission> orderByComparator);
149    
150            /**
151            * Returns the resource block permissions before and after the current resource block permission in the ordered set where resourceBlockId = &#63;.
152            *
153            * @param resourceBlockPermissionId the primary key of the current resource block permission
154            * @param resourceBlockId the resource block ID
155            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
156            * @return the previous, current, and next resource block permission
157            * @throws NoSuchResourceBlockPermissionException if a resource block permission with the primary key could not be found
158            */
159            public ResourceBlockPermission[] findByResourceBlockId_PrevAndNext(
160                    long resourceBlockPermissionId, long resourceBlockId,
161                    com.liferay.portal.kernel.util.OrderByComparator<ResourceBlockPermission> orderByComparator)
162                    throws NoSuchResourceBlockPermissionException;
163    
164            /**
165            * Removes all the resource block permissions where resourceBlockId = &#63; from the database.
166            *
167            * @param resourceBlockId the resource block ID
168            */
169            public void removeByResourceBlockId(long resourceBlockId);
170    
171            /**
172            * Returns the number of resource block permissions where resourceBlockId = &#63;.
173            *
174            * @param resourceBlockId the resource block ID
175            * @return the number of matching resource block permissions
176            */
177            public int countByResourceBlockId(long resourceBlockId);
178    
179            /**
180            * Returns all the resource block permissions where roleId = &#63;.
181            *
182            * @param roleId the role ID
183            * @return the matching resource block permissions
184            */
185            public java.util.List<ResourceBlockPermission> findByRoleId(long roleId);
186    
187            /**
188            * Returns a range of all the resource block permissions where roleId = &#63;.
189            *
190            * <p>
191            * 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 ResourceBlockPermissionModelImpl}. 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.
192            * </p>
193            *
194            * @param roleId the role ID
195            * @param start the lower bound of the range of resource block permissions
196            * @param end the upper bound of the range of resource block permissions (not inclusive)
197            * @return the range of matching resource block permissions
198            */
199            public java.util.List<ResourceBlockPermission> findByRoleId(long roleId,
200                    int start, int end);
201    
202            /**
203            * Returns an ordered range of all the resource block permissions where roleId = &#63;.
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 ResourceBlockPermissionModelImpl}. 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 roleId the role ID
210            * @param start the lower bound of the range of resource block permissions
211            * @param end the upper bound of the range of resource block permissions (not inclusive)
212            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
213            * @return the ordered range of matching resource block permissions
214            */
215            public java.util.List<ResourceBlockPermission> findByRoleId(long roleId,
216                    int start, int end,
217                    com.liferay.portal.kernel.util.OrderByComparator<ResourceBlockPermission> orderByComparator);
218    
219            /**
220            * Returns an ordered range of all the resource block permissions where roleId = &#63;.
221            *
222            * <p>
223            * 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 ResourceBlockPermissionModelImpl}. 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.
224            * </p>
225            *
226            * @param roleId the role ID
227            * @param start the lower bound of the range of resource block permissions
228            * @param end the upper bound of the range of resource block permissions (not inclusive)
229            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
230            * @param retrieveFromCache whether to retrieve from the finder cache
231            * @return the ordered range of matching resource block permissions
232            */
233            public java.util.List<ResourceBlockPermission> findByRoleId(long roleId,
234                    int start, int end,
235                    com.liferay.portal.kernel.util.OrderByComparator<ResourceBlockPermission> orderByComparator,
236                    boolean retrieveFromCache);
237    
238            /**
239            * Returns the first resource block permission in the ordered set where roleId = &#63;.
240            *
241            * @param roleId the role ID
242            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
243            * @return the first matching resource block permission
244            * @throws NoSuchResourceBlockPermissionException if a matching resource block permission could not be found
245            */
246            public ResourceBlockPermission findByRoleId_First(long roleId,
247                    com.liferay.portal.kernel.util.OrderByComparator<ResourceBlockPermission> orderByComparator)
248                    throws NoSuchResourceBlockPermissionException;
249    
250            /**
251            * Returns the first resource block permission in the ordered set where roleId = &#63;.
252            *
253            * @param roleId the role ID
254            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
255            * @return the first matching resource block permission, or <code>null</code> if a matching resource block permission could not be found
256            */
257            public ResourceBlockPermission fetchByRoleId_First(long roleId,
258                    com.liferay.portal.kernel.util.OrderByComparator<ResourceBlockPermission> orderByComparator);
259    
260            /**
261            * Returns the last resource block permission in the ordered set where roleId = &#63;.
262            *
263            * @param roleId the role ID
264            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
265            * @return the last matching resource block permission
266            * @throws NoSuchResourceBlockPermissionException if a matching resource block permission could not be found
267            */
268            public ResourceBlockPermission findByRoleId_Last(long roleId,
269                    com.liferay.portal.kernel.util.OrderByComparator<ResourceBlockPermission> orderByComparator)
270                    throws NoSuchResourceBlockPermissionException;
271    
272            /**
273            * Returns the last resource block permission in the ordered set where roleId = &#63;.
274            *
275            * @param roleId the role ID
276            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
277            * @return the last matching resource block permission, or <code>null</code> if a matching resource block permission could not be found
278            */
279            public ResourceBlockPermission fetchByRoleId_Last(long roleId,
280                    com.liferay.portal.kernel.util.OrderByComparator<ResourceBlockPermission> orderByComparator);
281    
282            /**
283            * Returns the resource block permissions before and after the current resource block permission in the ordered set where roleId = &#63;.
284            *
285            * @param resourceBlockPermissionId the primary key of the current resource block permission
286            * @param roleId the role ID
287            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
288            * @return the previous, current, and next resource block permission
289            * @throws NoSuchResourceBlockPermissionException if a resource block permission with the primary key could not be found
290            */
291            public ResourceBlockPermission[] findByRoleId_PrevAndNext(
292                    long resourceBlockPermissionId, long roleId,
293                    com.liferay.portal.kernel.util.OrderByComparator<ResourceBlockPermission> orderByComparator)
294                    throws NoSuchResourceBlockPermissionException;
295    
296            /**
297            * Removes all the resource block permissions where roleId = &#63; from the database.
298            *
299            * @param roleId the role ID
300            */
301            public void removeByRoleId(long roleId);
302    
303            /**
304            * Returns the number of resource block permissions where roleId = &#63;.
305            *
306            * @param roleId the role ID
307            * @return the number of matching resource block permissions
308            */
309            public int countByRoleId(long roleId);
310    
311            /**
312            * Returns the resource block permission where resourceBlockId = &#63; and roleId = &#63; or throws a {@link NoSuchResourceBlockPermissionException} if it could not be found.
313            *
314            * @param resourceBlockId the resource block ID
315            * @param roleId the role ID
316            * @return the matching resource block permission
317            * @throws NoSuchResourceBlockPermissionException if a matching resource block permission could not be found
318            */
319            public ResourceBlockPermission findByR_R(long resourceBlockId, long roleId)
320                    throws NoSuchResourceBlockPermissionException;
321    
322            /**
323            * Returns the resource block permission where resourceBlockId = &#63; and roleId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
324            *
325            * @param resourceBlockId the resource block ID
326            * @param roleId the role ID
327            * @return the matching resource block permission, or <code>null</code> if a matching resource block permission could not be found
328            */
329            public ResourceBlockPermission fetchByR_R(long resourceBlockId, long roleId);
330    
331            /**
332            * Returns the resource block permission where resourceBlockId = &#63; and roleId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
333            *
334            * @param resourceBlockId the resource block ID
335            * @param roleId the role ID
336            * @param retrieveFromCache whether to retrieve from the finder cache
337            * @return the matching resource block permission, or <code>null</code> if a matching resource block permission could not be found
338            */
339            public ResourceBlockPermission fetchByR_R(long resourceBlockId,
340                    long roleId, boolean retrieveFromCache);
341    
342            /**
343            * Removes the resource block permission where resourceBlockId = &#63; and roleId = &#63; from the database.
344            *
345            * @param resourceBlockId the resource block ID
346            * @param roleId the role ID
347            * @return the resource block permission that was removed
348            */
349            public ResourceBlockPermission removeByR_R(long resourceBlockId, long roleId)
350                    throws NoSuchResourceBlockPermissionException;
351    
352            /**
353            * Returns the number of resource block permissions where resourceBlockId = &#63; and roleId = &#63;.
354            *
355            * @param resourceBlockId the resource block ID
356            * @param roleId the role ID
357            * @return the number of matching resource block permissions
358            */
359            public int countByR_R(long resourceBlockId, long roleId);
360    
361            /**
362            * Caches the resource block permission in the entity cache if it is enabled.
363            *
364            * @param resourceBlockPermission the resource block permission
365            */
366            public void cacheResult(ResourceBlockPermission resourceBlockPermission);
367    
368            /**
369            * Caches the resource block permissions in the entity cache if it is enabled.
370            *
371            * @param resourceBlockPermissions the resource block permissions
372            */
373            public void cacheResult(
374                    java.util.List<ResourceBlockPermission> resourceBlockPermissions);
375    
376            /**
377            * Creates a new resource block permission with the primary key. Does not add the resource block permission to the database.
378            *
379            * @param resourceBlockPermissionId the primary key for the new resource block permission
380            * @return the new resource block permission
381            */
382            public ResourceBlockPermission create(long resourceBlockPermissionId);
383    
384            /**
385            * Removes the resource block permission with the primary key from the database. Also notifies the appropriate model listeners.
386            *
387            * @param resourceBlockPermissionId the primary key of the resource block permission
388            * @return the resource block permission that was removed
389            * @throws NoSuchResourceBlockPermissionException if a resource block permission with the primary key could not be found
390            */
391            public ResourceBlockPermission remove(long resourceBlockPermissionId)
392                    throws NoSuchResourceBlockPermissionException;
393    
394            public ResourceBlockPermission updateImpl(
395                    ResourceBlockPermission resourceBlockPermission);
396    
397            /**
398            * Returns the resource block permission with the primary key or throws a {@link NoSuchResourceBlockPermissionException} if it could not be found.
399            *
400            * @param resourceBlockPermissionId the primary key of the resource block permission
401            * @return the resource block permission
402            * @throws NoSuchResourceBlockPermissionException if a resource block permission with the primary key could not be found
403            */
404            public ResourceBlockPermission findByPrimaryKey(
405                    long resourceBlockPermissionId)
406                    throws NoSuchResourceBlockPermissionException;
407    
408            /**
409            * Returns the resource block permission with the primary key or returns <code>null</code> if it could not be found.
410            *
411            * @param resourceBlockPermissionId the primary key of the resource block permission
412            * @return the resource block permission, or <code>null</code> if a resource block permission with the primary key could not be found
413            */
414            public ResourceBlockPermission fetchByPrimaryKey(
415                    long resourceBlockPermissionId);
416    
417            @Override
418            public java.util.Map<java.io.Serializable, ResourceBlockPermission> fetchByPrimaryKeys(
419                    java.util.Set<java.io.Serializable> primaryKeys);
420    
421            /**
422            * Returns all the resource block permissions.
423            *
424            * @return the resource block permissions
425            */
426            public java.util.List<ResourceBlockPermission> findAll();
427    
428            /**
429            * Returns a range of all the resource block permissions.
430            *
431            * <p>
432            * 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 ResourceBlockPermissionModelImpl}. 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.
433            * </p>
434            *
435            * @param start the lower bound of the range of resource block permissions
436            * @param end the upper bound of the range of resource block permissions (not inclusive)
437            * @return the range of resource block permissions
438            */
439            public java.util.List<ResourceBlockPermission> findAll(int start, int end);
440    
441            /**
442            * Returns an ordered range of all the resource block permissions.
443            *
444            * <p>
445            * 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 ResourceBlockPermissionModelImpl}. 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.
446            * </p>
447            *
448            * @param start the lower bound of the range of resource block permissions
449            * @param end the upper bound of the range of resource block permissions (not inclusive)
450            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
451            * @return the ordered range of resource block permissions
452            */
453            public java.util.List<ResourceBlockPermission> findAll(int start, int end,
454                    com.liferay.portal.kernel.util.OrderByComparator<ResourceBlockPermission> orderByComparator);
455    
456            /**
457            * Returns an ordered range of all the resource block permissions.
458            *
459            * <p>
460            * 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 ResourceBlockPermissionModelImpl}. 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.
461            * </p>
462            *
463            * @param start the lower bound of the range of resource block permissions
464            * @param end the upper bound of the range of resource block permissions (not inclusive)
465            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
466            * @param retrieveFromCache whether to retrieve from the finder cache
467            * @return the ordered range of resource block permissions
468            */
469            public java.util.List<ResourceBlockPermission> findAll(int start, int end,
470                    com.liferay.portal.kernel.util.OrderByComparator<ResourceBlockPermission> orderByComparator,
471                    boolean retrieveFromCache);
472    
473            /**
474            * Removes all the resource block permissions from the database.
475            */
476            public void removeAll();
477    
478            /**
479            * Returns the number of resource block permissions.
480            *
481            * @return the number of resource block permissions
482            */
483            public int countAll();
484    }