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