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