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