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.ShoppingOrderItem;
22  
23  import java.util.List;
24  
25  /**
26   * <a href="ShoppingOrderItemUtil.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       ShoppingOrderItemPersistence
35   * @see       ShoppingOrderItemPersistenceImpl
36   * @generated
37   */
38  public class ShoppingOrderItemUtil {
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#clearCache(ShoppingOrderItem)
48       */
49      public static void clearCache(ShoppingOrderItem shoppingOrderItem) {
50          getPersistence().clearCache(shoppingOrderItem);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
55       */
56      public long countWithDynamicQuery(DynamicQuery dynamicQuery)
57          throws SystemException {
58          return getPersistence().countWithDynamicQuery(dynamicQuery);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
63       */
64      public static List<ShoppingOrderItem> findWithDynamicQuery(
65          DynamicQuery dynamicQuery) throws SystemException {
66          return getPersistence().findWithDynamicQuery(dynamicQuery);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
71       */
72      public static List<ShoppingOrderItem> findWithDynamicQuery(
73          DynamicQuery dynamicQuery, int start, int end)
74          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 ShoppingOrderItem remove(ShoppingOrderItem shoppingOrderItem)
82          throws SystemException {
83          return getPersistence().remove(shoppingOrderItem);
84      }
85  
86      /**
87       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
88       */
89      public static ShoppingOrderItem update(
90          ShoppingOrderItem shoppingOrderItem, boolean merge)
91          throws SystemException {
92          return getPersistence().update(shoppingOrderItem, merge);
93      }
94  
95      public static void cacheResult(
96          com.liferay.portlet.shopping.model.ShoppingOrderItem shoppingOrderItem) {
97          getPersistence().cacheResult(shoppingOrderItem);
98      }
99  
100     public static void cacheResult(
101         java.util.List<com.liferay.portlet.shopping.model.ShoppingOrderItem> shoppingOrderItems) {
102         getPersistence().cacheResult(shoppingOrderItems);
103     }
104 
105     public static com.liferay.portlet.shopping.model.ShoppingOrderItem create(
106         long orderItemId) {
107         return getPersistence().create(orderItemId);
108     }
109 
110     public static com.liferay.portlet.shopping.model.ShoppingOrderItem remove(
111         long orderItemId)
112         throws com.liferay.portal.kernel.exception.SystemException,
113             com.liferay.portlet.shopping.NoSuchOrderItemException {
114         return getPersistence().remove(orderItemId);
115     }
116 
117     public static com.liferay.portlet.shopping.model.ShoppingOrderItem updateImpl(
118         com.liferay.portlet.shopping.model.ShoppingOrderItem shoppingOrderItem,
119         boolean merge)
120         throws com.liferay.portal.kernel.exception.SystemException {
121         return getPersistence().updateImpl(shoppingOrderItem, merge);
122     }
123 
124     public static com.liferay.portlet.shopping.model.ShoppingOrderItem findByPrimaryKey(
125         long orderItemId)
126         throws com.liferay.portal.kernel.exception.SystemException,
127             com.liferay.portlet.shopping.NoSuchOrderItemException {
128         return getPersistence().findByPrimaryKey(orderItemId);
129     }
130 
131     public static com.liferay.portlet.shopping.model.ShoppingOrderItem fetchByPrimaryKey(
132         long orderItemId)
133         throws com.liferay.portal.kernel.exception.SystemException {
134         return getPersistence().fetchByPrimaryKey(orderItemId);
135     }
136 
137     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingOrderItem> findByOrderId(
138         long orderId)
139         throws com.liferay.portal.kernel.exception.SystemException {
140         return getPersistence().findByOrderId(orderId);
141     }
142 
143     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingOrderItem> findByOrderId(
144         long orderId, int start, int end)
145         throws com.liferay.portal.kernel.exception.SystemException {
146         return getPersistence().findByOrderId(orderId, start, end);
147     }
148 
149     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingOrderItem> findByOrderId(
150         long orderId, int start, int end,
151         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
152         throws com.liferay.portal.kernel.exception.SystemException {
153         return getPersistence()
154                    .findByOrderId(orderId, start, end, orderByComparator);
155     }
156 
157     public static com.liferay.portlet.shopping.model.ShoppingOrderItem findByOrderId_First(
158         long orderId,
159         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
160         throws com.liferay.portal.kernel.exception.SystemException,
161             com.liferay.portlet.shopping.NoSuchOrderItemException {
162         return getPersistence().findByOrderId_First(orderId, orderByComparator);
163     }
164 
165     public static com.liferay.portlet.shopping.model.ShoppingOrderItem findByOrderId_Last(
166         long orderId,
167         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
168         throws com.liferay.portal.kernel.exception.SystemException,
169             com.liferay.portlet.shopping.NoSuchOrderItemException {
170         return getPersistence().findByOrderId_Last(orderId, orderByComparator);
171     }
172 
173     public static com.liferay.portlet.shopping.model.ShoppingOrderItem[] findByOrderId_PrevAndNext(
174         long orderItemId, long orderId,
175         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
176         throws com.liferay.portal.kernel.exception.SystemException,
177             com.liferay.portlet.shopping.NoSuchOrderItemException {
178         return getPersistence()
179                    .findByOrderId_PrevAndNext(orderItemId, orderId,
180             orderByComparator);
181     }
182 
183     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingOrderItem> findAll()
184         throws com.liferay.portal.kernel.exception.SystemException {
185         return getPersistence().findAll();
186     }
187 
188     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingOrderItem> findAll(
189         int start, int end)
190         throws com.liferay.portal.kernel.exception.SystemException {
191         return getPersistence().findAll(start, end);
192     }
193 
194     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingOrderItem> findAll(
195         int start, int end,
196         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
197         throws com.liferay.portal.kernel.exception.SystemException {
198         return getPersistence().findAll(start, end, orderByComparator);
199     }
200 
201     public static void removeByOrderId(long orderId)
202         throws com.liferay.portal.kernel.exception.SystemException {
203         getPersistence().removeByOrderId(orderId);
204     }
205 
206     public static void removeAll()
207         throws com.liferay.portal.kernel.exception.SystemException {
208         getPersistence().removeAll();
209     }
210 
211     public static int countByOrderId(long orderId)
212         throws com.liferay.portal.kernel.exception.SystemException {
213         return getPersistence().countByOrderId(orderId);
214     }
215 
216     public static int countAll()
217         throws com.liferay.portal.kernel.exception.SystemException {
218         return getPersistence().countAll();
219     }
220 
221     public static ShoppingOrderItemPersistence getPersistence() {
222         if (_persistence == null) {
223             _persistence = (ShoppingOrderItemPersistence)PortalBeanLocatorUtil.locate(ShoppingOrderItemPersistence.class.getName());
224         }
225 
226         return _persistence;
227     }
228 
229     public void setPersistence(ShoppingOrderItemPersistence persistence) {
230         _persistence = persistence;
231     }
232 
233     private static ShoppingOrderItemPersistence _persistence;
234 }