1
22
23 package com.liferay.portlet.shopping.service;
24
25
51 public class ShoppingCouponLocalServiceUtil {
52 public static com.liferay.portlet.shopping.model.ShoppingCoupon addShoppingCoupon(
53 com.liferay.portlet.shopping.model.ShoppingCoupon model)
54 throws com.liferay.portal.SystemException {
55 ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
56
57 return shoppingCouponLocalService.addShoppingCoupon(model);
58 }
59
60 public static java.util.List dynamicQuery(
61 com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
62 throws com.liferay.portal.SystemException {
63 ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
64
65 return shoppingCouponLocalService.dynamicQuery(queryInitializer);
66 }
67
68 public static java.util.List dynamicQuery(
69 com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
70 int begin, int end) throws com.liferay.portal.SystemException {
71 ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
72
73 return shoppingCouponLocalService.dynamicQuery(queryInitializer, begin,
74 end);
75 }
76
77 public static com.liferay.portlet.shopping.model.ShoppingCoupon updateShoppingCoupon(
78 com.liferay.portlet.shopping.model.ShoppingCoupon model)
79 throws com.liferay.portal.SystemException {
80 ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
81
82 return shoppingCouponLocalService.updateShoppingCoupon(model);
83 }
84
85 public static com.liferay.portlet.shopping.model.ShoppingCoupon addCoupon(
86 long userId, long plid, java.lang.String code, boolean autoCode,
87 java.lang.String name, java.lang.String description,
88 int startDateMonth, int startDateDay, int startDateYear,
89 int startDateHour, int startDateMinute, int endDateMonth,
90 int endDateDay, int endDateYear, int endDateHour, int endDateMinute,
91 boolean neverExpire, boolean active, java.lang.String limitCategories,
92 java.lang.String limitSkus, double minOrder, double discount,
93 java.lang.String discountType)
94 throws com.liferay.portal.PortalException,
95 com.liferay.portal.SystemException {
96 ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
97
98 return shoppingCouponLocalService.addCoupon(userId, plid, code,
99 autoCode, name, description, startDateMonth, startDateDay,
100 startDateYear, startDateHour, startDateMinute, endDateMonth,
101 endDateDay, endDateYear, endDateHour, endDateMinute, neverExpire,
102 active, limitCategories, limitSkus, minOrder, discount, discountType);
103 }
104
105 public static void deleteCoupon(long couponId)
106 throws com.liferay.portal.PortalException,
107 com.liferay.portal.SystemException {
108 ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
109 shoppingCouponLocalService.deleteCoupon(couponId);
110 }
111
112 public static void deleteCoupons(long groupId)
113 throws com.liferay.portal.SystemException {
114 ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
115 shoppingCouponLocalService.deleteCoupons(groupId);
116 }
117
118 public static com.liferay.portlet.shopping.model.ShoppingCoupon getCoupon(
119 long couponId)
120 throws com.liferay.portal.PortalException,
121 com.liferay.portal.SystemException {
122 ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
123
124 return shoppingCouponLocalService.getCoupon(couponId);
125 }
126
127 public static com.liferay.portlet.shopping.model.ShoppingCoupon getCoupon(
128 java.lang.String code)
129 throws com.liferay.portal.PortalException,
130 com.liferay.portal.SystemException {
131 ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
132
133 return shoppingCouponLocalService.getCoupon(code);
134 }
135
136 public static java.util.List search(long plid, long companyId,
137 java.lang.String code, boolean active, java.lang.String discountType,
138 boolean andOperator, int begin, int end)
139 throws com.liferay.portal.SystemException {
140 ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
141
142 return shoppingCouponLocalService.search(plid, companyId, code, active,
143 discountType, andOperator, begin, end);
144 }
145
146 public static int searchCount(long groupId, long companyId,
147 java.lang.String code, boolean active, java.lang.String discountType,
148 boolean andOperator) throws com.liferay.portal.SystemException {
149 ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
150
151 return shoppingCouponLocalService.searchCount(groupId, companyId, code,
152 active, discountType, andOperator);
153 }
154
155 public static com.liferay.portlet.shopping.model.ShoppingCoupon updateCoupon(
156 long userId, long couponId, java.lang.String name,
157 java.lang.String description, int startDateMonth, int startDateDay,
158 int startDateYear, int startDateHour, int startDateMinute,
159 int endDateMonth, int endDateDay, int endDateYear, int endDateHour,
160 int endDateMinute, boolean neverExpire, boolean active,
161 java.lang.String limitCategories, java.lang.String limitSkus,
162 double minOrder, double discount, java.lang.String discountType)
163 throws com.liferay.portal.PortalException,
164 com.liferay.portal.SystemException {
165 ShoppingCouponLocalService shoppingCouponLocalService = ShoppingCouponLocalServiceFactory.getService();
166
167 return shoppingCouponLocalService.updateCoupon(userId, couponId, name,
168 description, startDateMonth, startDateDay, startDateYear,
169 startDateHour, startDateMinute, endDateMonth, endDateDay,
170 endDateYear, endDateHour, endDateMinute, neverExpire, active,
171 limitCategories, limitSkus, minOrder, discount, discountType);
172 }
173 }