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