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.imagegallery.service.persistence;
21  
22  /**
23   * <a href="IGImageUtil.java.html"><b><i>View Source</i></b></a>
24   *
25   * @author Brian Wing Shun Chan
26   *
27   */
28  public class IGImageUtil {
29      public static void cacheResult(
30          com.liferay.portlet.imagegallery.model.IGImage igImage) {
31          getPersistence().cacheResult(igImage);
32      }
33  
34      public static void cacheResult(
35          java.util.List<com.liferay.portlet.imagegallery.model.IGImage> igImages) {
36          getPersistence().cacheResult(igImages);
37      }
38  
39      public static void clearCache() {
40          getPersistence().clearCache();
41      }
42  
43      public static com.liferay.portlet.imagegallery.model.IGImage create(
44          long imageId) {
45          return getPersistence().create(imageId);
46      }
47  
48      public static com.liferay.portlet.imagegallery.model.IGImage remove(
49          long imageId)
50          throws com.liferay.portal.SystemException,
51              com.liferay.portlet.imagegallery.NoSuchImageException {
52          return getPersistence().remove(imageId);
53      }
54  
55      public static com.liferay.portlet.imagegallery.model.IGImage remove(
56          com.liferay.portlet.imagegallery.model.IGImage igImage)
57          throws com.liferay.portal.SystemException {
58          return getPersistence().remove(igImage);
59      }
60  
61      /**
62       * @deprecated Use <code>update(IGImage igImage, boolean merge)</code>.
63       */
64      public static com.liferay.portlet.imagegallery.model.IGImage update(
65          com.liferay.portlet.imagegallery.model.IGImage igImage)
66          throws com.liferay.portal.SystemException {
67          return getPersistence().update(igImage);
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        igImage 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 igImage 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.imagegallery.model.IGImage update(
84          com.liferay.portlet.imagegallery.model.IGImage igImage, boolean merge)
85          throws com.liferay.portal.SystemException {
86          return getPersistence().update(igImage, merge);
87      }
88  
89      public static com.liferay.portlet.imagegallery.model.IGImage updateImpl(
90          com.liferay.portlet.imagegallery.model.IGImage igImage, boolean merge)
91          throws com.liferay.portal.SystemException {
92          return getPersistence().updateImpl(igImage, merge);
93      }
94  
95      public static com.liferay.portlet.imagegallery.model.IGImage findByPrimaryKey(
96          long imageId)
97          throws com.liferay.portal.SystemException,
98              com.liferay.portlet.imagegallery.NoSuchImageException {
99          return getPersistence().findByPrimaryKey(imageId);
100     }
101 
102     public static com.liferay.portlet.imagegallery.model.IGImage fetchByPrimaryKey(
103         long imageId) throws com.liferay.portal.SystemException {
104         return getPersistence().fetchByPrimaryKey(imageId);
105     }
106 
107     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByUuid(
108         java.lang.String uuid) throws com.liferay.portal.SystemException {
109         return getPersistence().findByUuid(uuid);
110     }
111 
112     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByUuid(
113         java.lang.String uuid, int start, int end)
114         throws com.liferay.portal.SystemException {
115         return getPersistence().findByUuid(uuid, start, end);
116     }
117 
118     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByUuid(
119         java.lang.String uuid, int start, int end,
120         com.liferay.portal.kernel.util.OrderByComparator obc)
121         throws com.liferay.portal.SystemException {
122         return getPersistence().findByUuid(uuid, start, end, obc);
123     }
124 
125     public static com.liferay.portlet.imagegallery.model.IGImage findByUuid_First(
126         java.lang.String uuid,
127         com.liferay.portal.kernel.util.OrderByComparator obc)
128         throws com.liferay.portal.SystemException,
129             com.liferay.portlet.imagegallery.NoSuchImageException {
130         return getPersistence().findByUuid_First(uuid, obc);
131     }
132 
133     public static com.liferay.portlet.imagegallery.model.IGImage findByUuid_Last(
134         java.lang.String uuid,
135         com.liferay.portal.kernel.util.OrderByComparator obc)
136         throws com.liferay.portal.SystemException,
137             com.liferay.portlet.imagegallery.NoSuchImageException {
138         return getPersistence().findByUuid_Last(uuid, obc);
139     }
140 
141     public static com.liferay.portlet.imagegallery.model.IGImage[] findByUuid_PrevAndNext(
142         long imageId, java.lang.String uuid,
143         com.liferay.portal.kernel.util.OrderByComparator obc)
144         throws com.liferay.portal.SystemException,
145             com.liferay.portlet.imagegallery.NoSuchImageException {
146         return getPersistence().findByUuid_PrevAndNext(imageId, uuid, obc);
147     }
148 
149     public static com.liferay.portlet.imagegallery.model.IGImage findByUUID_G(
150         java.lang.String uuid, long groupId)
151         throws com.liferay.portal.SystemException,
152             com.liferay.portlet.imagegallery.NoSuchImageException {
153         return getPersistence().findByUUID_G(uuid, groupId);
154     }
155 
156     public static com.liferay.portlet.imagegallery.model.IGImage fetchByUUID_G(
157         java.lang.String uuid, long groupId)
158         throws com.liferay.portal.SystemException {
159         return getPersistence().fetchByUUID_G(uuid, groupId);
160     }
161 
162     public static com.liferay.portlet.imagegallery.model.IGImage fetchByUUID_G(
163         java.lang.String uuid, long groupId, boolean retrieveFromCache)
164         throws com.liferay.portal.SystemException {
165         return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache);
166     }
167 
168     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByGroupId(
169         long groupId) throws com.liferay.portal.SystemException {
170         return getPersistence().findByGroupId(groupId);
171     }
172 
173     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByGroupId(
174         long groupId, int start, int end)
175         throws com.liferay.portal.SystemException {
176         return getPersistence().findByGroupId(groupId, start, end);
177     }
178 
179     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByGroupId(
180         long groupId, int start, int end,
181         com.liferay.portal.kernel.util.OrderByComparator obc)
182         throws com.liferay.portal.SystemException {
183         return getPersistence().findByGroupId(groupId, start, end, obc);
184     }
185 
186     public static com.liferay.portlet.imagegallery.model.IGImage findByGroupId_First(
187         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
188         throws com.liferay.portal.SystemException,
189             com.liferay.portlet.imagegallery.NoSuchImageException {
190         return getPersistence().findByGroupId_First(groupId, obc);
191     }
192 
193     public static com.liferay.portlet.imagegallery.model.IGImage findByGroupId_Last(
194         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
195         throws com.liferay.portal.SystemException,
196             com.liferay.portlet.imagegallery.NoSuchImageException {
197         return getPersistence().findByGroupId_Last(groupId, obc);
198     }
199 
200     public static com.liferay.portlet.imagegallery.model.IGImage[] findByGroupId_PrevAndNext(
201         long imageId, long groupId,
202         com.liferay.portal.kernel.util.OrderByComparator obc)
203         throws com.liferay.portal.SystemException,
204             com.liferay.portlet.imagegallery.NoSuchImageException {
205         return getPersistence().findByGroupId_PrevAndNext(imageId, groupId, obc);
206     }
207 
208     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByFolderId(
209         long folderId) throws com.liferay.portal.SystemException {
210         return getPersistence().findByFolderId(folderId);
211     }
212 
213     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByFolderId(
214         long folderId, int start, int end)
215         throws com.liferay.portal.SystemException {
216         return getPersistence().findByFolderId(folderId, start, end);
217     }
218 
219     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByFolderId(
220         long folderId, int start, int end,
221         com.liferay.portal.kernel.util.OrderByComparator obc)
222         throws com.liferay.portal.SystemException {
223         return getPersistence().findByFolderId(folderId, start, end, obc);
224     }
225 
226     public static com.liferay.portlet.imagegallery.model.IGImage findByFolderId_First(
227         long folderId, com.liferay.portal.kernel.util.OrderByComparator obc)
228         throws com.liferay.portal.SystemException,
229             com.liferay.portlet.imagegallery.NoSuchImageException {
230         return getPersistence().findByFolderId_First(folderId, obc);
231     }
232 
233     public static com.liferay.portlet.imagegallery.model.IGImage findByFolderId_Last(
234         long folderId, com.liferay.portal.kernel.util.OrderByComparator obc)
235         throws com.liferay.portal.SystemException,
236             com.liferay.portlet.imagegallery.NoSuchImageException {
237         return getPersistence().findByFolderId_Last(folderId, obc);
238     }
239 
240     public static com.liferay.portlet.imagegallery.model.IGImage[] findByFolderId_PrevAndNext(
241         long imageId, long folderId,
242         com.liferay.portal.kernel.util.OrderByComparator obc)
243         throws com.liferay.portal.SystemException,
244             com.liferay.portlet.imagegallery.NoSuchImageException {
245         return getPersistence()
246                    .findByFolderId_PrevAndNext(imageId, folderId, obc);
247     }
248 
249     public static com.liferay.portlet.imagegallery.model.IGImage findBySmallImageId(
250         long smallImageId)
251         throws com.liferay.portal.SystemException,
252             com.liferay.portlet.imagegallery.NoSuchImageException {
253         return getPersistence().findBySmallImageId(smallImageId);
254     }
255 
256     public static com.liferay.portlet.imagegallery.model.IGImage fetchBySmallImageId(
257         long smallImageId) throws com.liferay.portal.SystemException {
258         return getPersistence().fetchBySmallImageId(smallImageId);
259     }
260 
261     public static com.liferay.portlet.imagegallery.model.IGImage fetchBySmallImageId(
262         long smallImageId, boolean retrieveFromCache)
263         throws com.liferay.portal.SystemException {
264         return getPersistence()
265                    .fetchBySmallImageId(smallImageId, retrieveFromCache);
266     }
267 
268     public static com.liferay.portlet.imagegallery.model.IGImage findByLargeImageId(
269         long largeImageId)
270         throws com.liferay.portal.SystemException,
271             com.liferay.portlet.imagegallery.NoSuchImageException {
272         return getPersistence().findByLargeImageId(largeImageId);
273     }
274 
275     public static com.liferay.portlet.imagegallery.model.IGImage fetchByLargeImageId(
276         long largeImageId) throws com.liferay.portal.SystemException {
277         return getPersistence().fetchByLargeImageId(largeImageId);
278     }
279 
280     public static com.liferay.portlet.imagegallery.model.IGImage fetchByLargeImageId(
281         long largeImageId, boolean retrieveFromCache)
282         throws com.liferay.portal.SystemException {
283         return getPersistence()
284                    .fetchByLargeImageId(largeImageId, retrieveFromCache);
285     }
286 
287     public static com.liferay.portlet.imagegallery.model.IGImage findByCustom1ImageId(
288         long custom1ImageId)
289         throws com.liferay.portal.SystemException,
290             com.liferay.portlet.imagegallery.NoSuchImageException {
291         return getPersistence().findByCustom1ImageId(custom1ImageId);
292     }
293 
294     public static com.liferay.portlet.imagegallery.model.IGImage fetchByCustom1ImageId(
295         long custom1ImageId) throws com.liferay.portal.SystemException {
296         return getPersistence().fetchByCustom1ImageId(custom1ImageId);
297     }
298 
299     public static com.liferay.portlet.imagegallery.model.IGImage fetchByCustom1ImageId(
300         long custom1ImageId, boolean retrieveFromCache)
301         throws com.liferay.portal.SystemException {
302         return getPersistence()
303                    .fetchByCustom1ImageId(custom1ImageId, retrieveFromCache);
304     }
305 
306     public static com.liferay.portlet.imagegallery.model.IGImage findByCustom2ImageId(
307         long custom2ImageId)
308         throws com.liferay.portal.SystemException,
309             com.liferay.portlet.imagegallery.NoSuchImageException {
310         return getPersistence().findByCustom2ImageId(custom2ImageId);
311     }
312 
313     public static com.liferay.portlet.imagegallery.model.IGImage fetchByCustom2ImageId(
314         long custom2ImageId) throws com.liferay.portal.SystemException {
315         return getPersistence().fetchByCustom2ImageId(custom2ImageId);
316     }
317 
318     public static com.liferay.portlet.imagegallery.model.IGImage fetchByCustom2ImageId(
319         long custom2ImageId, boolean retrieveFromCache)
320         throws com.liferay.portal.SystemException {
321         return getPersistence()
322                    .fetchByCustom2ImageId(custom2ImageId, retrieveFromCache);
323     }
324 
325     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByG_U(
326         long groupId, long userId) throws com.liferay.portal.SystemException {
327         return getPersistence().findByG_U(groupId, userId);
328     }
329 
330     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByG_U(
331         long groupId, long userId, int start, int end)
332         throws com.liferay.portal.SystemException {
333         return getPersistence().findByG_U(groupId, userId, start, end);
334     }
335 
336     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByG_U(
337         long groupId, long userId, int start, int end,
338         com.liferay.portal.kernel.util.OrderByComparator obc)
339         throws com.liferay.portal.SystemException {
340         return getPersistence().findByG_U(groupId, userId, start, end, obc);
341     }
342 
343     public static com.liferay.portlet.imagegallery.model.IGImage findByG_U_First(
344         long groupId, long userId,
345         com.liferay.portal.kernel.util.OrderByComparator obc)
346         throws com.liferay.portal.SystemException,
347             com.liferay.portlet.imagegallery.NoSuchImageException {
348         return getPersistence().findByG_U_First(groupId, userId, obc);
349     }
350 
351     public static com.liferay.portlet.imagegallery.model.IGImage findByG_U_Last(
352         long groupId, long userId,
353         com.liferay.portal.kernel.util.OrderByComparator obc)
354         throws com.liferay.portal.SystemException,
355             com.liferay.portlet.imagegallery.NoSuchImageException {
356         return getPersistence().findByG_U_Last(groupId, userId, obc);
357     }
358 
359     public static com.liferay.portlet.imagegallery.model.IGImage[] findByG_U_PrevAndNext(
360         long imageId, long groupId, long userId,
361         com.liferay.portal.kernel.util.OrderByComparator obc)
362         throws com.liferay.portal.SystemException,
363             com.liferay.portlet.imagegallery.NoSuchImageException {
364         return getPersistence()
365                    .findByG_U_PrevAndNext(imageId, groupId, userId, obc);
366     }
367 
368     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByF_N(
369         long folderId, java.lang.String name)
370         throws com.liferay.portal.SystemException {
371         return getPersistence().findByF_N(folderId, name);
372     }
373 
374     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByF_N(
375         long folderId, java.lang.String name, int start, int end)
376         throws com.liferay.portal.SystemException {
377         return getPersistence().findByF_N(folderId, name, start, end);
378     }
379 
380     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByF_N(
381         long folderId, java.lang.String name, int start, int end,
382         com.liferay.portal.kernel.util.OrderByComparator obc)
383         throws com.liferay.portal.SystemException {
384         return getPersistence().findByF_N(folderId, name, start, end, obc);
385     }
386 
387     public static com.liferay.portlet.imagegallery.model.IGImage findByF_N_First(
388         long folderId, java.lang.String name,
389         com.liferay.portal.kernel.util.OrderByComparator obc)
390         throws com.liferay.portal.SystemException,
391             com.liferay.portlet.imagegallery.NoSuchImageException {
392         return getPersistence().findByF_N_First(folderId, name, obc);
393     }
394 
395     public static com.liferay.portlet.imagegallery.model.IGImage findByF_N_Last(
396         long folderId, java.lang.String name,
397         com.liferay.portal.kernel.util.OrderByComparator obc)
398         throws com.liferay.portal.SystemException,
399             com.liferay.portlet.imagegallery.NoSuchImageException {
400         return getPersistence().findByF_N_Last(folderId, name, obc);
401     }
402 
403     public static com.liferay.portlet.imagegallery.model.IGImage[] findByF_N_PrevAndNext(
404         long imageId, long folderId, java.lang.String name,
405         com.liferay.portal.kernel.util.OrderByComparator obc)
406         throws com.liferay.portal.SystemException,
407             com.liferay.portlet.imagegallery.NoSuchImageException {
408         return getPersistence()
409                    .findByF_N_PrevAndNext(imageId, folderId, name, obc);
410     }
411 
412     public static java.util.List<Object> findWithDynamicQuery(
413         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
414         throws com.liferay.portal.SystemException {
415         return getPersistence().findWithDynamicQuery(dynamicQuery);
416     }
417 
418     public static java.util.List<Object> findWithDynamicQuery(
419         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
420         int end) throws com.liferay.portal.SystemException {
421         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
422     }
423 
424     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findAll()
425         throws com.liferay.portal.SystemException {
426         return getPersistence().findAll();
427     }
428 
429     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findAll(
430         int start, int end) throws com.liferay.portal.SystemException {
431         return getPersistence().findAll(start, end);
432     }
433 
434     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findAll(
435         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
436         throws com.liferay.portal.SystemException {
437         return getPersistence().findAll(start, end, obc);
438     }
439 
440     public static void removeByUuid(java.lang.String uuid)
441         throws com.liferay.portal.SystemException {
442         getPersistence().removeByUuid(uuid);
443     }
444 
445     public static void removeByUUID_G(java.lang.String uuid, long groupId)
446         throws com.liferay.portal.SystemException,
447             com.liferay.portlet.imagegallery.NoSuchImageException {
448         getPersistence().removeByUUID_G(uuid, groupId);
449     }
450 
451     public static void removeByGroupId(long groupId)
452         throws com.liferay.portal.SystemException {
453         getPersistence().removeByGroupId(groupId);
454     }
455 
456     public static void removeByFolderId(long folderId)
457         throws com.liferay.portal.SystemException {
458         getPersistence().removeByFolderId(folderId);
459     }
460 
461     public static void removeBySmallImageId(long smallImageId)
462         throws com.liferay.portal.SystemException,
463             com.liferay.portlet.imagegallery.NoSuchImageException {
464         getPersistence().removeBySmallImageId(smallImageId);
465     }
466 
467     public static void removeByLargeImageId(long largeImageId)
468         throws com.liferay.portal.SystemException,
469             com.liferay.portlet.imagegallery.NoSuchImageException {
470         getPersistence().removeByLargeImageId(largeImageId);
471     }
472 
473     public static void removeByCustom1ImageId(long custom1ImageId)
474         throws com.liferay.portal.SystemException,
475             com.liferay.portlet.imagegallery.NoSuchImageException {
476         getPersistence().removeByCustom1ImageId(custom1ImageId);
477     }
478 
479     public static void removeByCustom2ImageId(long custom2ImageId)
480         throws com.liferay.portal.SystemException,
481             com.liferay.portlet.imagegallery.NoSuchImageException {
482         getPersistence().removeByCustom2ImageId(custom2ImageId);
483     }
484 
485     public static void removeByG_U(long groupId, long userId)
486         throws com.liferay.portal.SystemException {
487         getPersistence().removeByG_U(groupId, userId);
488     }
489 
490     public static void removeByF_N(long folderId, java.lang.String name)
491         throws com.liferay.portal.SystemException {
492         getPersistence().removeByF_N(folderId, name);
493     }
494 
495     public static void removeAll() throws com.liferay.portal.SystemException {
496         getPersistence().removeAll();
497     }
498 
499     public static int countByUuid(java.lang.String uuid)
500         throws com.liferay.portal.SystemException {
501         return getPersistence().countByUuid(uuid);
502     }
503 
504     public static int countByUUID_G(java.lang.String uuid, long groupId)
505         throws com.liferay.portal.SystemException {
506         return getPersistence().countByUUID_G(uuid, groupId);
507     }
508 
509     public static int countByGroupId(long groupId)
510         throws com.liferay.portal.SystemException {
511         return getPersistence().countByGroupId(groupId);
512     }
513 
514     public static int countByFolderId(long folderId)
515         throws com.liferay.portal.SystemException {
516         return getPersistence().countByFolderId(folderId);
517     }
518 
519     public static int countBySmallImageId(long smallImageId)
520         throws com.liferay.portal.SystemException {
521         return getPersistence().countBySmallImageId(smallImageId);
522     }
523 
524     public static int countByLargeImageId(long largeImageId)
525         throws com.liferay.portal.SystemException {
526         return getPersistence().countByLargeImageId(largeImageId);
527     }
528 
529     public static int countByCustom1ImageId(long custom1ImageId)
530         throws com.liferay.portal.SystemException {
531         return getPersistence().countByCustom1ImageId(custom1ImageId);
532     }
533 
534     public static int countByCustom2ImageId(long custom2ImageId)
535         throws com.liferay.portal.SystemException {
536         return getPersistence().countByCustom2ImageId(custom2ImageId);
537     }
538 
539     public static int countByG_U(long groupId, long userId)
540         throws com.liferay.portal.SystemException {
541         return getPersistence().countByG_U(groupId, userId);
542     }
543 
544     public static int countByF_N(long folderId, java.lang.String name)
545         throws com.liferay.portal.SystemException {
546         return getPersistence().countByF_N(folderId, name);
547     }
548 
549     public static int countAll() throws com.liferay.portal.SystemException {
550         return getPersistence().countAll();
551     }
552 
553     public static IGImagePersistence getPersistence() {
554         return _persistence;
555     }
556 
557     public void setPersistence(IGImagePersistence persistence) {
558         _persistence = persistence;
559     }
560 
561     private static IGImagePersistence _persistence;
562 }