001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portlet.shopping.service;
022:
023: /**
024: * <a href="ShoppingCouponServiceUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * <p>
027: * ServiceBuilder generated this class. Modifications in this class will be
028: * overwritten the next time is generated.
029: * </p>
030: *
031: * <p>
032: * This class provides static methods for the
033: * <code>com.liferay.portlet.shopping.service.ShoppingCouponService</code>
034: * bean. The static methods of this class calls the same methods of the bean
035: * instance. It's convenient to be able to just write one line to call a method
036: * on a bean instead of writing a lookup call and a method call.
037: * </p>
038: *
039: * <p>
040: * <code>com.liferay.portlet.shopping.service.ShoppingCouponServiceFactory</code>
041: * is responsible for the lookup of the bean.
042: * </p>
043: *
044: * @author Brian Wing Shun Chan
045: *
046: * @see com.liferay.portlet.shopping.service.ShoppingCouponService
047: * @see com.liferay.portlet.shopping.service.ShoppingCouponServiceFactory
048: *
049: */
050: public class ShoppingCouponServiceUtil {
051: public static com.liferay.portlet.shopping.model.ShoppingCoupon addCoupon(
052: long plid, java.lang.String code, boolean autoCode,
053: java.lang.String name, java.lang.String description,
054: int startDateMonth, int startDateDay, int startDateYear,
055: int startDateHour, int startDateMinute, int endDateMonth,
056: int endDateDay, int endDateYear, int endDateHour,
057: int endDateMinute, boolean neverExpire, boolean active,
058: java.lang.String limitCategories,
059: java.lang.String limitSkus, double minOrder,
060: double discount, java.lang.String discountType)
061: throws com.liferay.portal.PortalException,
062: com.liferay.portal.SystemException,
063: java.rmi.RemoteException {
064: ShoppingCouponService shoppingCouponService = ShoppingCouponServiceFactory
065: .getService();
066:
067: return shoppingCouponService.addCoupon(plid, code, autoCode,
068: name, description, startDateMonth, startDateDay,
069: startDateYear, startDateHour, startDateMinute,
070: endDateMonth, endDateDay, endDateYear, endDateHour,
071: endDateMinute, neverExpire, active, limitCategories,
072: limitSkus, minOrder, discount, discountType);
073: }
074:
075: public static void deleteCoupon(long plid, long couponId)
076: throws com.liferay.portal.PortalException,
077: com.liferay.portal.SystemException,
078: java.rmi.RemoteException {
079: ShoppingCouponService shoppingCouponService = ShoppingCouponServiceFactory
080: .getService();
081:
082: shoppingCouponService.deleteCoupon(plid, couponId);
083: }
084:
085: public static com.liferay.portlet.shopping.model.ShoppingCoupon getCoupon(
086: long plid, long couponId)
087: throws com.liferay.portal.PortalException,
088: com.liferay.portal.SystemException,
089: java.rmi.RemoteException {
090: ShoppingCouponService shoppingCouponService = ShoppingCouponServiceFactory
091: .getService();
092:
093: return shoppingCouponService.getCoupon(plid, couponId);
094: }
095:
096: public static java.util.List search(long plid, long companyId,
097: java.lang.String code, boolean active,
098: java.lang.String discountType, boolean andOperator,
099: int begin, int end)
100: throws com.liferay.portal.PortalException,
101: com.liferay.portal.SystemException,
102: java.rmi.RemoteException {
103: ShoppingCouponService shoppingCouponService = ShoppingCouponServiceFactory
104: .getService();
105:
106: return shoppingCouponService.search(plid, companyId, code,
107: active, discountType, andOperator, begin, end);
108: }
109:
110: public static com.liferay.portlet.shopping.model.ShoppingCoupon updateCoupon(
111: long plid, long couponId, java.lang.String name,
112: java.lang.String description, int startDateMonth,
113: int startDateDay, int startDateYear, int startDateHour,
114: int startDateMinute, int endDateMonth, int endDateDay,
115: int endDateYear, int endDateHour, int endDateMinute,
116: boolean neverExpire, boolean active,
117: java.lang.String limitCategories,
118: java.lang.String limitSkus, double minOrder,
119: double discount, java.lang.String discountType)
120: throws com.liferay.portal.PortalException,
121: com.liferay.portal.SystemException,
122: java.rmi.RemoteException {
123: ShoppingCouponService shoppingCouponService = ShoppingCouponServiceFactory
124: .getService();
125:
126: return shoppingCouponService.updateCoupon(plid, couponId, name,
127: description, startDateMonth, startDateDay,
128: startDateYear, startDateHour, startDateMinute,
129: endDateMonth, endDateDay, endDateYear, endDateHour,
130: endDateMinute, neverExpire, active, limitCategories,
131: limitSkus, minOrder, discount, discountType);
132: }
133: }
|