1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.shopping.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="ShoppingCouponServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link ShoppingCouponService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       ShoppingCouponService
37   * @generated
38   */
39  public class ShoppingCouponServiceUtil {
40      public static com.liferay.portlet.shopping.model.ShoppingCoupon addCoupon(
41          java.lang.String code, boolean autoCode, java.lang.String name,
42          java.lang.String description, int startDateMonth, int startDateDay,
43          int startDateYear, int startDateHour, int startDateMinute,
44          int endDateMonth, int endDateDay, int endDateYear, int endDateHour,
45          int endDateMinute, boolean neverExpire, boolean active,
46          java.lang.String limitCategories, java.lang.String limitSkus,
47          double minOrder, double discount, java.lang.String discountType,
48          com.liferay.portal.service.ServiceContext serviceContext)
49          throws com.liferay.portal.kernel.exception.PortalException,
50              com.liferay.portal.kernel.exception.SystemException {
51          return getService()
52                     .addCoupon(code, autoCode, name, description,
53              startDateMonth, startDateDay, startDateYear, startDateHour,
54              startDateMinute, endDateMonth, endDateDay, endDateYear,
55              endDateHour, endDateMinute, neverExpire, active, limitCategories,
56              limitSkus, minOrder, discount, discountType, serviceContext);
57      }
58  
59      public static void deleteCoupon(long groupId, long couponId)
60          throws com.liferay.portal.kernel.exception.PortalException,
61              com.liferay.portal.kernel.exception.SystemException {
62          getService().deleteCoupon(groupId, couponId);
63      }
64  
65      public static com.liferay.portlet.shopping.model.ShoppingCoupon getCoupon(
66          long groupId, long couponId)
67          throws com.liferay.portal.kernel.exception.PortalException,
68              com.liferay.portal.kernel.exception.SystemException {
69          return getService().getCoupon(groupId, couponId);
70      }
71  
72      public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> search(
73          long groupId, long companyId, java.lang.String code, boolean active,
74          java.lang.String discountType, boolean andOperator, int start, int end)
75          throws com.liferay.portal.kernel.exception.PortalException,
76              com.liferay.portal.kernel.exception.SystemException {
77          return getService()
78                     .search(groupId, companyId, code, active, discountType,
79              andOperator, start, end);
80      }
81  
82      public static com.liferay.portlet.shopping.model.ShoppingCoupon updateCoupon(
83          long couponId, java.lang.String name, java.lang.String description,
84          int startDateMonth, int startDateDay, int startDateYear,
85          int startDateHour, int startDateMinute, int endDateMonth,
86          int endDateDay, int endDateYear, int endDateHour, int endDateMinute,
87          boolean neverExpire, boolean active, java.lang.String limitCategories,
88          java.lang.String limitSkus, double minOrder, double discount,
89          java.lang.String discountType,
90          com.liferay.portal.service.ServiceContext serviceContext)
91          throws com.liferay.portal.kernel.exception.PortalException,
92              com.liferay.portal.kernel.exception.SystemException {
93          return getService()
94                     .updateCoupon(couponId, name, description, startDateMonth,
95              startDateDay, startDateYear, startDateHour, startDateMinute,
96              endDateMonth, endDateDay, endDateYear, endDateHour, endDateMinute,
97              neverExpire, active, limitCategories, limitSkus, minOrder,
98              discount, discountType, serviceContext);
99      }
100 
101     public static ShoppingCouponService getService() {
102         if (_service == null) {
103             _service = (ShoppingCouponService)PortalBeanLocatorUtil.locate(ShoppingCouponService.class.getName());
104         }
105 
106         return _service;
107     }
108 
109     public void setService(ShoppingCouponService service) {
110         _service = service;
111     }
112 
113     private static ShoppingCouponService _service;
114 }