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