1
22
23 package com.liferay.portlet.shopping.service;
24
25
26
46 public class ShoppingCouponServiceUtil {
47 public static com.liferay.portlet.shopping.model.ShoppingCoupon addCoupon(
48 java.lang.String code, boolean autoCode, java.lang.String name,
49 java.lang.String description, int startDateMonth, int startDateDay,
50 int startDateYear, int startDateHour, int startDateMinute,
51 int endDateMonth, int endDateDay, int endDateYear, int endDateHour,
52 int endDateMinute, boolean neverExpire, boolean active,
53 java.lang.String limitCategories, java.lang.String limitSkus,
54 double minOrder, double discount, java.lang.String discountType,
55 com.liferay.portal.service.ServiceContext serviceContext)
56 throws com.liferay.portal.PortalException,
57 com.liferay.portal.SystemException {
58 return getService()
59 .addCoupon(code, autoCode, name, description,
60 startDateMonth, startDateDay, startDateYear, startDateHour,
61 startDateMinute, endDateMonth, endDateDay, endDateYear,
62 endDateHour, endDateMinute, neverExpire, active, limitCategories,
63 limitSkus, minOrder, discount, discountType, serviceContext);
64 }
65
66 public static void deleteCoupon(long groupId, long couponId)
67 throws com.liferay.portal.PortalException,
68 com.liferay.portal.SystemException {
69 getService().deleteCoupon(groupId, couponId);
70 }
71
72 public static com.liferay.portlet.shopping.model.ShoppingCoupon getCoupon(
73 long groupId, long couponId)
74 throws com.liferay.portal.PortalException,
75 com.liferay.portal.SystemException {
76 return getService().getCoupon(groupId, couponId);
77 }
78
79 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> search(
80 long groupId, long companyId, java.lang.String code, boolean active,
81 java.lang.String discountType, boolean andOperator, int start, int end)
82 throws com.liferay.portal.PortalException,
83 com.liferay.portal.SystemException {
84 return getService()
85 .search(groupId, companyId, code, active, discountType,
86 andOperator, start, end);
87 }
88
89 public static com.liferay.portlet.shopping.model.ShoppingCoupon updateCoupon(
90 long couponId, java.lang.String name, java.lang.String description,
91 int startDateMonth, int startDateDay, int startDateYear,
92 int startDateHour, int startDateMinute, int endDateMonth,
93 int endDateDay, int endDateYear, int endDateHour, int endDateMinute,
94 boolean neverExpire, boolean active, java.lang.String limitCategories,
95 java.lang.String limitSkus, double minOrder, double discount,
96 java.lang.String discountType,
97 com.liferay.portal.service.ServiceContext serviceContext)
98 throws com.liferay.portal.PortalException,
99 com.liferay.portal.SystemException {
100 return getService()
101 .updateCoupon(couponId, name, description, startDateMonth,
102 startDateDay, startDateYear, startDateHour, startDateMinute,
103 endDateMonth, endDateDay, endDateYear, endDateHour, endDateMinute,
104 neverExpire, active, limitCategories, limitSkus, minOrder,
105 discount, discountType, serviceContext);
106 }
107
108 public static ShoppingCouponService getService() {
109 if (_service == null) {
110 throw new RuntimeException("ShoppingCouponService is not set");
111 }
112
113 return _service;
114 }
115
116 public void setService(ShoppingCouponService service) {
117 _service = service;
118 }
119
120 private static ShoppingCouponService _service;
121 }