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="ShoppingOrderItemUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class ShoppingOrderItemUtil {
32      public static com.liferay.portlet.shopping.model.ShoppingOrderItem create(
33          long orderItemId) {
34          return getPersistence().create(orderItemId);
35      }
36  
37      public static com.liferay.portlet.shopping.model.ShoppingOrderItem remove(
38          long orderItemId)
39          throws com.liferay.portal.SystemException, 
40              com.liferay.portlet.shopping.NoSuchOrderItemException {
41          return getPersistence().remove(orderItemId);
42      }
43  
44      public static com.liferay.portlet.shopping.model.ShoppingOrderItem remove(
45          com.liferay.portlet.shopping.model.ShoppingOrderItem shoppingOrderItem)
46          throws com.liferay.portal.SystemException {
47          return getPersistence().remove(shoppingOrderItem);
48      }
49  
50      public static com.liferay.portlet.shopping.model.ShoppingOrderItem update(
51          com.liferay.portlet.shopping.model.ShoppingOrderItem shoppingOrderItem)
52          throws com.liferay.portal.SystemException {
53          return getPersistence().update(shoppingOrderItem);
54      }
55  
56      public static com.liferay.portlet.shopping.model.ShoppingOrderItem update(
57          com.liferay.portlet.shopping.model.ShoppingOrderItem shoppingOrderItem,
58          boolean merge) throws com.liferay.portal.SystemException {
59          return getPersistence().update(shoppingOrderItem, merge);
60      }
61  
62      public static com.liferay.portlet.shopping.model.ShoppingOrderItem updateImpl(
63          com.liferay.portlet.shopping.model.ShoppingOrderItem shoppingOrderItem,
64          boolean merge) throws com.liferay.portal.SystemException {
65          return getPersistence().updateImpl(shoppingOrderItem, merge);
66      }
67  
68      public static com.liferay.portlet.shopping.model.ShoppingOrderItem findByPrimaryKey(
69          long orderItemId)
70          throws com.liferay.portal.SystemException, 
71              com.liferay.portlet.shopping.NoSuchOrderItemException {
72          return getPersistence().findByPrimaryKey(orderItemId);
73      }
74  
75      public static com.liferay.portlet.shopping.model.ShoppingOrderItem fetchByPrimaryKey(
76          long orderItemId) throws com.liferay.portal.SystemException {
77          return getPersistence().fetchByPrimaryKey(orderItemId);
78      }
79  
80      public static java.util.List findByOrderId(long orderId)
81          throws com.liferay.portal.SystemException {
82          return getPersistence().findByOrderId(orderId);
83      }
84  
85      public static java.util.List findByOrderId(long orderId, int begin, int end)
86          throws com.liferay.portal.SystemException {
87          return getPersistence().findByOrderId(orderId, begin, end);
88      }
89  
90      public static java.util.List findByOrderId(long orderId, int begin,
91          int end, com.liferay.portal.kernel.util.OrderByComparator obc)
92          throws com.liferay.portal.SystemException {
93          return getPersistence().findByOrderId(orderId, begin, end, obc);
94      }
95  
96      public static com.liferay.portlet.shopping.model.ShoppingOrderItem findByOrderId_First(
97          long orderId, com.liferay.portal.kernel.util.OrderByComparator obc)
98          throws com.liferay.portal.SystemException, 
99              com.liferay.portlet.shopping.NoSuchOrderItemException {
100         return getPersistence().findByOrderId_First(orderId, obc);
101     }
102 
103     public static com.liferay.portlet.shopping.model.ShoppingOrderItem findByOrderId_Last(
104         long orderId, com.liferay.portal.kernel.util.OrderByComparator obc)
105         throws com.liferay.portal.SystemException, 
106             com.liferay.portlet.shopping.NoSuchOrderItemException {
107         return getPersistence().findByOrderId_Last(orderId, obc);
108     }
109 
110     public static com.liferay.portlet.shopping.model.ShoppingOrderItem[] findByOrderId_PrevAndNext(
111         long orderItemId, long orderId,
112         com.liferay.portal.kernel.util.OrderByComparator obc)
113         throws com.liferay.portal.SystemException, 
114             com.liferay.portlet.shopping.NoSuchOrderItemException {
115         return getPersistence().findByOrderId_PrevAndNext(orderItemId, orderId,
116             obc);
117     }
118 
119     public static java.util.List findWithDynamicQuery(
120         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
121         throws com.liferay.portal.SystemException {
122         return getPersistence().findWithDynamicQuery(queryInitializer);
123     }
124 
125     public static java.util.List findWithDynamicQuery(
126         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
127         int begin, int end) throws com.liferay.portal.SystemException {
128         return getPersistence().findWithDynamicQuery(queryInitializer, begin,
129             end);
130     }
131 
132     public static java.util.List findAll()
133         throws com.liferay.portal.SystemException {
134         return getPersistence().findAll();
135     }
136 
137     public static java.util.List findAll(int begin, int end)
138         throws com.liferay.portal.SystemException {
139         return getPersistence().findAll(begin, end);
140     }
141 
142     public static java.util.List findAll(int begin, int end,
143         com.liferay.portal.kernel.util.OrderByComparator obc)
144         throws com.liferay.portal.SystemException {
145         return getPersistence().findAll(begin, end, obc);
146     }
147 
148     public static void removeByOrderId(long orderId)
149         throws com.liferay.portal.SystemException {
150         getPersistence().removeByOrderId(orderId);
151     }
152 
153     public static void removeAll() throws com.liferay.portal.SystemException {
154         getPersistence().removeAll();
155     }
156 
157     public static int countByOrderId(long orderId)
158         throws com.liferay.portal.SystemException {
159         return getPersistence().countByOrderId(orderId);
160     }
161 
162     public static int countAll() throws com.liferay.portal.SystemException {
163         return getPersistence().countAll();
164     }
165 
166     public static ShoppingOrderItemPersistence getPersistence() {
167         return _getUtil()._persistence;
168     }
169 
170     public void setPersistence(ShoppingOrderItemPersistence persistence) {
171         _persistence = persistence;
172     }
173 
174     private static ShoppingOrderItemUtil _getUtil() {
175         if (_util == null) {
176             _util = (ShoppingOrderItemUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
177         }
178 
179         return _util;
180     }
181 
182     private static final String _UTIL = ShoppingOrderItemUtil.class.getName();
183     private static ShoppingOrderItemUtil _util;
184     private ShoppingOrderItemPersistence _persistence;
185 }