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.portlet.journal.service.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.service.persistence.BasePersistence;
020    
021    import com.liferay.portlet.journal.model.JournalArticleResource;
022    
023    /**
024     * The persistence interface for the journal article resource service.
025     *
026     * <p>
027     * Caching information and settings can be found in <code>portal.properties</code>
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see JournalArticleResourcePersistenceImpl
032     * @see JournalArticleResourceUtil
033     * @generated
034     */
035    @ProviderType
036    public interface JournalArticleResourcePersistence extends BasePersistence<JournalArticleResource> {
037            /*
038             * NOTE FOR DEVELOPERS:
039             *
040             * 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.
041             */
042    
043            /**
044            * Returns all the journal article resources where uuid = &#63;.
045            *
046            * @param uuid the uuid
047            * @return the matching journal article resources
048            * @throws SystemException if a system exception occurred
049            */
050            public java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findByUuid(
051                    java.lang.String uuid)
052                    throws com.liferay.portal.kernel.exception.SystemException;
053    
054            /**
055            * Returns a range of all the journal article resources where uuid = &#63;.
056            *
057            * <p>
058            * 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.portlet.journal.model.impl.JournalArticleResourceModelImpl}. 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.
059            * </p>
060            *
061            * @param uuid the uuid
062            * @param start the lower bound of the range of journal article resources
063            * @param end the upper bound of the range of journal article resources (not inclusive)
064            * @return the range of matching journal article resources
065            * @throws SystemException if a system exception occurred
066            */
067            public java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findByUuid(
068                    java.lang.String uuid, int start, int end)
069                    throws com.liferay.portal.kernel.exception.SystemException;
070    
071            /**
072            * Returns an ordered range of all the journal article resources where uuid = &#63;.
073            *
074            * <p>
075            * 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.portlet.journal.model.impl.JournalArticleResourceModelImpl}. 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.
076            * </p>
077            *
078            * @param uuid the uuid
079            * @param start the lower bound of the range of journal article resources
080            * @param end the upper bound of the range of journal article resources (not inclusive)
081            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
082            * @return the ordered range of matching journal article resources
083            * @throws SystemException if a system exception occurred
084            */
085            public java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findByUuid(
086                    java.lang.String uuid, int start, int end,
087                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
088                    throws com.liferay.portal.kernel.exception.SystemException;
089    
090            /**
091            * Returns the first journal article resource in the ordered set where uuid = &#63;.
092            *
093            * @param uuid the uuid
094            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
095            * @return the first matching journal article resource
096            * @throws com.liferay.portlet.journal.NoSuchArticleResourceException if a matching journal article resource could not be found
097            * @throws SystemException if a system exception occurred
098            */
099            public com.liferay.portlet.journal.model.JournalArticleResource findByUuid_First(
100                    java.lang.String uuid,
101                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
102                    throws com.liferay.portal.kernel.exception.SystemException,
103                            com.liferay.portlet.journal.NoSuchArticleResourceException;
104    
105            /**
106            * Returns the first journal article resource in the ordered set where uuid = &#63;.
107            *
108            * @param uuid the uuid
109            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
110            * @return the first matching journal article resource, or <code>null</code> if a matching journal article resource could not be found
111            * @throws SystemException if a system exception occurred
112            */
113            public com.liferay.portlet.journal.model.JournalArticleResource fetchByUuid_First(
114                    java.lang.String uuid,
115                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
116                    throws com.liferay.portal.kernel.exception.SystemException;
117    
118            /**
119            * Returns the last journal article resource in the ordered set where uuid = &#63;.
120            *
121            * @param uuid the uuid
122            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
123            * @return the last matching journal article resource
124            * @throws com.liferay.portlet.journal.NoSuchArticleResourceException if a matching journal article resource could not be found
125            * @throws SystemException if a system exception occurred
126            */
127            public com.liferay.portlet.journal.model.JournalArticleResource findByUuid_Last(
128                    java.lang.String uuid,
129                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
130                    throws com.liferay.portal.kernel.exception.SystemException,
131                            com.liferay.portlet.journal.NoSuchArticleResourceException;
132    
133            /**
134            * Returns the last journal article resource in the ordered set where uuid = &#63;.
135            *
136            * @param uuid the uuid
137            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
138            * @return the last matching journal article resource, or <code>null</code> if a matching journal article resource could not be found
139            * @throws SystemException if a system exception occurred
140            */
141            public com.liferay.portlet.journal.model.JournalArticleResource fetchByUuid_Last(
142                    java.lang.String uuid,
143                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
144                    throws com.liferay.portal.kernel.exception.SystemException;
145    
146            /**
147            * Returns the journal article resources before and after the current journal article resource in the ordered set where uuid = &#63;.
148            *
149            * @param resourcePrimKey the primary key of the current journal article resource
150            * @param uuid the uuid
151            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
152            * @return the previous, current, and next journal article resource
153            * @throws com.liferay.portlet.journal.NoSuchArticleResourceException if a journal article resource with the primary key could not be found
154            * @throws SystemException if a system exception occurred
155            */
156            public com.liferay.portlet.journal.model.JournalArticleResource[] findByUuid_PrevAndNext(
157                    long resourcePrimKey, java.lang.String uuid,
158                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
159                    throws com.liferay.portal.kernel.exception.SystemException,
160                            com.liferay.portlet.journal.NoSuchArticleResourceException;
161    
162            /**
163            * Removes all the journal article resources where uuid = &#63; from the database.
164            *
165            * @param uuid the uuid
166            * @throws SystemException if a system exception occurred
167            */
168            public void removeByUuid(java.lang.String uuid)
169                    throws com.liferay.portal.kernel.exception.SystemException;
170    
171            /**
172            * Returns the number of journal article resources where uuid = &#63;.
173            *
174            * @param uuid the uuid
175            * @return the number of matching journal article resources
176            * @throws SystemException if a system exception occurred
177            */
178            public int countByUuid(java.lang.String uuid)
179                    throws com.liferay.portal.kernel.exception.SystemException;
180    
181            /**
182            * Returns the journal article resource where uuid = &#63; and groupId = &#63; or throws a {@link com.liferay.portlet.journal.NoSuchArticleResourceException} if it could not be found.
183            *
184            * @param uuid the uuid
185            * @param groupId the group ID
186            * @return the matching journal article resource
187            * @throws com.liferay.portlet.journal.NoSuchArticleResourceException if a matching journal article resource could not be found
188            * @throws SystemException if a system exception occurred
189            */
190            public com.liferay.portlet.journal.model.JournalArticleResource findByUUID_G(
191                    java.lang.String uuid, long groupId)
192                    throws com.liferay.portal.kernel.exception.SystemException,
193                            com.liferay.portlet.journal.NoSuchArticleResourceException;
194    
195            /**
196            * Returns the journal article resource where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
197            *
198            * @param uuid the uuid
199            * @param groupId the group ID
200            * @return the matching journal article resource, or <code>null</code> if a matching journal article resource could not be found
201            * @throws SystemException if a system exception occurred
202            */
203            public com.liferay.portlet.journal.model.JournalArticleResource fetchByUUID_G(
204                    java.lang.String uuid, long groupId)
205                    throws com.liferay.portal.kernel.exception.SystemException;
206    
207            /**
208            * Returns the journal article resource where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
209            *
210            * @param uuid the uuid
211            * @param groupId the group ID
212            * @param retrieveFromCache whether to use the finder cache
213            * @return the matching journal article resource, or <code>null</code> if a matching journal article resource could not be found
214            * @throws SystemException if a system exception occurred
215            */
216            public com.liferay.portlet.journal.model.JournalArticleResource fetchByUUID_G(
217                    java.lang.String uuid, long groupId, boolean retrieveFromCache)
218                    throws com.liferay.portal.kernel.exception.SystemException;
219    
220            /**
221            * Removes the journal article resource where uuid = &#63; and groupId = &#63; from the database.
222            *
223            * @param uuid the uuid
224            * @param groupId the group ID
225            * @return the journal article resource that was removed
226            * @throws SystemException if a system exception occurred
227            */
228            public com.liferay.portlet.journal.model.JournalArticleResource removeByUUID_G(
229                    java.lang.String uuid, long groupId)
230                    throws com.liferay.portal.kernel.exception.SystemException,
231                            com.liferay.portlet.journal.NoSuchArticleResourceException;
232    
233            /**
234            * Returns the number of journal article resources where uuid = &#63; and groupId = &#63;.
235            *
236            * @param uuid the uuid
237            * @param groupId the group ID
238            * @return the number of matching journal article resources
239            * @throws SystemException if a system exception occurred
240            */
241            public int countByUUID_G(java.lang.String uuid, long groupId)
242                    throws com.liferay.portal.kernel.exception.SystemException;
243    
244            /**
245            * Returns all the journal article resources where groupId = &#63;.
246            *
247            * @param groupId the group ID
248            * @return the matching journal article resources
249            * @throws SystemException if a system exception occurred
250            */
251            public java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findByGroupId(
252                    long groupId)
253                    throws com.liferay.portal.kernel.exception.SystemException;
254    
255            /**
256            * Returns a range of all the journal article resources where groupId = &#63;.
257            *
258            * <p>
259            * 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.portlet.journal.model.impl.JournalArticleResourceModelImpl}. 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.
260            * </p>
261            *
262            * @param groupId the group ID
263            * @param start the lower bound of the range of journal article resources
264            * @param end the upper bound of the range of journal article resources (not inclusive)
265            * @return the range of matching journal article resources
266            * @throws SystemException if a system exception occurred
267            */
268            public java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findByGroupId(
269                    long groupId, int start, int end)
270                    throws com.liferay.portal.kernel.exception.SystemException;
271    
272            /**
273            * Returns an ordered range of all the journal article resources where groupId = &#63;.
274            *
275            * <p>
276            * 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.portlet.journal.model.impl.JournalArticleResourceModelImpl}. 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.
277            * </p>
278            *
279            * @param groupId the group ID
280            * @param start the lower bound of the range of journal article resources
281            * @param end the upper bound of the range of journal article resources (not inclusive)
282            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
283            * @return the ordered range of matching journal article resources
284            * @throws SystemException if a system exception occurred
285            */
286            public java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findByGroupId(
287                    long groupId, int start, int end,
288                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
289                    throws com.liferay.portal.kernel.exception.SystemException;
290    
291            /**
292            * Returns the first journal article resource in the ordered set where groupId = &#63;.
293            *
294            * @param groupId the group ID
295            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
296            * @return the first matching journal article resource
297            * @throws com.liferay.portlet.journal.NoSuchArticleResourceException if a matching journal article resource could not be found
298            * @throws SystemException if a system exception occurred
299            */
300            public com.liferay.portlet.journal.model.JournalArticleResource findByGroupId_First(
301                    long groupId,
302                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
303                    throws com.liferay.portal.kernel.exception.SystemException,
304                            com.liferay.portlet.journal.NoSuchArticleResourceException;
305    
306            /**
307            * Returns the first journal article resource in the ordered set where groupId = &#63;.
308            *
309            * @param groupId the group ID
310            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
311            * @return the first matching journal article resource, or <code>null</code> if a matching journal article resource could not be found
312            * @throws SystemException if a system exception occurred
313            */
314            public com.liferay.portlet.journal.model.JournalArticleResource fetchByGroupId_First(
315                    long groupId,
316                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
317                    throws com.liferay.portal.kernel.exception.SystemException;
318    
319            /**
320            * Returns the last journal article resource in the ordered set where groupId = &#63;.
321            *
322            * @param groupId the group ID
323            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
324            * @return the last matching journal article resource
325            * @throws com.liferay.portlet.journal.NoSuchArticleResourceException if a matching journal article resource could not be found
326            * @throws SystemException if a system exception occurred
327            */
328            public com.liferay.portlet.journal.model.JournalArticleResource findByGroupId_Last(
329                    long groupId,
330                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
331                    throws com.liferay.portal.kernel.exception.SystemException,
332                            com.liferay.portlet.journal.NoSuchArticleResourceException;
333    
334            /**
335            * Returns the last journal article resource in the ordered set where groupId = &#63;.
336            *
337            * @param groupId the group ID
338            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
339            * @return the last matching journal article resource, or <code>null</code> if a matching journal article resource could not be found
340            * @throws SystemException if a system exception occurred
341            */
342            public com.liferay.portlet.journal.model.JournalArticleResource fetchByGroupId_Last(
343                    long groupId,
344                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
345                    throws com.liferay.portal.kernel.exception.SystemException;
346    
347            /**
348            * Returns the journal article resources before and after the current journal article resource in the ordered set where groupId = &#63;.
349            *
350            * @param resourcePrimKey the primary key of the current journal article resource
351            * @param groupId the group ID
352            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
353            * @return the previous, current, and next journal article resource
354            * @throws com.liferay.portlet.journal.NoSuchArticleResourceException if a journal article resource with the primary key could not be found
355            * @throws SystemException if a system exception occurred
356            */
357            public com.liferay.portlet.journal.model.JournalArticleResource[] findByGroupId_PrevAndNext(
358                    long resourcePrimKey, long groupId,
359                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
360                    throws com.liferay.portal.kernel.exception.SystemException,
361                            com.liferay.portlet.journal.NoSuchArticleResourceException;
362    
363            /**
364            * Removes all the journal article resources where groupId = &#63; from the database.
365            *
366            * @param groupId the group ID
367            * @throws SystemException if a system exception occurred
368            */
369            public void removeByGroupId(long groupId)
370                    throws com.liferay.portal.kernel.exception.SystemException;
371    
372            /**
373            * Returns the number of journal article resources where groupId = &#63;.
374            *
375            * @param groupId the group ID
376            * @return the number of matching journal article resources
377            * @throws SystemException if a system exception occurred
378            */
379            public int countByGroupId(long groupId)
380                    throws com.liferay.portal.kernel.exception.SystemException;
381    
382            /**
383            * Returns 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.
384            *
385            * @param groupId the group ID
386            * @param articleId the article ID
387            * @return the matching journal article resource
388            * @throws com.liferay.portlet.journal.NoSuchArticleResourceException if a matching journal article resource could not be found
389            * @throws SystemException if a system exception occurred
390            */
391            public com.liferay.portlet.journal.model.JournalArticleResource findByG_A(
392                    long groupId, java.lang.String articleId)
393                    throws com.liferay.portal.kernel.exception.SystemException,
394                            com.liferay.portlet.journal.NoSuchArticleResourceException;
395    
396            /**
397            * Returns 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.
398            *
399            * @param groupId the group ID
400            * @param articleId the article ID
401            * @return the matching journal article resource, or <code>null</code> if a matching journal article resource could not be found
402            * @throws SystemException if a system exception occurred
403            */
404            public com.liferay.portlet.journal.model.JournalArticleResource fetchByG_A(
405                    long groupId, java.lang.String articleId)
406                    throws com.liferay.portal.kernel.exception.SystemException;
407    
408            /**
409            * Returns 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.
410            *
411            * @param groupId the group ID
412            * @param articleId the article ID
413            * @param retrieveFromCache whether to use the finder cache
414            * @return the matching journal article resource, or <code>null</code> if a matching journal article resource could not be found
415            * @throws SystemException if a system exception occurred
416            */
417            public com.liferay.portlet.journal.model.JournalArticleResource fetchByG_A(
418                    long groupId, java.lang.String articleId, boolean retrieveFromCache)
419                    throws com.liferay.portal.kernel.exception.SystemException;
420    
421            /**
422            * Removes the journal article resource where groupId = &#63; and articleId = &#63; from the database.
423            *
424            * @param groupId the group ID
425            * @param articleId the article ID
426            * @return the journal article resource that was removed
427            * @throws SystemException if a system exception occurred
428            */
429            public com.liferay.portlet.journal.model.JournalArticleResource removeByG_A(
430                    long groupId, java.lang.String articleId)
431                    throws com.liferay.portal.kernel.exception.SystemException,
432                            com.liferay.portlet.journal.NoSuchArticleResourceException;
433    
434            /**
435            * Returns the number of journal article resources where groupId = &#63; and articleId = &#63;.
436            *
437            * @param groupId the group ID
438            * @param articleId the article ID
439            * @return the number of matching journal article resources
440            * @throws SystemException if a system exception occurred
441            */
442            public int countByG_A(long groupId, java.lang.String articleId)
443                    throws com.liferay.portal.kernel.exception.SystemException;
444    
445            /**
446            * Caches the journal article resource in the entity cache if it is enabled.
447            *
448            * @param journalArticleResource the journal article resource
449            */
450            public void cacheResult(
451                    com.liferay.portlet.journal.model.JournalArticleResource journalArticleResource);
452    
453            /**
454            * Caches the journal article resources in the entity cache if it is enabled.
455            *
456            * @param journalArticleResources the journal article resources
457            */
458            public void cacheResult(
459                    java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> journalArticleResources);
460    
461            /**
462            * Creates a new journal article resource with the primary key. Does not add the journal article resource to the database.
463            *
464            * @param resourcePrimKey the primary key for the new journal article resource
465            * @return the new journal article resource
466            */
467            public com.liferay.portlet.journal.model.JournalArticleResource create(
468                    long resourcePrimKey);
469    
470            /**
471            * Removes the journal article resource with the primary key from the database. Also notifies the appropriate model listeners.
472            *
473            * @param resourcePrimKey the primary key of the journal article resource
474            * @return the journal article resource that was removed
475            * @throws com.liferay.portlet.journal.NoSuchArticleResourceException if a journal article resource with the primary key could not be found
476            * @throws SystemException if a system exception occurred
477            */
478            public com.liferay.portlet.journal.model.JournalArticleResource remove(
479                    long resourcePrimKey)
480                    throws com.liferay.portal.kernel.exception.SystemException,
481                            com.liferay.portlet.journal.NoSuchArticleResourceException;
482    
483            public com.liferay.portlet.journal.model.JournalArticleResource updateImpl(
484                    com.liferay.portlet.journal.model.JournalArticleResource journalArticleResource)
485                    throws com.liferay.portal.kernel.exception.SystemException;
486    
487            /**
488            * Returns the journal article resource with the primary key or throws a {@link com.liferay.portlet.journal.NoSuchArticleResourceException} if it could not be found.
489            *
490            * @param resourcePrimKey the primary key of the journal article resource
491            * @return the journal article resource
492            * @throws com.liferay.portlet.journal.NoSuchArticleResourceException if a journal article resource with the primary key could not be found
493            * @throws SystemException if a system exception occurred
494            */
495            public com.liferay.portlet.journal.model.JournalArticleResource findByPrimaryKey(
496                    long resourcePrimKey)
497                    throws com.liferay.portal.kernel.exception.SystemException,
498                            com.liferay.portlet.journal.NoSuchArticleResourceException;
499    
500            /**
501            * Returns the journal article resource with the primary key or returns <code>null</code> if it could not be found.
502            *
503            * @param resourcePrimKey the primary key of the journal article resource
504            * @return the journal article resource, or <code>null</code> if a journal article resource with the primary key could not be found
505            * @throws SystemException if a system exception occurred
506            */
507            public com.liferay.portlet.journal.model.JournalArticleResource fetchByPrimaryKey(
508                    long resourcePrimKey)
509                    throws com.liferay.portal.kernel.exception.SystemException;
510    
511            /**
512            * Returns all the journal article resources.
513            *
514            * @return the journal article resources
515            * @throws SystemException if a system exception occurred
516            */
517            public java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findAll()
518                    throws com.liferay.portal.kernel.exception.SystemException;
519    
520            /**
521            * Returns a range of all the journal article resources.
522            *
523            * <p>
524            * 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.portlet.journal.model.impl.JournalArticleResourceModelImpl}. 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.
525            * </p>
526            *
527            * @param start the lower bound of the range of journal article resources
528            * @param end the upper bound of the range of journal article resources (not inclusive)
529            * @return the range of journal article resources
530            * @throws SystemException if a system exception occurred
531            */
532            public java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findAll(
533                    int start, int end)
534                    throws com.liferay.portal.kernel.exception.SystemException;
535    
536            /**
537            * Returns an ordered range of all the journal article resources.
538            *
539            * <p>
540            * 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.portlet.journal.model.impl.JournalArticleResourceModelImpl}. 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.
541            * </p>
542            *
543            * @param start the lower bound of the range of journal article resources
544            * @param end the upper bound of the range of journal article resources (not inclusive)
545            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
546            * @return the ordered range of journal article resources
547            * @throws SystemException if a system exception occurred
548            */
549            public java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findAll(
550                    int start, int end,
551                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
552                    throws com.liferay.portal.kernel.exception.SystemException;
553    
554            /**
555            * Removes all the journal article resources from the database.
556            *
557            * @throws SystemException if a system exception occurred
558            */
559            public void removeAll()
560                    throws com.liferay.portal.kernel.exception.SystemException;
561    
562            /**
563            * Returns the number of journal article resources.
564            *
565            * @return the number of journal article resources
566            * @throws SystemException if a system exception occurred
567            */
568            public int countAll()
569                    throws com.liferay.portal.kernel.exception.SystemException;
570    }