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.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
021    import com.liferay.portal.kernel.util.OrderByComparator;
022    import com.liferay.portal.kernel.util.ReferenceRegistry;
023    import com.liferay.portal.service.ServiceContext;
024    
025    import com.liferay.portlet.journal.model.JournalArticleResource;
026    
027    import java.util.List;
028    
029    /**
030     * The persistence utility for the journal article resource service. This utility wraps {@link JournalArticleResourcePersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
031     *
032     * <p>
033     * Caching information and settings can be found in <code>portal.properties</code>
034     * </p>
035     *
036     * @author Brian Wing Shun Chan
037     * @see JournalArticleResourcePersistence
038     * @see JournalArticleResourcePersistenceImpl
039     * @generated
040     */
041    @ProviderType
042    public class JournalArticleResourceUtil {
043            /*
044             * NOTE FOR DEVELOPERS:
045             *
046             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
047             */
048    
049            /**
050             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
051             */
052            public static void clearCache() {
053                    getPersistence().clearCache();
054            }
055    
056            /**
057             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
058             */
059            public static void clearCache(JournalArticleResource journalArticleResource) {
060                    getPersistence().clearCache(journalArticleResource);
061            }
062    
063            /**
064             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
065             */
066            public static long countWithDynamicQuery(DynamicQuery dynamicQuery) {
067                    return getPersistence().countWithDynamicQuery(dynamicQuery);
068            }
069    
070            /**
071             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
072             */
073            public static List<JournalArticleResource> findWithDynamicQuery(
074                    DynamicQuery dynamicQuery) {
075                    return getPersistence().findWithDynamicQuery(dynamicQuery);
076            }
077    
078            /**
079             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
080             */
081            public static List<JournalArticleResource> findWithDynamicQuery(
082                    DynamicQuery dynamicQuery, int start, int end) {
083                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
084            }
085    
086            /**
087             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
088             */
089            public static List<JournalArticleResource> findWithDynamicQuery(
090                    DynamicQuery dynamicQuery, int start, int end,
091                    OrderByComparator<JournalArticleResource> orderByComparator) {
092                    return getPersistence()
093                                       .findWithDynamicQuery(dynamicQuery, start, end,
094                            orderByComparator);
095            }
096    
097            /**
098             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
099             */
100            public static JournalArticleResource update(
101                    JournalArticleResource journalArticleResource) {
102                    return getPersistence().update(journalArticleResource);
103            }
104    
105            /**
106             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
107             */
108            public static JournalArticleResource update(
109                    JournalArticleResource journalArticleResource,
110                    ServiceContext serviceContext) {
111                    return getPersistence().update(journalArticleResource, serviceContext);
112            }
113    
114            /**
115            * Returns all the journal article resources where uuid = &#63;.
116            *
117            * @param uuid the uuid
118            * @return the matching journal article resources
119            */
120            public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findByUuid(
121                    java.lang.String uuid) {
122                    return getPersistence().findByUuid(uuid);
123            }
124    
125            /**
126            * Returns a range of all the journal article resources where uuid = &#63;.
127            *
128            * <p>
129            * 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.
130            * </p>
131            *
132            * @param uuid the uuid
133            * @param start the lower bound of the range of journal article resources
134            * @param end the upper bound of the range of journal article resources (not inclusive)
135            * @return the range of matching journal article resources
136            */
137            public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findByUuid(
138                    java.lang.String uuid, int start, int end) {
139                    return getPersistence().findByUuid(uuid, start, end);
140            }
141    
142            /**
143            * Returns an ordered range of all the journal article resources where uuid = &#63;.
144            *
145            * <p>
146            * 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.
147            * </p>
148            *
149            * @param uuid the uuid
150            * @param start the lower bound of the range of journal article resources
151            * @param end the upper bound of the range of journal article resources (not inclusive)
152            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
153            * @return the ordered range of matching journal article resources
154            */
155            public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findByUuid(
156                    java.lang.String uuid, int start, int end,
157                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalArticleResource> orderByComparator) {
158                    return getPersistence().findByUuid(uuid, start, end, orderByComparator);
159            }
160    
161            /**
162            * Returns the first journal article resource in the ordered set where uuid = &#63;.
163            *
164            * @param uuid the uuid
165            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
166            * @return the first matching journal article resource
167            * @throws com.liferay.portlet.journal.NoSuchArticleResourceException if a matching journal article resource could not be found
168            */
169            public static com.liferay.portlet.journal.model.JournalArticleResource findByUuid_First(
170                    java.lang.String uuid,
171                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalArticleResource> orderByComparator)
172                    throws com.liferay.portlet.journal.NoSuchArticleResourceException {
173                    return getPersistence().findByUuid_First(uuid, orderByComparator);
174            }
175    
176            /**
177            * Returns the first journal article resource in the ordered set where uuid = &#63;.
178            *
179            * @param uuid the uuid
180            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
181            * @return the first matching journal article resource, or <code>null</code> if a matching journal article resource could not be found
182            */
183            public static com.liferay.portlet.journal.model.JournalArticleResource fetchByUuid_First(
184                    java.lang.String uuid,
185                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalArticleResource> orderByComparator) {
186                    return getPersistence().fetchByUuid_First(uuid, orderByComparator);
187            }
188    
189            /**
190            * Returns the last journal article resource in the ordered set where uuid = &#63;.
191            *
192            * @param uuid the uuid
193            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
194            * @return the last matching journal article resource
195            * @throws com.liferay.portlet.journal.NoSuchArticleResourceException if a matching journal article resource could not be found
196            */
197            public static com.liferay.portlet.journal.model.JournalArticleResource findByUuid_Last(
198                    java.lang.String uuid,
199                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalArticleResource> orderByComparator)
200                    throws com.liferay.portlet.journal.NoSuchArticleResourceException {
201                    return getPersistence().findByUuid_Last(uuid, orderByComparator);
202            }
203    
204            /**
205            * Returns the last journal article resource in the ordered set where uuid = &#63;.
206            *
207            * @param uuid the uuid
208            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
209            * @return the last matching journal article resource, or <code>null</code> if a matching journal article resource could not be found
210            */
211            public static com.liferay.portlet.journal.model.JournalArticleResource fetchByUuid_Last(
212                    java.lang.String uuid,
213                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalArticleResource> orderByComparator) {
214                    return getPersistence().fetchByUuid_Last(uuid, orderByComparator);
215            }
216    
217            /**
218            * Returns the journal article resources before and after the current journal article resource in the ordered set where uuid = &#63;.
219            *
220            * @param resourcePrimKey the primary key of the current journal article resource
221            * @param uuid the uuid
222            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
223            * @return the previous, current, and next journal article resource
224            * @throws com.liferay.portlet.journal.NoSuchArticleResourceException if a journal article resource with the primary key could not be found
225            */
226            public static com.liferay.portlet.journal.model.JournalArticleResource[] findByUuid_PrevAndNext(
227                    long resourcePrimKey, java.lang.String uuid,
228                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalArticleResource> orderByComparator)
229                    throws com.liferay.portlet.journal.NoSuchArticleResourceException {
230                    return getPersistence()
231                                       .findByUuid_PrevAndNext(resourcePrimKey, uuid,
232                            orderByComparator);
233            }
234    
235            /**
236            * Removes all the journal article resources where uuid = &#63; from the database.
237            *
238            * @param uuid the uuid
239            */
240            public static void removeByUuid(java.lang.String uuid) {
241                    getPersistence().removeByUuid(uuid);
242            }
243    
244            /**
245            * Returns the number of journal article resources where uuid = &#63;.
246            *
247            * @param uuid the uuid
248            * @return the number of matching journal article resources
249            */
250            public static int countByUuid(java.lang.String uuid) {
251                    return getPersistence().countByUuid(uuid);
252            }
253    
254            /**
255            * 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.
256            *
257            * @param uuid the uuid
258            * @param groupId the group ID
259            * @return the matching journal article resource
260            * @throws com.liferay.portlet.journal.NoSuchArticleResourceException if a matching journal article resource could not be found
261            */
262            public static com.liferay.portlet.journal.model.JournalArticleResource findByUUID_G(
263                    java.lang.String uuid, long groupId)
264                    throws com.liferay.portlet.journal.NoSuchArticleResourceException {
265                    return getPersistence().findByUUID_G(uuid, groupId);
266            }
267    
268            /**
269            * 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.
270            *
271            * @param uuid the uuid
272            * @param groupId the group ID
273            * @return the matching journal article resource, or <code>null</code> if a matching journal article resource could not be found
274            */
275            public static com.liferay.portlet.journal.model.JournalArticleResource fetchByUUID_G(
276                    java.lang.String uuid, long groupId) {
277                    return getPersistence().fetchByUUID_G(uuid, groupId);
278            }
279    
280            /**
281            * 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.
282            *
283            * @param uuid the uuid
284            * @param groupId the group ID
285            * @param retrieveFromCache whether to use the finder cache
286            * @return the matching journal article resource, or <code>null</code> if a matching journal article resource could not be found
287            */
288            public static com.liferay.portlet.journal.model.JournalArticleResource fetchByUUID_G(
289                    java.lang.String uuid, long groupId, boolean retrieveFromCache) {
290                    return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache);
291            }
292    
293            /**
294            * Removes the journal article resource where uuid = &#63; and groupId = &#63; from the database.
295            *
296            * @param uuid the uuid
297            * @param groupId the group ID
298            * @return the journal article resource that was removed
299            */
300            public static com.liferay.portlet.journal.model.JournalArticleResource removeByUUID_G(
301                    java.lang.String uuid, long groupId)
302                    throws com.liferay.portlet.journal.NoSuchArticleResourceException {
303                    return getPersistence().removeByUUID_G(uuid, groupId);
304            }
305    
306            /**
307            * Returns the number of journal article resources where uuid = &#63; and groupId = &#63;.
308            *
309            * @param uuid the uuid
310            * @param groupId the group ID
311            * @return the number of matching journal article resources
312            */
313            public static int countByUUID_G(java.lang.String uuid, long groupId) {
314                    return getPersistence().countByUUID_G(uuid, groupId);
315            }
316    
317            /**
318            * Returns all the journal article resources where groupId = &#63;.
319            *
320            * @param groupId the group ID
321            * @return the matching journal article resources
322            */
323            public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findByGroupId(
324                    long groupId) {
325                    return getPersistence().findByGroupId(groupId);
326            }
327    
328            /**
329            * Returns a range of all the journal article resources where groupId = &#63;.
330            *
331            * <p>
332            * 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.
333            * </p>
334            *
335            * @param groupId the group ID
336            * @param start the lower bound of the range of journal article resources
337            * @param end the upper bound of the range of journal article resources (not inclusive)
338            * @return the range of matching journal article resources
339            */
340            public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findByGroupId(
341                    long groupId, int start, int end) {
342                    return getPersistence().findByGroupId(groupId, start, end);
343            }
344    
345            /**
346            * Returns an ordered range of all the journal article resources where groupId = &#63;.
347            *
348            * <p>
349            * 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.
350            * </p>
351            *
352            * @param groupId the group ID
353            * @param start the lower bound of the range of journal article resources
354            * @param end the upper bound of the range of journal article resources (not inclusive)
355            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
356            * @return the ordered range of matching journal article resources
357            */
358            public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findByGroupId(
359                    long groupId, int start, int end,
360                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalArticleResource> orderByComparator) {
361                    return getPersistence()
362                                       .findByGroupId(groupId, start, end, orderByComparator);
363            }
364    
365            /**
366            * Returns the first journal article resource in the ordered set where groupId = &#63;.
367            *
368            * @param groupId the group ID
369            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
370            * @return the first matching journal article resource
371            * @throws com.liferay.portlet.journal.NoSuchArticleResourceException if a matching journal article resource could not be found
372            */
373            public static com.liferay.portlet.journal.model.JournalArticleResource findByGroupId_First(
374                    long groupId,
375                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalArticleResource> orderByComparator)
376                    throws com.liferay.portlet.journal.NoSuchArticleResourceException {
377                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
378            }
379    
380            /**
381            * Returns the first journal article resource in the ordered set where groupId = &#63;.
382            *
383            * @param groupId the group ID
384            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
385            * @return the first matching journal article resource, or <code>null</code> if a matching journal article resource could not be found
386            */
387            public static com.liferay.portlet.journal.model.JournalArticleResource fetchByGroupId_First(
388                    long groupId,
389                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalArticleResource> orderByComparator) {
390                    return getPersistence().fetchByGroupId_First(groupId, orderByComparator);
391            }
392    
393            /**
394            * Returns the last journal article resource in the ordered set where groupId = &#63;.
395            *
396            * @param groupId the group ID
397            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
398            * @return the last matching journal article resource
399            * @throws com.liferay.portlet.journal.NoSuchArticleResourceException if a matching journal article resource could not be found
400            */
401            public static com.liferay.portlet.journal.model.JournalArticleResource findByGroupId_Last(
402                    long groupId,
403                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalArticleResource> orderByComparator)
404                    throws com.liferay.portlet.journal.NoSuchArticleResourceException {
405                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
406            }
407    
408            /**
409            * Returns the last journal article resource in the ordered set where groupId = &#63;.
410            *
411            * @param groupId the group ID
412            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
413            * @return the last matching journal article resource, or <code>null</code> if a matching journal article resource could not be found
414            */
415            public static com.liferay.portlet.journal.model.JournalArticleResource fetchByGroupId_Last(
416                    long groupId,
417                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalArticleResource> orderByComparator) {
418                    return getPersistence().fetchByGroupId_Last(groupId, orderByComparator);
419            }
420    
421            /**
422            * Returns the journal article resources before and after the current journal article resource in the ordered set where groupId = &#63;.
423            *
424            * @param resourcePrimKey the primary key of the current journal article resource
425            * @param groupId the group ID
426            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
427            * @return the previous, current, and next journal article resource
428            * @throws com.liferay.portlet.journal.NoSuchArticleResourceException if a journal article resource with the primary key could not be found
429            */
430            public static com.liferay.portlet.journal.model.JournalArticleResource[] findByGroupId_PrevAndNext(
431                    long resourcePrimKey, long groupId,
432                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalArticleResource> orderByComparator)
433                    throws com.liferay.portlet.journal.NoSuchArticleResourceException {
434                    return getPersistence()
435                                       .findByGroupId_PrevAndNext(resourcePrimKey, groupId,
436                            orderByComparator);
437            }
438    
439            /**
440            * Removes all the journal article resources where groupId = &#63; from the database.
441            *
442            * @param groupId the group ID
443            */
444            public static void removeByGroupId(long groupId) {
445                    getPersistence().removeByGroupId(groupId);
446            }
447    
448            /**
449            * Returns the number of journal article resources where groupId = &#63;.
450            *
451            * @param groupId the group ID
452            * @return the number of matching journal article resources
453            */
454            public static int countByGroupId(long groupId) {
455                    return getPersistence().countByGroupId(groupId);
456            }
457    
458            /**
459            * 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.
460            *
461            * @param groupId the group ID
462            * @param articleId the article ID
463            * @return the matching journal article resource
464            * @throws com.liferay.portlet.journal.NoSuchArticleResourceException if a matching journal article resource could not be found
465            */
466            public static com.liferay.portlet.journal.model.JournalArticleResource findByG_A(
467                    long groupId, java.lang.String articleId)
468                    throws com.liferay.portlet.journal.NoSuchArticleResourceException {
469                    return getPersistence().findByG_A(groupId, articleId);
470            }
471    
472            /**
473            * 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.
474            *
475            * @param groupId the group ID
476            * @param articleId the article ID
477            * @return the matching journal article resource, or <code>null</code> if a matching journal article resource could not be found
478            */
479            public static com.liferay.portlet.journal.model.JournalArticleResource fetchByG_A(
480                    long groupId, java.lang.String articleId) {
481                    return getPersistence().fetchByG_A(groupId, articleId);
482            }
483    
484            /**
485            * 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.
486            *
487            * @param groupId the group ID
488            * @param articleId the article ID
489            * @param retrieveFromCache whether to use the finder cache
490            * @return the matching journal article resource, or <code>null</code> if a matching journal article resource could not be found
491            */
492            public static com.liferay.portlet.journal.model.JournalArticleResource fetchByG_A(
493                    long groupId, java.lang.String articleId, boolean retrieveFromCache) {
494                    return getPersistence().fetchByG_A(groupId, articleId, retrieveFromCache);
495            }
496    
497            /**
498            * Removes the journal article resource where groupId = &#63; and articleId = &#63; from the database.
499            *
500            * @param groupId the group ID
501            * @param articleId the article ID
502            * @return the journal article resource that was removed
503            */
504            public static com.liferay.portlet.journal.model.JournalArticleResource removeByG_A(
505                    long groupId, java.lang.String articleId)
506                    throws com.liferay.portlet.journal.NoSuchArticleResourceException {
507                    return getPersistence().removeByG_A(groupId, articleId);
508            }
509    
510            /**
511            * Returns the number of journal article resources where groupId = &#63; and articleId = &#63;.
512            *
513            * @param groupId the group ID
514            * @param articleId the article ID
515            * @return the number of matching journal article resources
516            */
517            public static int countByG_A(long groupId, java.lang.String articleId) {
518                    return getPersistence().countByG_A(groupId, articleId);
519            }
520    
521            /**
522            * Caches the journal article resource in the entity cache if it is enabled.
523            *
524            * @param journalArticleResource the journal article resource
525            */
526            public static void cacheResult(
527                    com.liferay.portlet.journal.model.JournalArticleResource journalArticleResource) {
528                    getPersistence().cacheResult(journalArticleResource);
529            }
530    
531            /**
532            * Caches the journal article resources in the entity cache if it is enabled.
533            *
534            * @param journalArticleResources the journal article resources
535            */
536            public static void cacheResult(
537                    java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> journalArticleResources) {
538                    getPersistence().cacheResult(journalArticleResources);
539            }
540    
541            /**
542            * Creates a new journal article resource with the primary key. Does not add the journal article resource to the database.
543            *
544            * @param resourcePrimKey the primary key for the new journal article resource
545            * @return the new journal article resource
546            */
547            public static com.liferay.portlet.journal.model.JournalArticleResource create(
548                    long resourcePrimKey) {
549                    return getPersistence().create(resourcePrimKey);
550            }
551    
552            /**
553            * Removes the journal article resource with the primary key from the database. Also notifies the appropriate model listeners.
554            *
555            * @param resourcePrimKey the primary key of the journal article resource
556            * @return the journal article resource that was removed
557            * @throws com.liferay.portlet.journal.NoSuchArticleResourceException if a journal article resource with the primary key could not be found
558            */
559            public static com.liferay.portlet.journal.model.JournalArticleResource remove(
560                    long resourcePrimKey)
561                    throws com.liferay.portlet.journal.NoSuchArticleResourceException {
562                    return getPersistence().remove(resourcePrimKey);
563            }
564    
565            public static com.liferay.portlet.journal.model.JournalArticleResource updateImpl(
566                    com.liferay.portlet.journal.model.JournalArticleResource journalArticleResource) {
567                    return getPersistence().updateImpl(journalArticleResource);
568            }
569    
570            /**
571            * Returns the journal article resource with the primary key or throws a {@link com.liferay.portlet.journal.NoSuchArticleResourceException} if it could not be found.
572            *
573            * @param resourcePrimKey the primary key of the journal article resource
574            * @return the journal article resource
575            * @throws com.liferay.portlet.journal.NoSuchArticleResourceException if a journal article resource with the primary key could not be found
576            */
577            public static com.liferay.portlet.journal.model.JournalArticleResource findByPrimaryKey(
578                    long resourcePrimKey)
579                    throws com.liferay.portlet.journal.NoSuchArticleResourceException {
580                    return getPersistence().findByPrimaryKey(resourcePrimKey);
581            }
582    
583            /**
584            * Returns the journal article resource with the primary key or returns <code>null</code> if it could not be found.
585            *
586            * @param resourcePrimKey the primary key of the journal article resource
587            * @return the journal article resource, or <code>null</code> if a journal article resource with the primary key could not be found
588            */
589            public static com.liferay.portlet.journal.model.JournalArticleResource fetchByPrimaryKey(
590                    long resourcePrimKey) {
591                    return getPersistence().fetchByPrimaryKey(resourcePrimKey);
592            }
593    
594            public static java.util.Map<java.io.Serializable, com.liferay.portlet.journal.model.JournalArticleResource> fetchByPrimaryKeys(
595                    java.util.Set<java.io.Serializable> primaryKeys) {
596                    return getPersistence().fetchByPrimaryKeys(primaryKeys);
597            }
598    
599            /**
600            * Returns all the journal article resources.
601            *
602            * @return the journal article resources
603            */
604            public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findAll() {
605                    return getPersistence().findAll();
606            }
607    
608            /**
609            * Returns a range of all the journal article resources.
610            *
611            * <p>
612            * 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.
613            * </p>
614            *
615            * @param start the lower bound of the range of journal article resources
616            * @param end the upper bound of the range of journal article resources (not inclusive)
617            * @return the range of journal article resources
618            */
619            public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findAll(
620                    int start, int end) {
621                    return getPersistence().findAll(start, end);
622            }
623    
624            /**
625            * Returns an ordered range of all the journal article resources.
626            *
627            * <p>
628            * 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.
629            * </p>
630            *
631            * @param start the lower bound of the range of journal article resources
632            * @param end the upper bound of the range of journal article resources (not inclusive)
633            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
634            * @return the ordered range of journal article resources
635            */
636            public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findAll(
637                    int start, int end,
638                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalArticleResource> orderByComparator) {
639                    return getPersistence().findAll(start, end, orderByComparator);
640            }
641    
642            /**
643            * Removes all the journal article resources from the database.
644            */
645            public static void removeAll() {
646                    getPersistence().removeAll();
647            }
648    
649            /**
650            * Returns the number of journal article resources.
651            *
652            * @return the number of journal article resources
653            */
654            public static int countAll() {
655                    return getPersistence().countAll();
656            }
657    
658            public static JournalArticleResourcePersistence getPersistence() {
659                    if (_persistence == null) {
660                            _persistence = (JournalArticleResourcePersistence)PortalBeanLocatorUtil.locate(JournalArticleResourcePersistence.class.getName());
661    
662                            ReferenceRegistry.registerReference(JournalArticleResourceUtil.class,
663                                    "_persistence");
664                    }
665    
666                    return _persistence;
667            }
668    
669            /**
670             * @deprecated As of 6.2.0
671             */
672            @Deprecated
673            public void setPersistence(JournalArticleResourcePersistence persistence) {
674            }
675    
676            private static JournalArticleResourcePersistence _persistence;
677    }