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