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