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