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