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          long plid, java.lang.String code, boolean autoCode,
42          java.lang.String name, java.lang.String description,
43          int startDateMonth, int startDateDay, int startDateYear,
44          int startDateHour, int startDateMinute, int endDateMonth,
45          int endDateDay, int endDateYear, int endDateHour, int endDateMinute,
46          boolean neverExpire, boolean active, java.lang.String limitCategories,
47          java.lang.String limitSkus, double minOrder, double discount,
48          java.lang.String discountType)
49          throws com.liferay.portal.PortalException,
50              com.liferay.portal.SystemException, java.rmi.RemoteException {
51          return getService()
52                     .addCoupon(plid, 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);
57      }
58  
59      public static void deleteCoupon(long plid, long couponId)
60          throws com.liferay.portal.PortalException,
61              com.liferay.portal.SystemException, java.rmi.RemoteException {
62          getService().deleteCoupon(plid, couponId);
63      }
64  
65      public static com.liferay.portlet.shopping.model.ShoppingCoupon getCoupon(
66          long plid, long couponId)
67          throws com.liferay.portal.PortalException,
68              com.liferay.portal.SystemException, java.rmi.RemoteException {
69          return getService().getCoupon(plid, couponId);
70      }
71  
72      public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> search(
73          long plid, 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, java.rmi.RemoteException {
77          return getService()
78                     .search(plid, companyId, code, active, discountType,
79              andOperator, start, end);
80      }
81  
82      public static com.liferay.portlet.shopping.model.ShoppingCoupon updateCoupon(
83          long plid, long couponId, java.lang.String name,
84          java.lang.String description, int startDateMonth, int startDateDay,
85          int startDateYear, int startDateHour, int startDateMinute,
86          int endDateMonth, int endDateDay, int endDateYear, int endDateHour,
87          int endDateMinute, boolean neverExpire, boolean active,
88          java.lang.String limitCategories, java.lang.String limitSkus,
89          double minOrder, double discount, java.lang.String discountType)
90          throws com.liferay.portal.PortalException,
91              com.liferay.portal.SystemException, java.rmi.RemoteException {
92          return getService()
93                     .updateCoupon(plid, couponId, name, description,
94              startDateMonth, startDateDay, startDateYear, startDateHour,
95              startDateMinute, endDateMonth, endDateDay, endDateYear,
96              endDateHour, endDateMinute, neverExpire, active, limitCategories,
97              limitSkus, minOrder, discount, discountType);
98      }
99  
100     public static ShoppingCouponService getService() {
101         if (_service == null) {
102             _service = (ShoppingCouponService)PortalBeanLocatorUtil.locate(ShoppingCouponService.class.getName());
103         }
104 
105         return _service;
106     }
107 
108     public void setService(ShoppingCouponService service) {
109         _service = service;
110     }
111 
112     private static ShoppingCouponService _service;
113 }