001
014
015 package com.liferay.portlet.shopping.service.persistence;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019 import com.liferay.portal.kernel.exception.SystemException;
020 import com.liferay.portal.kernel.util.OrderByComparator;
021 import com.liferay.portal.service.ServiceContext;
022
023 import com.liferay.portlet.shopping.model.ShoppingCoupon;
024
025 import java.util.List;
026
027
033 public class ShoppingCouponUtil {
034
037 public static void clearCache() {
038 getPersistence().clearCache();
039 }
040
041
044 public static void clearCache(ShoppingCoupon shoppingCoupon) {
045 getPersistence().clearCache(shoppingCoupon);
046 }
047
048
051 public long countWithDynamicQuery(DynamicQuery dynamicQuery)
052 throws SystemException {
053 return getPersistence().countWithDynamicQuery(dynamicQuery);
054 }
055
056
059 public static List<ShoppingCoupon> findWithDynamicQuery(
060 DynamicQuery dynamicQuery) throws SystemException {
061 return getPersistence().findWithDynamicQuery(dynamicQuery);
062 }
063
064
067 public static List<ShoppingCoupon> findWithDynamicQuery(
068 DynamicQuery dynamicQuery, int start, int end)
069 throws SystemException {
070 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
071 }
072
073
076 public static List<ShoppingCoupon> findWithDynamicQuery(
077 DynamicQuery dynamicQuery, int start, int end,
078 OrderByComparator orderByComparator) throws SystemException {
079 return getPersistence()
080 .findWithDynamicQuery(dynamicQuery, start, end,
081 orderByComparator);
082 }
083
084
087 public static ShoppingCoupon remove(ShoppingCoupon shoppingCoupon)
088 throws SystemException {
089 return getPersistence().remove(shoppingCoupon);
090 }
091
092
095 public static ShoppingCoupon update(ShoppingCoupon shoppingCoupon,
096 boolean merge) throws SystemException {
097 return getPersistence().update(shoppingCoupon, merge);
098 }
099
100
103 public static ShoppingCoupon update(ShoppingCoupon shoppingCoupon,
104 boolean merge, ServiceContext serviceContext) throws SystemException {
105 return getPersistence().update(shoppingCoupon, merge, serviceContext);
106 }
107
108 public static void cacheResult(
109 com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon) {
110 getPersistence().cacheResult(shoppingCoupon);
111 }
112
113 public static void cacheResult(
114 java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> shoppingCoupons) {
115 getPersistence().cacheResult(shoppingCoupons);
116 }
117
118 public static com.liferay.portlet.shopping.model.ShoppingCoupon create(
119 long couponId) {
120 return getPersistence().create(couponId);
121 }
122
123 public static com.liferay.portlet.shopping.model.ShoppingCoupon remove(
124 long couponId)
125 throws com.liferay.portal.kernel.exception.SystemException,
126 com.liferay.portlet.shopping.NoSuchCouponException {
127 return getPersistence().remove(couponId);
128 }
129
130 public static com.liferay.portlet.shopping.model.ShoppingCoupon updateImpl(
131 com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon,
132 boolean merge)
133 throws com.liferay.portal.kernel.exception.SystemException {
134 return getPersistence().updateImpl(shoppingCoupon, merge);
135 }
136
137 public static com.liferay.portlet.shopping.model.ShoppingCoupon findByPrimaryKey(
138 long couponId)
139 throws com.liferay.portal.kernel.exception.SystemException,
140 com.liferay.portlet.shopping.NoSuchCouponException {
141 return getPersistence().findByPrimaryKey(couponId);
142 }
143
144 public static com.liferay.portlet.shopping.model.ShoppingCoupon fetchByPrimaryKey(
145 long couponId)
146 throws com.liferay.portal.kernel.exception.SystemException {
147 return getPersistence().fetchByPrimaryKey(couponId);
148 }
149
150 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findByGroupId(
151 long groupId)
152 throws com.liferay.portal.kernel.exception.SystemException {
153 return getPersistence().findByGroupId(groupId);
154 }
155
156 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findByGroupId(
157 long groupId, int start, int end)
158 throws com.liferay.portal.kernel.exception.SystemException {
159 return getPersistence().findByGroupId(groupId, start, end);
160 }
161
162 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findByGroupId(
163 long groupId, int start, int end,
164 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
165 throws com.liferay.portal.kernel.exception.SystemException {
166 return getPersistence()
167 .findByGroupId(groupId, start, end, orderByComparator);
168 }
169
170 public static com.liferay.portlet.shopping.model.ShoppingCoupon findByGroupId_First(
171 long groupId,
172 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
173 throws com.liferay.portal.kernel.exception.SystemException,
174 com.liferay.portlet.shopping.NoSuchCouponException {
175 return getPersistence().findByGroupId_First(groupId, orderByComparator);
176 }
177
178 public static com.liferay.portlet.shopping.model.ShoppingCoupon findByGroupId_Last(
179 long groupId,
180 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
181 throws com.liferay.portal.kernel.exception.SystemException,
182 com.liferay.portlet.shopping.NoSuchCouponException {
183 return getPersistence().findByGroupId_Last(groupId, orderByComparator);
184 }
185
186 public static com.liferay.portlet.shopping.model.ShoppingCoupon[] findByGroupId_PrevAndNext(
187 long couponId, long groupId,
188 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
189 throws com.liferay.portal.kernel.exception.SystemException,
190 com.liferay.portlet.shopping.NoSuchCouponException {
191 return getPersistence()
192 .findByGroupId_PrevAndNext(couponId, groupId,
193 orderByComparator);
194 }
195
196 public static com.liferay.portlet.shopping.model.ShoppingCoupon findByCode(
197 java.lang.String code)
198 throws com.liferay.portal.kernel.exception.SystemException,
199 com.liferay.portlet.shopping.NoSuchCouponException {
200 return getPersistence().findByCode(code);
201 }
202
203 public static com.liferay.portlet.shopping.model.ShoppingCoupon fetchByCode(
204 java.lang.String code)
205 throws com.liferay.portal.kernel.exception.SystemException {
206 return getPersistence().fetchByCode(code);
207 }
208
209 public static com.liferay.portlet.shopping.model.ShoppingCoupon fetchByCode(
210 java.lang.String code, boolean retrieveFromCache)
211 throws com.liferay.portal.kernel.exception.SystemException {
212 return getPersistence().fetchByCode(code, retrieveFromCache);
213 }
214
215 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findAll()
216 throws com.liferay.portal.kernel.exception.SystemException {
217 return getPersistence().findAll();
218 }
219
220 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findAll(
221 int start, int end)
222 throws com.liferay.portal.kernel.exception.SystemException {
223 return getPersistence().findAll(start, end);
224 }
225
226 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findAll(
227 int start, int end,
228 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
229 throws com.liferay.portal.kernel.exception.SystemException {
230 return getPersistence().findAll(start, end, orderByComparator);
231 }
232
233 public static void removeByGroupId(long groupId)
234 throws com.liferay.portal.kernel.exception.SystemException {
235 getPersistence().removeByGroupId(groupId);
236 }
237
238 public static void removeByCode(java.lang.String code)
239 throws com.liferay.portal.kernel.exception.SystemException,
240 com.liferay.portlet.shopping.NoSuchCouponException {
241 getPersistence().removeByCode(code);
242 }
243
244 public static void removeAll()
245 throws com.liferay.portal.kernel.exception.SystemException {
246 getPersistence().removeAll();
247 }
248
249 public static int countByGroupId(long groupId)
250 throws com.liferay.portal.kernel.exception.SystemException {
251 return getPersistence().countByGroupId(groupId);
252 }
253
254 public static int countByCode(java.lang.String code)
255 throws com.liferay.portal.kernel.exception.SystemException {
256 return getPersistence().countByCode(code);
257 }
258
259 public static int countAll()
260 throws com.liferay.portal.kernel.exception.SystemException {
261 return getPersistence().countAll();
262 }
263
264 public static ShoppingCouponPersistence getPersistence() {
265 if (_persistence == null) {
266 _persistence = (ShoppingCouponPersistence)PortalBeanLocatorUtil.locate(ShoppingCouponPersistence.class.getName());
267 }
268
269 return _persistence;
270 }
271
272 public void setPersistence(ShoppingCouponPersistence persistence) {
273 _persistence = persistence;
274 }
275
276 private static ShoppingCouponPersistence _persistence;
277 }