001
014
015 package com.liferay.portlet.shopping.service.persistence;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019 import com.liferay.portal.kernel.exception.SystemException;
020 import com.liferay.portal.kernel.util.OrderByComparator;
021 import com.liferay.portal.service.ServiceContext;
022
023 import com.liferay.portlet.shopping.model.ShoppingItem;
024
025 import java.util.List;
026
027
033 public class ShoppingItemUtil {
034
037 public static void clearCache() {
038 getPersistence().clearCache();
039 }
040
041
044 public static void clearCache(ShoppingItem shoppingItem) {
045 getPersistence().clearCache(shoppingItem);
046 }
047
048
051 public long countWithDynamicQuery(DynamicQuery dynamicQuery)
052 throws SystemException {
053 return getPersistence().countWithDynamicQuery(dynamicQuery);
054 }
055
056
059 public static List<ShoppingItem> findWithDynamicQuery(
060 DynamicQuery dynamicQuery) throws SystemException {
061 return getPersistence().findWithDynamicQuery(dynamicQuery);
062 }
063
064
067 public static List<ShoppingItem> findWithDynamicQuery(
068 DynamicQuery dynamicQuery, int start, int end)
069 throws SystemException {
070 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
071 }
072
073
076 public static List<ShoppingItem> findWithDynamicQuery(
077 DynamicQuery dynamicQuery, int start, int end,
078 OrderByComparator orderByComparator) throws SystemException {
079 return getPersistence()
080 .findWithDynamicQuery(dynamicQuery, start, end,
081 orderByComparator);
082 }
083
084
087 public static ShoppingItem remove(ShoppingItem shoppingItem)
088 throws SystemException {
089 return getPersistence().remove(shoppingItem);
090 }
091
092
095 public static ShoppingItem update(ShoppingItem shoppingItem, boolean merge)
096 throws SystemException {
097 return getPersistence().update(shoppingItem, merge);
098 }
099
100
103 public static ShoppingItem update(ShoppingItem shoppingItem, boolean merge,
104 ServiceContext serviceContext) throws SystemException {
105 return getPersistence().update(shoppingItem, merge, serviceContext);
106 }
107
108 public static void cacheResult(
109 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem) {
110 getPersistence().cacheResult(shoppingItem);
111 }
112
113 public static void cacheResult(
114 java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> shoppingItems) {
115 getPersistence().cacheResult(shoppingItems);
116 }
117
118 public static com.liferay.portlet.shopping.model.ShoppingItem create(
119 long itemId) {
120 return getPersistence().create(itemId);
121 }
122
123 public static com.liferay.portlet.shopping.model.ShoppingItem remove(
124 long itemId)
125 throws com.liferay.portal.kernel.exception.SystemException,
126 com.liferay.portlet.shopping.NoSuchItemException {
127 return getPersistence().remove(itemId);
128 }
129
130 public static com.liferay.portlet.shopping.model.ShoppingItem updateImpl(
131 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem,
132 boolean merge)
133 throws com.liferay.portal.kernel.exception.SystemException {
134 return getPersistence().updateImpl(shoppingItem, merge);
135 }
136
137 public static com.liferay.portlet.shopping.model.ShoppingItem findByPrimaryKey(
138 long itemId)
139 throws com.liferay.portal.kernel.exception.SystemException,
140 com.liferay.portlet.shopping.NoSuchItemException {
141 return getPersistence().findByPrimaryKey(itemId);
142 }
143
144 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByPrimaryKey(
145 long itemId) throws com.liferay.portal.kernel.exception.SystemException {
146 return getPersistence().fetchByPrimaryKey(itemId);
147 }
148
149 public static com.liferay.portlet.shopping.model.ShoppingItem findBySmallImageId(
150 long smallImageId)
151 throws com.liferay.portal.kernel.exception.SystemException,
152 com.liferay.portlet.shopping.NoSuchItemException {
153 return getPersistence().findBySmallImageId(smallImageId);
154 }
155
156 public static com.liferay.portlet.shopping.model.ShoppingItem fetchBySmallImageId(
157 long smallImageId)
158 throws com.liferay.portal.kernel.exception.SystemException {
159 return getPersistence().fetchBySmallImageId(smallImageId);
160 }
161
162 public static com.liferay.portlet.shopping.model.ShoppingItem fetchBySmallImageId(
163 long smallImageId, boolean retrieveFromCache)
164 throws com.liferay.portal.kernel.exception.SystemException {
165 return getPersistence()
166 .fetchBySmallImageId(smallImageId, retrieveFromCache);
167 }
168
169 public static com.liferay.portlet.shopping.model.ShoppingItem findByMediumImageId(
170 long mediumImageId)
171 throws com.liferay.portal.kernel.exception.SystemException,
172 com.liferay.portlet.shopping.NoSuchItemException {
173 return getPersistence().findByMediumImageId(mediumImageId);
174 }
175
176 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByMediumImageId(
177 long mediumImageId)
178 throws com.liferay.portal.kernel.exception.SystemException {
179 return getPersistence().fetchByMediumImageId(mediumImageId);
180 }
181
182 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByMediumImageId(
183 long mediumImageId, boolean retrieveFromCache)
184 throws com.liferay.portal.kernel.exception.SystemException {
185 return getPersistence()
186 .fetchByMediumImageId(mediumImageId, retrieveFromCache);
187 }
188
189 public static com.liferay.portlet.shopping.model.ShoppingItem findByLargeImageId(
190 long largeImageId)
191 throws com.liferay.portal.kernel.exception.SystemException,
192 com.liferay.portlet.shopping.NoSuchItemException {
193 return getPersistence().findByLargeImageId(largeImageId);
194 }
195
196 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByLargeImageId(
197 long largeImageId)
198 throws com.liferay.portal.kernel.exception.SystemException {
199 return getPersistence().fetchByLargeImageId(largeImageId);
200 }
201
202 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByLargeImageId(
203 long largeImageId, boolean retrieveFromCache)
204 throws com.liferay.portal.kernel.exception.SystemException {
205 return getPersistence()
206 .fetchByLargeImageId(largeImageId, retrieveFromCache);
207 }
208
209 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByG_C(
210 long groupId, long categoryId)
211 throws com.liferay.portal.kernel.exception.SystemException {
212 return getPersistence().findByG_C(groupId, categoryId);
213 }
214
215 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByG_C(
216 long groupId, long categoryId, int start, int end)
217 throws com.liferay.portal.kernel.exception.SystemException {
218 return getPersistence().findByG_C(groupId, categoryId, start, end);
219 }
220
221 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByG_C(
222 long groupId, long categoryId, int start, int end,
223 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
224 throws com.liferay.portal.kernel.exception.SystemException {
225 return getPersistence()
226 .findByG_C(groupId, categoryId, start, end, orderByComparator);
227 }
228
229 public static com.liferay.portlet.shopping.model.ShoppingItem findByG_C_First(
230 long groupId, long categoryId,
231 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
232 throws com.liferay.portal.kernel.exception.SystemException,
233 com.liferay.portlet.shopping.NoSuchItemException {
234 return getPersistence()
235 .findByG_C_First(groupId, categoryId, orderByComparator);
236 }
237
238 public static com.liferay.portlet.shopping.model.ShoppingItem findByG_C_Last(
239 long groupId, long categoryId,
240 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
241 throws com.liferay.portal.kernel.exception.SystemException,
242 com.liferay.portlet.shopping.NoSuchItemException {
243 return getPersistence()
244 .findByG_C_Last(groupId, categoryId, orderByComparator);
245 }
246
247 public static com.liferay.portlet.shopping.model.ShoppingItem[] findByG_C_PrevAndNext(
248 long itemId, long groupId, long categoryId,
249 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
250 throws com.liferay.portal.kernel.exception.SystemException,
251 com.liferay.portlet.shopping.NoSuchItemException {
252 return getPersistence()
253 .findByG_C_PrevAndNext(itemId, groupId, categoryId,
254 orderByComparator);
255 }
256
257 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> filterFindByG_C(
258 long groupId, long categoryId)
259 throws com.liferay.portal.kernel.exception.SystemException {
260 return getPersistence().filterFindByG_C(groupId, categoryId);
261 }
262
263 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> filterFindByG_C(
264 long groupId, long categoryId, int start, int end)
265 throws com.liferay.portal.kernel.exception.SystemException {
266 return getPersistence().filterFindByG_C(groupId, categoryId, start, end);
267 }
268
269 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> filterFindByG_C(
270 long groupId, long categoryId, int start, int end,
271 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
272 throws com.liferay.portal.kernel.exception.SystemException {
273 return getPersistence()
274 .filterFindByG_C(groupId, categoryId, start, end,
275 orderByComparator);
276 }
277
278 public static com.liferay.portlet.shopping.model.ShoppingItem findByC_S(
279 long companyId, java.lang.String sku)
280 throws com.liferay.portal.kernel.exception.SystemException,
281 com.liferay.portlet.shopping.NoSuchItemException {
282 return getPersistence().findByC_S(companyId, sku);
283 }
284
285 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByC_S(
286 long companyId, java.lang.String sku)
287 throws com.liferay.portal.kernel.exception.SystemException {
288 return getPersistence().fetchByC_S(companyId, sku);
289 }
290
291 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByC_S(
292 long companyId, java.lang.String sku, boolean retrieveFromCache)
293 throws com.liferay.portal.kernel.exception.SystemException {
294 return getPersistence().fetchByC_S(companyId, sku, retrieveFromCache);
295 }
296
297 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll()
298 throws com.liferay.portal.kernel.exception.SystemException {
299 return getPersistence().findAll();
300 }
301
302 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll(
303 int start, int end)
304 throws com.liferay.portal.kernel.exception.SystemException {
305 return getPersistence().findAll(start, end);
306 }
307
308 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll(
309 int start, int end,
310 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
311 throws com.liferay.portal.kernel.exception.SystemException {
312 return getPersistence().findAll(start, end, orderByComparator);
313 }
314
315 public static void removeBySmallImageId(long smallImageId)
316 throws com.liferay.portal.kernel.exception.SystemException,
317 com.liferay.portlet.shopping.NoSuchItemException {
318 getPersistence().removeBySmallImageId(smallImageId);
319 }
320
321 public static void removeByMediumImageId(long mediumImageId)
322 throws com.liferay.portal.kernel.exception.SystemException,
323 com.liferay.portlet.shopping.NoSuchItemException {
324 getPersistence().removeByMediumImageId(mediumImageId);
325 }
326
327 public static void removeByLargeImageId(long largeImageId)
328 throws com.liferay.portal.kernel.exception.SystemException,
329 com.liferay.portlet.shopping.NoSuchItemException {
330 getPersistence().removeByLargeImageId(largeImageId);
331 }
332
333 public static void removeByG_C(long groupId, long categoryId)
334 throws com.liferay.portal.kernel.exception.SystemException {
335 getPersistence().removeByG_C(groupId, categoryId);
336 }
337
338 public static void removeByC_S(long companyId, java.lang.String sku)
339 throws com.liferay.portal.kernel.exception.SystemException,
340 com.liferay.portlet.shopping.NoSuchItemException {
341 getPersistence().removeByC_S(companyId, sku);
342 }
343
344 public static void removeAll()
345 throws com.liferay.portal.kernel.exception.SystemException {
346 getPersistence().removeAll();
347 }
348
349 public static int countBySmallImageId(long smallImageId)
350 throws com.liferay.portal.kernel.exception.SystemException {
351 return getPersistence().countBySmallImageId(smallImageId);
352 }
353
354 public static int countByMediumImageId(long mediumImageId)
355 throws com.liferay.portal.kernel.exception.SystemException {
356 return getPersistence().countByMediumImageId(mediumImageId);
357 }
358
359 public static int countByLargeImageId(long largeImageId)
360 throws com.liferay.portal.kernel.exception.SystemException {
361 return getPersistence().countByLargeImageId(largeImageId);
362 }
363
364 public static int countByG_C(long groupId, long categoryId)
365 throws com.liferay.portal.kernel.exception.SystemException {
366 return getPersistence().countByG_C(groupId, categoryId);
367 }
368
369 public static int filterCountByG_C(long groupId, long categoryId)
370 throws com.liferay.portal.kernel.exception.SystemException {
371 return getPersistence().filterCountByG_C(groupId, categoryId);
372 }
373
374 public static int countByC_S(long companyId, java.lang.String sku)
375 throws com.liferay.portal.kernel.exception.SystemException {
376 return getPersistence().countByC_S(companyId, sku);
377 }
378
379 public static int countAll()
380 throws com.liferay.portal.kernel.exception.SystemException {
381 return getPersistence().countAll();
382 }
383
384 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices(
385 long pk) throws com.liferay.portal.kernel.exception.SystemException {
386 return getPersistence().getShoppingItemPrices(pk);
387 }
388
389 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices(
390 long pk, int start, int end)
391 throws com.liferay.portal.kernel.exception.SystemException {
392 return getPersistence().getShoppingItemPrices(pk, start, end);
393 }
394
395 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices(
396 long pk, int start, int end,
397 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
398 throws com.liferay.portal.kernel.exception.SystemException {
399 return getPersistence()
400 .getShoppingItemPrices(pk, start, end, orderByComparator);
401 }
402
403 public static int getShoppingItemPricesSize(long pk)
404 throws com.liferay.portal.kernel.exception.SystemException {
405 return getPersistence().getShoppingItemPricesSize(pk);
406 }
407
408 public static boolean containsShoppingItemPrice(long pk,
409 long shoppingItemPricePK)
410 throws com.liferay.portal.kernel.exception.SystemException {
411 return getPersistence()
412 .containsShoppingItemPrice(pk, shoppingItemPricePK);
413 }
414
415 public static boolean containsShoppingItemPrices(long pk)
416 throws com.liferay.portal.kernel.exception.SystemException {
417 return getPersistence().containsShoppingItemPrices(pk);
418 }
419
420 public static ShoppingItemPersistence getPersistence() {
421 if (_persistence == null) {
422 _persistence = (ShoppingItemPersistence)PortalBeanLocatorUtil.locate(ShoppingItemPersistence.class.getName());
423 }
424
425 return _persistence;
426 }
427
428 public void setPersistence(ShoppingItemPersistence persistence) {
429 _persistence = persistence;
430 }
431
432 private static ShoppingItemPersistence _persistence;
433 }