1   /**
2    * Copyright (c) 2000-2009 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      /**
51       * @deprecated Use <code>update(ShoppingOrder shoppingOrder, boolean merge)</code>.
52       */
53      public static com.liferay.portlet.shopping.model.ShoppingOrder update(
54          com.liferay.portlet.shopping.model.ShoppingOrder shoppingOrder)
55          throws com.liferay.portal.SystemException {
56          return getPersistence().update(shoppingOrder);
57      }
58  
59      /**
60       * Add, update, or merge, the entity. This method also calls the model
61       * listeners to trigger the proper events associated with adding, deleting,
62       * or updating an entity.
63       *
64       * @param        shoppingOrder the entity to add, update, or merge
65       * @param        merge boolean value for whether to merge the entity. The
66       *                default value is false. Setting merge to true is more
67       *                expensive and should only be true when shoppingOrder is
68       *                transient. See LEP-5473 for a detailed discussion of this
69       *                method.
70       * @return        true if the portlet can be displayed via Ajax
71       */
72      public static com.liferay.portlet.shopping.model.ShoppingOrder update(
73          com.liferay.portlet.shopping.model.ShoppingOrder shoppingOrder,
74          boolean merge) throws com.liferay.portal.SystemException {
75          return getPersistence().update(shoppingOrder, merge);
76      }
77  
78      public static com.liferay.portlet.shopping.model.ShoppingOrder updateImpl(
79          com.liferay.portlet.shopping.model.ShoppingOrder shoppingOrder,
80          boolean merge) throws com.liferay.portal.SystemException {
81          return getPersistence().updateImpl(shoppingOrder, merge);
82      }
83  
84      public static com.liferay.portlet.shopping.model.ShoppingOrder findByPrimaryKey(
85          long orderId)
86          throws com.liferay.portal.SystemException,
87              com.liferay.portlet.shopping.NoSuchOrderException {
88          return getPersistence().findByPrimaryKey(orderId);
89      }
90  
91      public static com.liferay.portlet.shopping.model.ShoppingOrder fetchByPrimaryKey(
92          long orderId) throws com.liferay.portal.SystemException {
93          return getPersistence().fetchByPrimaryKey(orderId);
94      }
95  
96      public static java.util.List<com.liferay.portlet.shopping.model.ShoppingOrder> findByGroupId(
97          long groupId) throws com.liferay.portal.SystemException {
98          return getPersistence().findByGroupId(groupId);
99      }
100 
101     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingOrder> findByGroupId(
102         long groupId, int start, int end)
103         throws com.liferay.portal.SystemException {
104         return getPersistence().findByGroupId(groupId, start, end);
105     }
106 
107     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingOrder> findByGroupId(
108         long groupId, int start, int end,
109         com.liferay.portal.kernel.util.OrderByComparator obc)
110         throws com.liferay.portal.SystemException {
111         return getPersistence().findByGroupId(groupId, start, end, obc);
112     }
113 
114     public static com.liferay.portlet.shopping.model.ShoppingOrder findByGroupId_First(
115         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
116         throws com.liferay.portal.SystemException,
117             com.liferay.portlet.shopping.NoSuchOrderException {
118         return getPersistence().findByGroupId_First(groupId, obc);
119     }
120 
121     public static com.liferay.portlet.shopping.model.ShoppingOrder findByGroupId_Last(
122         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
123         throws com.liferay.portal.SystemException,
124             com.liferay.portlet.shopping.NoSuchOrderException {
125         return getPersistence().findByGroupId_Last(groupId, obc);
126     }
127 
128     public static com.liferay.portlet.shopping.model.ShoppingOrder[] findByGroupId_PrevAndNext(
129         long orderId, long groupId,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException,
132             com.liferay.portlet.shopping.NoSuchOrderException {
133         return getPersistence().findByGroupId_PrevAndNext(orderId, groupId, obc);
134     }
135 
136     public static com.liferay.portlet.shopping.model.ShoppingOrder findByNumber(
137         java.lang.String number)
138         throws com.liferay.portal.SystemException,
139             com.liferay.portlet.shopping.NoSuchOrderException {
140         return getPersistence().findByNumber(number);
141     }
142 
143     public static com.liferay.portlet.shopping.model.ShoppingOrder fetchByNumber(
144         java.lang.String number) throws com.liferay.portal.SystemException {
145         return getPersistence().fetchByNumber(number);
146     }
147 
148     public static com.liferay.portlet.shopping.model.ShoppingOrder findByPPTxnId(
149         java.lang.String ppTxnId)
150         throws com.liferay.portal.SystemException,
151             com.liferay.portlet.shopping.NoSuchOrderException {
152         return getPersistence().findByPPTxnId(ppTxnId);
153     }
154 
155     public static com.liferay.portlet.shopping.model.ShoppingOrder fetchByPPTxnId(
156         java.lang.String ppTxnId) throws com.liferay.portal.SystemException {
157         return getPersistence().fetchByPPTxnId(ppTxnId);
158     }
159 
160     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingOrder> findByG_U_PPPS(
161         long groupId, long userId, java.lang.String ppPaymentStatus)
162         throws com.liferay.portal.SystemException {
163         return getPersistence().findByG_U_PPPS(groupId, userId, ppPaymentStatus);
164     }
165 
166     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingOrder> findByG_U_PPPS(
167         long groupId, long userId, java.lang.String ppPaymentStatus, int start,
168         int end) throws com.liferay.portal.SystemException {
169         return getPersistence()
170                    .findByG_U_PPPS(groupId, userId, ppPaymentStatus, start, end);
171     }
172 
173     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingOrder> findByG_U_PPPS(
174         long groupId, long userId, java.lang.String ppPaymentStatus, int start,
175         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
176         throws com.liferay.portal.SystemException {
177         return getPersistence()
178                    .findByG_U_PPPS(groupId, userId, ppPaymentStatus, start,
179             end, obc);
180     }
181 
182     public static com.liferay.portlet.shopping.model.ShoppingOrder findByG_U_PPPS_First(
183         long groupId, long userId, java.lang.String ppPaymentStatus,
184         com.liferay.portal.kernel.util.OrderByComparator obc)
185         throws com.liferay.portal.SystemException,
186             com.liferay.portlet.shopping.NoSuchOrderException {
187         return getPersistence()
188                    .findByG_U_PPPS_First(groupId, userId, ppPaymentStatus, obc);
189     }
190 
191     public static com.liferay.portlet.shopping.model.ShoppingOrder findByG_U_PPPS_Last(
192         long groupId, long userId, java.lang.String ppPaymentStatus,
193         com.liferay.portal.kernel.util.OrderByComparator obc)
194         throws com.liferay.portal.SystemException,
195             com.liferay.portlet.shopping.NoSuchOrderException {
196         return getPersistence()
197                    .findByG_U_PPPS_Last(groupId, userId, ppPaymentStatus, obc);
198     }
199 
200     public static com.liferay.portlet.shopping.model.ShoppingOrder[] findByG_U_PPPS_PrevAndNext(
201         long orderId, long groupId, long userId,
202         java.lang.String ppPaymentStatus,
203         com.liferay.portal.kernel.util.OrderByComparator obc)
204         throws com.liferay.portal.SystemException,
205             com.liferay.portlet.shopping.NoSuchOrderException {
206         return getPersistence()
207                    .findByG_U_PPPS_PrevAndNext(orderId, groupId, userId,
208             ppPaymentStatus, obc);
209     }
210 
211     public static java.util.List<Object> findWithDynamicQuery(
212         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
213         throws com.liferay.portal.SystemException {
214         return getPersistence().findWithDynamicQuery(dynamicQuery);
215     }
216 
217     public static java.util.List<Object> findWithDynamicQuery(
218         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
219         int end) throws com.liferay.portal.SystemException {
220         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
221     }
222 
223     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingOrder> findAll()
224         throws com.liferay.portal.SystemException {
225         return getPersistence().findAll();
226     }
227 
228     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingOrder> findAll(
229         int start, int end) throws com.liferay.portal.SystemException {
230         return getPersistence().findAll(start, end);
231     }
232 
233     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingOrder> findAll(
234         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
235         throws com.liferay.portal.SystemException {
236         return getPersistence().findAll(start, end, obc);
237     }
238 
239     public static void removeByGroupId(long groupId)
240         throws com.liferay.portal.SystemException {
241         getPersistence().removeByGroupId(groupId);
242     }
243 
244     public static void removeByNumber(java.lang.String number)
245         throws com.liferay.portal.SystemException,
246             com.liferay.portlet.shopping.NoSuchOrderException {
247         getPersistence().removeByNumber(number);
248     }
249 
250     public static void removeByPPTxnId(java.lang.String ppTxnId)
251         throws com.liferay.portal.SystemException,
252             com.liferay.portlet.shopping.NoSuchOrderException {
253         getPersistence().removeByPPTxnId(ppTxnId);
254     }
255 
256     public static void removeByG_U_PPPS(long groupId, long userId,
257         java.lang.String ppPaymentStatus)
258         throws com.liferay.portal.SystemException {
259         getPersistence().removeByG_U_PPPS(groupId, userId, ppPaymentStatus);
260     }
261 
262     public static void removeAll() throws com.liferay.portal.SystemException {
263         getPersistence().removeAll();
264     }
265 
266     public static int countByGroupId(long groupId)
267         throws com.liferay.portal.SystemException {
268         return getPersistence().countByGroupId(groupId);
269     }
270 
271     public static int countByNumber(java.lang.String number)
272         throws com.liferay.portal.SystemException {
273         return getPersistence().countByNumber(number);
274     }
275 
276     public static int countByPPTxnId(java.lang.String ppTxnId)
277         throws com.liferay.portal.SystemException {
278         return getPersistence().countByPPTxnId(ppTxnId);
279     }
280 
281     public static int countByG_U_PPPS(long groupId, long userId,
282         java.lang.String ppPaymentStatus)
283         throws com.liferay.portal.SystemException {
284         return getPersistence().countByG_U_PPPS(groupId, userId, ppPaymentStatus);
285     }
286 
287     public static int countAll() throws com.liferay.portal.SystemException {
288         return getPersistence().countAll();
289     }
290 
291     public static ShoppingOrderPersistence getPersistence() {
292         return _persistence;
293     }
294 
295     public void setPersistence(ShoppingOrderPersistence persistence) {
296         _persistence = persistence;
297     }
298 
299     private static ShoppingOrderPersistence _persistence;
300 }