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