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 obc)
134 throws com.liferay.portal.SystemException {
135 return getPersistence().findBySize(size, start, end, obc);
136 }
137
138 public static com.liferay.portal.model.Image findBySize_First(int size,
139 com.liferay.portal.kernel.util.OrderByComparator obc)
140 throws com.liferay.portal.NoSuchImageException,
141 com.liferay.portal.SystemException {
142 return getPersistence().findBySize_First(size, obc);
143 }
144
145 public static com.liferay.portal.model.Image findBySize_Last(int size,
146 com.liferay.portal.kernel.util.OrderByComparator obc)
147 throws com.liferay.portal.NoSuchImageException,
148 com.liferay.portal.SystemException {
149 return getPersistence().findBySize_Last(size, obc);
150 }
151
152 public static com.liferay.portal.model.Image[] findBySize_PrevAndNext(
153 long imageId, int size,
154 com.liferay.portal.kernel.util.OrderByComparator obc)
155 throws com.liferay.portal.NoSuchImageException,
156 com.liferay.portal.SystemException {
157 return getPersistence().findBySize_PrevAndNext(imageId, size, obc);
158 }
159
160 public static java.util.List<com.liferay.portal.model.Image> findAll()
161 throws com.liferay.portal.SystemException {
162 return getPersistence().findAll();
163 }
164
165 public static java.util.List<com.liferay.portal.model.Image> findAll(
166 int start, int end) throws com.liferay.portal.SystemException {
167 return getPersistence().findAll(start, end);
168 }
169
170 public static java.util.List<com.liferay.portal.model.Image> findAll(
171 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
172 throws com.liferay.portal.SystemException {
173 return getPersistence().findAll(start, end, obc);
174 }
175
176 public static void removeBySize(int size)
177 throws com.liferay.portal.SystemException {
178 getPersistence().removeBySize(size);
179 }
180
181 public static void removeAll() throws com.liferay.portal.SystemException {
182 getPersistence().removeAll();
183 }
184
185 public static int countBySize(int size)
186 throws com.liferay.portal.SystemException {
187 return getPersistence().countBySize(size);
188 }
189
190 public static int countAll() throws com.liferay.portal.SystemException {
191 return getPersistence().countAll();
192 }
193
194 public static ImagePersistence getPersistence() {
195 if (_persistence == null) {
196 _persistence = (ImagePersistence)PortalBeanLocatorUtil.locate(ImagePersistence.class.getName());
197 }
198
199 return _persistence;
200 }
201
202 public void setPersistence(ImagePersistence persistence) {
203 _persistence = persistence;
204 }
205
206 private static ImagePersistence _persistence;
207 }