1
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
37 public class ImageUtil {
38
41 public static void clearCache() {
42 getPersistence().clearCache();
43 }
44
45
48 public static void clearCache(Image image) {
49 getPersistence().clearCache(image);
50 }
51
52
55 public long countWithDynamicQuery(DynamicQuery dynamicQuery)
56 throws SystemException {
57 return getPersistence().countWithDynamicQuery(dynamicQuery);
58 }
59
60
63 public static List<Image> findWithDynamicQuery(DynamicQuery dynamicQuery)
64 throws SystemException {
65 return getPersistence().findWithDynamicQuery(dynamicQuery);
66 }
67
68
71 public static List<Image> findWithDynamicQuery(DynamicQuery dynamicQuery,
72 int start, int end) throws SystemException {
73 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
74 }
75
76
79 public static Image remove(Image image) throws SystemException {
80 return getPersistence().remove(image);
81 }
82
83
86 public static Image update(Image image, boolean merge)
87 throws SystemException {
88 return getPersistence().update(image, merge);
89 }
90
91 public static void cacheResult(com.liferay.portal.model.Image image) {
92 getPersistence().cacheResult(image);
93 }
94
95 public static void cacheResult(
96 java.util.List<com.liferay.portal.model.Image> images) {
97 getPersistence().cacheResult(images);
98 }
99
100 public static com.liferay.portal.model.Image create(long imageId) {
101 return getPersistence().create(imageId);
102 }
103
104 public static com.liferay.portal.model.Image remove(long imageId)
105 throws com.liferay.portal.NoSuchImageException,
106 com.liferay.portal.kernel.exception.SystemException {
107 return getPersistence().remove(imageId);
108 }
109
110 public static com.liferay.portal.model.Image updateImpl(
111 com.liferay.portal.model.Image image, boolean merge)
112 throws com.liferay.portal.kernel.exception.SystemException {
113 return getPersistence().updateImpl(image, merge);
114 }
115
116 public static com.liferay.portal.model.Image findByPrimaryKey(long imageId)
117 throws com.liferay.portal.NoSuchImageException,
118 com.liferay.portal.kernel.exception.SystemException {
119 return getPersistence().findByPrimaryKey(imageId);
120 }
121
122 public static com.liferay.portal.model.Image fetchByPrimaryKey(long imageId)
123 throws com.liferay.portal.kernel.exception.SystemException {
124 return getPersistence().fetchByPrimaryKey(imageId);
125 }
126
127 public static java.util.List<com.liferay.portal.model.Image> findBySize(
128 int size) throws com.liferay.portal.kernel.exception.SystemException {
129 return getPersistence().findBySize(size);
130 }
131
132 public static java.util.List<com.liferay.portal.model.Image> findBySize(
133 int size, int start, int end)
134 throws com.liferay.portal.kernel.exception.SystemException {
135 return getPersistence().findBySize(size, start, end);
136 }
137
138 public static java.util.List<com.liferay.portal.model.Image> findBySize(
139 int size, int start, int end,
140 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
141 throws com.liferay.portal.kernel.exception.SystemException {
142 return getPersistence().findBySize(size, start, end, orderByComparator);
143 }
144
145 public static com.liferay.portal.model.Image findBySize_First(int size,
146 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
147 throws com.liferay.portal.NoSuchImageException,
148 com.liferay.portal.kernel.exception.SystemException {
149 return getPersistence().findBySize_First(size, orderByComparator);
150 }
151
152 public static com.liferay.portal.model.Image findBySize_Last(int size,
153 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
154 throws com.liferay.portal.NoSuchImageException,
155 com.liferay.portal.kernel.exception.SystemException {
156 return getPersistence().findBySize_Last(size, orderByComparator);
157 }
158
159 public static com.liferay.portal.model.Image[] findBySize_PrevAndNext(
160 long imageId, int size,
161 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
162 throws com.liferay.portal.NoSuchImageException,
163 com.liferay.portal.kernel.exception.SystemException {
164 return getPersistence()
165 .findBySize_PrevAndNext(imageId, size, orderByComparator);
166 }
167
168 public static java.util.List<com.liferay.portal.model.Image> findAll()
169 throws com.liferay.portal.kernel.exception.SystemException {
170 return getPersistence().findAll();
171 }
172
173 public static java.util.List<com.liferay.portal.model.Image> findAll(
174 int start, int end)
175 throws com.liferay.portal.kernel.exception.SystemException {
176 return getPersistence().findAll(start, end);
177 }
178
179 public static java.util.List<com.liferay.portal.model.Image> findAll(
180 int start, int end,
181 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
182 throws com.liferay.portal.kernel.exception.SystemException {
183 return getPersistence().findAll(start, end, orderByComparator);
184 }
185
186 public static void removeBySize(int size)
187 throws com.liferay.portal.kernel.exception.SystemException {
188 getPersistence().removeBySize(size);
189 }
190
191 public static void removeAll()
192 throws com.liferay.portal.kernel.exception.SystemException {
193 getPersistence().removeAll();
194 }
195
196 public static int countBySize(int size)
197 throws com.liferay.portal.kernel.exception.SystemException {
198 return getPersistence().countBySize(size);
199 }
200
201 public static int countAll()
202 throws com.liferay.portal.kernel.exception.SystemException {
203 return getPersistence().countAll();
204 }
205
206 public static ImagePersistence getPersistence() {
207 if (_persistence == null) {
208 _persistence = (ImagePersistence)PortalBeanLocatorUtil.locate(ImagePersistence.class.getName());
209 }
210
211 return _persistence;
212 }
213
214 public void setPersistence(ImagePersistence persistence) {
215 _persistence = persistence;
216 }
217
218 private static ImagePersistence _persistence;
219 }