001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.shopping.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * <p>
021     * This class provides static methods for the
022     * {@link ShoppingCouponLocalService} bean. The static methods of
023     * this class calls the same methods of the bean instance. It's convenient to be
024     * able to just write one line to call a method on a bean instead of writing a
025     * lookup call and a method call.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       ShoppingCouponLocalService
030     * @generated
031     */
032    public class ShoppingCouponLocalServiceUtil {
033            public static com.liferay.portlet.shopping.model.ShoppingCoupon addShoppingCoupon(
034                    com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon)
035                    throws com.liferay.portal.kernel.exception.SystemException {
036                    return getService().addShoppingCoupon(shoppingCoupon);
037            }
038    
039            public static com.liferay.portlet.shopping.model.ShoppingCoupon createShoppingCoupon(
040                    long couponId) {
041                    return getService().createShoppingCoupon(couponId);
042            }
043    
044            public static void deleteShoppingCoupon(long couponId)
045                    throws com.liferay.portal.kernel.exception.PortalException,
046                            com.liferay.portal.kernel.exception.SystemException {
047                    getService().deleteShoppingCoupon(couponId);
048            }
049    
050            public static void deleteShoppingCoupon(
051                    com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon)
052                    throws com.liferay.portal.kernel.exception.SystemException {
053                    getService().deleteShoppingCoupon(shoppingCoupon);
054            }
055    
056            @SuppressWarnings("unchecked")
057            public static java.util.List dynamicQuery(
058                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
059                    throws com.liferay.portal.kernel.exception.SystemException {
060                    return getService().dynamicQuery(dynamicQuery);
061            }
062    
063            @SuppressWarnings("unchecked")
064            public static java.util.List dynamicQuery(
065                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
066                    int end) throws com.liferay.portal.kernel.exception.SystemException {
067                    return getService().dynamicQuery(dynamicQuery, start, end);
068            }
069    
070            @SuppressWarnings("unchecked")
071            public static java.util.List dynamicQuery(
072                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
073                    int end,
074                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
075                    throws com.liferay.portal.kernel.exception.SystemException {
076                    return getService()
077                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
078            }
079    
080            public static long dynamicQueryCount(
081                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
082                    throws com.liferay.portal.kernel.exception.SystemException {
083                    return getService().dynamicQueryCount(dynamicQuery);
084            }
085    
086            public static com.liferay.portlet.shopping.model.ShoppingCoupon getShoppingCoupon(
087                    long couponId)
088                    throws com.liferay.portal.kernel.exception.PortalException,
089                            com.liferay.portal.kernel.exception.SystemException {
090                    return getService().getShoppingCoupon(couponId);
091            }
092    
093            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> getShoppingCoupons(
094                    int start, int end)
095                    throws com.liferay.portal.kernel.exception.SystemException {
096                    return getService().getShoppingCoupons(start, end);
097            }
098    
099            public static int getShoppingCouponsCount()
100                    throws com.liferay.portal.kernel.exception.SystemException {
101                    return getService().getShoppingCouponsCount();
102            }
103    
104            public static com.liferay.portlet.shopping.model.ShoppingCoupon updateShoppingCoupon(
105                    com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon)
106                    throws com.liferay.portal.kernel.exception.SystemException {
107                    return getService().updateShoppingCoupon(shoppingCoupon);
108            }
109    
110            public static com.liferay.portlet.shopping.model.ShoppingCoupon updateShoppingCoupon(
111                    com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon,
112                    boolean merge)
113                    throws com.liferay.portal.kernel.exception.SystemException {
114                    return getService().updateShoppingCoupon(shoppingCoupon, merge);
115            }
116    
117            public static com.liferay.portlet.shopping.model.ShoppingCoupon addCoupon(
118                    long userId, java.lang.String code, boolean autoCode,
119                    java.lang.String name, java.lang.String description,
120                    int startDateMonth, int startDateDay, int startDateYear,
121                    int startDateHour, int startDateMinute, int endDateMonth,
122                    int endDateDay, int endDateYear, int endDateHour, int endDateMinute,
123                    boolean neverExpire, boolean active, java.lang.String limitCategories,
124                    java.lang.String limitSkus, double minOrder, double discount,
125                    java.lang.String discountType,
126                    com.liferay.portal.service.ServiceContext serviceContext)
127                    throws com.liferay.portal.kernel.exception.PortalException,
128                            com.liferay.portal.kernel.exception.SystemException {
129                    return getService()
130                                       .addCoupon(userId, code, autoCode, name, description,
131                            startDateMonth, startDateDay, startDateYear, startDateHour,
132                            startDateMinute, endDateMonth, endDateDay, endDateYear,
133                            endDateHour, endDateMinute, neverExpire, active, limitCategories,
134                            limitSkus, minOrder, discount, discountType, serviceContext);
135            }
136    
137            public static void deleteCoupon(long couponId)
138                    throws com.liferay.portal.kernel.exception.PortalException,
139                            com.liferay.portal.kernel.exception.SystemException {
140                    getService().deleteCoupon(couponId);
141            }
142    
143            public static void deleteCoupons(long groupId)
144                    throws com.liferay.portal.kernel.exception.SystemException {
145                    getService().deleteCoupons(groupId);
146            }
147    
148            public static com.liferay.portlet.shopping.model.ShoppingCoupon getCoupon(
149                    long couponId)
150                    throws com.liferay.portal.kernel.exception.PortalException,
151                            com.liferay.portal.kernel.exception.SystemException {
152                    return getService().getCoupon(couponId);
153            }
154    
155            public static com.liferay.portlet.shopping.model.ShoppingCoupon getCoupon(
156                    java.lang.String code)
157                    throws com.liferay.portal.kernel.exception.PortalException,
158                            com.liferay.portal.kernel.exception.SystemException {
159                    return getService().getCoupon(code);
160            }
161    
162            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> search(
163                    long groupId, long companyId, java.lang.String code, boolean active,
164                    java.lang.String discountType, boolean andOperator, int start, int end)
165                    throws com.liferay.portal.kernel.exception.SystemException {
166                    return getService()
167                                       .search(groupId, companyId, code, active, discountType,
168                            andOperator, start, end);
169            }
170    
171            public static int searchCount(long groupId, long companyId,
172                    java.lang.String code, boolean active, java.lang.String discountType,
173                    boolean andOperator)
174                    throws com.liferay.portal.kernel.exception.SystemException {
175                    return getService()
176                                       .searchCount(groupId, companyId, code, active, discountType,
177                            andOperator);
178            }
179    
180            public static com.liferay.portlet.shopping.model.ShoppingCoupon updateCoupon(
181                    long userId, long couponId, java.lang.String name,
182                    java.lang.String description, int startDateMonth, int startDateDay,
183                    int startDateYear, int startDateHour, int startDateMinute,
184                    int endDateMonth, int endDateDay, int endDateYear, int endDateHour,
185                    int endDateMinute, boolean neverExpire, boolean active,
186                    java.lang.String limitCategories, java.lang.String limitSkus,
187                    double minOrder, double discount, java.lang.String discountType,
188                    com.liferay.portal.service.ServiceContext serviceContext)
189                    throws com.liferay.portal.kernel.exception.PortalException,
190                            com.liferay.portal.kernel.exception.SystemException {
191                    return getService()
192                                       .updateCoupon(userId, couponId, name, description,
193                            startDateMonth, startDateDay, startDateYear, startDateHour,
194                            startDateMinute, endDateMonth, endDateDay, endDateYear,
195                            endDateHour, endDateMinute, neverExpire, active, limitCategories,
196                            limitSkus, minOrder, discount, discountType, serviceContext);
197            }
198    
199            public static ShoppingCouponLocalService getService() {
200                    if (_service == null) {
201                            _service = (ShoppingCouponLocalService)PortalBeanLocatorUtil.locate(ShoppingCouponLocalService.class.getName());
202                    }
203    
204                    return _service;
205            }
206    
207            public void setService(ShoppingCouponLocalService service) {
208                    _service = service;
209            }
210    
211            private static ShoppingCouponLocalService _service;
212    }