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