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;
24  
25  
26  /**
27   * <a href="ShoppingCartLocalServiceUtil.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   * <p>
35   * This class provides static methods for the
36   * <code>com.liferay.portlet.shopping.service.ShoppingCartLocalService</code>
37   * bean. The static methods of this class calls the same methods of the bean
38   * instance. It's convenient to be able to just write one line to call a method
39   * on a bean instead of writing a lookup call and a method call.
40   * </p>
41   *
42   * <p>
43   * <code>com.liferay.portlet.shopping.service.ShoppingCartLocalServiceFactory</code>
44   * is responsible for the lookup of the bean.
45   * </p>
46   *
47   * @author Brian Wing Shun Chan
48   *
49   * @see com.liferay.portlet.shopping.service.ShoppingCartLocalService
50   * @see com.liferay.portlet.shopping.service.ShoppingCartLocalServiceFactory
51   *
52   */
53  public class ShoppingCartLocalServiceUtil {
54      public static com.liferay.portlet.shopping.model.ShoppingCart addShoppingCart(
55          com.liferay.portlet.shopping.model.ShoppingCart model)
56          throws com.liferay.portal.SystemException {
57          ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
58  
59          return shoppingCartLocalService.addShoppingCart(model);
60      }
61  
62      public static java.util.List dynamicQuery(
63          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
64          throws com.liferay.portal.SystemException {
65          ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
66  
67          return shoppingCartLocalService.dynamicQuery(queryInitializer);
68      }
69  
70      public static java.util.List dynamicQuery(
71          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
72          int begin, int end) throws com.liferay.portal.SystemException {
73          ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
74  
75          return shoppingCartLocalService.dynamicQuery(queryInitializer, begin,
76              end);
77      }
78  
79      public static com.liferay.portlet.shopping.model.ShoppingCart updateShoppingCart(
80          com.liferay.portlet.shopping.model.ShoppingCart model)
81          throws com.liferay.portal.SystemException {
82          ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
83  
84          return shoppingCartLocalService.updateShoppingCart(model);
85      }
86  
87      public static com.liferay.portlet.shopping.service.persistence.ShoppingCartPersistence getShoppingCartPersistence() {
88          ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
89  
90          return shoppingCartLocalService.getShoppingCartPersistence();
91      }
92  
93      public static void setShoppingCartPersistence(
94          com.liferay.portlet.shopping.service.persistence.ShoppingCartPersistence shoppingCartPersistence) {
95          ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
96  
97          shoppingCartLocalService.setShoppingCartPersistence(shoppingCartPersistence);
98      }
99  
100     public static com.liferay.portlet.shopping.service.persistence.ShoppingCategoryPersistence getShoppingCategoryPersistence() {
101         ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
102 
103         return shoppingCartLocalService.getShoppingCategoryPersistence();
104     }
105 
106     public static void setShoppingCategoryPersistence(
107         com.liferay.portlet.shopping.service.persistence.ShoppingCategoryPersistence shoppingCategoryPersistence) {
108         ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
109 
110         shoppingCartLocalService.setShoppingCategoryPersistence(shoppingCategoryPersistence);
111     }
112 
113     public static com.liferay.portlet.shopping.service.persistence.ShoppingCouponPersistence getShoppingCouponPersistence() {
114         ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
115 
116         return shoppingCartLocalService.getShoppingCouponPersistence();
117     }
118 
119     public static void setShoppingCouponPersistence(
120         com.liferay.portlet.shopping.service.persistence.ShoppingCouponPersistence shoppingCouponPersistence) {
121         ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
122 
123         shoppingCartLocalService.setShoppingCouponPersistence(shoppingCouponPersistence);
124     }
125 
126     public static com.liferay.portlet.shopping.service.persistence.ShoppingCouponFinder getShoppingCouponFinder() {
127         ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
128 
129         return shoppingCartLocalService.getShoppingCouponFinder();
130     }
131 
132     public static void setShoppingCouponFinder(
133         com.liferay.portlet.shopping.service.persistence.ShoppingCouponFinder shoppingCouponFinder) {
134         ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
135 
136         shoppingCartLocalService.setShoppingCouponFinder(shoppingCouponFinder);
137     }
138 
139     public static com.liferay.portlet.shopping.service.persistence.ShoppingItemPersistence getShoppingItemPersistence() {
140         ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
141 
142         return shoppingCartLocalService.getShoppingItemPersistence();
143     }
144 
145     public static void setShoppingItemPersistence(
146         com.liferay.portlet.shopping.service.persistence.ShoppingItemPersistence shoppingItemPersistence) {
147         ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
148 
149         shoppingCartLocalService.setShoppingItemPersistence(shoppingItemPersistence);
150     }
151 
152     public static com.liferay.portlet.shopping.service.persistence.ShoppingItemFinder getShoppingItemFinder() {
153         ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
154 
155         return shoppingCartLocalService.getShoppingItemFinder();
156     }
157 
158     public static void setShoppingItemFinder(
159         com.liferay.portlet.shopping.service.persistence.ShoppingItemFinder shoppingItemFinder) {
160         ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
161 
162         shoppingCartLocalService.setShoppingItemFinder(shoppingItemFinder);
163     }
164 
165     public static com.liferay.portlet.shopping.service.persistence.ShoppingItemFieldPersistence getShoppingItemFieldPersistence() {
166         ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
167 
168         return shoppingCartLocalService.getShoppingItemFieldPersistence();
169     }
170 
171     public static void setShoppingItemFieldPersistence(
172         com.liferay.portlet.shopping.service.persistence.ShoppingItemFieldPersistence shoppingItemFieldPersistence) {
173         ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
174 
175         shoppingCartLocalService.setShoppingItemFieldPersistence(shoppingItemFieldPersistence);
176     }
177 
178     public static com.liferay.portlet.shopping.service.persistence.ShoppingItemPricePersistence getShoppingItemPricePersistence() {
179         ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
180 
181         return shoppingCartLocalService.getShoppingItemPricePersistence();
182     }
183 
184     public static void setShoppingItemPricePersistence(
185         com.liferay.portlet.shopping.service.persistence.ShoppingItemPricePersistence shoppingItemPricePersistence) {
186         ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
187 
188         shoppingCartLocalService.setShoppingItemPricePersistence(shoppingItemPricePersistence);
189     }
190 
191     public static com.liferay.portlet.shopping.service.persistence.ShoppingOrderPersistence getShoppingOrderPersistence() {
192         ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
193 
194         return shoppingCartLocalService.getShoppingOrderPersistence();
195     }
196 
197     public static void setShoppingOrderPersistence(
198         com.liferay.portlet.shopping.service.persistence.ShoppingOrderPersistence shoppingOrderPersistence) {
199         ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
200 
201         shoppingCartLocalService.setShoppingOrderPersistence(shoppingOrderPersistence);
202     }
203 
204     public static com.liferay.portlet.shopping.service.persistence.ShoppingOrderFinder getShoppingOrderFinder() {
205         ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
206 
207         return shoppingCartLocalService.getShoppingOrderFinder();
208     }
209 
210     public static void setShoppingOrderFinder(
211         com.liferay.portlet.shopping.service.persistence.ShoppingOrderFinder shoppingOrderFinder) {
212         ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
213 
214         shoppingCartLocalService.setShoppingOrderFinder(shoppingOrderFinder);
215     }
216 
217     public static com.liferay.portlet.shopping.service.persistence.ShoppingOrderItemPersistence getShoppingOrderItemPersistence() {
218         ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
219 
220         return shoppingCartLocalService.getShoppingOrderItemPersistence();
221     }
222 
223     public static void setShoppingOrderItemPersistence(
224         com.liferay.portlet.shopping.service.persistence.ShoppingOrderItemPersistence shoppingOrderItemPersistence) {
225         ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
226 
227         shoppingCartLocalService.setShoppingOrderItemPersistence(shoppingOrderItemPersistence);
228     }
229 
230     public static com.liferay.portal.service.persistence.UserPersistence getUserPersistence() {
231         ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
232 
233         return shoppingCartLocalService.getUserPersistence();
234     }
235 
236     public static void setUserPersistence(
237         com.liferay.portal.service.persistence.UserPersistence userPersistence) {
238         ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
239 
240         shoppingCartLocalService.setUserPersistence(userPersistence);
241     }
242 
243     public static com.liferay.portal.service.persistence.UserFinder getUserFinder() {
244         ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
245 
246         return shoppingCartLocalService.getUserFinder();
247     }
248 
249     public static void setUserFinder(
250         com.liferay.portal.service.persistence.UserFinder userFinder) {
251         ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
252 
253         shoppingCartLocalService.setUserFinder(userFinder);
254     }
255 
256     public static void afterPropertiesSet() {
257         ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
258 
259         shoppingCartLocalService.afterPropertiesSet();
260     }
261 
262     public static void deleteGroupCarts(long groupId)
263         throws com.liferay.portal.SystemException {
264         ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
265 
266         shoppingCartLocalService.deleteGroupCarts(groupId);
267     }
268 
269     public static void deleteUserCarts(long userId)
270         throws com.liferay.portal.SystemException {
271         ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
272 
273         shoppingCartLocalService.deleteUserCarts(userId);
274     }
275 
276     public static com.liferay.portlet.shopping.model.ShoppingCart getCart(
277         long userId, long groupId)
278         throws com.liferay.portal.PortalException, 
279             com.liferay.portal.SystemException {
280         ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
281 
282         return shoppingCartLocalService.getCart(userId, groupId);
283     }
284 
285     public static java.util.Map getItems(long groupId, java.lang.String itemIds)
286         throws com.liferay.portal.SystemException {
287         ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
288 
289         return shoppingCartLocalService.getItems(groupId, itemIds);
290     }
291 
292     public static com.liferay.portlet.shopping.model.ShoppingCart updateCart(
293         long userId, long groupId, java.lang.String itemIds,
294         java.lang.String couponCodes, int altShipping, boolean insure)
295         throws com.liferay.portal.PortalException, 
296             com.liferay.portal.SystemException {
297         ShoppingCartLocalService shoppingCartLocalService = ShoppingCartLocalServiceFactory.getService();
298 
299         return shoppingCartLocalService.updateCart(userId, groupId, itemIds,
300             couponCodes, altShipping, insure);
301     }
302 }