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