1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
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  /**
26   * <a href="ShoppingItemUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be
30   * overwritten the next time is generated.
31   * </p>
32   *
33   * @author    Brian Wing Shun Chan
34   * @see       ShoppingItemPersistence
35   * @see       ShoppingItemPersistenceImpl
36   * @generated
37   */
38  public class ShoppingItemUtil {
39      /**
40       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
41       */
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      /**
47       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
48       */
49      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
50          throws SystemException {
51          return getPersistence().findWithDynamicQuery(dynamicQuery);
52      }
53  
54      /**
55       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
56       */
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      /**
63       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
64       */
65      public static ShoppingItem remove(ShoppingItem shoppingItem)
66          throws SystemException {
67          return getPersistence().remove(shoppingItem);
68      }
69  
70      /**
71       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
72       */
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 obc)
194         throws com.liferay.portal.kernel.exception.SystemException {
195         return getPersistence().findByG_C(groupId, categoryId, start, end, obc);
196     }
197 
198     public static com.liferay.portlet.shopping.model.ShoppingItem findByG_C_First(
199         long groupId, long categoryId,
200         com.liferay.portal.kernel.util.OrderByComparator obc)
201         throws com.liferay.portal.kernel.exception.SystemException,
202             com.liferay.portlet.shopping.NoSuchItemException {
203         return getPersistence().findByG_C_First(groupId, categoryId, obc);
204     }
205 
206     public static com.liferay.portlet.shopping.model.ShoppingItem findByG_C_Last(
207         long groupId, long categoryId,
208         com.liferay.portal.kernel.util.OrderByComparator obc)
209         throws com.liferay.portal.kernel.exception.SystemException,
210             com.liferay.portlet.shopping.NoSuchItemException {
211         return getPersistence().findByG_C_Last(groupId, categoryId, obc);
212     }
213 
214     public static com.liferay.portlet.shopping.model.ShoppingItem[] findByG_C_PrevAndNext(
215         long itemId, long groupId, long categoryId,
216         com.liferay.portal.kernel.util.OrderByComparator obc)
217         throws com.liferay.portal.kernel.exception.SystemException,
218             com.liferay.portlet.shopping.NoSuchItemException {
219         return getPersistence()
220                    .findByG_C_PrevAndNext(itemId, groupId, categoryId, obc);
221     }
222 
223     public static com.liferay.portlet.shopping.model.ShoppingItem findByC_S(
224         long companyId, java.lang.String sku)
225         throws com.liferay.portal.kernel.exception.SystemException,
226             com.liferay.portlet.shopping.NoSuchItemException {
227         return getPersistence().findByC_S(companyId, sku);
228     }
229 
230     public static com.liferay.portlet.shopping.model.ShoppingItem fetchByC_S(
231         long companyId, java.lang.String sku)
232         throws com.liferay.portal.kernel.exception.SystemException {
233         return getPersistence().fetchByC_S(companyId, sku);
234     }
235 
236     public static com.liferay.portlet.shopping.model.ShoppingItem fetchByC_S(
237         long companyId, java.lang.String sku, boolean retrieveFromCache)
238         throws com.liferay.portal.kernel.exception.SystemException {
239         return getPersistence().fetchByC_S(companyId, sku, retrieveFromCache);
240     }
241 
242     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll()
243         throws com.liferay.portal.kernel.exception.SystemException {
244         return getPersistence().findAll();
245     }
246 
247     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll(
248         int start, int end)
249         throws com.liferay.portal.kernel.exception.SystemException {
250         return getPersistence().findAll(start, end);
251     }
252 
253     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll(
254         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
255         throws com.liferay.portal.kernel.exception.SystemException {
256         return getPersistence().findAll(start, end, obc);
257     }
258 
259     public static void removeBySmallImageId(long smallImageId)
260         throws com.liferay.portal.kernel.exception.SystemException,
261             com.liferay.portlet.shopping.NoSuchItemException {
262         getPersistence().removeBySmallImageId(smallImageId);
263     }
264 
265     public static void removeByMediumImageId(long mediumImageId)
266         throws com.liferay.portal.kernel.exception.SystemException,
267             com.liferay.portlet.shopping.NoSuchItemException {
268         getPersistence().removeByMediumImageId(mediumImageId);
269     }
270 
271     public static void removeByLargeImageId(long largeImageId)
272         throws com.liferay.portal.kernel.exception.SystemException,
273             com.liferay.portlet.shopping.NoSuchItemException {
274         getPersistence().removeByLargeImageId(largeImageId);
275     }
276 
277     public static void removeByG_C(long groupId, long categoryId)
278         throws com.liferay.portal.kernel.exception.SystemException {
279         getPersistence().removeByG_C(groupId, categoryId);
280     }
281 
282     public static void removeByC_S(long companyId, java.lang.String sku)
283         throws com.liferay.portal.kernel.exception.SystemException,
284             com.liferay.portlet.shopping.NoSuchItemException {
285         getPersistence().removeByC_S(companyId, sku);
286     }
287 
288     public static void removeAll()
289         throws com.liferay.portal.kernel.exception.SystemException {
290         getPersistence().removeAll();
291     }
292 
293     public static int countBySmallImageId(long smallImageId)
294         throws com.liferay.portal.kernel.exception.SystemException {
295         return getPersistence().countBySmallImageId(smallImageId);
296     }
297 
298     public static int countByMediumImageId(long mediumImageId)
299         throws com.liferay.portal.kernel.exception.SystemException {
300         return getPersistence().countByMediumImageId(mediumImageId);
301     }
302 
303     public static int countByLargeImageId(long largeImageId)
304         throws com.liferay.portal.kernel.exception.SystemException {
305         return getPersistence().countByLargeImageId(largeImageId);
306     }
307 
308     public static int countByG_C(long groupId, long categoryId)
309         throws com.liferay.portal.kernel.exception.SystemException {
310         return getPersistence().countByG_C(groupId, categoryId);
311     }
312 
313     public static int countByC_S(long companyId, java.lang.String sku)
314         throws com.liferay.portal.kernel.exception.SystemException {
315         return getPersistence().countByC_S(companyId, sku);
316     }
317 
318     public static int countAll()
319         throws com.liferay.portal.kernel.exception.SystemException {
320         return getPersistence().countAll();
321     }
322 
323     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices(
324         long pk) throws com.liferay.portal.kernel.exception.SystemException {
325         return getPersistence().getShoppingItemPrices(pk);
326     }
327 
328     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices(
329         long pk, int start, int end)
330         throws com.liferay.portal.kernel.exception.SystemException {
331         return getPersistence().getShoppingItemPrices(pk, start, end);
332     }
333 
334     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices(
335         long pk, int start, int end,
336         com.liferay.portal.kernel.util.OrderByComparator obc)
337         throws com.liferay.portal.kernel.exception.SystemException {
338         return getPersistence().getShoppingItemPrices(pk, start, end, obc);
339     }
340 
341     public static int getShoppingItemPricesSize(long pk)
342         throws com.liferay.portal.kernel.exception.SystemException {
343         return getPersistence().getShoppingItemPricesSize(pk);
344     }
345 
346     public static boolean containsShoppingItemPrice(long pk,
347         long shoppingItemPricePK)
348         throws com.liferay.portal.kernel.exception.SystemException {
349         return getPersistence()
350                    .containsShoppingItemPrice(pk, shoppingItemPricePK);
351     }
352 
353     public static boolean containsShoppingItemPrices(long pk)
354         throws com.liferay.portal.kernel.exception.SystemException {
355         return getPersistence().containsShoppingItemPrices(pk);
356     }
357 
358     public static ShoppingItemPersistence getPersistence() {
359         if (_persistence == null) {
360             _persistence = (ShoppingItemPersistence)PortalBeanLocatorUtil.locate(ShoppingItemPersistence.class.getName());
361         }
362 
363         return _persistence;
364     }
365 
366     public void setPersistence(ShoppingItemPersistence persistence) {
367         _persistence = persistence;
368     }
369 
370     private static ShoppingItemPersistence _persistence;
371 }