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