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