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