001    /**
002     * Copyright (c) 2000-2011 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.kernel.exception.SystemException;
018    import com.liferay.portal.model.ResourceBlockPermission;
019    
020    /**
021     * The persistence interface for the resource block permission service.
022     *
023     * <p>
024     * Caching information and settings can be found in <code>portal.properties</code>
025     * </p>
026     *
027     * @author Brian Wing Shun Chan
028     * @see ResourceBlockPermissionPersistenceImpl
029     * @see ResourceBlockPermissionUtil
030     * @generated
031     */
032    public interface ResourceBlockPermissionPersistence extends BasePersistence<ResourceBlockPermission> {
033            /*
034             * NOTE FOR DEVELOPERS:
035             *
036             * 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.
037             */
038    
039            /**
040            * Caches the resource block permission in the entity cache if it is enabled.
041            *
042            * @param resourceBlockPermission the resource block permission
043            */
044            public void cacheResult(
045                    com.liferay.portal.model.ResourceBlockPermission resourceBlockPermission);
046    
047            /**
048            * Caches the resource block permissions in the entity cache if it is enabled.
049            *
050            * @param resourceBlockPermissions the resource block permissions
051            */
052            public void cacheResult(
053                    java.util.List<com.liferay.portal.model.ResourceBlockPermission> resourceBlockPermissions);
054    
055            /**
056            * Creates a new resource block permission with the primary key. Does not add the resource block permission to the database.
057            *
058            * @param resourceBlockPermissionId the primary key for the new resource block permission
059            * @return the new resource block permission
060            */
061            public com.liferay.portal.model.ResourceBlockPermission create(
062                    long resourceBlockPermissionId);
063    
064            /**
065            * Removes the resource block permission with the primary key from the database. Also notifies the appropriate model listeners.
066            *
067            * @param resourceBlockPermissionId the primary key of the resource block permission
068            * @return the resource block permission that was removed
069            * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a resource block permission with the primary key could not be found
070            * @throws SystemException if a system exception occurred
071            */
072            public com.liferay.portal.model.ResourceBlockPermission remove(
073                    long resourceBlockPermissionId)
074                    throws com.liferay.portal.NoSuchResourceBlockPermissionException,
075                            com.liferay.portal.kernel.exception.SystemException;
076    
077            public com.liferay.portal.model.ResourceBlockPermission updateImpl(
078                    com.liferay.portal.model.ResourceBlockPermission resourceBlockPermission,
079                    boolean merge)
080                    throws com.liferay.portal.kernel.exception.SystemException;
081    
082            /**
083            * Returns the resource block permission with the primary key or throws a {@link com.liferay.portal.NoSuchResourceBlockPermissionException} if it could not be found.
084            *
085            * @param resourceBlockPermissionId the primary key of the resource block permission
086            * @return the resource block permission
087            * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a resource block permission with the primary key could not be found
088            * @throws SystemException if a system exception occurred
089            */
090            public com.liferay.portal.model.ResourceBlockPermission findByPrimaryKey(
091                    long resourceBlockPermissionId)
092                    throws com.liferay.portal.NoSuchResourceBlockPermissionException,
093                            com.liferay.portal.kernel.exception.SystemException;
094    
095            /**
096            * Returns the resource block permission with the primary key or returns <code>null</code> if it could not be found.
097            *
098            * @param resourceBlockPermissionId the primary key of the resource block permission
099            * @return the resource block permission, or <code>null</code> if a resource block permission with the primary key could not be found
100            * @throws SystemException if a system exception occurred
101            */
102            public com.liferay.portal.model.ResourceBlockPermission fetchByPrimaryKey(
103                    long resourceBlockPermissionId)
104                    throws com.liferay.portal.kernel.exception.SystemException;
105    
106            /**
107            * Returns all the resource block permissions where resourceBlockId = &#63;.
108            *
109            * @param resourceBlockId the resource block ID
110            * @return the matching resource block permissions
111            * @throws SystemException if a system exception occurred
112            */
113            public java.util.List<com.liferay.portal.model.ResourceBlockPermission> findByResourceBlockId(
114                    long resourceBlockId)
115                    throws com.liferay.portal.kernel.exception.SystemException;
116    
117            /**
118            * Returns a range of all the resource block permissions where resourceBlockId = &#63;.
119            *
120            * <p>
121            * 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.
122            * </p>
123            *
124            * @param resourceBlockId the resource block ID
125            * @param start the lower bound of the range of resource block permissions
126            * @param end the upper bound of the range of resource block permissions (not inclusive)
127            * @return the range of matching resource block permissions
128            * @throws SystemException if a system exception occurred
129            */
130            public java.util.List<com.liferay.portal.model.ResourceBlockPermission> findByResourceBlockId(
131                    long resourceBlockId, int start, int end)
132                    throws com.liferay.portal.kernel.exception.SystemException;
133    
134            /**
135            * Returns an ordered range of all the resource block permissions where resourceBlockId = &#63;.
136            *
137            * <p>
138            * 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.
139            * </p>
140            *
141            * @param resourceBlockId the resource block ID
142            * @param start the lower bound of the range of resource block permissions
143            * @param end the upper bound of the range of resource block permissions (not inclusive)
144            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
145            * @return the ordered range of matching resource block permissions
146            * @throws SystemException if a system exception occurred
147            */
148            public java.util.List<com.liferay.portal.model.ResourceBlockPermission> findByResourceBlockId(
149                    long resourceBlockId, int start, int end,
150                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
151                    throws com.liferay.portal.kernel.exception.SystemException;
152    
153            /**
154            * Returns the first resource block permission in the ordered set where resourceBlockId = &#63;.
155            *
156            * <p>
157            * 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.
158            * </p>
159            *
160            * @param resourceBlockId the resource block ID
161            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
162            * @return the first matching resource block permission
163            * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a matching resource block permission could not be found
164            * @throws SystemException if a system exception occurred
165            */
166            public com.liferay.portal.model.ResourceBlockPermission findByResourceBlockId_First(
167                    long resourceBlockId,
168                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
169                    throws com.liferay.portal.NoSuchResourceBlockPermissionException,
170                            com.liferay.portal.kernel.exception.SystemException;
171    
172            /**
173            * Returns the last resource block permission in the ordered set where resourceBlockId = &#63;.
174            *
175            * <p>
176            * 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.
177            * </p>
178            *
179            * @param resourceBlockId the resource block ID
180            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
181            * @return the last 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 findByResourceBlockId_Last(
186                    long resourceBlockId,
187                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
188                    throws com.liferay.portal.NoSuchResourceBlockPermissionException,
189                            com.liferay.portal.kernel.exception.SystemException;
190    
191            /**
192            * Returns the resource block permissions before and after the current resource block permission in the ordered set where resourceBlockId = &#63;.
193            *
194            * <p>
195            * 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.
196            * </p>
197            *
198            * @param resourceBlockPermissionId the primary key of the current resource block permission
199            * @param resourceBlockId the resource block ID
200            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
201            * @return the previous, current, and next resource block permission
202            * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a resource block permission with the primary key could not be found
203            * @throws SystemException if a system exception occurred
204            */
205            public com.liferay.portal.model.ResourceBlockPermission[] findByResourceBlockId_PrevAndNext(
206                    long resourceBlockPermissionId, long resourceBlockId,
207                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
208                    throws com.liferay.portal.NoSuchResourceBlockPermissionException,
209                            com.liferay.portal.kernel.exception.SystemException;
210    
211            /**
212            * 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.
213            *
214            * @param resourceBlockId the resource block ID
215            * @param roleId the role ID
216            * @return the matching resource block permission
217            * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a matching resource block permission could not be found
218            * @throws SystemException if a system exception occurred
219            */
220            public com.liferay.portal.model.ResourceBlockPermission findByR_R(
221                    long resourceBlockId, long roleId)
222                    throws com.liferay.portal.NoSuchResourceBlockPermissionException,
223                            com.liferay.portal.kernel.exception.SystemException;
224    
225            /**
226            * 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.
227            *
228            * @param resourceBlockId the resource block ID
229            * @param roleId the role ID
230            * @return the matching resource block permission, or <code>null</code> if a matching resource block permission could not be found
231            * @throws SystemException if a system exception occurred
232            */
233            public com.liferay.portal.model.ResourceBlockPermission fetchByR_R(
234                    long resourceBlockId, long roleId)
235                    throws 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, optionally using the finder cache.
239            *
240            * @param resourceBlockId the resource block ID
241            * @param roleId the role ID
242            * @param retrieveFromCache whether to use the finder cache
243            * @return the matching resource block permission, or <code>null</code> if a matching resource block permission could not be found
244            * @throws SystemException if a system exception occurred
245            */
246            public com.liferay.portal.model.ResourceBlockPermission fetchByR_R(
247                    long resourceBlockId, long roleId, boolean retrieveFromCache)
248                    throws com.liferay.portal.kernel.exception.SystemException;
249    
250            /**
251            * Returns all the resource block permissions.
252            *
253            * @return the resource block permissions
254            * @throws SystemException if a system exception occurred
255            */
256            public java.util.List<com.liferay.portal.model.ResourceBlockPermission> findAll()
257                    throws com.liferay.portal.kernel.exception.SystemException;
258    
259            /**
260            * Returns a range of all the resource block permissions.
261            *
262            * <p>
263            * 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.
264            * </p>
265            *
266            * @param start the lower bound of the range of resource block permissions
267            * @param end the upper bound of the range of resource block permissions (not inclusive)
268            * @return the range of resource block permissions
269            * @throws SystemException if a system exception occurred
270            */
271            public java.util.List<com.liferay.portal.model.ResourceBlockPermission> findAll(
272                    int start, int end)
273                    throws com.liferay.portal.kernel.exception.SystemException;
274    
275            /**
276            * Returns an ordered range of all the resource block permissions.
277            *
278            * <p>
279            * 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.
280            * </p>
281            *
282            * @param start the lower bound of the range of resource block permissions
283            * @param end the upper bound of the range of resource block permissions (not inclusive)
284            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
285            * @return the ordered range of resource block permissions
286            * @throws SystemException if a system exception occurred
287            */
288            public java.util.List<com.liferay.portal.model.ResourceBlockPermission> findAll(
289                    int start, int end,
290                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
291                    throws com.liferay.portal.kernel.exception.SystemException;
292    
293            /**
294            * Removes all the resource block permissions where resourceBlockId = &#63; from the database.
295            *
296            * @param resourceBlockId the resource block ID
297            * @throws SystemException if a system exception occurred
298            */
299            public void removeByResourceBlockId(long resourceBlockId)
300                    throws com.liferay.portal.kernel.exception.SystemException;
301    
302            /**
303            * Removes the resource block permission where resourceBlockId = &#63; and roleId = &#63; from the database.
304            *
305            * @param resourceBlockId the resource block ID
306            * @param roleId the role ID
307            * @throws SystemException if a system exception occurred
308            */
309            public void removeByR_R(long resourceBlockId, long roleId)
310                    throws com.liferay.portal.NoSuchResourceBlockPermissionException,
311                            com.liferay.portal.kernel.exception.SystemException;
312    
313            /**
314            * Removes all the resource block permissions from the database.
315            *
316            * @throws SystemException if a system exception occurred
317            */
318            public void removeAll()
319                    throws com.liferay.portal.kernel.exception.SystemException;
320    
321            /**
322            * Returns the number of resource block permissions where resourceBlockId = &#63;.
323            *
324            * @param resourceBlockId the resource block ID
325            * @return the number of matching resource block permissions
326            * @throws SystemException if a system exception occurred
327            */
328            public int countByResourceBlockId(long resourceBlockId)
329                    throws com.liferay.portal.kernel.exception.SystemException;
330    
331            /**
332            * Returns the number of resource block permissions where resourceBlockId = &#63; and roleId = &#63;.
333            *
334            * @param resourceBlockId the resource block ID
335            * @param roleId the role ID
336            * @return the number of matching resource block permissions
337            * @throws SystemException if a system exception occurred
338            */
339            public int countByR_R(long resourceBlockId, long roleId)
340                    throws com.liferay.portal.kernel.exception.SystemException;
341    
342            /**
343            * Returns the number of resource block permissions.
344            *
345            * @return the number of resource block permissions
346            * @throws SystemException if a system exception occurred
347            */
348            public int countAll()
349                    throws com.liferay.portal.kernel.exception.SystemException;
350    
351            public ResourceBlockPermission remove(
352                    ResourceBlockPermission resourceBlockPermission)
353                    throws SystemException;
354    }