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