1
14
15 package com.liferay.portlet.shopping.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
21 import com.liferay.portlet.shopping.model.ShoppingItem;
22
23 import java.util.List;
24
25
38 public class ShoppingItemUtil {
39
42 public static void clearCache() {
43 getPersistence().clearCache();
44 }
45
46
49 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
50 throws SystemException {
51 return getPersistence().findWithDynamicQuery(dynamicQuery);
52 }
53
54
57 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
58 int start, int end) throws SystemException {
59 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
60 }
61
62
65 public static ShoppingItem remove(ShoppingItem shoppingItem)
66 throws SystemException {
67 return getPersistence().remove(shoppingItem);
68 }
69
70
73 public static ShoppingItem update(ShoppingItem shoppingItem, boolean merge)
74 throws SystemException {
75 return getPersistence().update(shoppingItem, merge);
76 }
77
78 public static void cacheResult(
79 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem) {
80 getPersistence().cacheResult(shoppingItem);
81 }
82
83 public static void cacheResult(
84 java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> shoppingItems) {
85 getPersistence().cacheResult(shoppingItems);
86 }
87
88 public static com.liferay.portlet.shopping.model.ShoppingItem create(
89 long itemId) {
90 return getPersistence().create(itemId);
91 }
92
93 public static com.liferay.portlet.shopping.model.ShoppingItem remove(
94 long itemId)
95 throws com.liferay.portal.kernel.exception.SystemException,
96 com.liferay.portlet.shopping.NoSuchItemException {
97 return getPersistence().remove(itemId);
98 }
99
100 public static com.liferay.portlet.shopping.model.ShoppingItem updateImpl(
101 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem,
102 boolean merge)
103 throws com.liferay.portal.kernel.exception.SystemException {
104 return getPersistence().updateImpl(shoppingItem, merge);
105 }
106
107 public static com.liferay.portlet.shopping.model.ShoppingItem findByPrimaryKey(
108 long itemId)
109 throws com.liferay.portal.kernel.exception.SystemException,
110 com.liferay.portlet.shopping.NoSuchItemException {
111 return getPersistence().findByPrimaryKey(itemId);
112 }
113
114 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByPrimaryKey(
115 long itemId) throws com.liferay.portal.kernel.exception.SystemException {
116 return getPersistence().fetchByPrimaryKey(itemId);
117 }
118
119 public static com.liferay.portlet.shopping.model.ShoppingItem findBySmallImageId(
120 long smallImageId)
121 throws com.liferay.portal.kernel.exception.SystemException,
122 com.liferay.portlet.shopping.NoSuchItemException {
123 return getPersistence().findBySmallImageId(smallImageId);
124 }
125
126 public static com.liferay.portlet.shopping.model.ShoppingItem fetchBySmallImageId(
127 long smallImageId)
128 throws com.liferay.portal.kernel.exception.SystemException {
129 return getPersistence().fetchBySmallImageId(smallImageId);
130 }
131
132 public static com.liferay.portlet.shopping.model.ShoppingItem fetchBySmallImageId(
133 long smallImageId, boolean retrieveFromCache)
134 throws com.liferay.portal.kernel.exception.SystemException {
135 return getPersistence()
136 .fetchBySmallImageId(smallImageId, retrieveFromCache);
137 }
138
139 public static com.liferay.portlet.shopping.model.ShoppingItem findByMediumImageId(
140 long mediumImageId)
141 throws com.liferay.portal.kernel.exception.SystemException,
142 com.liferay.portlet.shopping.NoSuchItemException {
143 return getPersistence().findByMediumImageId(mediumImageId);
144 }
145
146 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByMediumImageId(
147 long mediumImageId)
148 throws com.liferay.portal.kernel.exception.SystemException {
149 return getPersistence().fetchByMediumImageId(mediumImageId);
150 }
151
152 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByMediumImageId(
153 long mediumImageId, boolean retrieveFromCache)
154 throws com.liferay.portal.kernel.exception.SystemException {
155 return getPersistence()
156 .fetchByMediumImageId(mediumImageId, retrieveFromCache);
157 }
158
159 public static com.liferay.portlet.shopping.model.ShoppingItem findByLargeImageId(
160 long largeImageId)
161 throws com.liferay.portal.kernel.exception.SystemException,
162 com.liferay.portlet.shopping.NoSuchItemException {
163 return getPersistence().findByLargeImageId(largeImageId);
164 }
165
166 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByLargeImageId(
167 long largeImageId)
168 throws com.liferay.portal.kernel.exception.SystemException {
169 return getPersistence().fetchByLargeImageId(largeImageId);
170 }
171
172 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByLargeImageId(
173 long largeImageId, boolean retrieveFromCache)
174 throws com.liferay.portal.kernel.exception.SystemException {
175 return getPersistence()
176 .fetchByLargeImageId(largeImageId, retrieveFromCache);
177 }
178
179 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByG_C(
180 long groupId, long categoryId)
181 throws com.liferay.portal.kernel.exception.SystemException {
182 return getPersistence().findByG_C(groupId, categoryId);
183 }
184
185 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByG_C(
186 long groupId, long categoryId, int start, int end)
187 throws com.liferay.portal.kernel.exception.SystemException {
188 return getPersistence().findByG_C(groupId, categoryId, start, end);
189 }
190
191 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByG_C(
192 long groupId, long categoryId, int start, int end,
193 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
194 throws com.liferay.portal.kernel.exception.SystemException {
195 return getPersistence()
196 .findByG_C(groupId, categoryId, start, end, orderByComparator);
197 }
198
199 public static com.liferay.portlet.shopping.model.ShoppingItem findByG_C_First(
200 long groupId, long categoryId,
201 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
202 throws com.liferay.portal.kernel.exception.SystemException,
203 com.liferay.portlet.shopping.NoSuchItemException {
204 return getPersistence()
205 .findByG_C_First(groupId, categoryId, orderByComparator);
206 }
207
208 public static com.liferay.portlet.shopping.model.ShoppingItem findByG_C_Last(
209 long groupId, long categoryId,
210 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
211 throws com.liferay.portal.kernel.exception.SystemException,
212 com.liferay.portlet.shopping.NoSuchItemException {
213 return getPersistence()
214 .findByG_C_Last(groupId, categoryId, orderByComparator);
215 }
216
217 public static com.liferay.portlet.shopping.model.ShoppingItem[] findByG_C_PrevAndNext(
218 long itemId, long groupId, long categoryId,
219 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
220 throws com.liferay.portal.kernel.exception.SystemException,
221 com.liferay.portlet.shopping.NoSuchItemException {
222 return getPersistence()
223 .findByG_C_PrevAndNext(itemId, groupId, categoryId,
224 orderByComparator);
225 }
226
227 public static com.liferay.portlet.shopping.model.ShoppingItem findByC_S(
228 long companyId, java.lang.String sku)
229 throws com.liferay.portal.kernel.exception.SystemException,
230 com.liferay.portlet.shopping.NoSuchItemException {
231 return getPersistence().findByC_S(companyId, sku);
232 }
233
234 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByC_S(
235 long companyId, java.lang.String sku)
236 throws com.liferay.portal.kernel.exception.SystemException {
237 return getPersistence().fetchByC_S(companyId, sku);
238 }
239
240 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByC_S(
241 long companyId, java.lang.String sku, boolean retrieveFromCache)
242 throws com.liferay.portal.kernel.exception.SystemException {
243 return getPersistence().fetchByC_S(companyId, sku, retrieveFromCache);
244 }
245
246 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll()
247 throws com.liferay.portal.kernel.exception.SystemException {
248 return getPersistence().findAll();
249 }
250
251 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll(
252 int start, int end)
253 throws com.liferay.portal.kernel.exception.SystemException {
254 return getPersistence().findAll(start, end);
255 }
256
257 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll(
258 int start, int end,
259 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
260 throws com.liferay.portal.kernel.exception.SystemException {
261 return getPersistence().findAll(start, end, orderByComparator);
262 }
263
264 public static void removeBySmallImageId(long smallImageId)
265 throws com.liferay.portal.kernel.exception.SystemException,
266 com.liferay.portlet.shopping.NoSuchItemException {
267 getPersistence().removeBySmallImageId(smallImageId);
268 }
269
270 public static void removeByMediumImageId(long mediumImageId)
271 throws com.liferay.portal.kernel.exception.SystemException,
272 com.liferay.portlet.shopping.NoSuchItemException {
273 getPersistence().removeByMediumImageId(mediumImageId);
274 }
275
276 public static void removeByLargeImageId(long largeImageId)
277 throws com.liferay.portal.kernel.exception.SystemException,
278 com.liferay.portlet.shopping.NoSuchItemException {
279 getPersistence().removeByLargeImageId(largeImageId);
280 }
281
282 public static void removeByG_C(long groupId, long categoryId)
283 throws com.liferay.portal.kernel.exception.SystemException {
284 getPersistence().removeByG_C(groupId, categoryId);
285 }
286
287 public static void removeByC_S(long companyId, java.lang.String sku)
288 throws com.liferay.portal.kernel.exception.SystemException,
289 com.liferay.portlet.shopping.NoSuchItemException {
290 getPersistence().removeByC_S(companyId, sku);
291 }
292
293 public static void removeAll()
294 throws com.liferay.portal.kernel.exception.SystemException {
295 getPersistence().removeAll();
296 }
297
298 public static int countBySmallImageId(long smallImageId)
299 throws com.liferay.portal.kernel.exception.SystemException {
300 return getPersistence().countBySmallImageId(smallImageId);
301 }
302
303 public static int countByMediumImageId(long mediumImageId)
304 throws com.liferay.portal.kernel.exception.SystemException {
305 return getPersistence().countByMediumImageId(mediumImageId);
306 }
307
308 public static int countByLargeImageId(long largeImageId)
309 throws com.liferay.portal.kernel.exception.SystemException {
310 return getPersistence().countByLargeImageId(largeImageId);
311 }
312
313 public static int countByG_C(long groupId, long categoryId)
314 throws com.liferay.portal.kernel.exception.SystemException {
315 return getPersistence().countByG_C(groupId, categoryId);
316 }
317
318 public static int countByC_S(long companyId, java.lang.String sku)
319 throws com.liferay.portal.kernel.exception.SystemException {
320 return getPersistence().countByC_S(companyId, sku);
321 }
322
323 public static int countAll()
324 throws com.liferay.portal.kernel.exception.SystemException {
325 return getPersistence().countAll();
326 }
327
328 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices(
329 long pk) throws com.liferay.portal.kernel.exception.SystemException {
330 return getPersistence().getShoppingItemPrices(pk);
331 }
332
333 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices(
334 long pk, int start, int end)
335 throws com.liferay.portal.kernel.exception.SystemException {
336 return getPersistence().getShoppingItemPrices(pk, start, end);
337 }
338
339 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices(
340 long pk, int start, int end,
341 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
342 throws com.liferay.portal.kernel.exception.SystemException {
343 return getPersistence()
344 .getShoppingItemPrices(pk, start, end, orderByComparator);
345 }
346
347 public static int getShoppingItemPricesSize(long pk)
348 throws com.liferay.portal.kernel.exception.SystemException {
349 return getPersistence().getShoppingItemPricesSize(pk);
350 }
351
352 public static boolean containsShoppingItemPrice(long pk,
353 long shoppingItemPricePK)
354 throws com.liferay.portal.kernel.exception.SystemException {
355 return getPersistence()
356 .containsShoppingItemPrice(pk, shoppingItemPricePK);
357 }
358
359 public static boolean containsShoppingItemPrices(long pk)
360 throws com.liferay.portal.kernel.exception.SystemException {
361 return getPersistence().containsShoppingItemPrices(pk);
362 }
363
364 public static ShoppingItemPersistence getPersistence() {
365 if (_persistence == null) {
366 _persistence = (ShoppingItemPersistence)PortalBeanLocatorUtil.locate(ShoppingItemPersistence.class.getName());
367 }
368
369 return _persistence;
370 }
371
372 public void setPersistence(ShoppingItemPersistence persistence) {
373 _persistence = persistence;
374 }
375
376 private static ShoppingItemPersistence _persistence;
377 }