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