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