1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.shopping.service.persistence;
24  
25  /**
26   * <a href="ShoppingItemUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class ShoppingItemUtil {
32      public static com.liferay.portlet.shopping.model.ShoppingItem create(
33          long itemId) {
34          return getPersistence().create(itemId);
35      }
36  
37      public static com.liferay.portlet.shopping.model.ShoppingItem remove(
38          long itemId)
39          throws com.liferay.portal.SystemException, 
40              com.liferay.portlet.shopping.NoSuchItemException {
41          return getPersistence().remove(itemId);
42      }
43  
44      public static com.liferay.portlet.shopping.model.ShoppingItem remove(
45          com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
46          throws com.liferay.portal.SystemException {
47          return getPersistence().remove(shoppingItem);
48      }
49  
50      public static com.liferay.portlet.shopping.model.ShoppingItem update(
51          com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
52          throws com.liferay.portal.SystemException {
53          return getPersistence().update(shoppingItem);
54      }
55  
56      public static com.liferay.portlet.shopping.model.ShoppingItem update(
57          com.liferay.portlet.shopping.model.ShoppingItem shoppingItem,
58          boolean merge) throws com.liferay.portal.SystemException {
59          return getPersistence().update(shoppingItem, merge);
60      }
61  
62      public static com.liferay.portlet.shopping.model.ShoppingItem updateImpl(
63          com.liferay.portlet.shopping.model.ShoppingItem shoppingItem,
64          boolean merge) throws com.liferay.portal.SystemException {
65          return getPersistence().updateImpl(shoppingItem, merge);
66      }
67  
68      public static com.liferay.portlet.shopping.model.ShoppingItem findByPrimaryKey(
69          long itemId)
70          throws com.liferay.portal.SystemException, 
71              com.liferay.portlet.shopping.NoSuchItemException {
72          return getPersistence().findByPrimaryKey(itemId);
73      }
74  
75      public static com.liferay.portlet.shopping.model.ShoppingItem fetchByPrimaryKey(
76          long itemId) throws com.liferay.portal.SystemException {
77          return getPersistence().fetchByPrimaryKey(itemId);
78      }
79  
80      public static java.util.List findByCategoryId(long categoryId)
81          throws com.liferay.portal.SystemException {
82          return getPersistence().findByCategoryId(categoryId);
83      }
84  
85      public static java.util.List findByCategoryId(long categoryId, int begin,
86          int end) throws com.liferay.portal.SystemException {
87          return getPersistence().findByCategoryId(categoryId, begin, end);
88      }
89  
90      public static java.util.List findByCategoryId(long categoryId, int begin,
91          int end, com.liferay.portal.kernel.util.OrderByComparator obc)
92          throws com.liferay.portal.SystemException {
93          return getPersistence().findByCategoryId(categoryId, begin, end, obc);
94      }
95  
96      public static com.liferay.portlet.shopping.model.ShoppingItem findByCategoryId_First(
97          long categoryId, com.liferay.portal.kernel.util.OrderByComparator obc)
98          throws com.liferay.portal.SystemException, 
99              com.liferay.portlet.shopping.NoSuchItemException {
100         return getPersistence().findByCategoryId_First(categoryId, obc);
101     }
102 
103     public static com.liferay.portlet.shopping.model.ShoppingItem findByCategoryId_Last(
104         long categoryId, com.liferay.portal.kernel.util.OrderByComparator obc)
105         throws com.liferay.portal.SystemException, 
106             com.liferay.portlet.shopping.NoSuchItemException {
107         return getPersistence().findByCategoryId_Last(categoryId, obc);
108     }
109 
110     public static com.liferay.portlet.shopping.model.ShoppingItem[] findByCategoryId_PrevAndNext(
111         long itemId, long categoryId,
112         com.liferay.portal.kernel.util.OrderByComparator obc)
113         throws com.liferay.portal.SystemException, 
114             com.liferay.portlet.shopping.NoSuchItemException {
115         return getPersistence().findByCategoryId_PrevAndNext(itemId,
116             categoryId, obc);
117     }
118 
119     public static com.liferay.portlet.shopping.model.ShoppingItem findBySmallImageId(
120         long smallImageId)
121         throws com.liferay.portal.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) throws com.liferay.portal.SystemException {
128         return getPersistence().fetchBySmallImageId(smallImageId);
129     }
130 
131     public static com.liferay.portlet.shopping.model.ShoppingItem findByMediumImageId(
132         long mediumImageId)
133         throws com.liferay.portal.SystemException, 
134             com.liferay.portlet.shopping.NoSuchItemException {
135         return getPersistence().findByMediumImageId(mediumImageId);
136     }
137 
138     public static com.liferay.portlet.shopping.model.ShoppingItem fetchByMediumImageId(
139         long mediumImageId) throws com.liferay.portal.SystemException {
140         return getPersistence().fetchByMediumImageId(mediumImageId);
141     }
142 
143     public static com.liferay.portlet.shopping.model.ShoppingItem findByLargeImageId(
144         long largeImageId)
145         throws com.liferay.portal.SystemException, 
146             com.liferay.portlet.shopping.NoSuchItemException {
147         return getPersistence().findByLargeImageId(largeImageId);
148     }
149 
150     public static com.liferay.portlet.shopping.model.ShoppingItem fetchByLargeImageId(
151         long largeImageId) throws com.liferay.portal.SystemException {
152         return getPersistence().fetchByLargeImageId(largeImageId);
153     }
154 
155     public static com.liferay.portlet.shopping.model.ShoppingItem findByC_S(
156         long companyId, java.lang.String sku)
157         throws com.liferay.portal.SystemException, 
158             com.liferay.portlet.shopping.NoSuchItemException {
159         return getPersistence().findByC_S(companyId, sku);
160     }
161 
162     public static com.liferay.portlet.shopping.model.ShoppingItem fetchByC_S(
163         long companyId, java.lang.String sku)
164         throws com.liferay.portal.SystemException {
165         return getPersistence().fetchByC_S(companyId, sku);
166     }
167 
168     public static java.util.List findWithDynamicQuery(
169         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
170         throws com.liferay.portal.SystemException {
171         return getPersistence().findWithDynamicQuery(queryInitializer);
172     }
173 
174     public static java.util.List findWithDynamicQuery(
175         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
176         int begin, int end) throws com.liferay.portal.SystemException {
177         return getPersistence().findWithDynamicQuery(queryInitializer, begin,
178             end);
179     }
180 
181     public static java.util.List findAll()
182         throws com.liferay.portal.SystemException {
183         return getPersistence().findAll();
184     }
185 
186     public static java.util.List findAll(int begin, int end)
187         throws com.liferay.portal.SystemException {
188         return getPersistence().findAll(begin, end);
189     }
190 
191     public static java.util.List findAll(int begin, int end,
192         com.liferay.portal.kernel.util.OrderByComparator obc)
193         throws com.liferay.portal.SystemException {
194         return getPersistence().findAll(begin, end, obc);
195     }
196 
197     public static void removeByCategoryId(long categoryId)
198         throws com.liferay.portal.SystemException {
199         getPersistence().removeByCategoryId(categoryId);
200     }
201 
202     public static void removeBySmallImageId(long smallImageId)
203         throws com.liferay.portal.SystemException, 
204             com.liferay.portlet.shopping.NoSuchItemException {
205         getPersistence().removeBySmallImageId(smallImageId);
206     }
207 
208     public static void removeByMediumImageId(long mediumImageId)
209         throws com.liferay.portal.SystemException, 
210             com.liferay.portlet.shopping.NoSuchItemException {
211         getPersistence().removeByMediumImageId(mediumImageId);
212     }
213 
214     public static void removeByLargeImageId(long largeImageId)
215         throws com.liferay.portal.SystemException, 
216             com.liferay.portlet.shopping.NoSuchItemException {
217         getPersistence().removeByLargeImageId(largeImageId);
218     }
219 
220     public static void removeByC_S(long companyId, java.lang.String sku)
221         throws com.liferay.portal.SystemException, 
222             com.liferay.portlet.shopping.NoSuchItemException {
223         getPersistence().removeByC_S(companyId, sku);
224     }
225 
226     public static void removeAll() throws com.liferay.portal.SystemException {
227         getPersistence().removeAll();
228     }
229 
230     public static int countByCategoryId(long categoryId)
231         throws com.liferay.portal.SystemException {
232         return getPersistence().countByCategoryId(categoryId);
233     }
234 
235     public static int countBySmallImageId(long smallImageId)
236         throws com.liferay.portal.SystemException {
237         return getPersistence().countBySmallImageId(smallImageId);
238     }
239 
240     public static int countByMediumImageId(long mediumImageId)
241         throws com.liferay.portal.SystemException {
242         return getPersistence().countByMediumImageId(mediumImageId);
243     }
244 
245     public static int countByLargeImageId(long largeImageId)
246         throws com.liferay.portal.SystemException {
247         return getPersistence().countByLargeImageId(largeImageId);
248     }
249 
250     public static int countByC_S(long companyId, java.lang.String sku)
251         throws com.liferay.portal.SystemException {
252         return getPersistence().countByC_S(companyId, sku);
253     }
254 
255     public static int countAll() throws com.liferay.portal.SystemException {
256         return getPersistence().countAll();
257     }
258 
259     public static java.util.List getShoppingItemPrices(long pk)
260         throws com.liferay.portal.SystemException, 
261             com.liferay.portlet.shopping.NoSuchItemException {
262         return getPersistence().getShoppingItemPrices(pk);
263     }
264 
265     public static java.util.List getShoppingItemPrices(long pk, int begin,
266         int end)
267         throws com.liferay.portal.SystemException, 
268             com.liferay.portlet.shopping.NoSuchItemException {
269         return getPersistence().getShoppingItemPrices(pk, begin, end);
270     }
271 
272     public static java.util.List getShoppingItemPrices(long pk, int begin,
273         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
274         throws com.liferay.portal.SystemException, 
275             com.liferay.portlet.shopping.NoSuchItemException {
276         return getPersistence().getShoppingItemPrices(pk, begin, end, obc);
277     }
278 
279     public static int getShoppingItemPricesSize(long pk)
280         throws com.liferay.portal.SystemException {
281         return getPersistence().getShoppingItemPricesSize(pk);
282     }
283 
284     public static boolean containsShoppingItemPrice(long pk,
285         long shoppingItemPricePK) throws com.liferay.portal.SystemException {
286         return getPersistence().containsShoppingItemPrice(pk,
287             shoppingItemPricePK);
288     }
289 
290     public static boolean containsShoppingItemPrices(long pk)
291         throws com.liferay.portal.SystemException {
292         return getPersistence().containsShoppingItemPrices(pk);
293     }
294 
295     public static ShoppingItemPersistence getPersistence() {
296         return _getUtil()._persistence;
297     }
298 
299     public void setPersistence(ShoppingItemPersistence persistence) {
300         _persistence = persistence;
301     }
302 
303     private static ShoppingItemUtil _getUtil() {
304         if (_util == null) {
305             _util = (ShoppingItemUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
306         }
307 
308         return _util;
309     }
310 
311     private static final String _UTIL = ShoppingItemUtil.class.getName();
312     private static ShoppingItemUtil _util;
313     private ShoppingItemPersistence _persistence;
314 }