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.portal.service.persistence;
022:
023: /**
024: * <a href="ImageUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * @author Brian Wing Shun Chan
027: *
028: */
029: public class ImageUtil {
030: public static com.liferay.portal.model.Image create(long imageId) {
031: return getPersistence().create(imageId);
032: }
033:
034: public static com.liferay.portal.model.Image remove(long imageId)
035: throws com.liferay.portal.SystemException,
036: com.liferay.portal.NoSuchImageException {
037: return getPersistence().remove(imageId);
038: }
039:
040: public static com.liferay.portal.model.Image remove(
041: com.liferay.portal.model.Image image)
042: throws com.liferay.portal.SystemException {
043: return getPersistence().remove(image);
044: }
045:
046: public static com.liferay.portal.model.Image update(
047: com.liferay.portal.model.Image image)
048: throws com.liferay.portal.SystemException {
049: return getPersistence().update(image);
050: }
051:
052: public static com.liferay.portal.model.Image update(
053: com.liferay.portal.model.Image image, boolean merge)
054: throws com.liferay.portal.SystemException {
055: return getPersistence().update(image, merge);
056: }
057:
058: public static com.liferay.portal.model.Image updateImpl(
059: com.liferay.portal.model.Image image, boolean merge)
060: throws com.liferay.portal.SystemException {
061: return getPersistence().updateImpl(image, merge);
062: }
063:
064: public static com.liferay.portal.model.Image findByPrimaryKey(
065: long imageId) throws com.liferay.portal.SystemException,
066: com.liferay.portal.NoSuchImageException {
067: return getPersistence().findByPrimaryKey(imageId);
068: }
069:
070: public static com.liferay.portal.model.Image fetchByPrimaryKey(
071: long imageId) throws com.liferay.portal.SystemException {
072: return getPersistence().fetchByPrimaryKey(imageId);
073: }
074:
075: public static java.util.List findBySize(int size)
076: throws com.liferay.portal.SystemException {
077: return getPersistence().findBySize(size);
078: }
079:
080: public static java.util.List findBySize(int size, int begin, int end)
081: throws com.liferay.portal.SystemException {
082: return getPersistence().findBySize(size, begin, end);
083: }
084:
085: public static java.util.List findBySize(int size, int begin,
086: int end,
087: com.liferay.portal.kernel.util.OrderByComparator obc)
088: throws com.liferay.portal.SystemException {
089: return getPersistence().findBySize(size, begin, end, obc);
090: }
091:
092: public static com.liferay.portal.model.Image findBySize_First(
093: int size,
094: com.liferay.portal.kernel.util.OrderByComparator obc)
095: throws com.liferay.portal.SystemException,
096: com.liferay.portal.NoSuchImageException {
097: return getPersistence().findBySize_First(size, obc);
098: }
099:
100: public static com.liferay.portal.model.Image findBySize_Last(
101: int size,
102: com.liferay.portal.kernel.util.OrderByComparator obc)
103: throws com.liferay.portal.SystemException,
104: com.liferay.portal.NoSuchImageException {
105: return getPersistence().findBySize_Last(size, obc);
106: }
107:
108: public static com.liferay.portal.model.Image[] findBySize_PrevAndNext(
109: long imageId, int size,
110: com.liferay.portal.kernel.util.OrderByComparator obc)
111: throws com.liferay.portal.SystemException,
112: com.liferay.portal.NoSuchImageException {
113: return getPersistence().findBySize_PrevAndNext(imageId, size,
114: obc);
115: }
116:
117: public static java.util.List findWithDynamicQuery(
118: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
119: throws com.liferay.portal.SystemException {
120: return getPersistence().findWithDynamicQuery(queryInitializer);
121: }
122:
123: public static java.util.List findWithDynamicQuery(
124: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
125: int begin, int end)
126: throws com.liferay.portal.SystemException {
127: return getPersistence().findWithDynamicQuery(queryInitializer,
128: begin, end);
129: }
130:
131: public static java.util.List findAll()
132: throws com.liferay.portal.SystemException {
133: return getPersistence().findAll();
134: }
135:
136: public static java.util.List findAll(int begin, int end)
137: throws com.liferay.portal.SystemException {
138: return getPersistence().findAll(begin, end);
139: }
140:
141: public static java.util.List findAll(int begin, int end,
142: com.liferay.portal.kernel.util.OrderByComparator obc)
143: throws com.liferay.portal.SystemException {
144: return getPersistence().findAll(begin, end, obc);
145: }
146:
147: public static void removeBySize(int size)
148: throws com.liferay.portal.SystemException {
149: getPersistence().removeBySize(size);
150: }
151:
152: public static void removeAll()
153: throws com.liferay.portal.SystemException {
154: getPersistence().removeAll();
155: }
156:
157: public static int countBySize(int size)
158: throws com.liferay.portal.SystemException {
159: return getPersistence().countBySize(size);
160: }
161:
162: public static int countAll()
163: throws com.liferay.portal.SystemException {
164: return getPersistence().countAll();
165: }
166:
167: public static ImagePersistence getPersistence() {
168: return _getUtil()._persistence;
169: }
170:
171: public void setPersistence(ImagePersistence persistence) {
172: _persistence = persistence;
173: }
174:
175: private static ImageUtil _getUtil() {
176: if (_util == null) {
177: _util = (ImageUtil) com.liferay.portal.kernel.bean.BeanLocatorUtil
178: .locate(_UTIL);
179: }
180:
181: return _util;
182: }
183:
184: private static final String _UTIL = ImageUtil.class.getName();
185: private static ImageUtil _util;
186: private ImagePersistence _persistence;
187: }
|