1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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  /**
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      public static void cacheResult(
41          com.liferay.portlet.shopping.model.ShoppingItem shoppingItem) {
42          getPersistence().cacheResult(shoppingItem);
43      }
44  
45      public static void cacheResult(
46          java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> shoppingItems) {
47          getPersistence().cacheResult(shoppingItems);
48      }
49  
50      public static void clearCache() {
51          getPersistence().clearCache();
52      }
53  
54      public static com.liferay.portlet.shopping.model.ShoppingItem create(
55          long itemId) {
56          return getPersistence().create(itemId);
57      }
58  
59      public static com.liferay.portlet.shopping.model.ShoppingItem remove(
60          long itemId)
61          throws com.liferay.portal.SystemException,
62              com.liferay.portlet.shopping.NoSuchItemException {
63          return getPersistence().remove(itemId);
64      }
65  
66      public static com.liferay.portlet.shopping.model.ShoppingItem remove(
67          com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
68          throws com.liferay.portal.SystemException {
69          return getPersistence().remove(shoppingItem);
70      }
71  
72      /**
73       * @deprecated Use {@link #update(ShoppingItem, boolean merge)}.
74       */
75      public static com.liferay.portlet.shopping.model.ShoppingItem update(
76          com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
77          throws com.liferay.portal.SystemException {
78          return getPersistence().update(shoppingItem);
79      }
80  
81      /**
82       * Add, update, or merge, the entity. This method also calls the model
83       * listeners to trigger the proper events associated with adding, deleting,
84       * or updating an entity.
85       *
86       * @param  shoppingItem the entity to add, update, or merge
87       * @param  merge boolean value for whether to merge the entity. The default
88       *         value is false. Setting merge to true is more expensive and
89       *         should only be true when shoppingItem is transient. See
90       *         LEP-5473 for a detailed discussion of this method.
91       * @return the entity that was added, updated, or merged
92       */
93      public static com.liferay.portlet.shopping.model.ShoppingItem update(
94          com.liferay.portlet.shopping.model.ShoppingItem shoppingItem,
95          boolean merge) throws com.liferay.portal.SystemException {
96          return getPersistence().update(shoppingItem, merge);
97      }
98  
99      public static com.liferay.portlet.shopping.model.ShoppingItem updateImpl(
100         com.liferay.portlet.shopping.model.ShoppingItem shoppingItem,
101         boolean merge) throws com.liferay.portal.SystemException {
102         return getPersistence().updateImpl(shoppingItem, merge);
103     }
104 
105     public static com.liferay.portlet.shopping.model.ShoppingItem findByPrimaryKey(
106         long itemId)
107         throws com.liferay.portal.SystemException,
108             com.liferay.portlet.shopping.NoSuchItemException {
109         return getPersistence().findByPrimaryKey(itemId);
110     }
111 
112     public static com.liferay.portlet.shopping.model.ShoppingItem fetchByPrimaryKey(
113         long itemId) throws com.liferay.portal.SystemException {
114         return getPersistence().fetchByPrimaryKey(itemId);
115     }
116 
117     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByCategoryId(
118         long categoryId) throws com.liferay.portal.SystemException {
119         return getPersistence().findByCategoryId(categoryId);
120     }
121 
122     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByCategoryId(
123         long categoryId, int start, int end)
124         throws com.liferay.portal.SystemException {
125         return getPersistence().findByCategoryId(categoryId, start, end);
126     }
127 
128     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByCategoryId(
129         long categoryId, int start, int end,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException {
132         return getPersistence().findByCategoryId(categoryId, start, end, obc);
133     }
134 
135     public static com.liferay.portlet.shopping.model.ShoppingItem findByCategoryId_First(
136         long categoryId, com.liferay.portal.kernel.util.OrderByComparator obc)
137         throws com.liferay.portal.SystemException,
138             com.liferay.portlet.shopping.NoSuchItemException {
139         return getPersistence().findByCategoryId_First(categoryId, obc);
140     }
141 
142     public static com.liferay.portlet.shopping.model.ShoppingItem findByCategoryId_Last(
143         long categoryId, com.liferay.portal.kernel.util.OrderByComparator obc)
144         throws com.liferay.portal.SystemException,
145             com.liferay.portlet.shopping.NoSuchItemException {
146         return getPersistence().findByCategoryId_Last(categoryId, obc);
147     }
148 
149     public static com.liferay.portlet.shopping.model.ShoppingItem[] findByCategoryId_PrevAndNext(
150         long itemId, long categoryId,
151         com.liferay.portal.kernel.util.OrderByComparator obc)
152         throws com.liferay.portal.SystemException,
153             com.liferay.portlet.shopping.NoSuchItemException {
154         return getPersistence()
155                    .findByCategoryId_PrevAndNext(itemId, categoryId, obc);
156     }
157 
158     public static com.liferay.portlet.shopping.model.ShoppingItem findBySmallImageId(
159         long smallImageId)
160         throws com.liferay.portal.SystemException,
161             com.liferay.portlet.shopping.NoSuchItemException {
162         return getPersistence().findBySmallImageId(smallImageId);
163     }
164 
165     public static com.liferay.portlet.shopping.model.ShoppingItem fetchBySmallImageId(
166         long smallImageId) throws com.liferay.portal.SystemException {
167         return getPersistence().fetchBySmallImageId(smallImageId);
168     }
169 
170     public static com.liferay.portlet.shopping.model.ShoppingItem fetchBySmallImageId(
171         long smallImageId, boolean retrieveFromCache)
172         throws com.liferay.portal.SystemException {
173         return getPersistence()
174                    .fetchBySmallImageId(smallImageId, retrieveFromCache);
175     }
176 
177     public static com.liferay.portlet.shopping.model.ShoppingItem findByMediumImageId(
178         long mediumImageId)
179         throws com.liferay.portal.SystemException,
180             com.liferay.portlet.shopping.NoSuchItemException {
181         return getPersistence().findByMediumImageId(mediumImageId);
182     }
183 
184     public static com.liferay.portlet.shopping.model.ShoppingItem fetchByMediumImageId(
185         long mediumImageId) throws com.liferay.portal.SystemException {
186         return getPersistence().fetchByMediumImageId(mediumImageId);
187     }
188 
189     public static com.liferay.portlet.shopping.model.ShoppingItem fetchByMediumImageId(
190         long mediumImageId, boolean retrieveFromCache)
191         throws com.liferay.portal.SystemException {
192         return getPersistence()
193                    .fetchByMediumImageId(mediumImageId, retrieveFromCache);
194     }
195 
196     public static com.liferay.portlet.shopping.model.ShoppingItem findByLargeImageId(
197         long largeImageId)
198         throws com.liferay.portal.SystemException,
199             com.liferay.portlet.shopping.NoSuchItemException {
200         return getPersistence().findByLargeImageId(largeImageId);
201     }
202 
203     public static com.liferay.portlet.shopping.model.ShoppingItem fetchByLargeImageId(
204         long largeImageId) throws com.liferay.portal.SystemException {
205         return getPersistence().fetchByLargeImageId(largeImageId);
206     }
207 
208     public static com.liferay.portlet.shopping.model.ShoppingItem fetchByLargeImageId(
209         long largeImageId, boolean retrieveFromCache)
210         throws com.liferay.portal.SystemException {
211         return getPersistence()
212                    .fetchByLargeImageId(largeImageId, retrieveFromCache);
213     }
214 
215     public static com.liferay.portlet.shopping.model.ShoppingItem findByC_S(
216         long companyId, java.lang.String sku)
217         throws com.liferay.portal.SystemException,
218             com.liferay.portlet.shopping.NoSuchItemException {
219         return getPersistence().findByC_S(companyId, sku);
220     }
221 
222     public static com.liferay.portlet.shopping.model.ShoppingItem fetchByC_S(
223         long companyId, java.lang.String sku)
224         throws com.liferay.portal.SystemException {
225         return getPersistence().fetchByC_S(companyId, sku);
226     }
227 
228     public static com.liferay.portlet.shopping.model.ShoppingItem fetchByC_S(
229         long companyId, java.lang.String sku, boolean retrieveFromCache)
230         throws com.liferay.portal.SystemException {
231         return getPersistence().fetchByC_S(companyId, sku, retrieveFromCache);
232     }
233 
234     public static java.util.List<Object> findWithDynamicQuery(
235         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
236         throws com.liferay.portal.SystemException {
237         return getPersistence().findWithDynamicQuery(dynamicQuery);
238     }
239 
240     public static java.util.List<Object> findWithDynamicQuery(
241         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
242         int end) throws com.liferay.portal.SystemException {
243         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
244     }
245 
246     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll()
247         throws com.liferay.portal.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) throws com.liferay.portal.SystemException {
253         return getPersistence().findAll(start, end);
254     }
255 
256     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll(
257         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
258         throws com.liferay.portal.SystemException {
259         return getPersistence().findAll(start, end, obc);
260     }
261 
262     public static void removeByCategoryId(long categoryId)
263         throws com.liferay.portal.SystemException {
264         getPersistence().removeByCategoryId(categoryId);
265     }
266 
267     public static void removeBySmallImageId(long smallImageId)
268         throws com.liferay.portal.SystemException,
269             com.liferay.portlet.shopping.NoSuchItemException {
270         getPersistence().removeBySmallImageId(smallImageId);
271     }
272 
273     public static void removeByMediumImageId(long mediumImageId)
274         throws com.liferay.portal.SystemException,
275             com.liferay.portlet.shopping.NoSuchItemException {
276         getPersistence().removeByMediumImageId(mediumImageId);
277     }
278 
279     public static void removeByLargeImageId(long largeImageId)
280         throws com.liferay.portal.SystemException,
281             com.liferay.portlet.shopping.NoSuchItemException {
282         getPersistence().removeByLargeImageId(largeImageId);
283     }
284 
285     public static void removeByC_S(long companyId, java.lang.String sku)
286         throws com.liferay.portal.SystemException,
287             com.liferay.portlet.shopping.NoSuchItemException {
288         getPersistence().removeByC_S(companyId, sku);
289     }
290 
291     public static void removeAll() throws com.liferay.portal.SystemException {
292         getPersistence().removeAll();
293     }
294 
295     public static int countByCategoryId(long categoryId)
296         throws com.liferay.portal.SystemException {
297         return getPersistence().countByCategoryId(categoryId);
298     }
299 
300     public static int countBySmallImageId(long smallImageId)
301         throws com.liferay.portal.SystemException {
302         return getPersistence().countBySmallImageId(smallImageId);
303     }
304 
305     public static int countByMediumImageId(long mediumImageId)
306         throws com.liferay.portal.SystemException {
307         return getPersistence().countByMediumImageId(mediumImageId);
308     }
309 
310     public static int countByLargeImageId(long largeImageId)
311         throws com.liferay.portal.SystemException {
312         return getPersistence().countByLargeImageId(largeImageId);
313     }
314 
315     public static int countByC_S(long companyId, java.lang.String sku)
316         throws com.liferay.portal.SystemException {
317         return getPersistence().countByC_S(companyId, sku);
318     }
319 
320     public static int countAll() throws com.liferay.portal.SystemException {
321         return getPersistence().countAll();
322     }
323 
324     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices(
325         long pk) throws com.liferay.portal.SystemException {
326         return getPersistence().getShoppingItemPrices(pk);
327     }
328 
329     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices(
330         long pk, int start, int end) throws com.liferay.portal.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.SystemException {
338         return getPersistence().getShoppingItemPrices(pk, start, end, obc);
339     }
340 
341     public static int getShoppingItemPricesSize(long pk)
342         throws com.liferay.portal.SystemException {
343         return getPersistence().getShoppingItemPricesSize(pk);
344     }
345 
346     public static boolean containsShoppingItemPrice(long pk,
347         long shoppingItemPricePK) throws com.liferay.portal.SystemException {
348         return getPersistence()
349                    .containsShoppingItemPrice(pk, shoppingItemPricePK);
350     }
351 
352     public static boolean containsShoppingItemPrices(long pk)
353         throws com.liferay.portal.SystemException {
354         return getPersistence().containsShoppingItemPrices(pk);
355     }
356 
357     public static ShoppingItemPersistence getPersistence() {
358         return _persistence;
359     }
360 
361     public void setPersistence(ShoppingItemPersistence persistence) {
362         _persistence = persistence;
363     }
364 
365     private static ShoppingItemPersistence _persistence;
366 }