1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portlet.shopping.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.kernel.util.ReferenceRegistry;
21  
22  import com.liferay.portlet.shopping.model.ShoppingItem;
23  
24  import java.util.List;
25  
26  /**
27   * <a href="ShoppingItemUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * @author    Brian Wing Shun Chan
35   * @see       ShoppingItemPersistence
36   * @see       ShoppingItemPersistenceImpl
37   * @generated
38   */
39  public class ShoppingItemUtil {
40      /**
41       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
42       */
43      public static void clearCache() {
44          getPersistence().clearCache();
45      }
46  
47      /**
48       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(ShoppingItem)
49       */
50      public static void clearCache(ShoppingItem shoppingItem) {
51          getPersistence().clearCache(shoppingItem);
52      }
53  
54      /**
55       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
56       */
57      public int countWithDynamicQuery(DynamicQuery dynamicQuery)
58          throws SystemException {
59          return getPersistence().countWithDynamicQuery(dynamicQuery);
60      }
61  
62      /**
63       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
64       */
65      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
66          throws SystemException {
67          return getPersistence().findWithDynamicQuery(dynamicQuery);
68      }
69  
70      /**
71       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
72       */
73      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
74          int start, int end) throws SystemException {
75          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
76      }
77  
78      /**
79       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
80       */
81      public static ShoppingItem remove(ShoppingItem shoppingItem)
82          throws SystemException {
83          return getPersistence().remove(shoppingItem);
84      }
85  
86      /**
87       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
88       */
89      public static ShoppingItem update(ShoppingItem shoppingItem, boolean merge)
90          throws SystemException {
91          return getPersistence().update(shoppingItem, merge);
92      }
93  
94      public static void cacheResult(
95          com.liferay.portlet.shopping.model.ShoppingItem shoppingItem) {
96          getPersistence().cacheResult(shoppingItem);
97      }
98  
99      public static void cacheResult(
100         java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> shoppingItems) {
101         getPersistence().cacheResult(shoppingItems);
102     }
103 
104     public static com.liferay.portlet.shopping.model.ShoppingItem create(
105         long itemId) {
106         return getPersistence().create(itemId);
107     }
108 
109     public static com.liferay.portlet.shopping.model.ShoppingItem remove(
110         long itemId)
111         throws com.liferay.portal.SystemException,
112             com.liferay.portlet.shopping.NoSuchItemException {
113         return getPersistence().remove(itemId);
114     }
115 
116     /**
117      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
118      */
119     public static com.liferay.portlet.shopping.model.ShoppingItem update(
120         com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
121         throws com.liferay.portal.SystemException {
122         return getPersistence().update(shoppingItem);
123     }
124 
125     public static com.liferay.portlet.shopping.model.ShoppingItem updateImpl(
126         com.liferay.portlet.shopping.model.ShoppingItem shoppingItem,
127         boolean merge) throws com.liferay.portal.SystemException {
128         return getPersistence().updateImpl(shoppingItem, merge);
129     }
130 
131     public static com.liferay.portlet.shopping.model.ShoppingItem findByPrimaryKey(
132         long itemId)
133         throws com.liferay.portal.SystemException,
134             com.liferay.portlet.shopping.NoSuchItemException {
135         return getPersistence().findByPrimaryKey(itemId);
136     }
137 
138     public static com.liferay.portlet.shopping.model.ShoppingItem fetchByPrimaryKey(
139         long itemId) throws com.liferay.portal.SystemException {
140         return getPersistence().fetchByPrimaryKey(itemId);
141     }
142 
143     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByCategoryId(
144         long categoryId) throws com.liferay.portal.SystemException {
145         return getPersistence().findByCategoryId(categoryId);
146     }
147 
148     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByCategoryId(
149         long categoryId, int start, int end)
150         throws com.liferay.portal.SystemException {
151         return getPersistence().findByCategoryId(categoryId, start, end);
152     }
153 
154     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByCategoryId(
155         long categoryId, int start, int end,
156         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
157         throws com.liferay.portal.SystemException {
158         return getPersistence()
159                    .findByCategoryId(categoryId, start, end, orderByComparator);
160     }
161 
162     public static com.liferay.portlet.shopping.model.ShoppingItem findByCategoryId_First(
163         long categoryId,
164         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
165         throws com.liferay.portal.SystemException,
166             com.liferay.portlet.shopping.NoSuchItemException {
167         return getPersistence()
168                    .findByCategoryId_First(categoryId, orderByComparator);
169     }
170 
171     public static com.liferay.portlet.shopping.model.ShoppingItem findByCategoryId_Last(
172         long categoryId,
173         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
174         throws com.liferay.portal.SystemException,
175             com.liferay.portlet.shopping.NoSuchItemException {
176         return getPersistence()
177                    .findByCategoryId_Last(categoryId, orderByComparator);
178     }
179 
180     public static com.liferay.portlet.shopping.model.ShoppingItem[] findByCategoryId_PrevAndNext(
181         long itemId, long categoryId,
182         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
183         throws com.liferay.portal.SystemException,
184             com.liferay.portlet.shopping.NoSuchItemException {
185         return getPersistence()
186                    .findByCategoryId_PrevAndNext(itemId, categoryId,
187             orderByComparator);
188     }
189 
190     public static com.liferay.portlet.shopping.model.ShoppingItem findBySmallImageId(
191         long smallImageId)
192         throws com.liferay.portal.SystemException,
193             com.liferay.portlet.shopping.NoSuchItemException {
194         return getPersistence().findBySmallImageId(smallImageId);
195     }
196 
197     public static com.liferay.portlet.shopping.model.ShoppingItem fetchBySmallImageId(
198         long smallImageId) throws com.liferay.portal.SystemException {
199         return getPersistence().fetchBySmallImageId(smallImageId);
200     }
201 
202     public static com.liferay.portlet.shopping.model.ShoppingItem fetchBySmallImageId(
203         long smallImageId, boolean retrieveFromCache)
204         throws com.liferay.portal.SystemException {
205         return getPersistence()
206                    .fetchBySmallImageId(smallImageId, retrieveFromCache);
207     }
208 
209     public static com.liferay.portlet.shopping.model.ShoppingItem findByMediumImageId(
210         long mediumImageId)
211         throws com.liferay.portal.SystemException,
212             com.liferay.portlet.shopping.NoSuchItemException {
213         return getPersistence().findByMediumImageId(mediumImageId);
214     }
215 
216     public static com.liferay.portlet.shopping.model.ShoppingItem fetchByMediumImageId(
217         long mediumImageId) throws com.liferay.portal.SystemException {
218         return getPersistence().fetchByMediumImageId(mediumImageId);
219     }
220 
221     public static com.liferay.portlet.shopping.model.ShoppingItem fetchByMediumImageId(
222         long mediumImageId, boolean retrieveFromCache)
223         throws com.liferay.portal.SystemException {
224         return getPersistence()
225                    .fetchByMediumImageId(mediumImageId, retrieveFromCache);
226     }
227 
228     public static com.liferay.portlet.shopping.model.ShoppingItem findByLargeImageId(
229         long largeImageId)
230         throws com.liferay.portal.SystemException,
231             com.liferay.portlet.shopping.NoSuchItemException {
232         return getPersistence().findByLargeImageId(largeImageId);
233     }
234 
235     public static com.liferay.portlet.shopping.model.ShoppingItem fetchByLargeImageId(
236         long largeImageId) throws com.liferay.portal.SystemException {
237         return getPersistence().fetchByLargeImageId(largeImageId);
238     }
239 
240     public static com.liferay.portlet.shopping.model.ShoppingItem fetchByLargeImageId(
241         long largeImageId, boolean retrieveFromCache)
242         throws com.liferay.portal.SystemException {
243         return getPersistence()
244                    .fetchByLargeImageId(largeImageId, retrieveFromCache);
245     }
246 
247     public static com.liferay.portlet.shopping.model.ShoppingItem findByC_S(
248         long companyId, java.lang.String sku)
249         throws com.liferay.portal.SystemException,
250             com.liferay.portlet.shopping.NoSuchItemException {
251         return getPersistence().findByC_S(companyId, sku);
252     }
253 
254     public static com.liferay.portlet.shopping.model.ShoppingItem fetchByC_S(
255         long companyId, java.lang.String sku)
256         throws com.liferay.portal.SystemException {
257         return getPersistence().fetchByC_S(companyId, sku);
258     }
259 
260     public static com.liferay.portlet.shopping.model.ShoppingItem fetchByC_S(
261         long companyId, java.lang.String sku, boolean retrieveFromCache)
262         throws com.liferay.portal.SystemException {
263         return getPersistence().fetchByC_S(companyId, sku, retrieveFromCache);
264     }
265 
266     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll()
267         throws com.liferay.portal.SystemException {
268         return getPersistence().findAll();
269     }
270 
271     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll(
272         int start, int end) throws com.liferay.portal.SystemException {
273         return getPersistence().findAll(start, end);
274     }
275 
276     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll(
277         int start, int end,
278         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
279         throws com.liferay.portal.SystemException {
280         return getPersistence().findAll(start, end, orderByComparator);
281     }
282 
283     public static void removeByCategoryId(long categoryId)
284         throws com.liferay.portal.SystemException {
285         getPersistence().removeByCategoryId(categoryId);
286     }
287 
288     public static void removeBySmallImageId(long smallImageId)
289         throws com.liferay.portal.SystemException,
290             com.liferay.portlet.shopping.NoSuchItemException {
291         getPersistence().removeBySmallImageId(smallImageId);
292     }
293 
294     public static void removeByMediumImageId(long mediumImageId)
295         throws com.liferay.portal.SystemException,
296             com.liferay.portlet.shopping.NoSuchItemException {
297         getPersistence().removeByMediumImageId(mediumImageId);
298     }
299 
300     public static void removeByLargeImageId(long largeImageId)
301         throws com.liferay.portal.SystemException,
302             com.liferay.portlet.shopping.NoSuchItemException {
303         getPersistence().removeByLargeImageId(largeImageId);
304     }
305 
306     public static void removeByC_S(long companyId, java.lang.String sku)
307         throws com.liferay.portal.SystemException,
308             com.liferay.portlet.shopping.NoSuchItemException {
309         getPersistence().removeByC_S(companyId, sku);
310     }
311 
312     public static void removeAll() throws com.liferay.portal.SystemException {
313         getPersistence().removeAll();
314     }
315 
316     public static int countByCategoryId(long categoryId)
317         throws com.liferay.portal.SystemException {
318         return getPersistence().countByCategoryId(categoryId);
319     }
320 
321     public static int countBySmallImageId(long smallImageId)
322         throws com.liferay.portal.SystemException {
323         return getPersistence().countBySmallImageId(smallImageId);
324     }
325 
326     public static int countByMediumImageId(long mediumImageId)
327         throws com.liferay.portal.SystemException {
328         return getPersistence().countByMediumImageId(mediumImageId);
329     }
330 
331     public static int countByLargeImageId(long largeImageId)
332         throws com.liferay.portal.SystemException {
333         return getPersistence().countByLargeImageId(largeImageId);
334     }
335 
336     public static int countByC_S(long companyId, java.lang.String sku)
337         throws com.liferay.portal.SystemException {
338         return getPersistence().countByC_S(companyId, sku);
339     }
340 
341     public static int countAll() throws com.liferay.portal.SystemException {
342         return getPersistence().countAll();
343     }
344 
345     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices(
346         long pk) throws com.liferay.portal.SystemException {
347         return getPersistence().getShoppingItemPrices(pk);
348     }
349 
350     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices(
351         long pk, int start, int end) throws com.liferay.portal.SystemException {
352         return getPersistence().getShoppingItemPrices(pk, start, end);
353     }
354 
355     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices(
356         long pk, int start, int end,
357         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
358         throws com.liferay.portal.SystemException {
359         return getPersistence()
360                    .getShoppingItemPrices(pk, start, end, orderByComparator);
361     }
362 
363     public static int getShoppingItemPricesSize(long pk)
364         throws com.liferay.portal.SystemException {
365         return getPersistence().getShoppingItemPricesSize(pk);
366     }
367 
368     public static boolean containsShoppingItemPrice(long pk,
369         long shoppingItemPricePK) throws com.liferay.portal.SystemException {
370         return getPersistence()
371                    .containsShoppingItemPrice(pk, shoppingItemPricePK);
372     }
373 
374     public static boolean containsShoppingItemPrices(long pk)
375         throws com.liferay.portal.SystemException {
376         return getPersistence().containsShoppingItemPrices(pk);
377     }
378 
379     public static ShoppingItemPersistence getPersistence() {
380         if (_persistence == null) {
381             _persistence = (ShoppingItemPersistence)PortalBeanLocatorUtil.locate(ShoppingItemPersistence.class.getName());
382 
383             ReferenceRegistry.registerReference(ShoppingItemUtil.class,
384                 "_persistence");
385         }
386 
387         return _persistence;
388     }
389 
390     public void setPersistence(ShoppingItemPersistence persistence) {
391         _persistence = persistence;
392 
393         ReferenceRegistry.registerReference(ShoppingItemUtil.class,
394             "_persistence");
395     }
396 
397     private static ShoppingItemPersistence _persistence;
398 }