1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.shopping.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
19  import com.liferay.portal.kernel.exception.SystemException;
20  
21  import com.liferay.portlet.shopping.model.ShoppingCoupon;
22  
23  import java.util.List;
24  
25  /**
26   * <a href="ShoppingCouponUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be
30   * overwritten the next time is generated.
31   * </p>
32   *
33   * @author    Brian Wing Shun Chan
34   * @see       ShoppingCouponPersistence
35   * @see       ShoppingCouponPersistenceImpl
36   * @generated
37   */
38  public class ShoppingCouponUtil {
39      /**
40       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
41       */
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      /**
47       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(ShoppingCoupon)
48       */
49      public static void clearCache(ShoppingCoupon shoppingCoupon) {
50          getPersistence().clearCache(shoppingCoupon);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
55       */
56      public long countWithDynamicQuery(DynamicQuery dynamicQuery)
57          throws SystemException {
58          return getPersistence().countWithDynamicQuery(dynamicQuery);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
63       */
64      public static List<ShoppingCoupon> findWithDynamicQuery(
65          DynamicQuery dynamicQuery) throws SystemException {
66          return getPersistence().findWithDynamicQuery(dynamicQuery);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
71       */
72      public static List<ShoppingCoupon> findWithDynamicQuery(
73          DynamicQuery dynamicQuery, int start, int end)
74          throws SystemException {
75          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
76      }
77  
78      /**
79       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
80       */
81      public static ShoppingCoupon remove(ShoppingCoupon shoppingCoupon)
82          throws SystemException {
83          return getPersistence().remove(shoppingCoupon);
84      }
85  
86      /**
87       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
88       */
89      public static ShoppingCoupon update(ShoppingCoupon shoppingCoupon,
90          boolean merge) throws SystemException {
91          return getPersistence().update(shoppingCoupon, merge);
92      }
93  
94      public static void cacheResult(
95          com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon) {
96          getPersistence().cacheResult(shoppingCoupon);
97      }
98  
99      public static void cacheResult(
100         java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> shoppingCoupons) {
101         getPersistence().cacheResult(shoppingCoupons);
102     }
103 
104     public static com.liferay.portlet.shopping.model.ShoppingCoupon create(
105         long couponId) {
106         return getPersistence().create(couponId);
107     }
108 
109     public static com.liferay.portlet.shopping.model.ShoppingCoupon remove(
110         long couponId)
111         throws com.liferay.portal.kernel.exception.SystemException,
112             com.liferay.portlet.shopping.NoSuchCouponException {
113         return getPersistence().remove(couponId);
114     }
115 
116     public static com.liferay.portlet.shopping.model.ShoppingCoupon updateImpl(
117         com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon,
118         boolean merge)
119         throws com.liferay.portal.kernel.exception.SystemException {
120         return getPersistence().updateImpl(shoppingCoupon, merge);
121     }
122 
123     public static com.liferay.portlet.shopping.model.ShoppingCoupon findByPrimaryKey(
124         long couponId)
125         throws com.liferay.portal.kernel.exception.SystemException,
126             com.liferay.portlet.shopping.NoSuchCouponException {
127         return getPersistence().findByPrimaryKey(couponId);
128     }
129 
130     public static com.liferay.portlet.shopping.model.ShoppingCoupon fetchByPrimaryKey(
131         long couponId)
132         throws com.liferay.portal.kernel.exception.SystemException {
133         return getPersistence().fetchByPrimaryKey(couponId);
134     }
135 
136     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findByGroupId(
137         long groupId)
138         throws com.liferay.portal.kernel.exception.SystemException {
139         return getPersistence().findByGroupId(groupId);
140     }
141 
142     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findByGroupId(
143         long groupId, int start, int end)
144         throws com.liferay.portal.kernel.exception.SystemException {
145         return getPersistence().findByGroupId(groupId, start, end);
146     }
147 
148     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findByGroupId(
149         long groupId, int start, int end,
150         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
151         throws com.liferay.portal.kernel.exception.SystemException {
152         return getPersistence()
153                    .findByGroupId(groupId, start, end, orderByComparator);
154     }
155 
156     public static com.liferay.portlet.shopping.model.ShoppingCoupon findByGroupId_First(
157         long groupId,
158         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
159         throws com.liferay.portal.kernel.exception.SystemException,
160             com.liferay.portlet.shopping.NoSuchCouponException {
161         return getPersistence().findByGroupId_First(groupId, orderByComparator);
162     }
163 
164     public static com.liferay.portlet.shopping.model.ShoppingCoupon findByGroupId_Last(
165         long groupId,
166         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
167         throws com.liferay.portal.kernel.exception.SystemException,
168             com.liferay.portlet.shopping.NoSuchCouponException {
169         return getPersistence().findByGroupId_Last(groupId, orderByComparator);
170     }
171 
172     public static com.liferay.portlet.shopping.model.ShoppingCoupon[] findByGroupId_PrevAndNext(
173         long couponId, long groupId,
174         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
175         throws com.liferay.portal.kernel.exception.SystemException,
176             com.liferay.portlet.shopping.NoSuchCouponException {
177         return getPersistence()
178                    .findByGroupId_PrevAndNext(couponId, groupId,
179             orderByComparator);
180     }
181 
182     public static com.liferay.portlet.shopping.model.ShoppingCoupon findByCode(
183         java.lang.String code)
184         throws com.liferay.portal.kernel.exception.SystemException,
185             com.liferay.portlet.shopping.NoSuchCouponException {
186         return getPersistence().findByCode(code);
187     }
188 
189     public static com.liferay.portlet.shopping.model.ShoppingCoupon fetchByCode(
190         java.lang.String code)
191         throws com.liferay.portal.kernel.exception.SystemException {
192         return getPersistence().fetchByCode(code);
193     }
194 
195     public static com.liferay.portlet.shopping.model.ShoppingCoupon fetchByCode(
196         java.lang.String code, boolean retrieveFromCache)
197         throws com.liferay.portal.kernel.exception.SystemException {
198         return getPersistence().fetchByCode(code, retrieveFromCache);
199     }
200 
201     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findAll()
202         throws com.liferay.portal.kernel.exception.SystemException {
203         return getPersistence().findAll();
204     }
205 
206     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findAll(
207         int start, int end)
208         throws com.liferay.portal.kernel.exception.SystemException {
209         return getPersistence().findAll(start, end);
210     }
211 
212     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findAll(
213         int start, int end,
214         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
215         throws com.liferay.portal.kernel.exception.SystemException {
216         return getPersistence().findAll(start, end, orderByComparator);
217     }
218 
219     public static void removeByGroupId(long groupId)
220         throws com.liferay.portal.kernel.exception.SystemException {
221         getPersistence().removeByGroupId(groupId);
222     }
223 
224     public static void removeByCode(java.lang.String code)
225         throws com.liferay.portal.kernel.exception.SystemException,
226             com.liferay.portlet.shopping.NoSuchCouponException {
227         getPersistence().removeByCode(code);
228     }
229 
230     public static void removeAll()
231         throws com.liferay.portal.kernel.exception.SystemException {
232         getPersistence().removeAll();
233     }
234 
235     public static int countByGroupId(long groupId)
236         throws com.liferay.portal.kernel.exception.SystemException {
237         return getPersistence().countByGroupId(groupId);
238     }
239 
240     public static int countByCode(java.lang.String code)
241         throws com.liferay.portal.kernel.exception.SystemException {
242         return getPersistence().countByCode(code);
243     }
244 
245     public static int countAll()
246         throws com.liferay.portal.kernel.exception.SystemException {
247         return getPersistence().countAll();
248     }
249 
250     public static ShoppingCouponPersistence getPersistence() {
251         if (_persistence == null) {
252             _persistence = (ShoppingCouponPersistence)PortalBeanLocatorUtil.locate(ShoppingCouponPersistence.class.getName());
253         }
254 
255         return _persistence;
256     }
257 
258     public void setPersistence(ShoppingCouponPersistence persistence) {
259         _persistence = persistence;
260     }
261 
262     private static ShoppingCouponPersistence _persistence;
263 }