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.JournalArticleImage;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the journal article image service. This utility wraps {@link JournalArticleImagePersistenceImpl} 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 JournalArticleImagePersistence
037     * @see JournalArticleImagePersistenceImpl
038     * @generated
039     */
040    public class JournalArticleImageUtil {
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(JournalArticleImage journalArticleImage) {
058                    getPersistence().clearCache(journalArticleImage);
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<JournalArticleImage> 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<JournalArticleImage> 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<JournalArticleImage> 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, boolean)
099             */
100            public static JournalArticleImage update(
101                    JournalArticleImage journalArticleImage, boolean merge)
102                    throws SystemException {
103                    return getPersistence().update(journalArticleImage, merge);
104            }
105    
106            /**
107             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
108             */
109            public static JournalArticleImage update(
110                    JournalArticleImage journalArticleImage, boolean merge,
111                    ServiceContext serviceContext) throws SystemException {
112                    return getPersistence()
113                                       .update(journalArticleImage, merge, serviceContext);
114            }
115    
116            /**
117            * Caches the journal article image in the entity cache if it is enabled.
118            *
119            * @param journalArticleImage the journal article image
120            */
121            public static void cacheResult(
122                    com.liferay.portlet.journal.model.JournalArticleImage journalArticleImage) {
123                    getPersistence().cacheResult(journalArticleImage);
124            }
125    
126            /**
127            * Caches the journal article images in the entity cache if it is enabled.
128            *
129            * @param journalArticleImages the journal article images
130            */
131            public static void cacheResult(
132                    java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> journalArticleImages) {
133                    getPersistence().cacheResult(journalArticleImages);
134            }
135    
136            /**
137            * Creates a new journal article image with the primary key. Does not add the journal article image to the database.
138            *
139            * @param articleImageId the primary key for the new journal article image
140            * @return the new journal article image
141            */
142            public static com.liferay.portlet.journal.model.JournalArticleImage create(
143                    long articleImageId) {
144                    return getPersistence().create(articleImageId);
145            }
146    
147            /**
148            * Removes the journal article image with the primary key from the database. Also notifies the appropriate model listeners.
149            *
150            * @param articleImageId the primary key of the journal article image
151            * @return the journal article image that was removed
152            * @throws com.liferay.portlet.journal.NoSuchArticleImageException if a journal article image with the primary key could not be found
153            * @throws SystemException if a system exception occurred
154            */
155            public static com.liferay.portlet.journal.model.JournalArticleImage remove(
156                    long articleImageId)
157                    throws com.liferay.portal.kernel.exception.SystemException,
158                            com.liferay.portlet.journal.NoSuchArticleImageException {
159                    return getPersistence().remove(articleImageId);
160            }
161    
162            public static com.liferay.portlet.journal.model.JournalArticleImage updateImpl(
163                    com.liferay.portlet.journal.model.JournalArticleImage journalArticleImage,
164                    boolean merge)
165                    throws com.liferay.portal.kernel.exception.SystemException {
166                    return getPersistence().updateImpl(journalArticleImage, merge);
167            }
168    
169            /**
170            * Returns the journal article image with the primary key or throws a {@link com.liferay.portlet.journal.NoSuchArticleImageException} if it could not be found.
171            *
172            * @param articleImageId the primary key of the journal article image
173            * @return the journal article image
174            * @throws com.liferay.portlet.journal.NoSuchArticleImageException if a journal article image with the primary key could not be found
175            * @throws SystemException if a system exception occurred
176            */
177            public static com.liferay.portlet.journal.model.JournalArticleImage findByPrimaryKey(
178                    long articleImageId)
179                    throws com.liferay.portal.kernel.exception.SystemException,
180                            com.liferay.portlet.journal.NoSuchArticleImageException {
181                    return getPersistence().findByPrimaryKey(articleImageId);
182            }
183    
184            /**
185            * Returns the journal article image with the primary key or returns <code>null</code> if it could not be found.
186            *
187            * @param articleImageId the primary key of the journal article image
188            * @return the journal article image, or <code>null</code> if a journal article image with the primary key could not be found
189            * @throws SystemException if a system exception occurred
190            */
191            public static com.liferay.portlet.journal.model.JournalArticleImage fetchByPrimaryKey(
192                    long articleImageId)
193                    throws com.liferay.portal.kernel.exception.SystemException {
194                    return getPersistence().fetchByPrimaryKey(articleImageId);
195            }
196    
197            /**
198            * Returns all the journal article images where groupId = &#63;.
199            *
200            * @param groupId the group ID
201            * @return the matching journal article images
202            * @throws SystemException if a system exception occurred
203            */
204            public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByGroupId(
205                    long groupId)
206                    throws com.liferay.portal.kernel.exception.SystemException {
207                    return getPersistence().findByGroupId(groupId);
208            }
209    
210            /**
211            * Returns a range of all the journal article images where groupId = &#63;.
212            *
213            * <p>
214            * 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.
215            * </p>
216            *
217            * @param groupId the group ID
218            * @param start the lower bound of the range of journal article images
219            * @param end the upper bound of the range of journal article images (not inclusive)
220            * @return the range of matching journal article images
221            * @throws SystemException if a system exception occurred
222            */
223            public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByGroupId(
224                    long groupId, int start, int end)
225                    throws com.liferay.portal.kernel.exception.SystemException {
226                    return getPersistence().findByGroupId(groupId, start, end);
227            }
228    
229            /**
230            * Returns an ordered range of all the journal article images where groupId = &#63;.
231            *
232            * <p>
233            * 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.
234            * </p>
235            *
236            * @param groupId the group ID
237            * @param start the lower bound of the range of journal article images
238            * @param end the upper bound of the range of journal article images (not inclusive)
239            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
240            * @return the ordered range of matching journal article images
241            * @throws SystemException if a system exception occurred
242            */
243            public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByGroupId(
244                    long groupId, int start, int end,
245                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
246                    throws com.liferay.portal.kernel.exception.SystemException {
247                    return getPersistence()
248                                       .findByGroupId(groupId, start, end, orderByComparator);
249            }
250    
251            /**
252            * Returns the first journal article image in the ordered set where groupId = &#63;.
253            *
254            * <p>
255            * 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.
256            * </p>
257            *
258            * @param groupId the group ID
259            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
260            * @return the first matching journal article image
261            * @throws com.liferay.portlet.journal.NoSuchArticleImageException if a matching journal article image could not be found
262            * @throws SystemException if a system exception occurred
263            */
264            public static com.liferay.portlet.journal.model.JournalArticleImage findByGroupId_First(
265                    long groupId,
266                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
267                    throws com.liferay.portal.kernel.exception.SystemException,
268                            com.liferay.portlet.journal.NoSuchArticleImageException {
269                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
270            }
271    
272            /**
273            * Returns the last journal article image in the ordered set where groupId = &#63;.
274            *
275            * <p>
276            * 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.
277            * </p>
278            *
279            * @param groupId the group ID
280            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
281            * @return the last matching journal article image
282            * @throws com.liferay.portlet.journal.NoSuchArticleImageException if a matching journal article image could not be found
283            * @throws SystemException if a system exception occurred
284            */
285            public static com.liferay.portlet.journal.model.JournalArticleImage findByGroupId_Last(
286                    long groupId,
287                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
288                    throws com.liferay.portal.kernel.exception.SystemException,
289                            com.liferay.portlet.journal.NoSuchArticleImageException {
290                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
291            }
292    
293            /**
294            * Returns the journal article images before and after the current journal article image in the ordered set where groupId = &#63;.
295            *
296            * <p>
297            * 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.
298            * </p>
299            *
300            * @param articleImageId the primary key of the current journal article image
301            * @param groupId the group ID
302            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
303            * @return the previous, current, and next journal article image
304            * @throws com.liferay.portlet.journal.NoSuchArticleImageException if a journal article image with the primary key could not be found
305            * @throws SystemException if a system exception occurred
306            */
307            public static com.liferay.portlet.journal.model.JournalArticleImage[] findByGroupId_PrevAndNext(
308                    long articleImageId, long groupId,
309                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
310                    throws com.liferay.portal.kernel.exception.SystemException,
311                            com.liferay.portlet.journal.NoSuchArticleImageException {
312                    return getPersistence()
313                                       .findByGroupId_PrevAndNext(articleImageId, groupId,
314                            orderByComparator);
315            }
316    
317            /**
318            * Returns all the journal article images where tempImage = &#63;.
319            *
320            * @param tempImage the temp image
321            * @return the matching journal article images
322            * @throws SystemException if a system exception occurred
323            */
324            public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByTempImage(
325                    boolean tempImage)
326                    throws com.liferay.portal.kernel.exception.SystemException {
327                    return getPersistence().findByTempImage(tempImage);
328            }
329    
330            /**
331            * Returns a range of all the journal article images where tempImage = &#63;.
332            *
333            * <p>
334            * 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.
335            * </p>
336            *
337            * @param tempImage the temp image
338            * @param start the lower bound of the range of journal article images
339            * @param end the upper bound of the range of journal article images (not inclusive)
340            * @return the range of matching journal article images
341            * @throws SystemException if a system exception occurred
342            */
343            public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByTempImage(
344                    boolean tempImage, int start, int end)
345                    throws com.liferay.portal.kernel.exception.SystemException {
346                    return getPersistence().findByTempImage(tempImage, start, end);
347            }
348    
349            /**
350            * Returns an ordered range of all the journal article images where tempImage = &#63;.
351            *
352            * <p>
353            * 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.
354            * </p>
355            *
356            * @param tempImage the temp image
357            * @param start the lower bound of the range of journal article images
358            * @param end the upper bound of the range of journal article images (not inclusive)
359            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
360            * @return the ordered range of matching journal article images
361            * @throws SystemException if a system exception occurred
362            */
363            public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByTempImage(
364                    boolean tempImage, int start, int end,
365                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
366                    throws com.liferay.portal.kernel.exception.SystemException {
367                    return getPersistence()
368                                       .findByTempImage(tempImage, start, end, orderByComparator);
369            }
370    
371            /**
372            * Returns the first journal article image in the ordered set where tempImage = &#63;.
373            *
374            * <p>
375            * 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.
376            * </p>
377            *
378            * @param tempImage the temp image
379            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
380            * @return the first matching journal article image
381            * @throws com.liferay.portlet.journal.NoSuchArticleImageException if a matching journal article image could not be found
382            * @throws SystemException if a system exception occurred
383            */
384            public static com.liferay.portlet.journal.model.JournalArticleImage findByTempImage_First(
385                    boolean tempImage,
386                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
387                    throws com.liferay.portal.kernel.exception.SystemException,
388                            com.liferay.portlet.journal.NoSuchArticleImageException {
389                    return getPersistence()
390                                       .findByTempImage_First(tempImage, orderByComparator);
391            }
392    
393            /**
394            * Returns the last journal article image in the ordered set where tempImage = &#63;.
395            *
396            * <p>
397            * 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.
398            * </p>
399            *
400            * @param tempImage the temp image
401            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
402            * @return the last matching journal article image
403            * @throws com.liferay.portlet.journal.NoSuchArticleImageException if a matching journal article image could not be found
404            * @throws SystemException if a system exception occurred
405            */
406            public static com.liferay.portlet.journal.model.JournalArticleImage findByTempImage_Last(
407                    boolean tempImage,
408                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
409                    throws com.liferay.portal.kernel.exception.SystemException,
410                            com.liferay.portlet.journal.NoSuchArticleImageException {
411                    return getPersistence()
412                                       .findByTempImage_Last(tempImage, orderByComparator);
413            }
414    
415            /**
416            * Returns the journal article images before and after the current journal article image in the ordered set where tempImage = &#63;.
417            *
418            * <p>
419            * 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.
420            * </p>
421            *
422            * @param articleImageId the primary key of the current journal article image
423            * @param tempImage the temp image
424            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
425            * @return the previous, current, and next journal article image
426            * @throws com.liferay.portlet.journal.NoSuchArticleImageException if a journal article image with the primary key could not be found
427            * @throws SystemException if a system exception occurred
428            */
429            public static com.liferay.portlet.journal.model.JournalArticleImage[] findByTempImage_PrevAndNext(
430                    long articleImageId, boolean tempImage,
431                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
432                    throws com.liferay.portal.kernel.exception.SystemException,
433                            com.liferay.portlet.journal.NoSuchArticleImageException {
434                    return getPersistence()
435                                       .findByTempImage_PrevAndNext(articleImageId, tempImage,
436                            orderByComparator);
437            }
438    
439            /**
440            * Returns all the journal article images where groupId = &#63; and articleId = &#63; and version = &#63;.
441            *
442            * @param groupId the group ID
443            * @param articleId the article ID
444            * @param version the version
445            * @return the matching journal article images
446            * @throws SystemException if a system exception occurred
447            */
448            public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByG_A_V(
449                    long groupId, java.lang.String articleId, double version)
450                    throws com.liferay.portal.kernel.exception.SystemException {
451                    return getPersistence().findByG_A_V(groupId, articleId, version);
452            }
453    
454            /**
455            * Returns a range of all the journal article images where groupId = &#63; and articleId = &#63; and version = &#63;.
456            *
457            * <p>
458            * 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.
459            * </p>
460            *
461            * @param groupId the group ID
462            * @param articleId the article ID
463            * @param version the version
464            * @param start the lower bound of the range of journal article images
465            * @param end the upper bound of the range of journal article images (not inclusive)
466            * @return the range of matching journal article images
467            * @throws SystemException if a system exception occurred
468            */
469            public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByG_A_V(
470                    long groupId, java.lang.String articleId, double version, int start,
471                    int end) throws com.liferay.portal.kernel.exception.SystemException {
472                    return getPersistence()
473                                       .findByG_A_V(groupId, articleId, version, start, end);
474            }
475    
476            /**
477            * Returns an ordered range of all the journal article images where groupId = &#63; and articleId = &#63; and version = &#63;.
478            *
479            * <p>
480            * 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.
481            * </p>
482            *
483            * @param groupId the group ID
484            * @param articleId the article ID
485            * @param version the version
486            * @param start the lower bound of the range of journal article images
487            * @param end the upper bound of the range of journal article images (not inclusive)
488            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
489            * @return the ordered range of matching journal article images
490            * @throws SystemException if a system exception occurred
491            */
492            public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByG_A_V(
493                    long groupId, java.lang.String articleId, double version, int start,
494                    int end,
495                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
496                    throws com.liferay.portal.kernel.exception.SystemException {
497                    return getPersistence()
498                                       .findByG_A_V(groupId, articleId, version, start, end,
499                            orderByComparator);
500            }
501    
502            /**
503            * Returns the first journal article image in the ordered set where groupId = &#63; and articleId = &#63; and version = &#63;.
504            *
505            * <p>
506            * 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.
507            * </p>
508            *
509            * @param groupId the group ID
510            * @param articleId the article ID
511            * @param version the version
512            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
513            * @return the first matching journal article image
514            * @throws com.liferay.portlet.journal.NoSuchArticleImageException if a matching journal article image could not be found
515            * @throws SystemException if a system exception occurred
516            */
517            public static com.liferay.portlet.journal.model.JournalArticleImage findByG_A_V_First(
518                    long groupId, java.lang.String articleId, double version,
519                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
520                    throws com.liferay.portal.kernel.exception.SystemException,
521                            com.liferay.portlet.journal.NoSuchArticleImageException {
522                    return getPersistence()
523                                       .findByG_A_V_First(groupId, articleId, version,
524                            orderByComparator);
525            }
526    
527            /**
528            * Returns the last journal article image in the ordered set where groupId = &#63; and articleId = &#63; and version = &#63;.
529            *
530            * <p>
531            * 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.
532            * </p>
533            *
534            * @param groupId the group ID
535            * @param articleId the article ID
536            * @param version the version
537            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
538            * @return the last matching journal article image
539            * @throws com.liferay.portlet.journal.NoSuchArticleImageException if a matching journal article image could not be found
540            * @throws SystemException if a system exception occurred
541            */
542            public static com.liferay.portlet.journal.model.JournalArticleImage findByG_A_V_Last(
543                    long groupId, java.lang.String articleId, double version,
544                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
545                    throws com.liferay.portal.kernel.exception.SystemException,
546                            com.liferay.portlet.journal.NoSuchArticleImageException {
547                    return getPersistence()
548                                       .findByG_A_V_Last(groupId, articleId, version,
549                            orderByComparator);
550            }
551    
552            /**
553            * Returns the journal article images before and after the current journal article image in the ordered set where groupId = &#63; and articleId = &#63; and version = &#63;.
554            *
555            * <p>
556            * 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.
557            * </p>
558            *
559            * @param articleImageId the primary key of the current journal article image
560            * @param groupId the group ID
561            * @param articleId the article ID
562            * @param version the version
563            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
564            * @return the previous, current, and next journal article image
565            * @throws com.liferay.portlet.journal.NoSuchArticleImageException if a journal article image with the primary key could not be found
566            * @throws SystemException if a system exception occurred
567            */
568            public static com.liferay.portlet.journal.model.JournalArticleImage[] findByG_A_V_PrevAndNext(
569                    long articleImageId, long groupId, java.lang.String articleId,
570                    double version,
571                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
572                    throws com.liferay.portal.kernel.exception.SystemException,
573                            com.liferay.portlet.journal.NoSuchArticleImageException {
574                    return getPersistence()
575                                       .findByG_A_V_PrevAndNext(articleImageId, groupId, articleId,
576                            version, orderByComparator);
577            }
578    
579            /**
580            * Returns the journal article image where groupId = &#63; and articleId = &#63; and version = &#63; and elInstanceId = &#63; and elName = &#63; and languageId = &#63; or throws a {@link com.liferay.portlet.journal.NoSuchArticleImageException} if it could not be found.
581            *
582            * @param groupId the group ID
583            * @param articleId the article ID
584            * @param version the version
585            * @param elInstanceId the el instance ID
586            * @param elName the el name
587            * @param languageId the language ID
588            * @return the matching journal article image
589            * @throws com.liferay.portlet.journal.NoSuchArticleImageException if a matching journal article image could not be found
590            * @throws SystemException if a system exception occurred
591            */
592            public static com.liferay.portlet.journal.model.JournalArticleImage findByG_A_V_E_E_L(
593                    long groupId, java.lang.String articleId, double version,
594                    java.lang.String elInstanceId, java.lang.String elName,
595                    java.lang.String languageId)
596                    throws com.liferay.portal.kernel.exception.SystemException,
597                            com.liferay.portlet.journal.NoSuchArticleImageException {
598                    return getPersistence()
599                                       .findByG_A_V_E_E_L(groupId, articleId, version,
600                            elInstanceId, elName, languageId);
601            }
602    
603            /**
604            * Returns the journal article image where groupId = &#63; and articleId = &#63; and version = &#63; and elInstanceId = &#63; and elName = &#63; and languageId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
605            *
606            * @param groupId the group ID
607            * @param articleId the article ID
608            * @param version the version
609            * @param elInstanceId the el instance ID
610            * @param elName the el name
611            * @param languageId the language ID
612            * @return the matching journal article image, or <code>null</code> if a matching journal article image could not be found
613            * @throws SystemException if a system exception occurred
614            */
615            public static com.liferay.portlet.journal.model.JournalArticleImage fetchByG_A_V_E_E_L(
616                    long groupId, java.lang.String articleId, double version,
617                    java.lang.String elInstanceId, java.lang.String elName,
618                    java.lang.String languageId)
619                    throws com.liferay.portal.kernel.exception.SystemException {
620                    return getPersistence()
621                                       .fetchByG_A_V_E_E_L(groupId, articleId, version,
622                            elInstanceId, elName, languageId);
623            }
624    
625            /**
626            * Returns the journal article image where groupId = &#63; and articleId = &#63; and version = &#63; and elInstanceId = &#63; and elName = &#63; and languageId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
627            *
628            * @param groupId the group ID
629            * @param articleId the article ID
630            * @param version the version
631            * @param elInstanceId the el instance ID
632            * @param elName the el name
633            * @param languageId the language ID
634            * @param retrieveFromCache whether to use the finder cache
635            * @return the matching journal article image, or <code>null</code> if a matching journal article image could not be found
636            * @throws SystemException if a system exception occurred
637            */
638            public static com.liferay.portlet.journal.model.JournalArticleImage fetchByG_A_V_E_E_L(
639                    long groupId, java.lang.String articleId, double version,
640                    java.lang.String elInstanceId, java.lang.String elName,
641                    java.lang.String languageId, boolean retrieveFromCache)
642                    throws com.liferay.portal.kernel.exception.SystemException {
643                    return getPersistence()
644                                       .fetchByG_A_V_E_E_L(groupId, articleId, version,
645                            elInstanceId, elName, languageId, retrieveFromCache);
646            }
647    
648            /**
649            * Returns all the journal article images.
650            *
651            * @return the journal article images
652            * @throws SystemException if a system exception occurred
653            */
654            public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findAll()
655                    throws com.liferay.portal.kernel.exception.SystemException {
656                    return getPersistence().findAll();
657            }
658    
659            /**
660            * Returns a range of all the journal article images.
661            *
662            * <p>
663            * 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.
664            * </p>
665            *
666            * @param start the lower bound of the range of journal article images
667            * @param end the upper bound of the range of journal article images (not inclusive)
668            * @return the range of journal article images
669            * @throws SystemException if a system exception occurred
670            */
671            public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findAll(
672                    int start, int end)
673                    throws com.liferay.portal.kernel.exception.SystemException {
674                    return getPersistence().findAll(start, end);
675            }
676    
677            /**
678            * Returns an ordered range of all the journal article images.
679            *
680            * <p>
681            * 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.
682            * </p>
683            *
684            * @param start the lower bound of the range of journal article images
685            * @param end the upper bound of the range of journal article images (not inclusive)
686            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
687            * @return the ordered range of journal article images
688            * @throws SystemException if a system exception occurred
689            */
690            public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findAll(
691                    int start, int end,
692                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
693                    throws com.liferay.portal.kernel.exception.SystemException {
694                    return getPersistence().findAll(start, end, orderByComparator);
695            }
696    
697            /**
698            * Removes all the journal article images where groupId = &#63; from the database.
699            *
700            * @param groupId the group ID
701            * @throws SystemException if a system exception occurred
702            */
703            public static void removeByGroupId(long groupId)
704                    throws com.liferay.portal.kernel.exception.SystemException {
705                    getPersistence().removeByGroupId(groupId);
706            }
707    
708            /**
709            * Removes all the journal article images where tempImage = &#63; from the database.
710            *
711            * @param tempImage the temp image
712            * @throws SystemException if a system exception occurred
713            */
714            public static void removeByTempImage(boolean tempImage)
715                    throws com.liferay.portal.kernel.exception.SystemException {
716                    getPersistence().removeByTempImage(tempImage);
717            }
718    
719            /**
720            * Removes all the journal article images where groupId = &#63; and articleId = &#63; and version = &#63; from the database.
721            *
722            * @param groupId the group ID
723            * @param articleId the article ID
724            * @param version the version
725            * @throws SystemException if a system exception occurred
726            */
727            public static void removeByG_A_V(long groupId, java.lang.String articleId,
728                    double version)
729                    throws com.liferay.portal.kernel.exception.SystemException {
730                    getPersistence().removeByG_A_V(groupId, articleId, version);
731            }
732    
733            /**
734            * Removes the journal article image where groupId = &#63; and articleId = &#63; and version = &#63; and elInstanceId = &#63; and elName = &#63; and languageId = &#63; from the database.
735            *
736            * @param groupId the group ID
737            * @param articleId the article ID
738            * @param version the version
739            * @param elInstanceId the el instance ID
740            * @param elName the el name
741            * @param languageId the language ID
742            * @throws SystemException if a system exception occurred
743            */
744            public static void removeByG_A_V_E_E_L(long groupId,
745                    java.lang.String articleId, double version,
746                    java.lang.String elInstanceId, java.lang.String elName,
747                    java.lang.String languageId)
748                    throws com.liferay.portal.kernel.exception.SystemException,
749                            com.liferay.portlet.journal.NoSuchArticleImageException {
750                    getPersistence()
751                            .removeByG_A_V_E_E_L(groupId, articleId, version, elInstanceId,
752                            elName, languageId);
753            }
754    
755            /**
756            * Removes all the journal article images from the database.
757            *
758            * @throws SystemException if a system exception occurred
759            */
760            public static void removeAll()
761                    throws com.liferay.portal.kernel.exception.SystemException {
762                    getPersistence().removeAll();
763            }
764    
765            /**
766            * Returns the number of journal article images where groupId = &#63;.
767            *
768            * @param groupId the group ID
769            * @return the number of matching journal article images
770            * @throws SystemException if a system exception occurred
771            */
772            public static int countByGroupId(long groupId)
773                    throws com.liferay.portal.kernel.exception.SystemException {
774                    return getPersistence().countByGroupId(groupId);
775            }
776    
777            /**
778            * Returns the number of journal article images where tempImage = &#63;.
779            *
780            * @param tempImage the temp image
781            * @return the number of matching journal article images
782            * @throws SystemException if a system exception occurred
783            */
784            public static int countByTempImage(boolean tempImage)
785                    throws com.liferay.portal.kernel.exception.SystemException {
786                    return getPersistence().countByTempImage(tempImage);
787            }
788    
789            /**
790            * Returns the number of journal article images where groupId = &#63; and articleId = &#63; and version = &#63;.
791            *
792            * @param groupId the group ID
793            * @param articleId the article ID
794            * @param version the version
795            * @return the number of matching journal article images
796            * @throws SystemException if a system exception occurred
797            */
798            public static int countByG_A_V(long groupId, java.lang.String articleId,
799                    double version)
800                    throws com.liferay.portal.kernel.exception.SystemException {
801                    return getPersistence().countByG_A_V(groupId, articleId, version);
802            }
803    
804            /**
805            * Returns the number of journal article images where groupId = &#63; and articleId = &#63; and version = &#63; and elInstanceId = &#63; and elName = &#63; and languageId = &#63;.
806            *
807            * @param groupId the group ID
808            * @param articleId the article ID
809            * @param version the version
810            * @param elInstanceId the el instance ID
811            * @param elName the el name
812            * @param languageId the language ID
813            * @return the number of matching journal article images
814            * @throws SystemException if a system exception occurred
815            */
816            public static int countByG_A_V_E_E_L(long groupId,
817                    java.lang.String articleId, double version,
818                    java.lang.String elInstanceId, java.lang.String elName,
819                    java.lang.String languageId)
820                    throws com.liferay.portal.kernel.exception.SystemException {
821                    return getPersistence()
822                                       .countByG_A_V_E_E_L(groupId, articleId, version,
823                            elInstanceId, elName, languageId);
824            }
825    
826            /**
827            * Returns the number of journal article images.
828            *
829            * @return the number of journal article images
830            * @throws SystemException if a system exception occurred
831            */
832            public static int countAll()
833                    throws com.liferay.portal.kernel.exception.SystemException {
834                    return getPersistence().countAll();
835            }
836    
837            public static JournalArticleImagePersistence getPersistence() {
838                    if (_persistence == null) {
839                            _persistence = (JournalArticleImagePersistence)PortalBeanLocatorUtil.locate(JournalArticleImagePersistence.class.getName());
840    
841                            ReferenceRegistry.registerReference(JournalArticleImageUtil.class,
842                                    "_persistence");
843                    }
844    
845                    return _persistence;
846            }
847    
848            public void setPersistence(JournalArticleImagePersistence persistence) {
849                    _persistence = persistence;
850    
851                    ReferenceRegistry.registerReference(JournalArticleImageUtil.class,
852                            "_persistence");
853            }
854    
855            private static JournalArticleImagePersistence _persistence;
856    }