1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
19  import com.liferay.portal.kernel.exception.SystemException;
20  import com.liferay.portal.model.Image;
21  
22  import java.util.List;
23  
24  /**
25   * <a href="ImageUtil.java.html"><b><i>View Source</i></b></a>
26   *
27   * <p>
28   * ServiceBuilder generated this class. Modifications in this class will be
29   * overwritten the next time is generated.
30   * </p>
31   *
32   * @author    Brian Wing Shun Chan
33   * @see       ImagePersistence
34   * @see       ImagePersistenceImpl
35   * @generated
36   */
37  public class ImageUtil {
38      /**
39       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
40       */
41      public static void clearCache() {
42          getPersistence().clearCache();
43      }
44  
45      /**
46       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
47       */
48      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
49          throws SystemException {
50          return getPersistence().findWithDynamicQuery(dynamicQuery);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
55       */
56      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
57          int start, int end) throws SystemException {
58          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
63       */
64      public static Image remove(Image image) throws SystemException {
65          return getPersistence().remove(image);
66      }
67  
68      /**
69       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
70       */
71      public static Image update(Image image, boolean merge)
72          throws SystemException {
73          return getPersistence().update(image, merge);
74      }
75  
76      public static void cacheResult(com.liferay.portal.model.Image image) {
77          getPersistence().cacheResult(image);
78      }
79  
80      public static void cacheResult(
81          java.util.List<com.liferay.portal.model.Image> images) {
82          getPersistence().cacheResult(images);
83      }
84  
85      public static com.liferay.portal.model.Image create(long imageId) {
86          return getPersistence().create(imageId);
87      }
88  
89      public static com.liferay.portal.model.Image remove(long imageId)
90          throws com.liferay.portal.NoSuchImageException,
91              com.liferay.portal.kernel.exception.SystemException {
92          return getPersistence().remove(imageId);
93      }
94  
95      public static com.liferay.portal.model.Image updateImpl(
96          com.liferay.portal.model.Image image, boolean merge)
97          throws com.liferay.portal.kernel.exception.SystemException {
98          return getPersistence().updateImpl(image, merge);
99      }
100 
101     public static com.liferay.portal.model.Image findByPrimaryKey(long imageId)
102         throws com.liferay.portal.NoSuchImageException,
103             com.liferay.portal.kernel.exception.SystemException {
104         return getPersistence().findByPrimaryKey(imageId);
105     }
106 
107     public static com.liferay.portal.model.Image fetchByPrimaryKey(long imageId)
108         throws com.liferay.portal.kernel.exception.SystemException {
109         return getPersistence().fetchByPrimaryKey(imageId);
110     }
111 
112     public static java.util.List<com.liferay.portal.model.Image> findBySize(
113         int size) throws com.liferay.portal.kernel.exception.SystemException {
114         return getPersistence().findBySize(size);
115     }
116 
117     public static java.util.List<com.liferay.portal.model.Image> findBySize(
118         int size, int start, int end)
119         throws com.liferay.portal.kernel.exception.SystemException {
120         return getPersistence().findBySize(size, start, end);
121     }
122 
123     public static java.util.List<com.liferay.portal.model.Image> findBySize(
124         int size, int start, int end,
125         com.liferay.portal.kernel.util.OrderByComparator obc)
126         throws com.liferay.portal.kernel.exception.SystemException {
127         return getPersistence().findBySize(size, start, end, obc);
128     }
129 
130     public static com.liferay.portal.model.Image findBySize_First(int size,
131         com.liferay.portal.kernel.util.OrderByComparator obc)
132         throws com.liferay.portal.NoSuchImageException,
133             com.liferay.portal.kernel.exception.SystemException {
134         return getPersistence().findBySize_First(size, obc);
135     }
136 
137     public static com.liferay.portal.model.Image findBySize_Last(int size,
138         com.liferay.portal.kernel.util.OrderByComparator obc)
139         throws com.liferay.portal.NoSuchImageException,
140             com.liferay.portal.kernel.exception.SystemException {
141         return getPersistence().findBySize_Last(size, obc);
142     }
143 
144     public static com.liferay.portal.model.Image[] findBySize_PrevAndNext(
145         long imageId, int size,
146         com.liferay.portal.kernel.util.OrderByComparator obc)
147         throws com.liferay.portal.NoSuchImageException,
148             com.liferay.portal.kernel.exception.SystemException {
149         return getPersistence().findBySize_PrevAndNext(imageId, size, obc);
150     }
151 
152     public static java.util.List<com.liferay.portal.model.Image> findAll()
153         throws com.liferay.portal.kernel.exception.SystemException {
154         return getPersistence().findAll();
155     }
156 
157     public static java.util.List<com.liferay.portal.model.Image> findAll(
158         int start, int end)
159         throws com.liferay.portal.kernel.exception.SystemException {
160         return getPersistence().findAll(start, end);
161     }
162 
163     public static java.util.List<com.liferay.portal.model.Image> findAll(
164         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
165         throws com.liferay.portal.kernel.exception.SystemException {
166         return getPersistence().findAll(start, end, obc);
167     }
168 
169     public static void removeBySize(int size)
170         throws com.liferay.portal.kernel.exception.SystemException {
171         getPersistence().removeBySize(size);
172     }
173 
174     public static void removeAll()
175         throws com.liferay.portal.kernel.exception.SystemException {
176         getPersistence().removeAll();
177     }
178 
179     public static int countBySize(int size)
180         throws com.liferay.portal.kernel.exception.SystemException {
181         return getPersistence().countBySize(size);
182     }
183 
184     public static int countAll()
185         throws com.liferay.portal.kernel.exception.SystemException {
186         return getPersistence().countAll();
187     }
188 
189     public static ImagePersistence getPersistence() {
190         if (_persistence == null) {
191             _persistence = (ImagePersistence)PortalBeanLocatorUtil.locate(ImagePersistence.class.getName());
192         }
193 
194         return _persistence;
195     }
196 
197     public void setPersistence(ImagePersistence persistence) {
198         _persistence = persistence;
199     }
200 
201     private static ImagePersistence _persistence;
202 }