001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.model.ResourceBlockPermission;
018    
019    /**
020     * The persistence interface for the resource block permission service.
021     *
022     * <p>
023     * Caching information and settings can be found in <code>portal.properties</code>
024     * </p>
025     *
026     * @author Brian Wing Shun Chan
027     * @see ResourceBlockPermissionPersistenceImpl
028     * @see ResourceBlockPermissionUtil
029     * @generated
030     */
031    public interface ResourceBlockPermissionPersistence extends BasePersistence<ResourceBlockPermission> {
032            /*
033             * NOTE FOR DEVELOPERS:
034             *
035             * 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.
036             */
037    
038            /**
039            * Returns all the resource block permissions where resourceBlockId = &#63;.
040            *
041            * @param resourceBlockId the resource block ID
042            * @return the matching resource block permissions
043            * @throws SystemException if a system exception occurred
044            */
045            public java.util.List<com.liferay.portal.model.ResourceBlockPermission> findByResourceBlockId(
046                    long resourceBlockId)
047                    throws com.liferay.portal.kernel.exception.SystemException;
048    
049            /**
050            * Returns a range of all the resource block permissions where resourceBlockId = &#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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.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.
054            * </p>
055            *
056            * @param resourceBlockId the resource block ID
057            * @param start the lower bound of the range of resource block permissions
058            * @param end the upper bound of the range of resource block permissions (not inclusive)
059            * @return the range of matching resource block permissions
060            * @throws SystemException if a system exception occurred
061            */
062            public java.util.List<com.liferay.portal.model.ResourceBlockPermission> findByResourceBlockId(
063                    long resourceBlockId, int start, int end)
064                    throws com.liferay.portal.kernel.exception.SystemException;
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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.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            * @throws SystemException if a system exception occurred
079            */
080            public java.util.List<com.liferay.portal.model.ResourceBlockPermission> findByResourceBlockId(
081                    long resourceBlockId, int start, int end,
082                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
083                    throws com.liferay.portal.kernel.exception.SystemException;
084    
085            /**
086            * Returns the first resource block permission in the ordered set where resourceBlockId = &#63;.
087            *
088            * @param resourceBlockId the resource block ID
089            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
090            * @return the first matching resource block permission
091            * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a matching resource block permission could not be found
092            * @throws SystemException if a system exception occurred
093            */
094            public com.liferay.portal.model.ResourceBlockPermission findByResourceBlockId_First(
095                    long resourceBlockId,
096                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
097                    throws com.liferay.portal.NoSuchResourceBlockPermissionException,
098                            com.liferay.portal.kernel.exception.SystemException;
099    
100            /**
101            * Returns the first resource block permission in the ordered set where resourceBlockId = &#63;.
102            *
103            * @param resourceBlockId the resource block ID
104            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
105            * @return the first matching resource block permission, or <code>null</code> if a matching resource block permission could not be found
106            * @throws SystemException if a system exception occurred
107            */
108            public com.liferay.portal.model.ResourceBlockPermission fetchByResourceBlockId_First(
109                    long resourceBlockId,
110                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
111                    throws com.liferay.portal.kernel.exception.SystemException;
112    
113            /**
114            * Returns the last resource block permission in the ordered set where resourceBlockId = &#63;.
115            *
116            * @param resourceBlockId the resource block ID
117            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
118            * @return the last matching resource block permission
119            * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a matching resource block permission could not be found
120            * @throws SystemException if a system exception occurred
121            */
122            public com.liferay.portal.model.ResourceBlockPermission findByResourceBlockId_Last(
123                    long resourceBlockId,
124                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
125                    throws com.liferay.portal.NoSuchResourceBlockPermissionException,
126                            com.liferay.portal.kernel.exception.SystemException;
127    
128            /**
129            * Returns the last resource block permission in the ordered set where resourceBlockId = &#63;.
130            *
131            * @param resourceBlockId the resource block ID
132            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
133            * @return the last matching resource block permission, or <code>null</code> if a matching resource block permission could not be found
134            * @throws SystemException if a system exception occurred
135            */
136            public com.liferay.portal.model.ResourceBlockPermission fetchByResourceBlockId_Last(
137                    long resourceBlockId,
138                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
139                    throws com.liferay.portal.kernel.exception.SystemException;
140    
141            /**
142            * Returns the resource block permissions before and after the current resource block permission in the ordered set where resourceBlockId = &#63;.
143            *
144            * @param resourceBlockPermissionId the primary key of the current resource block permission
145            * @param resourceBlockId the resource block ID
146            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
147            * @return the previous, current, and next resource block permission
148            * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a resource block permission with the primary key could not be found
149            * @throws SystemException if a system exception occurred
150            */
151            public com.liferay.portal.model.ResourceBlockPermission[] findByResourceBlockId_PrevAndNext(
152                    long resourceBlockPermissionId, long resourceBlockId,
153                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
154                    throws com.liferay.portal.NoSuchResourceBlockPermissionException,
155                            com.liferay.portal.kernel.exception.SystemException;
156    
157            /**
158            * Removes all the resource block permissions where resourceBlockId = &#63; from the database.
159            *
160            * @param resourceBlockId the resource block ID
161            * @throws SystemException if a system exception occurred
162            */
163            public void removeByResourceBlockId(long resourceBlockId)
164                    throws com.liferay.portal.kernel.exception.SystemException;
165    
166            /**
167            * Returns the number of resource block permissions where resourceBlockId = &#63;.
168            *
169            * @param resourceBlockId the resource block ID
170            * @return the number of matching resource block permissions
171            * @throws SystemException if a system exception occurred
172            */
173            public int countByResourceBlockId(long resourceBlockId)
174                    throws com.liferay.portal.kernel.exception.SystemException;
175    
176            /**
177            * Returns the resource block permission where resourceBlockId = &#63; and roleId = &#63; or throws a {@link com.liferay.portal.NoSuchResourceBlockPermissionException} if it could not be found.
178            *
179            * @param resourceBlockId the resource block ID
180            * @param roleId the role ID
181            * @return the matching resource block permission
182            * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a matching resource block permission could not be found
183            * @throws SystemException if a system exception occurred
184            */
185            public com.liferay.portal.model.ResourceBlockPermission findByR_R(
186                    long resourceBlockId, long roleId)
187                    throws com.liferay.portal.NoSuchResourceBlockPermissionException,
188                            com.liferay.portal.kernel.exception.SystemException;
189    
190            /**
191            * 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.
192            *
193            * @param resourceBlockId the resource block ID
194            * @param roleId the role ID
195            * @return the matching resource block permission, or <code>null</code> if a matching resource block permission could not be found
196            * @throws SystemException if a system exception occurred
197            */
198            public com.liferay.portal.model.ResourceBlockPermission fetchByR_R(
199                    long resourceBlockId, long roleId)
200                    throws com.liferay.portal.kernel.exception.SystemException;
201    
202            /**
203            * 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.
204            *
205            * @param resourceBlockId the resource block ID
206            * @param roleId the role ID
207            * @param retrieveFromCache whether to use the finder cache
208            * @return the matching resource block permission, or <code>null</code> if a matching resource block permission could not be found
209            * @throws SystemException if a system exception occurred
210            */
211            public com.liferay.portal.model.ResourceBlockPermission fetchByR_R(
212                    long resourceBlockId, long roleId, boolean retrieveFromCache)
213                    throws com.liferay.portal.kernel.exception.SystemException;
214    
215            /**
216            * Removes the resource block permission where resourceBlockId = &#63; and roleId = &#63; from the database.
217            *
218            * @param resourceBlockId the resource block ID
219            * @param roleId the role ID
220            * @return the resource block permission that was removed
221            * @throws SystemException if a system exception occurred
222            */
223            public com.liferay.portal.model.ResourceBlockPermission removeByR_R(
224                    long resourceBlockId, long roleId)
225                    throws com.liferay.portal.NoSuchResourceBlockPermissionException,
226                            com.liferay.portal.kernel.exception.SystemException;
227    
228            /**
229            * Returns the number of resource block permissions where resourceBlockId = &#63; and roleId = &#63;.
230            *
231            * @param resourceBlockId the resource block ID
232            * @param roleId the role ID
233            * @return the number of matching resource block permissions
234            * @throws SystemException if a system exception occurred
235            */
236            public int countByR_R(long resourceBlockId, long roleId)
237                    throws com.liferay.portal.kernel.exception.SystemException;
238    
239            /**
240            * Caches the resource block permission in the entity cache if it is enabled.
241            *
242            * @param resourceBlockPermission the resource block permission
243            */
244            public void cacheResult(
245                    com.liferay.portal.model.ResourceBlockPermission resourceBlockPermission);
246    
247            /**
248            * Caches the resource block permissions in the entity cache if it is enabled.
249            *
250            * @param resourceBlockPermissions the resource block permissions
251            */
252            public void cacheResult(
253                    java.util.List<com.liferay.portal.model.ResourceBlockPermission> resourceBlockPermissions);
254    
255            /**
256            * Creates a new resource block permission with the primary key. Does not add the resource block permission to the database.
257            *
258            * @param resourceBlockPermissionId the primary key for the new resource block permission
259            * @return the new resource block permission
260            */
261            public com.liferay.portal.model.ResourceBlockPermission create(
262                    long resourceBlockPermissionId);
263    
264            /**
265            * Removes the resource block permission with the primary key from the database. Also notifies the appropriate model listeners.
266            *
267            * @param resourceBlockPermissionId the primary key of the resource block permission
268            * @return the resource block permission that was removed
269            * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a resource block permission with the primary key could not be found
270            * @throws SystemException if a system exception occurred
271            */
272            public com.liferay.portal.model.ResourceBlockPermission remove(
273                    long resourceBlockPermissionId)
274                    throws com.liferay.portal.NoSuchResourceBlockPermissionException,
275                            com.liferay.portal.kernel.exception.SystemException;
276    
277            public com.liferay.portal.model.ResourceBlockPermission updateImpl(
278                    com.liferay.portal.model.ResourceBlockPermission resourceBlockPermission)
279                    throws com.liferay.portal.kernel.exception.SystemException;
280    
281            /**
282            * Returns the resource block permission with the primary key or throws a {@link com.liferay.portal.NoSuchResourceBlockPermissionException} if it could not be found.
283            *
284            * @param resourceBlockPermissionId the primary key of the resource block permission
285            * @return the resource block permission
286            * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a resource block permission with the primary key could not be found
287            * @throws SystemException if a system exception occurred
288            */
289            public com.liferay.portal.model.ResourceBlockPermission findByPrimaryKey(
290                    long resourceBlockPermissionId)
291                    throws com.liferay.portal.NoSuchResourceBlockPermissionException,
292                            com.liferay.portal.kernel.exception.SystemException;
293    
294            /**
295            * Returns the resource block permission with the primary key or returns <code>null</code> if it could not be found.
296            *
297            * @param resourceBlockPermissionId the primary key of the resource block permission
298            * @return the resource block permission, or <code>null</code> if a resource block permission with the primary key could not be found
299            * @throws SystemException if a system exception occurred
300            */
301            public com.liferay.portal.model.ResourceBlockPermission fetchByPrimaryKey(
302                    long resourceBlockPermissionId)
303                    throws com.liferay.portal.kernel.exception.SystemException;
304    
305            /**
306            * Returns all the resource block permissions.
307            *
308            * @return the resource block permissions
309            * @throws SystemException if a system exception occurred
310            */
311            public java.util.List<com.liferay.portal.model.ResourceBlockPermission> findAll()
312                    throws com.liferay.portal.kernel.exception.SystemException;
313    
314            /**
315            * Returns a range of all the resource block permissions.
316            *
317            * <p>
318            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.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.
319            * </p>
320            *
321            * @param start the lower bound of the range of resource block permissions
322            * @param end the upper bound of the range of resource block permissions (not inclusive)
323            * @return the range of resource block permissions
324            * @throws SystemException if a system exception occurred
325            */
326            public java.util.List<com.liferay.portal.model.ResourceBlockPermission> findAll(
327                    int start, int end)
328                    throws com.liferay.portal.kernel.exception.SystemException;
329    
330            /**
331            * Returns an ordered range of all the resource block permissions.
332            *
333            * <p>
334            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.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.
335            * </p>
336            *
337            * @param start the lower bound of the range of resource block permissions
338            * @param end the upper bound of the range of resource block permissions (not inclusive)
339            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
340            * @return the ordered range of resource block permissions
341            * @throws SystemException if a system exception occurred
342            */
343            public java.util.List<com.liferay.portal.model.ResourceBlockPermission> findAll(
344                    int start, int end,
345                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
346                    throws com.liferay.portal.kernel.exception.SystemException;
347    
348            /**
349            * Removes all the resource block permissions from the database.
350            *
351            * @throws SystemException if a system exception occurred
352            */
353            public void removeAll()
354                    throws com.liferay.portal.kernel.exception.SystemException;
355    
356            /**
357            * Returns the number of resource block permissions.
358            *
359            * @return the number of resource block permissions
360            * @throws SystemException if a system exception occurred
361            */
362            public int countAll()
363                    throws com.liferay.portal.kernel.exception.SystemException;
364    }