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.persistence;
022:
023: /**
024: * <a href="ShoppingCouponUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * @author Brian Wing Shun Chan
027: *
028: */
029: public class ShoppingCouponUtil {
030: public static com.liferay.portlet.shopping.model.ShoppingCoupon create(
031: long couponId) {
032: return getPersistence().create(couponId);
033: }
034:
035: public static com.liferay.portlet.shopping.model.ShoppingCoupon remove(
036: long couponId) throws com.liferay.portal.SystemException,
037: com.liferay.portlet.shopping.NoSuchCouponException {
038: return getPersistence().remove(couponId);
039: }
040:
041: public static com.liferay.portlet.shopping.model.ShoppingCoupon remove(
042: com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon)
043: throws com.liferay.portal.SystemException {
044: return getPersistence().remove(shoppingCoupon);
045: }
046:
047: public static com.liferay.portlet.shopping.model.ShoppingCoupon update(
048: com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon)
049: throws com.liferay.portal.SystemException {
050: return getPersistence().update(shoppingCoupon);
051: }
052:
053: public static com.liferay.portlet.shopping.model.ShoppingCoupon update(
054: com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon,
055: boolean merge) throws com.liferay.portal.SystemException {
056: return getPersistence().update(shoppingCoupon, merge);
057: }
058:
059: public static com.liferay.portlet.shopping.model.ShoppingCoupon updateImpl(
060: com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon,
061: boolean merge) throws com.liferay.portal.SystemException {
062: return getPersistence().updateImpl(shoppingCoupon, merge);
063: }
064:
065: public static com.liferay.portlet.shopping.model.ShoppingCoupon findByPrimaryKey(
066: long couponId) throws com.liferay.portal.SystemException,
067: com.liferay.portlet.shopping.NoSuchCouponException {
068: return getPersistence().findByPrimaryKey(couponId);
069: }
070:
071: public static com.liferay.portlet.shopping.model.ShoppingCoupon fetchByPrimaryKey(
072: long couponId) throws com.liferay.portal.SystemException {
073: return getPersistence().fetchByPrimaryKey(couponId);
074: }
075:
076: public static java.util.List findByGroupId(long groupId)
077: throws com.liferay.portal.SystemException {
078: return getPersistence().findByGroupId(groupId);
079: }
080:
081: public static java.util.List findByGroupId(long groupId, int begin,
082: int end) throws com.liferay.portal.SystemException {
083: return getPersistence().findByGroupId(groupId, begin, end);
084: }
085:
086: public static java.util.List findByGroupId(long groupId, int begin,
087: int end,
088: com.liferay.portal.kernel.util.OrderByComparator obc)
089: throws com.liferay.portal.SystemException {
090: return getPersistence().findByGroupId(groupId, begin, end, obc);
091: }
092:
093: public static com.liferay.portlet.shopping.model.ShoppingCoupon findByGroupId_First(
094: long groupId,
095: com.liferay.portal.kernel.util.OrderByComparator obc)
096: throws com.liferay.portal.SystemException,
097: com.liferay.portlet.shopping.NoSuchCouponException {
098: return getPersistence().findByGroupId_First(groupId, obc);
099: }
100:
101: public static com.liferay.portlet.shopping.model.ShoppingCoupon findByGroupId_Last(
102: long groupId,
103: com.liferay.portal.kernel.util.OrderByComparator obc)
104: throws com.liferay.portal.SystemException,
105: com.liferay.portlet.shopping.NoSuchCouponException {
106: return getPersistence().findByGroupId_Last(groupId, obc);
107: }
108:
109: public static com.liferay.portlet.shopping.model.ShoppingCoupon[] findByGroupId_PrevAndNext(
110: long couponId, long groupId,
111: com.liferay.portal.kernel.util.OrderByComparator obc)
112: throws com.liferay.portal.SystemException,
113: com.liferay.portlet.shopping.NoSuchCouponException {
114: return getPersistence().findByGroupId_PrevAndNext(couponId,
115: groupId, obc);
116: }
117:
118: public static com.liferay.portlet.shopping.model.ShoppingCoupon findByCode(
119: java.lang.String code)
120: throws com.liferay.portal.SystemException,
121: com.liferay.portlet.shopping.NoSuchCouponException {
122: return getPersistence().findByCode(code);
123: }
124:
125: public static com.liferay.portlet.shopping.model.ShoppingCoupon fetchByCode(
126: java.lang.String code)
127: throws com.liferay.portal.SystemException {
128: return getPersistence().fetchByCode(code);
129: }
130:
131: public static java.util.List findWithDynamicQuery(
132: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
133: throws com.liferay.portal.SystemException {
134: return getPersistence().findWithDynamicQuery(queryInitializer);
135: }
136:
137: public static java.util.List findWithDynamicQuery(
138: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
139: int begin, int end)
140: throws com.liferay.portal.SystemException {
141: return getPersistence().findWithDynamicQuery(queryInitializer,
142: begin, end);
143: }
144:
145: public static java.util.List findAll()
146: throws com.liferay.portal.SystemException {
147: return getPersistence().findAll();
148: }
149:
150: public static java.util.List findAll(int begin, int end)
151: throws com.liferay.portal.SystemException {
152: return getPersistence().findAll(begin, end);
153: }
154:
155: public static java.util.List findAll(int begin, int end,
156: com.liferay.portal.kernel.util.OrderByComparator obc)
157: throws com.liferay.portal.SystemException {
158: return getPersistence().findAll(begin, end, obc);
159: }
160:
161: public static void removeByGroupId(long groupId)
162: throws com.liferay.portal.SystemException {
163: getPersistence().removeByGroupId(groupId);
164: }
165:
166: public static void removeByCode(java.lang.String code)
167: throws com.liferay.portal.SystemException,
168: com.liferay.portlet.shopping.NoSuchCouponException {
169: getPersistence().removeByCode(code);
170: }
171:
172: public static void removeAll()
173: throws com.liferay.portal.SystemException {
174: getPersistence().removeAll();
175: }
176:
177: public static int countByGroupId(long groupId)
178: throws com.liferay.portal.SystemException {
179: return getPersistence().countByGroupId(groupId);
180: }
181:
182: public static int countByCode(java.lang.String code)
183: throws com.liferay.portal.SystemException {
184: return getPersistence().countByCode(code);
185: }
186:
187: public static int countAll()
188: throws com.liferay.portal.SystemException {
189: return getPersistence().countAll();
190: }
191:
192: public static ShoppingCouponPersistence getPersistence() {
193: return _getUtil()._persistence;
194: }
195:
196: public void setPersistence(ShoppingCouponPersistence persistence) {
197: _persistence = persistence;
198: }
199:
200: private static ShoppingCouponUtil _getUtil() {
201: if (_util == null) {
202: _util = (ShoppingCouponUtil) com.liferay.portal.kernel.bean.BeanLocatorUtil
203: .locate(_UTIL);
204: }
205:
206: return _util;
207: }
208:
209: private static final String _UTIL = ShoppingCouponUtil.class
210: .getName();
211: private static ShoppingCouponUtil _util;
212: private ShoppingCouponPersistence _persistence;
213: }
|