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