1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.journal.service.persistence;
24  
25  /**
26   * <a href="JournalArticleImageUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class JournalArticleImageUtil {
32      public static com.liferay.portlet.journal.model.JournalArticleImage create(
33          long articleImageId) {
34          return getPersistence().create(articleImageId);
35      }
36  
37      public static com.liferay.portlet.journal.model.JournalArticleImage remove(
38          long articleImageId)
39          throws com.liferay.portal.SystemException,
40              com.liferay.portlet.journal.NoSuchArticleImageException {
41          return getPersistence().remove(articleImageId);
42      }
43  
44      public static com.liferay.portlet.journal.model.JournalArticleImage remove(
45          com.liferay.portlet.journal.model.JournalArticleImage journalArticleImage)
46          throws com.liferay.portal.SystemException {
47          return getPersistence().remove(journalArticleImage);
48      }
49  
50      /**
51       * @deprecated Use <code>update(JournalArticleImage journalArticleImage, boolean merge)</code>.
52       */
53      public static com.liferay.portlet.journal.model.JournalArticleImage update(
54          com.liferay.portlet.journal.model.JournalArticleImage journalArticleImage)
55          throws com.liferay.portal.SystemException {
56          return getPersistence().update(journalArticleImage);
57      }
58  
59      /**
60       * Add, update, or merge, the entity. This method also calls the model
61       * listeners to trigger the proper events associated with adding, deleting,
62       * or updating an entity.
63       *
64       * @param        journalArticleImage the entity to add, update, or merge
65       * @param        merge boolean value for whether to merge the entity. The
66       *                default value is false. Setting merge to true is more
67       *                expensive and should only be true when journalArticleImage is
68       *                transient. See LEP-5473 for a detailed discussion of this
69       *                method.
70       * @return        true if the portlet can be displayed via Ajax
71       */
72      public static com.liferay.portlet.journal.model.JournalArticleImage update(
73          com.liferay.portlet.journal.model.JournalArticleImage journalArticleImage,
74          boolean merge) throws com.liferay.portal.SystemException {
75          return getPersistence().update(journalArticleImage, merge);
76      }
77  
78      public static com.liferay.portlet.journal.model.JournalArticleImage updateImpl(
79          com.liferay.portlet.journal.model.JournalArticleImage journalArticleImage,
80          boolean merge) throws com.liferay.portal.SystemException {
81          return getPersistence().updateImpl(journalArticleImage, merge);
82      }
83  
84      public static com.liferay.portlet.journal.model.JournalArticleImage findByPrimaryKey(
85          long articleImageId)
86          throws com.liferay.portal.SystemException,
87              com.liferay.portlet.journal.NoSuchArticleImageException {
88          return getPersistence().findByPrimaryKey(articleImageId);
89      }
90  
91      public static com.liferay.portlet.journal.model.JournalArticleImage fetchByPrimaryKey(
92          long articleImageId) throws com.liferay.portal.SystemException {
93          return getPersistence().fetchByPrimaryKey(articleImageId);
94      }
95  
96      public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByGroupId(
97          long groupId) throws com.liferay.portal.SystemException {
98          return getPersistence().findByGroupId(groupId);
99      }
100 
101     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByGroupId(
102         long groupId, int begin, int end)
103         throws com.liferay.portal.SystemException {
104         return getPersistence().findByGroupId(groupId, begin, end);
105     }
106 
107     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByGroupId(
108         long groupId, int begin, int end,
109         com.liferay.portal.kernel.util.OrderByComparator obc)
110         throws com.liferay.portal.SystemException {
111         return getPersistence().findByGroupId(groupId, begin, end, obc);
112     }
113 
114     public static com.liferay.portlet.journal.model.JournalArticleImage findByGroupId_First(
115         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
116         throws com.liferay.portal.SystemException,
117             com.liferay.portlet.journal.NoSuchArticleImageException {
118         return getPersistence().findByGroupId_First(groupId, obc);
119     }
120 
121     public static com.liferay.portlet.journal.model.JournalArticleImage findByGroupId_Last(
122         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
123         throws com.liferay.portal.SystemException,
124             com.liferay.portlet.journal.NoSuchArticleImageException {
125         return getPersistence().findByGroupId_Last(groupId, obc);
126     }
127 
128     public static com.liferay.portlet.journal.model.JournalArticleImage[] findByGroupId_PrevAndNext(
129         long articleImageId, long groupId,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException,
132             com.liferay.portlet.journal.NoSuchArticleImageException {
133         return getPersistence()
134                    .findByGroupId_PrevAndNext(articleImageId, groupId, obc);
135     }
136 
137     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByTempImage(
138         boolean tempImage) throws com.liferay.portal.SystemException {
139         return getPersistence().findByTempImage(tempImage);
140     }
141 
142     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByTempImage(
143         boolean tempImage, int begin, int end)
144         throws com.liferay.portal.SystemException {
145         return getPersistence().findByTempImage(tempImage, begin, end);
146     }
147 
148     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByTempImage(
149         boolean tempImage, int begin, int end,
150         com.liferay.portal.kernel.util.OrderByComparator obc)
151         throws com.liferay.portal.SystemException {
152         return getPersistence().findByTempImage(tempImage, begin, end, obc);
153     }
154 
155     public static com.liferay.portlet.journal.model.JournalArticleImage findByTempImage_First(
156         boolean tempImage, com.liferay.portal.kernel.util.OrderByComparator obc)
157         throws com.liferay.portal.SystemException,
158             com.liferay.portlet.journal.NoSuchArticleImageException {
159         return getPersistence().findByTempImage_First(tempImage, obc);
160     }
161 
162     public static com.liferay.portlet.journal.model.JournalArticleImage findByTempImage_Last(
163         boolean tempImage, com.liferay.portal.kernel.util.OrderByComparator obc)
164         throws com.liferay.portal.SystemException,
165             com.liferay.portlet.journal.NoSuchArticleImageException {
166         return getPersistence().findByTempImage_Last(tempImage, obc);
167     }
168 
169     public static com.liferay.portlet.journal.model.JournalArticleImage[] findByTempImage_PrevAndNext(
170         long articleImageId, boolean tempImage,
171         com.liferay.portal.kernel.util.OrderByComparator obc)
172         throws com.liferay.portal.SystemException,
173             com.liferay.portlet.journal.NoSuchArticleImageException {
174         return getPersistence()
175                    .findByTempImage_PrevAndNext(articleImageId, tempImage, obc);
176     }
177 
178     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByG_A_V(
179         long groupId, java.lang.String articleId, double version)
180         throws com.liferay.portal.SystemException {
181         return getPersistence().findByG_A_V(groupId, articleId, version);
182     }
183 
184     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByG_A_V(
185         long groupId, java.lang.String articleId, double version, int begin,
186         int end) throws com.liferay.portal.SystemException {
187         return getPersistence()
188                    .findByG_A_V(groupId, articleId, version, begin, end);
189     }
190 
191     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByG_A_V(
192         long groupId, java.lang.String articleId, double version, int begin,
193         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
194         throws com.liferay.portal.SystemException {
195         return getPersistence()
196                    .findByG_A_V(groupId, articleId, version, begin, end, obc);
197     }
198 
199     public static com.liferay.portlet.journal.model.JournalArticleImage findByG_A_V_First(
200         long groupId, java.lang.String articleId, double version,
201         com.liferay.portal.kernel.util.OrderByComparator obc)
202         throws com.liferay.portal.SystemException,
203             com.liferay.portlet.journal.NoSuchArticleImageException {
204         return getPersistence()
205                    .findByG_A_V_First(groupId, articleId, version, obc);
206     }
207 
208     public static com.liferay.portlet.journal.model.JournalArticleImage findByG_A_V_Last(
209         long groupId, java.lang.String articleId, double version,
210         com.liferay.portal.kernel.util.OrderByComparator obc)
211         throws com.liferay.portal.SystemException,
212             com.liferay.portlet.journal.NoSuchArticleImageException {
213         return getPersistence()
214                    .findByG_A_V_Last(groupId, articleId, version, obc);
215     }
216 
217     public static com.liferay.portlet.journal.model.JournalArticleImage[] findByG_A_V_PrevAndNext(
218         long articleImageId, long groupId, java.lang.String articleId,
219         double version, com.liferay.portal.kernel.util.OrderByComparator obc)
220         throws com.liferay.portal.SystemException,
221             com.liferay.portlet.journal.NoSuchArticleImageException {
222         return getPersistence()
223                    .findByG_A_V_PrevAndNext(articleImageId, groupId, articleId,
224             version, obc);
225     }
226 
227     public static com.liferay.portlet.journal.model.JournalArticleImage findByG_A_V_E_L(
228         long groupId, java.lang.String articleId, double version,
229         java.lang.String elName, java.lang.String languageId)
230         throws com.liferay.portal.SystemException,
231             com.liferay.portlet.journal.NoSuchArticleImageException {
232         return getPersistence()
233                    .findByG_A_V_E_L(groupId, articleId, version, elName,
234             languageId);
235     }
236 
237     public static com.liferay.portlet.journal.model.JournalArticleImage fetchByG_A_V_E_L(
238         long groupId, java.lang.String articleId, double version,
239         java.lang.String elName, java.lang.String languageId)
240         throws com.liferay.portal.SystemException {
241         return getPersistence()
242                    .fetchByG_A_V_E_L(groupId, articleId, version, elName,
243             languageId);
244     }
245 
246     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findWithDynamicQuery(
247         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
248         throws com.liferay.portal.SystemException {
249         return getPersistence().findWithDynamicQuery(queryInitializer);
250     }
251 
252     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findWithDynamicQuery(
253         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
254         int begin, int end) throws com.liferay.portal.SystemException {
255         return getPersistence()
256                    .findWithDynamicQuery(queryInitializer, begin, end);
257     }
258 
259     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findAll()
260         throws com.liferay.portal.SystemException {
261         return getPersistence().findAll();
262     }
263 
264     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findAll(
265         int begin, int end) throws com.liferay.portal.SystemException {
266         return getPersistence().findAll(begin, end);
267     }
268 
269     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findAll(
270         int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
271         throws com.liferay.portal.SystemException {
272         return getPersistence().findAll(begin, end, obc);
273     }
274 
275     public static void removeByGroupId(long groupId)
276         throws com.liferay.portal.SystemException {
277         getPersistence().removeByGroupId(groupId);
278     }
279 
280     public static void removeByTempImage(boolean tempImage)
281         throws com.liferay.portal.SystemException {
282         getPersistence().removeByTempImage(tempImage);
283     }
284 
285     public static void removeByG_A_V(long groupId, java.lang.String articleId,
286         double version) throws com.liferay.portal.SystemException {
287         getPersistence().removeByG_A_V(groupId, articleId, version);
288     }
289 
290     public static void removeByG_A_V_E_L(long groupId,
291         java.lang.String articleId, double version, java.lang.String elName,
292         java.lang.String languageId)
293         throws com.liferay.portal.SystemException,
294             com.liferay.portlet.journal.NoSuchArticleImageException {
295         getPersistence()
296             .removeByG_A_V_E_L(groupId, articleId, version, elName, languageId);
297     }
298 
299     public static void removeAll() throws com.liferay.portal.SystemException {
300         getPersistence().removeAll();
301     }
302 
303     public static int countByGroupId(long groupId)
304         throws com.liferay.portal.SystemException {
305         return getPersistence().countByGroupId(groupId);
306     }
307 
308     public static int countByTempImage(boolean tempImage)
309         throws com.liferay.portal.SystemException {
310         return getPersistence().countByTempImage(tempImage);
311     }
312 
313     public static int countByG_A_V(long groupId, java.lang.String articleId,
314         double version) throws com.liferay.portal.SystemException {
315         return getPersistence().countByG_A_V(groupId, articleId, version);
316     }
317 
318     public static int countByG_A_V_E_L(long groupId,
319         java.lang.String articleId, double version, java.lang.String elName,
320         java.lang.String languageId) throws com.liferay.portal.SystemException {
321         return getPersistence()
322                    .countByG_A_V_E_L(groupId, articleId, version, elName,
323             languageId);
324     }
325 
326     public static int countAll() throws com.liferay.portal.SystemException {
327         return getPersistence().countAll();
328     }
329 
330     public static JournalArticleImagePersistence getPersistence() {
331         return _getUtil()._persistence;
332     }
333 
334     public void setPersistence(JournalArticleImagePersistence persistence) {
335         _persistence = persistence;
336     }
337 
338     private static JournalArticleImageUtil _getUtil() {
339         if (_util == null) {
340             _util = (JournalArticleImageUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
341         }
342 
343         return _util;
344     }
345 
346     private static final String _UTIL = JournalArticleImageUtil.class.getName();
347     private static JournalArticleImageUtil _util;
348     private JournalArticleImagePersistence _persistence;
349 }