1
22
23 package com.liferay.portlet.shopping.service;
24
25
26
47 public class ShoppingCouponServiceUtil {
48 public static com.liferay.portlet.shopping.model.ShoppingCoupon addCoupon(
49 long plid, java.lang.String code, boolean autoCode,
50 java.lang.String name, java.lang.String description,
51 int startDateMonth, int startDateDay, int startDateYear,
52 int startDateHour, int startDateMinute, int endDateMonth,
53 int endDateDay, int endDateYear, int endDateHour, int endDateMinute,
54 boolean neverExpire, boolean active, java.lang.String limitCategories,
55 java.lang.String limitSkus, double minOrder, double discount,
56 java.lang.String discountType)
57 throws com.liferay.portal.PortalException,
58 com.liferay.portal.SystemException, java.rmi.RemoteException {
59 return getService()
60 .addCoupon(plid, code, autoCode, name, description,
61 startDateMonth, startDateDay, startDateYear, startDateHour,
62 startDateMinute, endDateMonth, endDateDay, endDateYear,
63 endDateHour, endDateMinute, neverExpire, active, limitCategories,
64 limitSkus, minOrder, discount, discountType);
65 }
66
67 public static void deleteCoupon(long plid, long couponId)
68 throws com.liferay.portal.PortalException,
69 com.liferay.portal.SystemException, java.rmi.RemoteException {
70 getService().deleteCoupon(plid, couponId);
71 }
72
73 public static com.liferay.portlet.shopping.model.ShoppingCoupon getCoupon(
74 long plid, long couponId)
75 throws com.liferay.portal.PortalException,
76 com.liferay.portal.SystemException, java.rmi.RemoteException {
77 return getService().getCoupon(plid, couponId);
78 }
79
80 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> search(
81 long plid, long companyId, java.lang.String code, boolean active,
82 java.lang.String discountType, boolean andOperator, int start, int end)
83 throws com.liferay.portal.PortalException,
84 com.liferay.portal.SystemException, java.rmi.RemoteException {
85 return getService()
86 .search(plid, companyId, code, active, discountType,
87 andOperator, start, end);
88 }
89
90 public static com.liferay.portlet.shopping.model.ShoppingCoupon updateCoupon(
91 long plid, long couponId, java.lang.String name,
92 java.lang.String description, int startDateMonth, int startDateDay,
93 int startDateYear, int startDateHour, int startDateMinute,
94 int endDateMonth, int endDateDay, int endDateYear, int endDateHour,
95 int endDateMinute, boolean neverExpire, boolean active,
96 java.lang.String limitCategories, java.lang.String limitSkus,
97 double minOrder, double discount, java.lang.String discountType)
98 throws com.liferay.portal.PortalException,
99 com.liferay.portal.SystemException, java.rmi.RemoteException {
100 return getService()
101 .updateCoupon(plid, couponId, name, description,
102 startDateMonth, startDateDay, startDateYear, startDateHour,
103 startDateMinute, endDateMonth, endDateDay, endDateYear,
104 endDateHour, endDateMinute, neverExpire, active, limitCategories,
105 limitSkus, minOrder, discount, discountType);
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 }