1
14
15 package com.liferay.portlet.shopping.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18 import com.liferay.portal.kernel.util.MethodCache;
19 import com.liferay.portal.kernel.util.ReferenceRegistry;
20
21
41 public class ShoppingCouponLocalServiceUtil {
42 public static com.liferay.portlet.shopping.model.ShoppingCoupon addShoppingCoupon(
43 com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon)
44 throws com.liferay.portal.SystemException {
45 return getService().addShoppingCoupon(shoppingCoupon);
46 }
47
48 public static com.liferay.portlet.shopping.model.ShoppingCoupon createShoppingCoupon(
49 long couponId) {
50 return getService().createShoppingCoupon(couponId);
51 }
52
53 public static void deleteShoppingCoupon(long couponId)
54 throws com.liferay.portal.PortalException,
55 com.liferay.portal.SystemException {
56 getService().deleteShoppingCoupon(couponId);
57 }
58
59 public static void deleteShoppingCoupon(
60 com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon)
61 throws com.liferay.portal.SystemException {
62 getService().deleteShoppingCoupon(shoppingCoupon);
63 }
64
65 @SuppressWarnings("rawtypes")
66 public static java.util.List dynamicQuery(
67 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
68 throws com.liferay.portal.SystemException {
69 return getService().dynamicQuery(dynamicQuery);
70 }
71
72 @SuppressWarnings("rawtypes")
73 public static java.util.List dynamicQuery(
74 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
75 int end) throws com.liferay.portal.SystemException {
76 return getService().dynamicQuery(dynamicQuery, start, end);
77 }
78
79 @SuppressWarnings("rawtypes")
80 public static java.util.List dynamicQuery(
81 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
82 int end,
83 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
84 throws com.liferay.portal.SystemException {
85 return getService()
86 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
87 }
88
89 public static int dynamicQueryCount(
90 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
91 throws com.liferay.portal.SystemException {
92 return getService().dynamicQueryCount(dynamicQuery);
93 }
94
95 public static com.liferay.portlet.shopping.model.ShoppingCoupon getShoppingCoupon(
96 long couponId)
97 throws com.liferay.portal.PortalException,
98 com.liferay.portal.SystemException {
99 return getService().getShoppingCoupon(couponId);
100 }
101
102 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> getShoppingCoupons(
103 int start, int end) throws com.liferay.portal.SystemException {
104 return getService().getShoppingCoupons(start, end);
105 }
106
107 public static int getShoppingCouponsCount()
108 throws com.liferay.portal.SystemException {
109 return getService().getShoppingCouponsCount();
110 }
111
112 public static com.liferay.portlet.shopping.model.ShoppingCoupon updateShoppingCoupon(
113 com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon)
114 throws com.liferay.portal.SystemException {
115 return getService().updateShoppingCoupon(shoppingCoupon);
116 }
117
118 public static com.liferay.portlet.shopping.model.ShoppingCoupon updateShoppingCoupon(
119 com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon,
120 boolean merge) throws com.liferay.portal.SystemException {
121 return getService().updateShoppingCoupon(shoppingCoupon, merge);
122 }
123
124 public static com.liferay.portlet.shopping.model.ShoppingCoupon addCoupon(
125 long userId, java.lang.String code, boolean autoCode,
126 java.lang.String name, java.lang.String description,
127 int startDateMonth, int startDateDay, int startDateYear,
128 int startDateHour, int startDateMinute, int endDateMonth,
129 int endDateDay, int endDateYear, int endDateHour, int endDateMinute,
130 boolean neverExpire, boolean active, java.lang.String limitCategories,
131 java.lang.String limitSkus, double minOrder, double discount,
132 java.lang.String discountType,
133 com.liferay.portal.service.ServiceContext serviceContext)
134 throws com.liferay.portal.PortalException,
135 com.liferay.portal.SystemException {
136 return getService()
137 .addCoupon(userId, code, autoCode, name, description,
138 startDateMonth, startDateDay, startDateYear, startDateHour,
139 startDateMinute, endDateMonth, endDateDay, endDateYear,
140 endDateHour, endDateMinute, neverExpire, active, limitCategories,
141 limitSkus, minOrder, discount, discountType, serviceContext);
142 }
143
144 public static void deleteCoupon(long couponId)
145 throws com.liferay.portal.PortalException,
146 com.liferay.portal.SystemException {
147 getService().deleteCoupon(couponId);
148 }
149
150 public static void deleteCoupons(long groupId)
151 throws com.liferay.portal.SystemException {
152 getService().deleteCoupons(groupId);
153 }
154
155 public static com.liferay.portlet.shopping.model.ShoppingCoupon getCoupon(
156 long couponId)
157 throws com.liferay.portal.PortalException,
158 com.liferay.portal.SystemException {
159 return getService().getCoupon(couponId);
160 }
161
162 public static com.liferay.portlet.shopping.model.ShoppingCoupon getCoupon(
163 java.lang.String code)
164 throws com.liferay.portal.PortalException,
165 com.liferay.portal.SystemException {
166 return getService().getCoupon(code);
167 }
168
169 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> search(
170 long groupId, long companyId, java.lang.String code, boolean active,
171 java.lang.String discountType, boolean andOperator, int start, int end)
172 throws com.liferay.portal.SystemException {
173 return getService()
174 .search(groupId, companyId, code, active, discountType,
175 andOperator, start, end);
176 }
177
178 public static int searchCount(long groupId, long companyId,
179 java.lang.String code, boolean active, java.lang.String discountType,
180 boolean andOperator) throws com.liferay.portal.SystemException {
181 return getService()
182 .searchCount(groupId, companyId, code, active, discountType,
183 andOperator);
184 }
185
186 public static com.liferay.portlet.shopping.model.ShoppingCoupon updateCoupon(
187 long userId, long couponId, java.lang.String name,
188 java.lang.String description, int startDateMonth, int startDateDay,
189 int startDateYear, int startDateHour, int startDateMinute,
190 int endDateMonth, int endDateDay, int endDateYear, int endDateHour,
191 int endDateMinute, boolean neverExpire, boolean active,
192 java.lang.String limitCategories, java.lang.String limitSkus,
193 double minOrder, double discount, java.lang.String discountType,
194 com.liferay.portal.service.ServiceContext serviceContext)
195 throws com.liferay.portal.PortalException,
196 com.liferay.portal.SystemException {
197 return getService()
198 .updateCoupon(userId, couponId, name, description,
199 startDateMonth, startDateDay, startDateYear, startDateHour,
200 startDateMinute, endDateMonth, endDateDay, endDateYear,
201 endDateHour, endDateMinute, neverExpire, active, limitCategories,
202 limitSkus, minOrder, discount, discountType, serviceContext);
203 }
204
205 public static ShoppingCouponLocalService getService() {
206 if (_service == null) {
207 _service = (ShoppingCouponLocalService)PortalBeanLocatorUtil.locate(ShoppingCouponLocalService.class.getName());
208
209 ReferenceRegistry.registerReference(ShoppingCouponLocalServiceUtil.class,
210 "_service");
211 MethodCache.remove(ShoppingCouponLocalService.class);
212 }
213
214 return _service;
215 }
216
217 public void setService(ShoppingCouponLocalService service) {
218 MethodCache.remove(ShoppingCouponLocalService.class);
219
220 _service = service;
221
222 ReferenceRegistry.registerReference(ShoppingCouponLocalServiceUtil.class,
223 "_service");
224 MethodCache.remove(ShoppingCouponLocalService.class);
225 }
226
227 private static ShoppingCouponLocalService _service;
228 }