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="ShoppingCouponLocalServiceUtil.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 ShoppingCouponLocalService} 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       ShoppingCouponLocalService
37   * @generated
38   */
39  public class ShoppingCouponLocalServiceUtil {
40      public static com.liferay.portlet.shopping.model.ShoppingCoupon addShoppingCoupon(
41          com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon)
42          throws com.liferay.portal.SystemException {
43          return getService().addShoppingCoupon(shoppingCoupon);
44      }
45  
46      public static com.liferay.portlet.shopping.model.ShoppingCoupon createShoppingCoupon(
47          long couponId) {
48          return getService().createShoppingCoupon(couponId);
49      }
50  
51      public static void deleteShoppingCoupon(long couponId)
52          throws com.liferay.portal.PortalException,
53              com.liferay.portal.SystemException {
54          getService().deleteShoppingCoupon(couponId);
55      }
56  
57      public static void deleteShoppingCoupon(
58          com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon)
59          throws com.liferay.portal.SystemException {
60          getService().deleteShoppingCoupon(shoppingCoupon);
61      }
62  
63      public static java.util.List<Object> dynamicQuery(
64          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
65          throws com.liferay.portal.SystemException {
66          return getService().dynamicQuery(dynamicQuery);
67      }
68  
69      public static java.util.List<Object> dynamicQuery(
70          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
71          int end) throws com.liferay.portal.SystemException {
72          return getService().dynamicQuery(dynamicQuery, start, end);
73      }
74  
75      public static com.liferay.portlet.shopping.model.ShoppingCoupon getShoppingCoupon(
76          long couponId)
77          throws com.liferay.portal.PortalException,
78              com.liferay.portal.SystemException {
79          return getService().getShoppingCoupon(couponId);
80      }
81  
82      public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> getShoppingCoupons(
83          int start, int end) throws com.liferay.portal.SystemException {
84          return getService().getShoppingCoupons(start, end);
85      }
86  
87      public static int getShoppingCouponsCount()
88          throws com.liferay.portal.SystemException {
89          return getService().getShoppingCouponsCount();
90      }
91  
92      public static com.liferay.portlet.shopping.model.ShoppingCoupon updateShoppingCoupon(
93          com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon)
94          throws com.liferay.portal.SystemException {
95          return getService().updateShoppingCoupon(shoppingCoupon);
96      }
97  
98      public static com.liferay.portlet.shopping.model.ShoppingCoupon updateShoppingCoupon(
99          com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon,
100         boolean merge) throws com.liferay.portal.SystemException {
101         return getService().updateShoppingCoupon(shoppingCoupon, merge);
102     }
103 
104     public static com.liferay.portlet.shopping.model.ShoppingCoupon addCoupon(
105         long userId, long plid, java.lang.String code, boolean autoCode,
106         java.lang.String name, java.lang.String description,
107         int startDateMonth, int startDateDay, int startDateYear,
108         int startDateHour, int startDateMinute, int endDateMonth,
109         int endDateDay, int endDateYear, int endDateHour, int endDateMinute,
110         boolean neverExpire, boolean active, java.lang.String limitCategories,
111         java.lang.String limitSkus, double minOrder, double discount,
112         java.lang.String discountType)
113         throws com.liferay.portal.PortalException,
114             com.liferay.portal.SystemException {
115         return getService()
116                    .addCoupon(userId, plid, code, autoCode, name, description,
117             startDateMonth, startDateDay, startDateYear, startDateHour,
118             startDateMinute, endDateMonth, endDateDay, endDateYear,
119             endDateHour, endDateMinute, neverExpire, active, limitCategories,
120             limitSkus, minOrder, discount, discountType);
121     }
122 
123     public static void deleteCoupon(long couponId)
124         throws com.liferay.portal.PortalException,
125             com.liferay.portal.SystemException {
126         getService().deleteCoupon(couponId);
127     }
128 
129     public static void deleteCoupons(long groupId)
130         throws com.liferay.portal.SystemException {
131         getService().deleteCoupons(groupId);
132     }
133 
134     public static com.liferay.portlet.shopping.model.ShoppingCoupon getCoupon(
135         long couponId)
136         throws com.liferay.portal.PortalException,
137             com.liferay.portal.SystemException {
138         return getService().getCoupon(couponId);
139     }
140 
141     public static com.liferay.portlet.shopping.model.ShoppingCoupon getCoupon(
142         java.lang.String code)
143         throws com.liferay.portal.PortalException,
144             com.liferay.portal.SystemException {
145         return getService().getCoupon(code);
146     }
147 
148     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> search(
149         long plid, long companyId, java.lang.String code, boolean active,
150         java.lang.String discountType, boolean andOperator, int start, int end)
151         throws com.liferay.portal.SystemException {
152         return getService()
153                    .search(plid, companyId, code, active, discountType,
154             andOperator, start, end);
155     }
156 
157     public static int searchCount(long groupId, long companyId,
158         java.lang.String code, boolean active, java.lang.String discountType,
159         boolean andOperator) throws com.liferay.portal.SystemException {
160         return getService()
161                    .searchCount(groupId, companyId, code, active, discountType,
162             andOperator);
163     }
164 
165     public static com.liferay.portlet.shopping.model.ShoppingCoupon updateCoupon(
166         long userId, long couponId, java.lang.String name,
167         java.lang.String description, int startDateMonth, int startDateDay,
168         int startDateYear, int startDateHour, int startDateMinute,
169         int endDateMonth, int endDateDay, int endDateYear, int endDateHour,
170         int endDateMinute, boolean neverExpire, boolean active,
171         java.lang.String limitCategories, java.lang.String limitSkus,
172         double minOrder, double discount, java.lang.String discountType)
173         throws com.liferay.portal.PortalException,
174             com.liferay.portal.SystemException {
175         return getService()
176                    .updateCoupon(userId, couponId, name, description,
177             startDateMonth, startDateDay, startDateYear, startDateHour,
178             startDateMinute, endDateMonth, endDateDay, endDateYear,
179             endDateHour, endDateMinute, neverExpire, active, limitCategories,
180             limitSkus, minOrder, discount, discountType);
181     }
182 
183     public static ShoppingCouponLocalService getService() {
184         if (_service == null) {
185             _service = (ShoppingCouponLocalService)PortalBeanLocatorUtil.locate(ShoppingCouponLocalService.class.getName());
186         }
187 
188         return _service;
189     }
190 
191     public void setService(ShoppingCouponLocalService service) {
192         _service = service;
193     }
194 
195     private static ShoppingCouponLocalService _service;
196 }