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="ShoppingOrderUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class ShoppingOrderUtil {
32      public static com.liferay.portlet.shopping.model.ShoppingOrder create(
33          long orderId) {
34          return getPersistence().create(orderId);
35      }
36  
37      public static com.liferay.portlet.shopping.model.ShoppingOrder remove(
38          long orderId)
39          throws com.liferay.portal.SystemException, 
40              com.liferay.portlet.shopping.NoSuchOrderException {
41          return getPersistence().remove(orderId);
42      }
43  
44      public static com.liferay.portlet.shopping.model.ShoppingOrder remove(
45          com.liferay.portlet.shopping.model.ShoppingOrder shoppingOrder)
46          throws com.liferay.portal.SystemException {
47          return getPersistence().remove(shoppingOrder);
48      }
49  
50      public static com.liferay.portlet.shopping.model.ShoppingOrder update(
51          com.liferay.portlet.shopping.model.ShoppingOrder shoppingOrder)
52          throws com.liferay.portal.SystemException {
53          return getPersistence().update(shoppingOrder);
54      }
55  
56      public static com.liferay.portlet.shopping.model.ShoppingOrder update(
57          com.liferay.portlet.shopping.model.ShoppingOrder shoppingOrder,
58          boolean merge) throws com.liferay.portal.SystemException {
59          return getPersistence().update(shoppingOrder, merge);
60      }
61  
62      public static com.liferay.portlet.shopping.model.ShoppingOrder updateImpl(
63          com.liferay.portlet.shopping.model.ShoppingOrder shoppingOrder,
64          boolean merge) throws com.liferay.portal.SystemException {
65          return getPersistence().updateImpl(shoppingOrder, merge);
66      }
67  
68      public static com.liferay.portlet.shopping.model.ShoppingOrder findByPrimaryKey(
69          long orderId)
70          throws com.liferay.portal.SystemException, 
71              com.liferay.portlet.shopping.NoSuchOrderException {
72          return getPersistence().findByPrimaryKey(orderId);
73      }
74  
75      public static com.liferay.portlet.shopping.model.ShoppingOrder fetchByPrimaryKey(
76          long orderId) throws com.liferay.portal.SystemException {
77          return getPersistence().fetchByPrimaryKey(orderId);
78      }
79  
80      public static java.util.List findByGroupId(long groupId)
81          throws com.liferay.portal.SystemException {
82          return getPersistence().findByGroupId(groupId);
83      }
84  
85      public static java.util.List findByGroupId(long groupId, int begin, int end)
86          throws com.liferay.portal.SystemException {
87          return getPersistence().findByGroupId(groupId, begin, end);
88      }
89  
90      public static java.util.List findByGroupId(long groupId, int begin,
91          int end, com.liferay.portal.kernel.util.OrderByComparator obc)
92          throws com.liferay.portal.SystemException {
93          return getPersistence().findByGroupId(groupId, begin, end, obc);
94      }
95  
96      public static com.liferay.portlet.shopping.model.ShoppingOrder findByGroupId_First(
97          long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
98          throws com.liferay.portal.SystemException, 
99              com.liferay.portlet.shopping.NoSuchOrderException {
100         return getPersistence().findByGroupId_First(groupId, obc);
101     }
102 
103     public static com.liferay.portlet.shopping.model.ShoppingOrder findByGroupId_Last(
104         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
105         throws com.liferay.portal.SystemException, 
106             com.liferay.portlet.shopping.NoSuchOrderException {
107         return getPersistence().findByGroupId_Last(groupId, obc);
108     }
109 
110     public static com.liferay.portlet.shopping.model.ShoppingOrder[] findByGroupId_PrevAndNext(
111         long orderId, long groupId,
112         com.liferay.portal.kernel.util.OrderByComparator obc)
113         throws com.liferay.portal.SystemException, 
114             com.liferay.portlet.shopping.NoSuchOrderException {
115         return getPersistence().findByGroupId_PrevAndNext(orderId, groupId, obc);
116     }
117 
118     public static com.liferay.portlet.shopping.model.ShoppingOrder findByNumber(
119         java.lang.String number)
120         throws com.liferay.portal.SystemException, 
121             com.liferay.portlet.shopping.NoSuchOrderException {
122         return getPersistence().findByNumber(number);
123     }
124 
125     public static com.liferay.portlet.shopping.model.ShoppingOrder fetchByNumber(
126         java.lang.String number) throws com.liferay.portal.SystemException {
127         return getPersistence().fetchByNumber(number);
128     }
129 
130     public static java.util.List findByG_U_PPPS(long groupId, long userId,
131         java.lang.String ppPaymentStatus)
132         throws com.liferay.portal.SystemException {
133         return getPersistence().findByG_U_PPPS(groupId, userId, ppPaymentStatus);
134     }
135 
136     public static java.util.List findByG_U_PPPS(long groupId, long userId,
137         java.lang.String ppPaymentStatus, int begin, int end)
138         throws com.liferay.portal.SystemException {
139         return getPersistence().findByG_U_PPPS(groupId, userId,
140             ppPaymentStatus, begin, end);
141     }
142 
143     public static java.util.List findByG_U_PPPS(long groupId, long userId,
144         java.lang.String ppPaymentStatus, int begin, int end,
145         com.liferay.portal.kernel.util.OrderByComparator obc)
146         throws com.liferay.portal.SystemException {
147         return getPersistence().findByG_U_PPPS(groupId, userId,
148             ppPaymentStatus, begin, end, obc);
149     }
150 
151     public static com.liferay.portlet.shopping.model.ShoppingOrder findByG_U_PPPS_First(
152         long groupId, long userId, java.lang.String ppPaymentStatus,
153         com.liferay.portal.kernel.util.OrderByComparator obc)
154         throws com.liferay.portal.SystemException, 
155             com.liferay.portlet.shopping.NoSuchOrderException {
156         return getPersistence().findByG_U_PPPS_First(groupId, userId,
157             ppPaymentStatus, obc);
158     }
159 
160     public static com.liferay.portlet.shopping.model.ShoppingOrder findByG_U_PPPS_Last(
161         long groupId, long userId, java.lang.String ppPaymentStatus,
162         com.liferay.portal.kernel.util.OrderByComparator obc)
163         throws com.liferay.portal.SystemException, 
164             com.liferay.portlet.shopping.NoSuchOrderException {
165         return getPersistence().findByG_U_PPPS_Last(groupId, userId,
166             ppPaymentStatus, obc);
167     }
168 
169     public static com.liferay.portlet.shopping.model.ShoppingOrder[] findByG_U_PPPS_PrevAndNext(
170         long orderId, long groupId, long userId,
171         java.lang.String ppPaymentStatus,
172         com.liferay.portal.kernel.util.OrderByComparator obc)
173         throws com.liferay.portal.SystemException, 
174             com.liferay.portlet.shopping.NoSuchOrderException {
175         return getPersistence().findByG_U_PPPS_PrevAndNext(orderId, groupId,
176             userId, ppPaymentStatus, obc);
177     }
178 
179     public static java.util.List findWithDynamicQuery(
180         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
181         throws com.liferay.portal.SystemException {
182         return getPersistence().findWithDynamicQuery(queryInitializer);
183     }
184 
185     public static java.util.List findWithDynamicQuery(
186         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
187         int begin, int end) throws com.liferay.portal.SystemException {
188         return getPersistence().findWithDynamicQuery(queryInitializer, begin,
189             end);
190     }
191 
192     public static java.util.List findAll()
193         throws com.liferay.portal.SystemException {
194         return getPersistence().findAll();
195     }
196 
197     public static java.util.List findAll(int begin, int end)
198         throws com.liferay.portal.SystemException {
199         return getPersistence().findAll(begin, end);
200     }
201 
202     public static java.util.List findAll(int begin, int end,
203         com.liferay.portal.kernel.util.OrderByComparator obc)
204         throws com.liferay.portal.SystemException {
205         return getPersistence().findAll(begin, end, obc);
206     }
207 
208     public static void removeByGroupId(long groupId)
209         throws com.liferay.portal.SystemException {
210         getPersistence().removeByGroupId(groupId);
211     }
212 
213     public static void removeByNumber(java.lang.String number)
214         throws com.liferay.portal.SystemException, 
215             com.liferay.portlet.shopping.NoSuchOrderException {
216         getPersistence().removeByNumber(number);
217     }
218 
219     public static void removeByG_U_PPPS(long groupId, long userId,
220         java.lang.String ppPaymentStatus)
221         throws com.liferay.portal.SystemException {
222         getPersistence().removeByG_U_PPPS(groupId, userId, ppPaymentStatus);
223     }
224 
225     public static void removeAll() throws com.liferay.portal.SystemException {
226         getPersistence().removeAll();
227     }
228 
229     public static int countByGroupId(long groupId)
230         throws com.liferay.portal.SystemException {
231         return getPersistence().countByGroupId(groupId);
232     }
233 
234     public static int countByNumber(java.lang.String number)
235         throws com.liferay.portal.SystemException {
236         return getPersistence().countByNumber(number);
237     }
238 
239     public static int countByG_U_PPPS(long groupId, long userId,
240         java.lang.String ppPaymentStatus)
241         throws com.liferay.portal.SystemException {
242         return getPersistence().countByG_U_PPPS(groupId, userId, ppPaymentStatus);
243     }
244 
245     public static int countAll() throws com.liferay.portal.SystemException {
246         return getPersistence().countAll();
247     }
248 
249     public static ShoppingOrderPersistence getPersistence() {
250         return _getUtil()._persistence;
251     }
252 
253     public void setPersistence(ShoppingOrderPersistence persistence) {
254         _persistence = persistence;
255     }
256 
257     private static ShoppingOrderUtil _getUtil() {
258         if (_util == null) {
259             _util = (ShoppingOrderUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
260         }
261 
262         return _util;
263     }
264 
265     private static final String _UTIL = ShoppingOrderUtil.class.getName();
266     private static ShoppingOrderUtil _util;
267     private ShoppingOrderPersistence _persistence;
268 }