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 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.kernel.exception.SystemException {
92 return getPersistence().remove(imageId);
93 }
94
95 public static com.liferay.portal.model.Image updateImpl(
96 com.liferay.portal.model.Image image, boolean merge)
97 throws com.liferay.portal.kernel.exception.SystemException {
98 return getPersistence().updateImpl(image, merge);
99 }
100
101 public static com.liferay.portal.model.Image findByPrimaryKey(long imageId)
102 throws com.liferay.portal.NoSuchImageException,
103 com.liferay.portal.kernel.exception.SystemException {
104 return getPersistence().findByPrimaryKey(imageId);
105 }
106
107 public static com.liferay.portal.model.Image fetchByPrimaryKey(long imageId)
108 throws com.liferay.portal.kernel.exception.SystemException {
109 return getPersistence().fetchByPrimaryKey(imageId);
110 }
111
112 public static java.util.List<com.liferay.portal.model.Image> findBySize(
113 int size) throws com.liferay.portal.kernel.exception.SystemException {
114 return getPersistence().findBySize(size);
115 }
116
117 public static java.util.List<com.liferay.portal.model.Image> findBySize(
118 int size, int start, int end)
119 throws com.liferay.portal.kernel.exception.SystemException {
120 return getPersistence().findBySize(size, start, end);
121 }
122
123 public static java.util.List<com.liferay.portal.model.Image> findBySize(
124 int size, int start, int end,
125 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
126 throws com.liferay.portal.kernel.exception.SystemException {
127 return getPersistence().findBySize(size, start, end, orderByComparator);
128 }
129
130 public static com.liferay.portal.model.Image findBySize_First(int size,
131 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
132 throws com.liferay.portal.NoSuchImageException,
133 com.liferay.portal.kernel.exception.SystemException {
134 return getPersistence().findBySize_First(size, orderByComparator);
135 }
136
137 public static com.liferay.portal.model.Image findBySize_Last(int size,
138 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
139 throws com.liferay.portal.NoSuchImageException,
140 com.liferay.portal.kernel.exception.SystemException {
141 return getPersistence().findBySize_Last(size, orderByComparator);
142 }
143
144 public static com.liferay.portal.model.Image[] findBySize_PrevAndNext(
145 long imageId, 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()
150 .findBySize_PrevAndNext(imageId, size, orderByComparator);
151 }
152
153 public static java.util.List<com.liferay.portal.model.Image> findAll()
154 throws com.liferay.portal.kernel.exception.SystemException {
155 return getPersistence().findAll();
156 }
157
158 public static java.util.List<com.liferay.portal.model.Image> findAll(
159 int start, int end)
160 throws com.liferay.portal.kernel.exception.SystemException {
161 return getPersistence().findAll(start, end);
162 }
163
164 public static java.util.List<com.liferay.portal.model.Image> findAll(
165 int start, int end,
166 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
167 throws com.liferay.portal.kernel.exception.SystemException {
168 return getPersistence().findAll(start, end, orderByComparator);
169 }
170
171 public static void removeBySize(int size)
172 throws com.liferay.portal.kernel.exception.SystemException {
173 getPersistence().removeBySize(size);
174 }
175
176 public static void removeAll()
177 throws com.liferay.portal.kernel.exception.SystemException {
178 getPersistence().removeAll();
179 }
180
181 public static int countBySize(int size)
182 throws com.liferay.portal.kernel.exception.SystemException {
183 return getPersistence().countBySize(size);
184 }
185
186 public static int countAll()
187 throws com.liferay.portal.kernel.exception.SystemException {
188 return getPersistence().countAll();
189 }
190
191 public static ImagePersistence getPersistence() {
192 if (_persistence == null) {
193 _persistence = (ImagePersistence)PortalBeanLocatorUtil.locate(ImagePersistence.class.getName());
194 }
195
196 return _persistence;
197 }
198
199 public void setPersistence(ImagePersistence persistence) {
200 _persistence = persistence;
201 }
202
203 private static ImagePersistence _persistence;
204 }