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