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 com.liferay.portlet.imagegallery.model.IGImage create(
30          long imageId) {
31          return getPersistence().create(imageId);
32      }
33  
34      public static com.liferay.portlet.imagegallery.model.IGImage remove(
35          long imageId)
36          throws com.liferay.portal.SystemException,
37              com.liferay.portlet.imagegallery.NoSuchImageException {
38          return getPersistence().remove(imageId);
39      }
40  
41      public static com.liferay.portlet.imagegallery.model.IGImage remove(
42          com.liferay.portlet.imagegallery.model.IGImage igImage)
43          throws com.liferay.portal.SystemException {
44          return getPersistence().remove(igImage);
45      }
46  
47      /**
48       * @deprecated Use <code>update(IGImage igImage, boolean merge)</code>.
49       */
50      public static com.liferay.portlet.imagegallery.model.IGImage update(
51          com.liferay.portlet.imagegallery.model.IGImage igImage)
52          throws com.liferay.portal.SystemException {
53          return getPersistence().update(igImage);
54      }
55  
56      /**
57       * Add, update, or merge, the entity. This method also calls the model
58       * listeners to trigger the proper events associated with adding, deleting,
59       * or updating an entity.
60       *
61       * @param        igImage the entity to add, update, or merge
62       * @param        merge boolean value for whether to merge the entity. The
63       *                default value is false. Setting merge to true is more
64       *                expensive and should only be true when igImage is
65       *                transient. See LEP-5473 for a detailed discussion of this
66       *                method.
67       * @return        true if the portlet can be displayed via Ajax
68       */
69      public static com.liferay.portlet.imagegallery.model.IGImage update(
70          com.liferay.portlet.imagegallery.model.IGImage igImage, boolean merge)
71          throws com.liferay.portal.SystemException {
72          return getPersistence().update(igImage, merge);
73      }
74  
75      public static com.liferay.portlet.imagegallery.model.IGImage updateImpl(
76          com.liferay.portlet.imagegallery.model.IGImage igImage, boolean merge)
77          throws com.liferay.portal.SystemException {
78          return getPersistence().updateImpl(igImage, merge);
79      }
80  
81      public static com.liferay.portlet.imagegallery.model.IGImage findByPrimaryKey(
82          long imageId)
83          throws com.liferay.portal.SystemException,
84              com.liferay.portlet.imagegallery.NoSuchImageException {
85          return getPersistence().findByPrimaryKey(imageId);
86      }
87  
88      public static com.liferay.portlet.imagegallery.model.IGImage fetchByPrimaryKey(
89          long imageId) throws com.liferay.portal.SystemException {
90          return getPersistence().fetchByPrimaryKey(imageId);
91      }
92  
93      public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByUuid(
94          java.lang.String uuid) throws com.liferay.portal.SystemException {
95          return getPersistence().findByUuid(uuid);
96      }
97  
98      public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByUuid(
99          java.lang.String uuid, int start, int end)
100         throws com.liferay.portal.SystemException {
101         return getPersistence().findByUuid(uuid, start, end);
102     }
103 
104     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByUuid(
105         java.lang.String uuid, int start, int end,
106         com.liferay.portal.kernel.util.OrderByComparator obc)
107         throws com.liferay.portal.SystemException {
108         return getPersistence().findByUuid(uuid, start, end, obc);
109     }
110 
111     public static com.liferay.portlet.imagegallery.model.IGImage findByUuid_First(
112         java.lang.String uuid,
113         com.liferay.portal.kernel.util.OrderByComparator obc)
114         throws com.liferay.portal.SystemException,
115             com.liferay.portlet.imagegallery.NoSuchImageException {
116         return getPersistence().findByUuid_First(uuid, obc);
117     }
118 
119     public static com.liferay.portlet.imagegallery.model.IGImage findByUuid_Last(
120         java.lang.String uuid,
121         com.liferay.portal.kernel.util.OrderByComparator obc)
122         throws com.liferay.portal.SystemException,
123             com.liferay.portlet.imagegallery.NoSuchImageException {
124         return getPersistence().findByUuid_Last(uuid, obc);
125     }
126 
127     public static com.liferay.portlet.imagegallery.model.IGImage[] findByUuid_PrevAndNext(
128         long imageId, java.lang.String uuid,
129         com.liferay.portal.kernel.util.OrderByComparator obc)
130         throws com.liferay.portal.SystemException,
131             com.liferay.portlet.imagegallery.NoSuchImageException {
132         return getPersistence().findByUuid_PrevAndNext(imageId, uuid, obc);
133     }
134 
135     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByFolderId(
136         long folderId) throws com.liferay.portal.SystemException {
137         return getPersistence().findByFolderId(folderId);
138     }
139 
140     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByFolderId(
141         long folderId, int start, int end)
142         throws com.liferay.portal.SystemException {
143         return getPersistence().findByFolderId(folderId, start, end);
144     }
145 
146     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByFolderId(
147         long folderId, int start, int end,
148         com.liferay.portal.kernel.util.OrderByComparator obc)
149         throws com.liferay.portal.SystemException {
150         return getPersistence().findByFolderId(folderId, start, end, obc);
151     }
152 
153     public static com.liferay.portlet.imagegallery.model.IGImage findByFolderId_First(
154         long folderId, com.liferay.portal.kernel.util.OrderByComparator obc)
155         throws com.liferay.portal.SystemException,
156             com.liferay.portlet.imagegallery.NoSuchImageException {
157         return getPersistence().findByFolderId_First(folderId, obc);
158     }
159 
160     public static com.liferay.portlet.imagegallery.model.IGImage findByFolderId_Last(
161         long folderId, com.liferay.portal.kernel.util.OrderByComparator obc)
162         throws com.liferay.portal.SystemException,
163             com.liferay.portlet.imagegallery.NoSuchImageException {
164         return getPersistence().findByFolderId_Last(folderId, obc);
165     }
166 
167     public static com.liferay.portlet.imagegallery.model.IGImage[] findByFolderId_PrevAndNext(
168         long imageId, long folderId,
169         com.liferay.portal.kernel.util.OrderByComparator obc)
170         throws com.liferay.portal.SystemException,
171             com.liferay.portlet.imagegallery.NoSuchImageException {
172         return getPersistence()
173                    .findByFolderId_PrevAndNext(imageId, folderId, obc);
174     }
175 
176     public static com.liferay.portlet.imagegallery.model.IGImage findBySmallImageId(
177         long smallImageId)
178         throws com.liferay.portal.SystemException,
179             com.liferay.portlet.imagegallery.NoSuchImageException {
180         return getPersistence().findBySmallImageId(smallImageId);
181     }
182 
183     public static com.liferay.portlet.imagegallery.model.IGImage fetchBySmallImageId(
184         long smallImageId) throws com.liferay.portal.SystemException {
185         return getPersistence().fetchBySmallImageId(smallImageId);
186     }
187 
188     public static com.liferay.portlet.imagegallery.model.IGImage findByLargeImageId(
189         long largeImageId)
190         throws com.liferay.portal.SystemException,
191             com.liferay.portlet.imagegallery.NoSuchImageException {
192         return getPersistence().findByLargeImageId(largeImageId);
193     }
194 
195     public static com.liferay.portlet.imagegallery.model.IGImage fetchByLargeImageId(
196         long largeImageId) throws com.liferay.portal.SystemException {
197         return getPersistence().fetchByLargeImageId(largeImageId);
198     }
199 
200     public static com.liferay.portlet.imagegallery.model.IGImage findByCustom1ImageId(
201         long custom1ImageId)
202         throws com.liferay.portal.SystemException,
203             com.liferay.portlet.imagegallery.NoSuchImageException {
204         return getPersistence().findByCustom1ImageId(custom1ImageId);
205     }
206 
207     public static com.liferay.portlet.imagegallery.model.IGImage fetchByCustom1ImageId(
208         long custom1ImageId) throws com.liferay.portal.SystemException {
209         return getPersistence().fetchByCustom1ImageId(custom1ImageId);
210     }
211 
212     public static com.liferay.portlet.imagegallery.model.IGImage findByCustom2ImageId(
213         long custom2ImageId)
214         throws com.liferay.portal.SystemException,
215             com.liferay.portlet.imagegallery.NoSuchImageException {
216         return getPersistence().findByCustom2ImageId(custom2ImageId);
217     }
218 
219     public static com.liferay.portlet.imagegallery.model.IGImage fetchByCustom2ImageId(
220         long custom2ImageId) throws com.liferay.portal.SystemException {
221         return getPersistence().fetchByCustom2ImageId(custom2ImageId);
222     }
223 
224     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByF_N(
225         long folderId, java.lang.String name)
226         throws com.liferay.portal.SystemException {
227         return getPersistence().findByF_N(folderId, name);
228     }
229 
230     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByF_N(
231         long folderId, java.lang.String name, int start, int end)
232         throws com.liferay.portal.SystemException {
233         return getPersistence().findByF_N(folderId, name, start, end);
234     }
235 
236     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByF_N(
237         long folderId, java.lang.String name, int start, int end,
238         com.liferay.portal.kernel.util.OrderByComparator obc)
239         throws com.liferay.portal.SystemException {
240         return getPersistence().findByF_N(folderId, name, start, end, obc);
241     }
242 
243     public static com.liferay.portlet.imagegallery.model.IGImage findByF_N_First(
244         long folderId, java.lang.String name,
245         com.liferay.portal.kernel.util.OrderByComparator obc)
246         throws com.liferay.portal.SystemException,
247             com.liferay.portlet.imagegallery.NoSuchImageException {
248         return getPersistence().findByF_N_First(folderId, name, obc);
249     }
250 
251     public static com.liferay.portlet.imagegallery.model.IGImage findByF_N_Last(
252         long folderId, java.lang.String name,
253         com.liferay.portal.kernel.util.OrderByComparator obc)
254         throws com.liferay.portal.SystemException,
255             com.liferay.portlet.imagegallery.NoSuchImageException {
256         return getPersistence().findByF_N_Last(folderId, name, obc);
257     }
258 
259     public static com.liferay.portlet.imagegallery.model.IGImage[] findByF_N_PrevAndNext(
260         long imageId, long folderId, java.lang.String name,
261         com.liferay.portal.kernel.util.OrderByComparator obc)
262         throws com.liferay.portal.SystemException,
263             com.liferay.portlet.imagegallery.NoSuchImageException {
264         return getPersistence()
265                    .findByF_N_PrevAndNext(imageId, folderId, name, obc);
266     }
267 
268     public static java.util.List<Object> findWithDynamicQuery(
269         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
270         throws com.liferay.portal.SystemException {
271         return getPersistence().findWithDynamicQuery(dynamicQuery);
272     }
273 
274     public static java.util.List<Object> findWithDynamicQuery(
275         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
276         int end) throws com.liferay.portal.SystemException {
277         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
278     }
279 
280     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findAll()
281         throws com.liferay.portal.SystemException {
282         return getPersistence().findAll();
283     }
284 
285     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findAll(
286         int start, int end) throws com.liferay.portal.SystemException {
287         return getPersistence().findAll(start, end);
288     }
289 
290     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findAll(
291         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
292         throws com.liferay.portal.SystemException {
293         return getPersistence().findAll(start, end, obc);
294     }
295 
296     public static void removeByUuid(java.lang.String uuid)
297         throws com.liferay.portal.SystemException {
298         getPersistence().removeByUuid(uuid);
299     }
300 
301     public static void removeByFolderId(long folderId)
302         throws com.liferay.portal.SystemException {
303         getPersistence().removeByFolderId(folderId);
304     }
305 
306     public static void removeBySmallImageId(long smallImageId)
307         throws com.liferay.portal.SystemException,
308             com.liferay.portlet.imagegallery.NoSuchImageException {
309         getPersistence().removeBySmallImageId(smallImageId);
310     }
311 
312     public static void removeByLargeImageId(long largeImageId)
313         throws com.liferay.portal.SystemException,
314             com.liferay.portlet.imagegallery.NoSuchImageException {
315         getPersistence().removeByLargeImageId(largeImageId);
316     }
317 
318     public static void removeByCustom1ImageId(long custom1ImageId)
319         throws com.liferay.portal.SystemException,
320             com.liferay.portlet.imagegallery.NoSuchImageException {
321         getPersistence().removeByCustom1ImageId(custom1ImageId);
322     }
323 
324     public static void removeByCustom2ImageId(long custom2ImageId)
325         throws com.liferay.portal.SystemException,
326             com.liferay.portlet.imagegallery.NoSuchImageException {
327         getPersistence().removeByCustom2ImageId(custom2ImageId);
328     }
329 
330     public static void removeByF_N(long folderId, java.lang.String name)
331         throws com.liferay.portal.SystemException {
332         getPersistence().removeByF_N(folderId, name);
333     }
334 
335     public static void removeAll() throws com.liferay.portal.SystemException {
336         getPersistence().removeAll();
337     }
338 
339     public static int countByUuid(java.lang.String uuid)
340         throws com.liferay.portal.SystemException {
341         return getPersistence().countByUuid(uuid);
342     }
343 
344     public static int countByFolderId(long folderId)
345         throws com.liferay.portal.SystemException {
346         return getPersistence().countByFolderId(folderId);
347     }
348 
349     public static int countBySmallImageId(long smallImageId)
350         throws com.liferay.portal.SystemException {
351         return getPersistence().countBySmallImageId(smallImageId);
352     }
353 
354     public static int countByLargeImageId(long largeImageId)
355         throws com.liferay.portal.SystemException {
356         return getPersistence().countByLargeImageId(largeImageId);
357     }
358 
359     public static int countByCustom1ImageId(long custom1ImageId)
360         throws com.liferay.portal.SystemException {
361         return getPersistence().countByCustom1ImageId(custom1ImageId);
362     }
363 
364     public static int countByCustom2ImageId(long custom2ImageId)
365         throws com.liferay.portal.SystemException {
366         return getPersistence().countByCustom2ImageId(custom2ImageId);
367     }
368 
369     public static int countByF_N(long folderId, java.lang.String name)
370         throws com.liferay.portal.SystemException {
371         return getPersistence().countByF_N(folderId, name);
372     }
373 
374     public static int countAll() throws com.liferay.portal.SystemException {
375         return getPersistence().countAll();
376     }
377 
378     public static IGImagePersistence getPersistence() {
379         return _persistence;
380     }
381 
382     public void setPersistence(IGImagePersistence persistence) {
383         _persistence = persistence;
384     }
385 
386     private static IGImagePersistence _persistence;
387 }