1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.shopping.service.persistence;
24  
25  import com.liferay.portal.SystemException;
26  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
27  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
28  
29  import com.liferay.portlet.shopping.model.ShoppingCoupon;
30  
31  import java.util.List;
32  
33  /**
34   * <a href="ShoppingCouponUtil.java.html"><b><i>View Source</i></b></a>
35   *
36   * <p>
37   * ServiceBuilder generated this class. Modifications in this class will be
38   * overwritten the next time is generated.
39   * </p>
40   *
41   * @author    Brian Wing Shun Chan
42   * @see       ShoppingCouponPersistence
43   * @see       ShoppingCouponPersistenceImpl
44   * @generated
45   */
46  public class ShoppingCouponUtil {
47      /**
48       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
49       */
50      public static void clearCache() {
51          getPersistence().clearCache();
52      }
53  
54      /**
55       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
56       */
57      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
58          throws SystemException {
59          return getPersistence().findWithDynamicQuery(dynamicQuery);
60      }
61  
62      /**
63       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
64       */
65      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
66          int start, int end) throws SystemException {
67          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
68      }
69  
70      /**
71       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
72       */
73      public static ShoppingCoupon remove(ShoppingCoupon shoppingCoupon)
74          throws SystemException {
75          return getPersistence().remove(shoppingCoupon);
76      }
77  
78      /**
79       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
80       */
81      public static ShoppingCoupon update(ShoppingCoupon shoppingCoupon,
82          boolean merge) throws SystemException {
83          return getPersistence().update(shoppingCoupon, merge);
84      }
85  
86      public static void cacheResult(
87          com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon) {
88          getPersistence().cacheResult(shoppingCoupon);
89      }
90  
91      public static void cacheResult(
92          java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> shoppingCoupons) {
93          getPersistence().cacheResult(shoppingCoupons);
94      }
95  
96      public static com.liferay.portlet.shopping.model.ShoppingCoupon create(
97          long couponId) {
98          return getPersistence().create(couponId);
99      }
100 
101     public static com.liferay.portlet.shopping.model.ShoppingCoupon remove(
102         long couponId)
103         throws com.liferay.portal.SystemException,
104             com.liferay.portlet.shopping.NoSuchCouponException {
105         return getPersistence().remove(couponId);
106     }
107 
108     /**
109      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
110      */
111     public static com.liferay.portlet.shopping.model.ShoppingCoupon update(
112         com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon)
113         throws com.liferay.portal.SystemException {
114         return getPersistence().update(shoppingCoupon);
115     }
116 
117     public static com.liferay.portlet.shopping.model.ShoppingCoupon updateImpl(
118         com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon,
119         boolean merge) throws com.liferay.portal.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.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) throws com.liferay.portal.SystemException {
132         return getPersistence().fetchByPrimaryKey(couponId);
133     }
134 
135     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findByGroupId(
136         long groupId) throws com.liferay.portal.SystemException {
137         return getPersistence().findByGroupId(groupId);
138     }
139 
140     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findByGroupId(
141         long groupId, int start, int end)
142         throws com.liferay.portal.SystemException {
143         return getPersistence().findByGroupId(groupId, start, end);
144     }
145 
146     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findByGroupId(
147         long groupId, int start, int end,
148         com.liferay.portal.kernel.util.OrderByComparator obc)
149         throws com.liferay.portal.SystemException {
150         return getPersistence().findByGroupId(groupId, start, end, obc);
151     }
152 
153     public static com.liferay.portlet.shopping.model.ShoppingCoupon findByGroupId_First(
154         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
155         throws com.liferay.portal.SystemException,
156             com.liferay.portlet.shopping.NoSuchCouponException {
157         return getPersistence().findByGroupId_First(groupId, obc);
158     }
159 
160     public static com.liferay.portlet.shopping.model.ShoppingCoupon findByGroupId_Last(
161         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
162         throws com.liferay.portal.SystemException,
163             com.liferay.portlet.shopping.NoSuchCouponException {
164         return getPersistence().findByGroupId_Last(groupId, obc);
165     }
166 
167     public static com.liferay.portlet.shopping.model.ShoppingCoupon[] findByGroupId_PrevAndNext(
168         long couponId, long groupId,
169         com.liferay.portal.kernel.util.OrderByComparator obc)
170         throws com.liferay.portal.SystemException,
171             com.liferay.portlet.shopping.NoSuchCouponException {
172         return getPersistence().findByGroupId_PrevAndNext(couponId, groupId, obc);
173     }
174 
175     public static com.liferay.portlet.shopping.model.ShoppingCoupon findByCode(
176         java.lang.String code)
177         throws com.liferay.portal.SystemException,
178             com.liferay.portlet.shopping.NoSuchCouponException {
179         return getPersistence().findByCode(code);
180     }
181 
182     public static com.liferay.portlet.shopping.model.ShoppingCoupon fetchByCode(
183         java.lang.String code) throws com.liferay.portal.SystemException {
184         return getPersistence().fetchByCode(code);
185     }
186 
187     public static com.liferay.portlet.shopping.model.ShoppingCoupon fetchByCode(
188         java.lang.String code, boolean retrieveFromCache)
189         throws com.liferay.portal.SystemException {
190         return getPersistence().fetchByCode(code, retrieveFromCache);
191     }
192 
193     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findAll()
194         throws com.liferay.portal.SystemException {
195         return getPersistence().findAll();
196     }
197 
198     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findAll(
199         int start, int end) throws com.liferay.portal.SystemException {
200         return getPersistence().findAll(start, end);
201     }
202 
203     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findAll(
204         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
205         throws com.liferay.portal.SystemException {
206         return getPersistence().findAll(start, end, obc);
207     }
208 
209     public static void removeByGroupId(long groupId)
210         throws com.liferay.portal.SystemException {
211         getPersistence().removeByGroupId(groupId);
212     }
213 
214     public static void removeByCode(java.lang.String code)
215         throws com.liferay.portal.SystemException,
216             com.liferay.portlet.shopping.NoSuchCouponException {
217         getPersistence().removeByCode(code);
218     }
219 
220     public static void removeAll() throws com.liferay.portal.SystemException {
221         getPersistence().removeAll();
222     }
223 
224     public static int countByGroupId(long groupId)
225         throws com.liferay.portal.SystemException {
226         return getPersistence().countByGroupId(groupId);
227     }
228 
229     public static int countByCode(java.lang.String code)
230         throws com.liferay.portal.SystemException {
231         return getPersistence().countByCode(code);
232     }
233 
234     public static int countAll() throws com.liferay.portal.SystemException {
235         return getPersistence().countAll();
236     }
237 
238     public static ShoppingCouponPersistence getPersistence() {
239         if (_persistence == null) {
240             _persistence = (ShoppingCouponPersistence)PortalBeanLocatorUtil.locate(ShoppingCouponPersistence.class.getName());
241         }
242 
243         return _persistence;
244     }
245 
246     public void setPersistence(ShoppingCouponPersistence persistence) {
247         _persistence = persistence;
248     }
249 
250     private static ShoppingCouponPersistence _persistence;
251 }