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