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