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                    boolean merge)
079                    throws com.liferay.portal.kernel.exception.SystemException;
080    
081            /**
082            * Returns the resource block permission with the primary key or throws a {@link com.liferay.portal.NoSuchResourceBlockPermissionException} if it could not be found.
083            *
084            * @param resourceBlockPermissionId the primary key of the resource block permission
085            * @return the resource block permission
086            * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a resource block permission with the primary key could not be found
087            * @throws SystemException if a system exception occurred
088            */
089            public com.liferay.portal.model.ResourceBlockPermission findByPrimaryKey(
090                    long resourceBlockPermissionId)
091                    throws com.liferay.portal.NoSuchResourceBlockPermissionException,
092                            com.liferay.portal.kernel.exception.SystemException;
093    
094            /**
095            * Returns the resource block permission with the primary key or returns <code>null</code> if it could not be found.
096            *
097            * @param resourceBlockPermissionId the primary key of the resource block permission
098            * @return the resource block permission, or <code>null</code> if a resource block permission with the primary key could not be found
099            * @throws SystemException if a system exception occurred
100            */
101            public com.liferay.portal.model.ResourceBlockPermission fetchByPrimaryKey(
102                    long resourceBlockPermissionId)
103                    throws com.liferay.portal.kernel.exception.SystemException;
104    
105            /**
106            * Returns all the resource block permissions where resourceBlockId = &#63;.
107            *
108            * @param resourceBlockId the resource block ID
109            * @return the matching resource block permissions
110            * @throws SystemException if a system exception occurred
111            */
112            public java.util.List<com.liferay.portal.model.ResourceBlockPermission> findByResourceBlockId(
113                    long resourceBlockId)
114                    throws com.liferay.portal.kernel.exception.SystemException;
115    
116            /**
117            * Returns a range of all the resource block permissions where resourceBlockId = &#63;.
118            *
119            * <p>
120            * 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.
121            * </p>
122            *
123            * @param resourceBlockId the resource block ID
124            * @param start the lower bound of the range of resource block permissions
125            * @param end the upper bound of the range of resource block permissions (not inclusive)
126            * @return the range of matching resource block permissions
127            * @throws SystemException if a system exception occurred
128            */
129            public java.util.List<com.liferay.portal.model.ResourceBlockPermission> findByResourceBlockId(
130                    long resourceBlockId, int start, int end)
131                    throws com.liferay.portal.kernel.exception.SystemException;
132    
133            /**
134            * Returns an ordered range of all the resource block permissions where resourceBlockId = &#63;.
135            *
136            * <p>
137            * 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.
138            * </p>
139            *
140            * @param resourceBlockId the resource block ID
141            * @param start the lower bound of the range of resource block permissions
142            * @param end the upper bound of the range of resource block permissions (not inclusive)
143            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
144            * @return the ordered range of matching resource block permissions
145            * @throws SystemException if a system exception occurred
146            */
147            public java.util.List<com.liferay.portal.model.ResourceBlockPermission> findByResourceBlockId(
148                    long resourceBlockId, int start, int end,
149                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
150                    throws com.liferay.portal.kernel.exception.SystemException;
151    
152            /**
153            * Returns the first resource block permission in the ordered set where resourceBlockId = &#63;.
154            *
155            * <p>
156            * 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.
157            * </p>
158            *
159            * @param resourceBlockId the resource block ID
160            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
161            * @return the first matching resource block permission
162            * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a matching resource block permission could not be found
163            * @throws SystemException if a system exception occurred
164            */
165            public com.liferay.portal.model.ResourceBlockPermission findByResourceBlockId_First(
166                    long resourceBlockId,
167                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
168                    throws com.liferay.portal.NoSuchResourceBlockPermissionException,
169                            com.liferay.portal.kernel.exception.SystemException;
170    
171            /**
172            * Returns the last resource block permission in the ordered set where resourceBlockId = &#63;.
173            *
174            * <p>
175            * 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.
176            * </p>
177            *
178            * @param resourceBlockId the resource block ID
179            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
180            * @return the last matching resource block permission
181            * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a matching resource block permission could not be found
182            * @throws SystemException if a system exception occurred
183            */
184            public com.liferay.portal.model.ResourceBlockPermission findByResourceBlockId_Last(
185                    long resourceBlockId,
186                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
187                    throws com.liferay.portal.NoSuchResourceBlockPermissionException,
188                            com.liferay.portal.kernel.exception.SystemException;
189    
190            /**
191            * Returns the resource block permissions before and after the current resource block permission in the ordered set where resourceBlockId = &#63;.
192            *
193            * <p>
194            * 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.
195            * </p>
196            *
197            * @param resourceBlockPermissionId the primary key of the current resource block permission
198            * @param resourceBlockId the resource block ID
199            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
200            * @return the previous, current, and next resource block permission
201            * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a resource block permission with the primary key could not be found
202            * @throws SystemException if a system exception occurred
203            */
204            public com.liferay.portal.model.ResourceBlockPermission[] findByResourceBlockId_PrevAndNext(
205                    long resourceBlockPermissionId, long resourceBlockId,
206                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
207                    throws com.liferay.portal.NoSuchResourceBlockPermissionException,
208                            com.liferay.portal.kernel.exception.SystemException;
209    
210            /**
211            * 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.
212            *
213            * @param resourceBlockId the resource block ID
214            * @param roleId the role ID
215            * @return the matching resource block permission
216            * @throws com.liferay.portal.NoSuchResourceBlockPermissionException if a matching resource block permission could not be found
217            * @throws SystemException if a system exception occurred
218            */
219            public com.liferay.portal.model.ResourceBlockPermission findByR_R(
220                    long resourceBlockId, long roleId)
221                    throws com.liferay.portal.NoSuchResourceBlockPermissionException,
222                            com.liferay.portal.kernel.exception.SystemException;
223    
224            /**
225            * 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.
226            *
227            * @param resourceBlockId the resource block ID
228            * @param roleId the role ID
229            * @return the matching resource block permission, or <code>null</code> 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 fetchByR_R(
233                    long resourceBlockId, long roleId)
234                    throws com.liferay.portal.kernel.exception.SystemException;
235    
236            /**
237            * 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.
238            *
239            * @param resourceBlockId the resource block ID
240            * @param roleId the role ID
241            * @param retrieveFromCache whether to use the finder cache
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, boolean retrieveFromCache)
247                    throws com.liferay.portal.kernel.exception.SystemException;
248    
249            /**
250            * Returns all the resource block permissions.
251            *
252            * @return the resource block permissions
253            * @throws SystemException if a system exception occurred
254            */
255            public java.util.List<com.liferay.portal.model.ResourceBlockPermission> findAll()
256                    throws com.liferay.portal.kernel.exception.SystemException;
257    
258            /**
259            * Returns a range of all the resource block permissions.
260            *
261            * <p>
262            * 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.
263            * </p>
264            *
265            * @param start the lower bound of the range of resource block permissions
266            * @param end the upper bound of the range of resource block permissions (not inclusive)
267            * @return the range of resource block permissions
268            * @throws SystemException if a system exception occurred
269            */
270            public java.util.List<com.liferay.portal.model.ResourceBlockPermission> findAll(
271                    int start, int end)
272                    throws com.liferay.portal.kernel.exception.SystemException;
273    
274            /**
275            * Returns an ordered range of all the resource block permissions.
276            *
277            * <p>
278            * 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.
279            * </p>
280            *
281            * @param start the lower bound of the range of resource block permissions
282            * @param end the upper bound of the range of resource block permissions (not inclusive)
283            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
284            * @return the ordered range of resource block permissions
285            * @throws SystemException if a system exception occurred
286            */
287            public java.util.List<com.liferay.portal.model.ResourceBlockPermission> findAll(
288                    int start, int end,
289                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
290                    throws com.liferay.portal.kernel.exception.SystemException;
291    
292            /**
293            * Removes all the resource block permissions where resourceBlockId = &#63; from the database.
294            *
295            * @param resourceBlockId the resource block ID
296            * @throws SystemException if a system exception occurred
297            */
298            public void removeByResourceBlockId(long resourceBlockId)
299                    throws com.liferay.portal.kernel.exception.SystemException;
300    
301            /**
302            * Removes the resource block permission where resourceBlockId = &#63; and roleId = &#63; from the database.
303            *
304            * @param resourceBlockId the resource block ID
305            * @param roleId the role ID
306            * @throws SystemException if a system exception occurred
307            */
308            public void removeByR_R(long resourceBlockId, long roleId)
309                    throws com.liferay.portal.NoSuchResourceBlockPermissionException,
310                            com.liferay.portal.kernel.exception.SystemException;
311    
312            /**
313            * Removes all the resource block permissions from the database.
314            *
315            * @throws SystemException if a system exception occurred
316            */
317            public void removeAll()
318                    throws com.liferay.portal.kernel.exception.SystemException;
319    
320            /**
321            * Returns the number of resource block permissions where resourceBlockId = &#63;.
322            *
323            * @param resourceBlockId the resource block ID
324            * @return the number of matching resource block permissions
325            * @throws SystemException if a system exception occurred
326            */
327            public int countByResourceBlockId(long resourceBlockId)
328                    throws com.liferay.portal.kernel.exception.SystemException;
329    
330            /**
331            * Returns the number of resource block permissions where resourceBlockId = &#63; and roleId = &#63;.
332            *
333            * @param resourceBlockId the resource block ID
334            * @param roleId the role ID
335            * @return the number of matching resource block permissions
336            * @throws SystemException if a system exception occurred
337            */
338            public int countByR_R(long resourceBlockId, long roleId)
339                    throws com.liferay.portal.kernel.exception.SystemException;
340    
341            /**
342            * Returns the number of resource block permissions.
343            *
344            * @return the number of resource block permissions
345            * @throws SystemException if a system exception occurred
346            */
347            public int countAll()
348                    throws com.liferay.portal.kernel.exception.SystemException;
349    }