1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
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.PortalException,
50              com.liferay.portal.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.PortalException,
61              com.liferay.portal.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.PortalException,
68              com.liferay.portal.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.PortalException,
76              com.liferay.portal.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.PortalException,
92              com.liferay.portal.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 }