1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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.portal.service.persistence;
24  
25  import com.liferay.portal.SystemException;
26  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
27  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
28  import com.liferay.portal.model.Image;
29  
30  import java.util.List;
31  
32  /**
33   * <a href="ImageUtil.java.html"><b><i>View Source</i></b></a>
34   *
35   * <p>
36   * ServiceBuilder generated this class. Modifications in this class will be
37   * overwritten the next time is generated.
38   * </p>
39   *
40   * @author    Brian Wing Shun Chan
41   * @see       ImagePersistence
42   * @see       ImagePersistenceImpl
43   * @generated
44   */
45  public class ImageUtil {
46      /**
47       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
48       */
49      public static void clearCache() {
50          getPersistence().clearCache();
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
55       */
56      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
57          throws SystemException {
58          return getPersistence().findWithDynamicQuery(dynamicQuery);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
63       */
64      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
65          int start, int end) throws SystemException {
66          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
71       */
72      public static Image remove(Image image) throws SystemException {
73          return getPersistence().remove(image);
74      }
75  
76      /**
77       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
78       */
79      public static Image update(Image image, boolean merge)
80          throws SystemException {
81          return getPersistence().update(image, merge);
82      }
83  
84      public static void cacheResult(com.liferay.portal.model.Image image) {
85          getPersistence().cacheResult(image);
86      }
87  
88      public static void cacheResult(
89          java.util.List<com.liferay.portal.model.Image> images) {
90          getPersistence().cacheResult(images);
91      }
92  
93      public static com.liferay.portal.model.Image create(long imageId) {
94          return getPersistence().create(imageId);
95      }
96  
97      public static com.liferay.portal.model.Image remove(long imageId)
98          throws com.liferay.portal.NoSuchImageException,
99              com.liferay.portal.SystemException {
100         return getPersistence().remove(imageId);
101     }
102 
103     /**
104      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
105      */
106     public static com.liferay.portal.model.Image update(
107         com.liferay.portal.model.Image image)
108         throws com.liferay.portal.SystemException {
109         return getPersistence().update(image);
110     }
111 
112     public static com.liferay.portal.model.Image updateImpl(
113         com.liferay.portal.model.Image image, boolean merge)
114         throws com.liferay.portal.SystemException {
115         return getPersistence().updateImpl(image, merge);
116     }
117 
118     public static com.liferay.portal.model.Image findByPrimaryKey(long imageId)
119         throws com.liferay.portal.NoSuchImageException,
120             com.liferay.portal.SystemException {
121         return getPersistence().findByPrimaryKey(imageId);
122     }
123 
124     public static com.liferay.portal.model.Image fetchByPrimaryKey(long imageId)
125         throws com.liferay.portal.SystemException {
126         return getPersistence().fetchByPrimaryKey(imageId);
127     }
128 
129     public static java.util.List<com.liferay.portal.model.Image> findBySize(
130         int size) throws com.liferay.portal.SystemException {
131         return getPersistence().findBySize(size);
132     }
133 
134     public static java.util.List<com.liferay.portal.model.Image> findBySize(
135         int size, int start, int end) throws com.liferay.portal.SystemException {
136         return getPersistence().findBySize(size, start, end);
137     }
138 
139     public static java.util.List<com.liferay.portal.model.Image> findBySize(
140         int size, int start, int end,
141         com.liferay.portal.kernel.util.OrderByComparator obc)
142         throws com.liferay.portal.SystemException {
143         return getPersistence().findBySize(size, start, end, obc);
144     }
145 
146     public static com.liferay.portal.model.Image findBySize_First(int size,
147         com.liferay.portal.kernel.util.OrderByComparator obc)
148         throws com.liferay.portal.NoSuchImageException,
149             com.liferay.portal.SystemException {
150         return getPersistence().findBySize_First(size, obc);
151     }
152 
153     public static com.liferay.portal.model.Image findBySize_Last(int size,
154         com.liferay.portal.kernel.util.OrderByComparator obc)
155         throws com.liferay.portal.NoSuchImageException,
156             com.liferay.portal.SystemException {
157         return getPersistence().findBySize_Last(size, obc);
158     }
159 
160     public static com.liferay.portal.model.Image[] findBySize_PrevAndNext(
161         long imageId, int size,
162         com.liferay.portal.kernel.util.OrderByComparator obc)
163         throws com.liferay.portal.NoSuchImageException,
164             com.liferay.portal.SystemException {
165         return getPersistence().findBySize_PrevAndNext(imageId, size, obc);
166     }
167 
168     public static java.util.List<com.liferay.portal.model.Image> findAll()
169         throws com.liferay.portal.SystemException {
170         return getPersistence().findAll();
171     }
172 
173     public static java.util.List<com.liferay.portal.model.Image> findAll(
174         int start, int end) throws com.liferay.portal.SystemException {
175         return getPersistence().findAll(start, end);
176     }
177 
178     public static java.util.List<com.liferay.portal.model.Image> findAll(
179         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
180         throws com.liferay.portal.SystemException {
181         return getPersistence().findAll(start, end, obc);
182     }
183 
184     public static void removeBySize(int size)
185         throws com.liferay.portal.SystemException {
186         getPersistence().removeBySize(size);
187     }
188 
189     public static void removeAll() throws com.liferay.portal.SystemException {
190         getPersistence().removeAll();
191     }
192 
193     public static int countBySize(int size)
194         throws com.liferay.portal.SystemException {
195         return getPersistence().countBySize(size);
196     }
197 
198     public static int countAll() throws com.liferay.portal.SystemException {
199         return getPersistence().countAll();
200     }
201 
202     public static ImagePersistence getPersistence() {
203         if (_persistence == null) {
204             _persistence = (ImagePersistence)PortalBeanLocatorUtil.locate(ImagePersistence.class.getName());
205         }
206 
207         return _persistence;
208     }
209 
210     public void setPersistence(ImagePersistence persistence) {
211         _persistence = persistence;
212     }
213 
214     private static ImagePersistence _persistence;
215 }