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