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="ShoppingCouponLocalServiceUtil.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.ShoppingCouponLocalService</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.ShoppingCouponLocalServiceFactory</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.ShoppingCouponLocalService
50   * @see com.liferay.portlet.shopping.service.ShoppingCouponLocalServiceFactory
51   *
52   */
53  public class ShoppingCouponLocalServiceUtil {
54      public static com.liferay.portlet.shopping.model.ShoppingCoupon addShoppingCoupon(
55          com.liferay.portlet.shopping.model.ShoppingCoupon model)
56          throws com.liferay.portal.SystemException {
57          ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
58  
59          return shoppingCouponLocalService.addShoppingCoupon(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          ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
66  
67          return shoppingCouponLocalService.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          ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
74  
75          return shoppingCouponLocalService.dynamicQuery(queryInitializer, begin,
76              end);
77      }
78  
79      public static com.liferay.portlet.shopping.model.ShoppingCoupon updateShoppingCoupon(
80          com.liferay.portlet.shopping.model.ShoppingCoupon model)
81          throws com.liferay.portal.SystemException {
82          ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
83  
84          return shoppingCouponLocalService.updateShoppingCoupon(model);
85      }
86  
87      public static com.liferay.portlet.shopping.service.persistence.ShoppingCartPersistence getShoppingCartPersistence() {
88          ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
89  
90          return shoppingCouponLocalService.getShoppingCartPersistence();
91      }
92  
93      public static void setShoppingCartPersistence(
94          com.liferay.portlet.shopping.service.persistence.ShoppingCartPersistence shoppingCartPersistence) {
95          ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
96  
97          shoppingCouponLocalService.setShoppingCartPersistence(shoppingCartPersistence);
98      }
99  
100     public static com.liferay.portlet.shopping.service.persistence.ShoppingCategoryPersistence getShoppingCategoryPersistence() {
101         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
102 
103         return shoppingCouponLocalService.getShoppingCategoryPersistence();
104     }
105 
106     public static void setShoppingCategoryPersistence(
107         com.liferay.portlet.shopping.service.persistence.ShoppingCategoryPersistence shoppingCategoryPersistence) {
108         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
109 
110         shoppingCouponLocalService.setShoppingCategoryPersistence(shoppingCategoryPersistence);
111     }
112 
113     public static com.liferay.portlet.shopping.service.persistence.ShoppingCouponPersistence getShoppingCouponPersistence() {
114         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
115 
116         return shoppingCouponLocalService.getShoppingCouponPersistence();
117     }
118 
119     public static void setShoppingCouponPersistence(
120         com.liferay.portlet.shopping.service.persistence.ShoppingCouponPersistence shoppingCouponPersistence) {
121         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
122 
123         shoppingCouponLocalService.setShoppingCouponPersistence(shoppingCouponPersistence);
124     }
125 
126     public static com.liferay.portlet.shopping.service.persistence.ShoppingCouponFinder getShoppingCouponFinder() {
127         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
128 
129         return shoppingCouponLocalService.getShoppingCouponFinder();
130     }
131 
132     public static void setShoppingCouponFinder(
133         com.liferay.portlet.shopping.service.persistence.ShoppingCouponFinder shoppingCouponFinder) {
134         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
135 
136         shoppingCouponLocalService.setShoppingCouponFinder(shoppingCouponFinder);
137     }
138 
139     public static com.liferay.portlet.shopping.service.persistence.ShoppingItemPersistence getShoppingItemPersistence() {
140         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
141 
142         return shoppingCouponLocalService.getShoppingItemPersistence();
143     }
144 
145     public static void setShoppingItemPersistence(
146         com.liferay.portlet.shopping.service.persistence.ShoppingItemPersistence shoppingItemPersistence) {
147         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
148 
149         shoppingCouponLocalService.setShoppingItemPersistence(shoppingItemPersistence);
150     }
151 
152     public static com.liferay.portlet.shopping.service.persistence.ShoppingItemFinder getShoppingItemFinder() {
153         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
154 
155         return shoppingCouponLocalService.getShoppingItemFinder();
156     }
157 
158     public static void setShoppingItemFinder(
159         com.liferay.portlet.shopping.service.persistence.ShoppingItemFinder shoppingItemFinder) {
160         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
161 
162         shoppingCouponLocalService.setShoppingItemFinder(shoppingItemFinder);
163     }
164 
165     public static com.liferay.portlet.shopping.service.persistence.ShoppingItemFieldPersistence getShoppingItemFieldPersistence() {
166         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
167 
168         return shoppingCouponLocalService.getShoppingItemFieldPersistence();
169     }
170 
171     public static void setShoppingItemFieldPersistence(
172         com.liferay.portlet.shopping.service.persistence.ShoppingItemFieldPersistence shoppingItemFieldPersistence) {
173         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
174 
175         shoppingCouponLocalService.setShoppingItemFieldPersistence(shoppingItemFieldPersistence);
176     }
177 
178     public static com.liferay.portlet.shopping.service.persistence.ShoppingItemPricePersistence getShoppingItemPricePersistence() {
179         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
180 
181         return shoppingCouponLocalService.getShoppingItemPricePersistence();
182     }
183 
184     public static void setShoppingItemPricePersistence(
185         com.liferay.portlet.shopping.service.persistence.ShoppingItemPricePersistence shoppingItemPricePersistence) {
186         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
187 
188         shoppingCouponLocalService.setShoppingItemPricePersistence(shoppingItemPricePersistence);
189     }
190 
191     public static com.liferay.portlet.shopping.service.persistence.ShoppingOrderPersistence getShoppingOrderPersistence() {
192         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
193 
194         return shoppingCouponLocalService.getShoppingOrderPersistence();
195     }
196 
197     public static void setShoppingOrderPersistence(
198         com.liferay.portlet.shopping.service.persistence.ShoppingOrderPersistence shoppingOrderPersistence) {
199         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
200 
201         shoppingCouponLocalService.setShoppingOrderPersistence(shoppingOrderPersistence);
202     }
203 
204     public static com.liferay.portlet.shopping.service.persistence.ShoppingOrderFinder getShoppingOrderFinder() {
205         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
206 
207         return shoppingCouponLocalService.getShoppingOrderFinder();
208     }
209 
210     public static void setShoppingOrderFinder(
211         com.liferay.portlet.shopping.service.persistence.ShoppingOrderFinder shoppingOrderFinder) {
212         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
213 
214         shoppingCouponLocalService.setShoppingOrderFinder(shoppingOrderFinder);
215     }
216 
217     public static com.liferay.portlet.shopping.service.persistence.ShoppingOrderItemPersistence getShoppingOrderItemPersistence() {
218         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
219 
220         return shoppingCouponLocalService.getShoppingOrderItemPersistence();
221     }
222 
223     public static void setShoppingOrderItemPersistence(
224         com.liferay.portlet.shopping.service.persistence.ShoppingOrderItemPersistence shoppingOrderItemPersistence) {
225         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
226 
227         shoppingCouponLocalService.setShoppingOrderItemPersistence(shoppingOrderItemPersistence);
228     }
229 
230     public static com.liferay.portal.service.persistence.UserPersistence getUserPersistence() {
231         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
232 
233         return shoppingCouponLocalService.getUserPersistence();
234     }
235 
236     public static void setUserPersistence(
237         com.liferay.portal.service.persistence.UserPersistence userPersistence) {
238         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
239 
240         shoppingCouponLocalService.setUserPersistence(userPersistence);
241     }
242 
243     public static com.liferay.portal.service.persistence.UserFinder getUserFinder() {
244         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
245 
246         return shoppingCouponLocalService.getUserFinder();
247     }
248 
249     public static void setUserFinder(
250         com.liferay.portal.service.persistence.UserFinder userFinder) {
251         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
252 
253         shoppingCouponLocalService.setUserFinder(userFinder);
254     }
255 
256     public static void afterPropertiesSet() {
257         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
258 
259         shoppingCouponLocalService.afterPropertiesSet();
260     }
261 
262     public static com.liferay.portlet.shopping.model.ShoppingCoupon addCoupon(
263         long userId, long plid, java.lang.String code, boolean autoCode,
264         java.lang.String name, java.lang.String description,
265         int startDateMonth, int startDateDay, int startDateYear,
266         int startDateHour, int startDateMinute, int endDateMonth,
267         int endDateDay, int endDateYear, int endDateHour, int endDateMinute,
268         boolean neverExpire, boolean active, java.lang.String limitCategories,
269         java.lang.String limitSkus, double minOrder, double discount,
270         java.lang.String discountType)
271         throws com.liferay.portal.PortalException, 
272             com.liferay.portal.SystemException {
273         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
274 
275         return shoppingCouponLocalService.addCoupon(userId, plid, code,
276             autoCode, name, description, startDateMonth, startDateDay,
277             startDateYear, startDateHour, startDateMinute, endDateMonth,
278             endDateDay, endDateYear, endDateHour, endDateMinute, neverExpire,
279             active, limitCategories, limitSkus, minOrder, discount, discountType);
280     }
281 
282     public static void deleteCoupon(long couponId)
283         throws com.liferay.portal.PortalException, 
284             com.liferay.portal.SystemException {
285         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
286 
287         shoppingCouponLocalService.deleteCoupon(couponId);
288     }
289 
290     public static void deleteCoupons(long groupId)
291         throws com.liferay.portal.SystemException {
292         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
293 
294         shoppingCouponLocalService.deleteCoupons(groupId);
295     }
296 
297     public static com.liferay.portlet.shopping.model.ShoppingCoupon getCoupon(
298         long couponId)
299         throws com.liferay.portal.PortalException, 
300             com.liferay.portal.SystemException {
301         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
302 
303         return shoppingCouponLocalService.getCoupon(couponId);
304     }
305 
306     public static com.liferay.portlet.shopping.model.ShoppingCoupon getCoupon(
307         java.lang.String code)
308         throws com.liferay.portal.PortalException, 
309             com.liferay.portal.SystemException {
310         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
311 
312         return shoppingCouponLocalService.getCoupon(code);
313     }
314 
315     public static java.util.List search(long plid, long companyId,
316         java.lang.String code, boolean active, java.lang.String discountType,
317         boolean andOperator, int begin, int end)
318         throws com.liferay.portal.SystemException {
319         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
320 
321         return shoppingCouponLocalService.search(plid, companyId, code, active,
322             discountType, andOperator, begin, end);
323     }
324 
325     public static int searchCount(long groupId, long companyId,
326         java.lang.String code, boolean active, java.lang.String discountType,
327         boolean andOperator) throws com.liferay.portal.SystemException {
328         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
329 
330         return shoppingCouponLocalService.searchCount(groupId, companyId, code,
331             active, discountType, andOperator);
332     }
333 
334     public static com.liferay.portlet.shopping.model.ShoppingCoupon updateCoupon(
335         long userId, long couponId, java.lang.String name,
336         java.lang.String description, int startDateMonth, int startDateDay,
337         int startDateYear, int startDateHour, int startDateMinute,
338         int endDateMonth, int endDateDay, int endDateYear, int endDateHour,
339         int endDateMinute, boolean neverExpire, boolean active,
340         java.lang.String limitCategories, java.lang.String limitSkus,
341         double minOrder, double discount, java.lang.String discountType)
342         throws com.liferay.portal.PortalException, 
343             com.liferay.portal.SystemException {
344         ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
345 
346         return shoppingCouponLocalService.updateCoupon(userId, couponId, name,
347             description, startDateMonth, startDateDay, startDateYear,
348             startDateHour, startDateMinute, endDateMonth, endDateDay,
349             endDateYear, endDateHour, endDateMinute, neverExpire, active,
350             limitCategories, limitSkus, minOrder, discount, discountType);
351     }
352 }