001
014
015 package com.liferay.portlet.shopping.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.ReferenceRegistry;
019
020
034 public class ShoppingCouponServiceUtil {
035
040
041
046 public static java.lang.String getBeanIdentifier() {
047 return getService().getBeanIdentifier();
048 }
049
050
055 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
056 getService().setBeanIdentifier(beanIdentifier);
057 }
058
059 public static com.liferay.portlet.shopping.model.ShoppingCoupon addCoupon(
060 java.lang.String code, boolean autoCode, java.lang.String name,
061 java.lang.String description, int startDateMonth, int startDateDay,
062 int startDateYear, int startDateHour, int startDateMinute,
063 int endDateMonth, int endDateDay, int endDateYear, int endDateHour,
064 int endDateMinute, boolean neverExpire, boolean active,
065 java.lang.String limitCategories, java.lang.String limitSkus,
066 double minOrder, double discount, java.lang.String discountType,
067 com.liferay.portal.service.ServiceContext serviceContext)
068 throws com.liferay.portal.kernel.exception.PortalException,
069 com.liferay.portal.kernel.exception.SystemException {
070 return getService()
071 .addCoupon(code, autoCode, name, description,
072 startDateMonth, startDateDay, startDateYear, startDateHour,
073 startDateMinute, endDateMonth, endDateDay, endDateYear,
074 endDateHour, endDateMinute, neverExpire, active, limitCategories,
075 limitSkus, minOrder, discount, discountType, serviceContext);
076 }
077
078 public static void deleteCoupon(long groupId, long couponId)
079 throws com.liferay.portal.kernel.exception.PortalException,
080 com.liferay.portal.kernel.exception.SystemException {
081 getService().deleteCoupon(groupId, couponId);
082 }
083
084 public static com.liferay.portlet.shopping.model.ShoppingCoupon getCoupon(
085 long groupId, long couponId)
086 throws com.liferay.portal.kernel.exception.PortalException,
087 com.liferay.portal.kernel.exception.SystemException {
088 return getService().getCoupon(groupId, couponId);
089 }
090
091 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> search(
092 long groupId, long companyId, java.lang.String code, boolean active,
093 java.lang.String discountType, boolean andOperator, int start, int end)
094 throws com.liferay.portal.kernel.exception.PortalException,
095 com.liferay.portal.kernel.exception.SystemException {
096 return getService()
097 .search(groupId, companyId, code, active, discountType,
098 andOperator, start, end);
099 }
100
101 public static com.liferay.portlet.shopping.model.ShoppingCoupon updateCoupon(
102 long couponId, java.lang.String name, java.lang.String description,
103 int startDateMonth, int startDateDay, int startDateYear,
104 int startDateHour, int startDateMinute, int endDateMonth,
105 int endDateDay, int endDateYear, int endDateHour, int endDateMinute,
106 boolean neverExpire, boolean active, java.lang.String limitCategories,
107 java.lang.String limitSkus, double minOrder, double discount,
108 java.lang.String discountType,
109 com.liferay.portal.service.ServiceContext serviceContext)
110 throws com.liferay.portal.kernel.exception.PortalException,
111 com.liferay.portal.kernel.exception.SystemException {
112 return getService()
113 .updateCoupon(couponId, name, description, startDateMonth,
114 startDateDay, startDateYear, startDateHour, startDateMinute,
115 endDateMonth, endDateDay, endDateYear, endDateHour, endDateMinute,
116 neverExpire, active, limitCategories, limitSkus, minOrder,
117 discount, discountType, serviceContext);
118 }
119
120 public static ShoppingCouponService getService() {
121 if (_service == null) {
122 _service = (ShoppingCouponService)PortalBeanLocatorUtil.locate(ShoppingCouponService.class.getName());
123
124 ReferenceRegistry.registerReference(ShoppingCouponServiceUtil.class,
125 "_service");
126 }
127
128 return _service;
129 }
130
131
134 public void setService(ShoppingCouponService service) {
135 }
136
137 private static ShoppingCouponService _service;
138 }