1
14
15 package com.liferay.portlet.shopping.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18
19
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 java.util.List<Object> dynamicQuery(
76 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
77 int end,
78 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
79 throws com.liferay.portal.SystemException {
80 return getService()
81 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
82 }
83
84 public static int dynamicQueryCount(
85 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
86 throws com.liferay.portal.SystemException {
87 return getService().dynamicQueryCount(dynamicQuery);
88 }
89
90 public static com.liferay.portlet.shopping.model.ShoppingCoupon getShoppingCoupon(
91 long couponId)
92 throws com.liferay.portal.PortalException,
93 com.liferay.portal.SystemException {
94 return getService().getShoppingCoupon(couponId);
95 }
96
97 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> getShoppingCoupons(
98 int start, int end) throws com.liferay.portal.SystemException {
99 return getService().getShoppingCoupons(start, end);
100 }
101
102 public static int getShoppingCouponsCount()
103 throws com.liferay.portal.SystemException {
104 return getService().getShoppingCouponsCount();
105 }
106
107 public static com.liferay.portlet.shopping.model.ShoppingCoupon updateShoppingCoupon(
108 com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon)
109 throws com.liferay.portal.SystemException {
110 return getService().updateShoppingCoupon(shoppingCoupon);
111 }
112
113 public static com.liferay.portlet.shopping.model.ShoppingCoupon updateShoppingCoupon(
114 com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon,
115 boolean merge) throws com.liferay.portal.SystemException {
116 return getService().updateShoppingCoupon(shoppingCoupon, merge);
117 }
118
119 public static com.liferay.portlet.shopping.model.ShoppingCoupon addCoupon(
120 long userId, java.lang.String code, boolean autoCode,
121 java.lang.String name, java.lang.String description,
122 int startDateMonth, int startDateDay, int startDateYear,
123 int startDateHour, int startDateMinute, int endDateMonth,
124 int endDateDay, int endDateYear, int endDateHour, int endDateMinute,
125 boolean neverExpire, boolean active, java.lang.String limitCategories,
126 java.lang.String limitSkus, double minOrder, double discount,
127 java.lang.String discountType,
128 com.liferay.portal.service.ServiceContext serviceContext)
129 throws com.liferay.portal.PortalException,
130 com.liferay.portal.SystemException {
131 return getService()
132 .addCoupon(userId, code, autoCode, name, description,
133 startDateMonth, startDateDay, startDateYear, startDateHour,
134 startDateMinute, endDateMonth, endDateDay, endDateYear,
135 endDateHour, endDateMinute, neverExpire, active, limitCategories,
136 limitSkus, minOrder, discount, discountType, serviceContext);
137 }
138
139 public static void deleteCoupon(long couponId)
140 throws com.liferay.portal.PortalException,
141 com.liferay.portal.SystemException {
142 getService().deleteCoupon(couponId);
143 }
144
145 public static void deleteCoupons(long groupId)
146 throws com.liferay.portal.SystemException {
147 getService().deleteCoupons(groupId);
148 }
149
150 public static com.liferay.portlet.shopping.model.ShoppingCoupon getCoupon(
151 long couponId)
152 throws com.liferay.portal.PortalException,
153 com.liferay.portal.SystemException {
154 return getService().getCoupon(couponId);
155 }
156
157 public static com.liferay.portlet.shopping.model.ShoppingCoupon getCoupon(
158 java.lang.String code)
159 throws com.liferay.portal.PortalException,
160 com.liferay.portal.SystemException {
161 return getService().getCoupon(code);
162 }
163
164 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> search(
165 long groupId, long companyId, java.lang.String code, boolean active,
166 java.lang.String discountType, boolean andOperator, int start, int end)
167 throws com.liferay.portal.SystemException {
168 return getService()
169 .search(groupId, companyId, code, active, discountType,
170 andOperator, start, end);
171 }
172
173 public static int searchCount(long groupId, long companyId,
174 java.lang.String code, boolean active, java.lang.String discountType,
175 boolean andOperator) throws com.liferay.portal.SystemException {
176 return getService()
177 .searchCount(groupId, companyId, code, active, discountType,
178 andOperator);
179 }
180
181 public static com.liferay.portlet.shopping.model.ShoppingCoupon updateCoupon(
182 long userId, long couponId, java.lang.String name,
183 java.lang.String description, int startDateMonth, int startDateDay,
184 int startDateYear, int startDateHour, int startDateMinute,
185 int endDateMonth, int endDateDay, int endDateYear, int endDateHour,
186 int endDateMinute, boolean neverExpire, boolean active,
187 java.lang.String limitCategories, java.lang.String limitSkus,
188 double minOrder, double discount, java.lang.String discountType,
189 com.liferay.portal.service.ServiceContext serviceContext)
190 throws com.liferay.portal.PortalException,
191 com.liferay.portal.SystemException {
192 return getService()
193 .updateCoupon(userId, couponId, name, description,
194 startDateMonth, startDateDay, startDateYear, startDateHour,
195 startDateMinute, endDateMonth, endDateDay, endDateYear,
196 endDateHour, endDateMinute, neverExpire, active, limitCategories,
197 limitSkus, minOrder, discount, discountType, serviceContext);
198 }
199
200 public static ShoppingCouponLocalService getService() {
201 if (_service == null) {
202 _service = (ShoppingCouponLocalService)PortalBeanLocatorUtil.locate(ShoppingCouponLocalService.class.getName());
203 }
204
205 return _service;
206 }
207
208 public void setService(ShoppingCouponLocalService service) {
209 _service = service;
210 }
211
212 private static ShoppingCouponLocalService _service;
213 }