001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portlet.imagegallery.service.persistence;
022:
023: /**
024: * <a href="IGImageUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * @author Brian Wing Shun Chan
027: *
028: */
029: public class IGImageUtil {
030: public static com.liferay.portlet.imagegallery.model.IGImage create(
031: long imageId) {
032: return getPersistence().create(imageId);
033: }
034:
035: public static com.liferay.portlet.imagegallery.model.IGImage remove(
036: long imageId) throws com.liferay.portal.SystemException,
037: com.liferay.portlet.imagegallery.NoSuchImageException {
038: return getPersistence().remove(imageId);
039: }
040:
041: public static com.liferay.portlet.imagegallery.model.IGImage remove(
042: com.liferay.portlet.imagegallery.model.IGImage igImage)
043: throws com.liferay.portal.SystemException {
044: return getPersistence().remove(igImage);
045: }
046:
047: public static com.liferay.portlet.imagegallery.model.IGImage update(
048: com.liferay.portlet.imagegallery.model.IGImage igImage)
049: throws com.liferay.portal.SystemException {
050: return getPersistence().update(igImage);
051: }
052:
053: public static com.liferay.portlet.imagegallery.model.IGImage update(
054: com.liferay.portlet.imagegallery.model.IGImage igImage,
055: boolean merge) throws com.liferay.portal.SystemException {
056: return getPersistence().update(igImage, merge);
057: }
058:
059: public static com.liferay.portlet.imagegallery.model.IGImage updateImpl(
060: com.liferay.portlet.imagegallery.model.IGImage igImage,
061: boolean merge) throws com.liferay.portal.SystemException {
062: return getPersistence().updateImpl(igImage, merge);
063: }
064:
065: public static com.liferay.portlet.imagegallery.model.IGImage findByPrimaryKey(
066: long imageId) throws com.liferay.portal.SystemException,
067: com.liferay.portlet.imagegallery.NoSuchImageException {
068: return getPersistence().findByPrimaryKey(imageId);
069: }
070:
071: public static com.liferay.portlet.imagegallery.model.IGImage fetchByPrimaryKey(
072: long imageId) throws com.liferay.portal.SystemException {
073: return getPersistence().fetchByPrimaryKey(imageId);
074: }
075:
076: public static java.util.List findByUuid(java.lang.String uuid)
077: throws com.liferay.portal.SystemException {
078: return getPersistence().findByUuid(uuid);
079: }
080:
081: public static java.util.List findByUuid(java.lang.String uuid,
082: int begin, int end)
083: throws com.liferay.portal.SystemException {
084: return getPersistence().findByUuid(uuid, begin, end);
085: }
086:
087: public static java.util.List findByUuid(java.lang.String uuid,
088: int begin, int end,
089: com.liferay.portal.kernel.util.OrderByComparator obc)
090: throws com.liferay.portal.SystemException {
091: return getPersistence().findByUuid(uuid, begin, end, obc);
092: }
093:
094: public static com.liferay.portlet.imagegallery.model.IGImage findByUuid_First(
095: java.lang.String uuid,
096: com.liferay.portal.kernel.util.OrderByComparator obc)
097: throws com.liferay.portal.SystemException,
098: com.liferay.portlet.imagegallery.NoSuchImageException {
099: return getPersistence().findByUuid_First(uuid, obc);
100: }
101:
102: public static com.liferay.portlet.imagegallery.model.IGImage findByUuid_Last(
103: java.lang.String uuid,
104: com.liferay.portal.kernel.util.OrderByComparator obc)
105: throws com.liferay.portal.SystemException,
106: com.liferay.portlet.imagegallery.NoSuchImageException {
107: return getPersistence().findByUuid_Last(uuid, obc);
108: }
109:
110: public static com.liferay.portlet.imagegallery.model.IGImage[] findByUuid_PrevAndNext(
111: long imageId, java.lang.String uuid,
112: com.liferay.portal.kernel.util.OrderByComparator obc)
113: throws com.liferay.portal.SystemException,
114: com.liferay.portlet.imagegallery.NoSuchImageException {
115: return getPersistence().findByUuid_PrevAndNext(imageId, uuid,
116: obc);
117: }
118:
119: public static java.util.List findByFolderId(long folderId)
120: throws com.liferay.portal.SystemException {
121: return getPersistence().findByFolderId(folderId);
122: }
123:
124: public static java.util.List findByFolderId(long folderId,
125: int begin, int end)
126: throws com.liferay.portal.SystemException {
127: return getPersistence().findByFolderId(folderId, begin, end);
128: }
129:
130: public static java.util.List findByFolderId(long folderId,
131: int begin, int end,
132: com.liferay.portal.kernel.util.OrderByComparator obc)
133: throws com.liferay.portal.SystemException {
134: return getPersistence().findByFolderId(folderId, begin, end,
135: obc);
136: }
137:
138: public static com.liferay.portlet.imagegallery.model.IGImage findByFolderId_First(
139: long folderId,
140: com.liferay.portal.kernel.util.OrderByComparator obc)
141: throws com.liferay.portal.SystemException,
142: com.liferay.portlet.imagegallery.NoSuchImageException {
143: return getPersistence().findByFolderId_First(folderId, obc);
144: }
145:
146: public static com.liferay.portlet.imagegallery.model.IGImage findByFolderId_Last(
147: long folderId,
148: com.liferay.portal.kernel.util.OrderByComparator obc)
149: throws com.liferay.portal.SystemException,
150: com.liferay.portlet.imagegallery.NoSuchImageException {
151: return getPersistence().findByFolderId_Last(folderId, obc);
152: }
153:
154: public static com.liferay.portlet.imagegallery.model.IGImage[] findByFolderId_PrevAndNext(
155: long imageId, long folderId,
156: com.liferay.portal.kernel.util.OrderByComparator obc)
157: throws com.liferay.portal.SystemException,
158: com.liferay.portlet.imagegallery.NoSuchImageException {
159: return getPersistence().findByFolderId_PrevAndNext(imageId,
160: folderId, obc);
161: }
162:
163: public static com.liferay.portlet.imagegallery.model.IGImage findBySmallImageId(
164: long smallImageId)
165: throws com.liferay.portal.SystemException,
166: com.liferay.portlet.imagegallery.NoSuchImageException {
167: return getPersistence().findBySmallImageId(smallImageId);
168: }
169:
170: public static com.liferay.portlet.imagegallery.model.IGImage fetchBySmallImageId(
171: long smallImageId)
172: throws com.liferay.portal.SystemException {
173: return getPersistence().fetchBySmallImageId(smallImageId);
174: }
175:
176: public static com.liferay.portlet.imagegallery.model.IGImage findByLargeImageId(
177: long largeImageId)
178: throws com.liferay.portal.SystemException,
179: com.liferay.portlet.imagegallery.NoSuchImageException {
180: return getPersistence().findByLargeImageId(largeImageId);
181: }
182:
183: public static com.liferay.portlet.imagegallery.model.IGImage fetchByLargeImageId(
184: long largeImageId)
185: throws com.liferay.portal.SystemException {
186: return getPersistence().fetchByLargeImageId(largeImageId);
187: }
188:
189: public static java.util.List findWithDynamicQuery(
190: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
191: throws com.liferay.portal.SystemException {
192: return getPersistence().findWithDynamicQuery(queryInitializer);
193: }
194:
195: public static java.util.List findWithDynamicQuery(
196: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
197: int begin, int end)
198: throws com.liferay.portal.SystemException {
199: return getPersistence().findWithDynamicQuery(queryInitializer,
200: begin, end);
201: }
202:
203: public static java.util.List findAll()
204: throws com.liferay.portal.SystemException {
205: return getPersistence().findAll();
206: }
207:
208: public static java.util.List findAll(int begin, int end)
209: throws com.liferay.portal.SystemException {
210: return getPersistence().findAll(begin, end);
211: }
212:
213: public static java.util.List findAll(int begin, int end,
214: com.liferay.portal.kernel.util.OrderByComparator obc)
215: throws com.liferay.portal.SystemException {
216: return getPersistence().findAll(begin, end, obc);
217: }
218:
219: public static void removeByUuid(java.lang.String uuid)
220: throws com.liferay.portal.SystemException {
221: getPersistence().removeByUuid(uuid);
222: }
223:
224: public static void removeByFolderId(long folderId)
225: throws com.liferay.portal.SystemException {
226: getPersistence().removeByFolderId(folderId);
227: }
228:
229: public static void removeBySmallImageId(long smallImageId)
230: throws com.liferay.portal.SystemException,
231: com.liferay.portlet.imagegallery.NoSuchImageException {
232: getPersistence().removeBySmallImageId(smallImageId);
233: }
234:
235: public static void removeByLargeImageId(long largeImageId)
236: throws com.liferay.portal.SystemException,
237: com.liferay.portlet.imagegallery.NoSuchImageException {
238: getPersistence().removeByLargeImageId(largeImageId);
239: }
240:
241: public static void removeAll()
242: throws com.liferay.portal.SystemException {
243: getPersistence().removeAll();
244: }
245:
246: public static int countByUuid(java.lang.String uuid)
247: throws com.liferay.portal.SystemException {
248: return getPersistence().countByUuid(uuid);
249: }
250:
251: public static int countByFolderId(long folderId)
252: throws com.liferay.portal.SystemException {
253: return getPersistence().countByFolderId(folderId);
254: }
255:
256: public static int countBySmallImageId(long smallImageId)
257: throws com.liferay.portal.SystemException {
258: return getPersistence().countBySmallImageId(smallImageId);
259: }
260:
261: public static int countByLargeImageId(long largeImageId)
262: throws com.liferay.portal.SystemException {
263: return getPersistence().countByLargeImageId(largeImageId);
264: }
265:
266: public static int countAll()
267: throws com.liferay.portal.SystemException {
268: return getPersistence().countAll();
269: }
270:
271: public static IGImagePersistence getPersistence() {
272: return _getUtil()._persistence;
273: }
274:
275: public void setPersistence(IGImagePersistence persistence) {
276: _persistence = persistence;
277: }
278:
279: private static IGImageUtil _getUtil() {
280: if (_util == null) {
281: _util = (IGImageUtil) com.liferay.portal.kernel.bean.BeanLocatorUtil
282: .locate(_UTIL);
283: }
284:
285: return _util;
286: }
287:
288: private static final String _UTIL = IGImageUtil.class.getName();
289: private static IGImageUtil _util;
290: private IGImagePersistence _persistence;
291: }
|