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.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 com.liferay.portlet.journal.service.persistence.impl.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            */
049            public java.util.List<JournalArticleResource> findByUuid(
050                    java.lang.String uuid);
051    
052            /**
053            * Returns a range of all the journal article resources where uuid = &#63;.
054            *
055            * <p>
056            * 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 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.
057            * </p>
058            *
059            * @param uuid the uuid
060            * @param start the lower bound of the range of journal article resources
061            * @param end the upper bound of the range of journal article resources (not inclusive)
062            * @return the range of matching journal article resources
063            */
064            public java.util.List<JournalArticleResource> findByUuid(
065                    java.lang.String uuid, int start, int end);
066    
067            /**
068            * Returns an ordered range of all the journal article resources where uuid = &#63;.
069            *
070            * <p>
071            * 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 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.
072            * </p>
073            *
074            * @param uuid the uuid
075            * @param start the lower bound of the range of journal article resources
076            * @param end the upper bound of the range of journal article resources (not inclusive)
077            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
078            * @return the ordered range of matching journal article resources
079            */
080            public java.util.List<JournalArticleResource> findByUuid(
081                    java.lang.String uuid, int start, int end,
082                    com.liferay.portal.kernel.util.OrderByComparator<JournalArticleResource> orderByComparator);
083    
084            /**
085            * Returns the first journal article resource in the ordered set where uuid = &#63;.
086            *
087            * @param uuid the uuid
088            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
089            * @return the first matching journal article resource
090            * @throws NoSuchArticleResourceException if a matching journal article resource could not be found
091            */
092            public JournalArticleResource findByUuid_First(java.lang.String uuid,
093                    com.liferay.portal.kernel.util.OrderByComparator<JournalArticleResource> orderByComparator)
094                    throws com.liferay.portlet.journal.NoSuchArticleResourceException;
095    
096            /**
097            * Returns the first journal article resource in the ordered set where uuid = &#63;.
098            *
099            * @param uuid the uuid
100            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
101            * @return the first matching journal article resource, or <code>null</code> if a matching journal article resource could not be found
102            */
103            public JournalArticleResource fetchByUuid_First(java.lang.String uuid,
104                    com.liferay.portal.kernel.util.OrderByComparator<JournalArticleResource> orderByComparator);
105    
106            /**
107            * Returns the last journal article resource in the ordered set where uuid = &#63;.
108            *
109            * @param uuid the uuid
110            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
111            * @return the last matching journal article resource
112            * @throws NoSuchArticleResourceException if a matching journal article resource could not be found
113            */
114            public JournalArticleResource findByUuid_Last(java.lang.String uuid,
115                    com.liferay.portal.kernel.util.OrderByComparator<JournalArticleResource> orderByComparator)
116                    throws com.liferay.portlet.journal.NoSuchArticleResourceException;
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, or <code>null</code> if a matching journal article resource could not be found
124            */
125            public JournalArticleResource fetchByUuid_Last(java.lang.String uuid,
126                    com.liferay.portal.kernel.util.OrderByComparator<JournalArticleResource> orderByComparator);
127    
128            /**
129            * Returns the journal article resources before and after the current journal article resource in the ordered set where uuid = &#63;.
130            *
131            * @param resourcePrimKey the primary key of the current journal article resource
132            * @param uuid the uuid
133            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
134            * @return the previous, current, and next journal article resource
135            * @throws NoSuchArticleResourceException if a journal article resource with the primary key could not be found
136            */
137            public JournalArticleResource[] findByUuid_PrevAndNext(
138                    long resourcePrimKey, java.lang.String uuid,
139                    com.liferay.portal.kernel.util.OrderByComparator<JournalArticleResource> orderByComparator)
140                    throws com.liferay.portlet.journal.NoSuchArticleResourceException;
141    
142            /**
143            * Removes all the journal article resources where uuid = &#63; from the database.
144            *
145            * @param uuid the uuid
146            */
147            public void removeByUuid(java.lang.String uuid);
148    
149            /**
150            * Returns the number of journal article resources where uuid = &#63;.
151            *
152            * @param uuid the uuid
153            * @return the number of matching journal article resources
154            */
155            public int countByUuid(java.lang.String uuid);
156    
157            /**
158            * Returns the journal article resource where uuid = &#63; and groupId = &#63; or throws a {@link NoSuchArticleResourceException} if it could not be found.
159            *
160            * @param uuid the uuid
161            * @param groupId the group ID
162            * @return the matching journal article resource
163            * @throws NoSuchArticleResourceException if a matching journal article resource could not be found
164            */
165            public JournalArticleResource findByUUID_G(java.lang.String uuid,
166                    long groupId)
167                    throws com.liferay.portlet.journal.NoSuchArticleResourceException;
168    
169            /**
170            * 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.
171            *
172            * @param uuid the uuid
173            * @param groupId the group ID
174            * @return the matching journal article resource, or <code>null</code> if a matching journal article resource could not be found
175            */
176            public JournalArticleResource fetchByUUID_G(java.lang.String uuid,
177                    long groupId);
178    
179            /**
180            * 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.
181            *
182            * @param uuid the uuid
183            * @param groupId the group ID
184            * @param retrieveFromCache whether to use the finder cache
185            * @return the matching journal article resource, or <code>null</code> if a matching journal article resource could not be found
186            */
187            public JournalArticleResource fetchByUUID_G(java.lang.String uuid,
188                    long groupId, boolean retrieveFromCache);
189    
190            /**
191            * Removes the journal article resource where uuid = &#63; and groupId = &#63; from the database.
192            *
193            * @param uuid the uuid
194            * @param groupId the group ID
195            * @return the journal article resource that was removed
196            */
197            public JournalArticleResource removeByUUID_G(java.lang.String uuid,
198                    long groupId)
199                    throws com.liferay.portlet.journal.NoSuchArticleResourceException;
200    
201            /**
202            * Returns the number of journal article resources where uuid = &#63; and groupId = &#63;.
203            *
204            * @param uuid the uuid
205            * @param groupId the group ID
206            * @return the number of matching journal article resources
207            */
208            public int countByUUID_G(java.lang.String uuid, long groupId);
209    
210            /**
211            * Returns all the journal article resources where groupId = &#63;.
212            *
213            * @param groupId the group ID
214            * @return the matching journal article resources
215            */
216            public java.util.List<JournalArticleResource> findByGroupId(long groupId);
217    
218            /**
219            * Returns a range of all the journal article resources where groupId = &#63;.
220            *
221            * <p>
222            * 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 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.
223            * </p>
224            *
225            * @param groupId the group ID
226            * @param start the lower bound of the range of journal article resources
227            * @param end the upper bound of the range of journal article resources (not inclusive)
228            * @return the range of matching journal article resources
229            */
230            public java.util.List<JournalArticleResource> findByGroupId(long groupId,
231                    int start, int end);
232    
233            /**
234            * Returns an ordered range of all the journal article resources where groupId = &#63;.
235            *
236            * <p>
237            * 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 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.
238            * </p>
239            *
240            * @param groupId the group ID
241            * @param start the lower bound of the range of journal article resources
242            * @param end the upper bound of the range of journal article resources (not inclusive)
243            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
244            * @return the ordered range of matching journal article resources
245            */
246            public java.util.List<JournalArticleResource> findByGroupId(long groupId,
247                    int start, int end,
248                    com.liferay.portal.kernel.util.OrderByComparator<JournalArticleResource> orderByComparator);
249    
250            /**
251            * Returns the first journal article resource in the ordered set where groupId = &#63;.
252            *
253            * @param groupId the group ID
254            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
255            * @return the first matching journal article resource
256            * @throws NoSuchArticleResourceException if a matching journal article resource could not be found
257            */
258            public JournalArticleResource findByGroupId_First(long groupId,
259                    com.liferay.portal.kernel.util.OrderByComparator<JournalArticleResource> orderByComparator)
260                    throws com.liferay.portlet.journal.NoSuchArticleResourceException;
261    
262            /**
263            * Returns the first journal article resource in the ordered set where groupId = &#63;.
264            *
265            * @param groupId the group ID
266            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
267            * @return the first matching journal article resource, or <code>null</code> if a matching journal article resource could not be found
268            */
269            public JournalArticleResource fetchByGroupId_First(long groupId,
270                    com.liferay.portal.kernel.util.OrderByComparator<JournalArticleResource> orderByComparator);
271    
272            /**
273            * Returns the last journal article resource in the ordered set where groupId = &#63;.
274            *
275            * @param groupId the group ID
276            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
277            * @return the last matching journal article resource
278            * @throws NoSuchArticleResourceException if a matching journal article resource could not be found
279            */
280            public JournalArticleResource findByGroupId_Last(long groupId,
281                    com.liferay.portal.kernel.util.OrderByComparator<JournalArticleResource> orderByComparator)
282                    throws com.liferay.portlet.journal.NoSuchArticleResourceException;
283    
284            /**
285            * Returns the last journal article resource in the ordered set where groupId = &#63;.
286            *
287            * @param groupId the group ID
288            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
289            * @return the last matching journal article resource, or <code>null</code> if a matching journal article resource could not be found
290            */
291            public JournalArticleResource fetchByGroupId_Last(long groupId,
292                    com.liferay.portal.kernel.util.OrderByComparator<JournalArticleResource> orderByComparator);
293    
294            /**
295            * Returns the journal article resources before and after the current journal article resource in the ordered set where groupId = &#63;.
296            *
297            * @param resourcePrimKey the primary key of the current journal article resource
298            * @param groupId the group ID
299            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
300            * @return the previous, current, and next journal article resource
301            * @throws NoSuchArticleResourceException if a journal article resource with the primary key could not be found
302            */
303            public JournalArticleResource[] findByGroupId_PrevAndNext(
304                    long resourcePrimKey, long groupId,
305                    com.liferay.portal.kernel.util.OrderByComparator<JournalArticleResource> orderByComparator)
306                    throws com.liferay.portlet.journal.NoSuchArticleResourceException;
307    
308            /**
309            * Removes all the journal article resources where groupId = &#63; from the database.
310            *
311            * @param groupId the group ID
312            */
313            public void removeByGroupId(long groupId);
314    
315            /**
316            * Returns the number of journal article resources where groupId = &#63;.
317            *
318            * @param groupId the group ID
319            * @return the number of matching journal article resources
320            */
321            public int countByGroupId(long groupId);
322    
323            /**
324            * Returns the journal article resource where groupId = &#63; and articleId = &#63; or throws a {@link NoSuchArticleResourceException} if it could not be found.
325            *
326            * @param groupId the group ID
327            * @param articleId the article ID
328            * @return the matching journal article resource
329            * @throws NoSuchArticleResourceException if a matching journal article resource could not be found
330            */
331            public JournalArticleResource findByG_A(long groupId,
332                    java.lang.String articleId)
333                    throws com.liferay.portlet.journal.NoSuchArticleResourceException;
334    
335            /**
336            * 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.
337            *
338            * @param groupId the group ID
339            * @param articleId the article ID
340            * @return the matching journal article resource, or <code>null</code> if a matching journal article resource could not be found
341            */
342            public JournalArticleResource fetchByG_A(long groupId,
343                    java.lang.String articleId);
344    
345            /**
346            * 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.
347            *
348            * @param groupId the group ID
349            * @param articleId the article ID
350            * @param retrieveFromCache whether to use the finder cache
351            * @return the matching journal article resource, or <code>null</code> if a matching journal article resource could not be found
352            */
353            public JournalArticleResource fetchByG_A(long groupId,
354                    java.lang.String articleId, boolean retrieveFromCache);
355    
356            /**
357            * Removes the journal article resource where groupId = &#63; and articleId = &#63; from the database.
358            *
359            * @param groupId the group ID
360            * @param articleId the article ID
361            * @return the journal article resource that was removed
362            */
363            public JournalArticleResource removeByG_A(long groupId,
364                    java.lang.String articleId)
365                    throws com.liferay.portlet.journal.NoSuchArticleResourceException;
366    
367            /**
368            * Returns the number of journal article resources where groupId = &#63; and articleId = &#63;.
369            *
370            * @param groupId the group ID
371            * @param articleId the article ID
372            * @return the number of matching journal article resources
373            */
374            public int countByG_A(long groupId, java.lang.String articleId);
375    
376            /**
377            * Caches the journal article resource in the entity cache if it is enabled.
378            *
379            * @param journalArticleResource the journal article resource
380            */
381            public void cacheResult(JournalArticleResource journalArticleResource);
382    
383            /**
384            * Caches the journal article resources in the entity cache if it is enabled.
385            *
386            * @param journalArticleResources the journal article resources
387            */
388            public void cacheResult(
389                    java.util.List<JournalArticleResource> journalArticleResources);
390    
391            /**
392            * Creates a new journal article resource with the primary key. Does not add the journal article resource to the database.
393            *
394            * @param resourcePrimKey the primary key for the new journal article resource
395            * @return the new journal article resource
396            */
397            public JournalArticleResource create(long resourcePrimKey);
398    
399            /**
400            * Removes the journal article resource with the primary key from the database. Also notifies the appropriate model listeners.
401            *
402            * @param resourcePrimKey the primary key of the journal article resource
403            * @return the journal article resource that was removed
404            * @throws NoSuchArticleResourceException if a journal article resource with the primary key could not be found
405            */
406            public JournalArticleResource remove(long resourcePrimKey)
407                    throws com.liferay.portlet.journal.NoSuchArticleResourceException;
408    
409            public JournalArticleResource updateImpl(
410                    JournalArticleResource journalArticleResource);
411    
412            /**
413            * Returns the journal article resource with the primary key or throws a {@link NoSuchArticleResourceException} if it could not be found.
414            *
415            * @param resourcePrimKey the primary key of the journal article resource
416            * @return the journal article resource
417            * @throws NoSuchArticleResourceException if a journal article resource with the primary key could not be found
418            */
419            public JournalArticleResource findByPrimaryKey(long resourcePrimKey)
420                    throws com.liferay.portlet.journal.NoSuchArticleResourceException;
421    
422            /**
423            * Returns the journal article resource with the primary key or returns <code>null</code> if it could not be found.
424            *
425            * @param resourcePrimKey the primary key of the journal article resource
426            * @return the journal article resource, or <code>null</code> if a journal article resource with the primary key could not be found
427            */
428            public JournalArticleResource fetchByPrimaryKey(long resourcePrimKey);
429    
430            @Override
431            public java.util.Map<java.io.Serializable, JournalArticleResource> fetchByPrimaryKeys(
432                    java.util.Set<java.io.Serializable> primaryKeys);
433    
434            /**
435            * Returns all the journal article resources.
436            *
437            * @return the journal article resources
438            */
439            public java.util.List<JournalArticleResource> findAll();
440    
441            /**
442            * Returns a range of all the journal article resources.
443            *
444            * <p>
445            * 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 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.
446            * </p>
447            *
448            * @param start the lower bound of the range of journal article resources
449            * @param end the upper bound of the range of journal article resources (not inclusive)
450            * @return the range of journal article resources
451            */
452            public java.util.List<JournalArticleResource> findAll(int start, int end);
453    
454            /**
455            * Returns an ordered range of all the journal article resources.
456            *
457            * <p>
458            * 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 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.
459            * </p>
460            *
461            * @param start the lower bound of the range of journal article resources
462            * @param end the upper bound of the range of journal article resources (not inclusive)
463            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
464            * @return the ordered range of journal article resources
465            */
466            public java.util.List<JournalArticleResource> findAll(int start, int end,
467                    com.liferay.portal.kernel.util.OrderByComparator<JournalArticleResource> orderByComparator);
468    
469            /**
470            * Removes all the journal article resources from the database.
471            */
472            public void removeAll();
473    
474            /**
475            * Returns the number of journal article resources.
476            *
477            * @return the number of journal article resources
478            */
479            public int countAll();
480    }