1
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
38 public class ShoppingCouponUtil {
39
42 public static void clearCache() {
43 getPersistence().clearCache();
44 }
45
46
49 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
50 throws SystemException {
51 return getPersistence().findWithDynamicQuery(dynamicQuery);
52 }
53
54
57 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
58 int start, int end) throws SystemException {
59 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
60 }
61
62
65 public static ShoppingCoupon remove(ShoppingCoupon shoppingCoupon)
66 throws SystemException {
67 return getPersistence().remove(shoppingCoupon);
68 }
69
70
73 public static ShoppingCoupon update(ShoppingCoupon shoppingCoupon,
74 boolean merge) throws SystemException {
75 return getPersistence().update(shoppingCoupon, merge);
76 }
77
78 public static void cacheResult(
79 com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon) {
80 getPersistence().cacheResult(shoppingCoupon);
81 }
82
83 public static void cacheResult(
84 java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> shoppingCoupons) {
85 getPersistence().cacheResult(shoppingCoupons);
86 }
87
88 public static com.liferay.portlet.shopping.model.ShoppingCoupon create(
89 long couponId) {
90 return getPersistence().create(couponId);
91 }
92
93 public static com.liferay.portlet.shopping.model.ShoppingCoupon remove(
94 long couponId)
95 throws com.liferay.portal.kernel.exception.SystemException,
96 com.liferay.portlet.shopping.NoSuchCouponException {
97 return getPersistence().remove(couponId);
98 }
99
100 public static com.liferay.portlet.shopping.model.ShoppingCoupon updateImpl(
101 com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon,
102 boolean merge)
103 throws com.liferay.portal.kernel.exception.SystemException {
104 return getPersistence().updateImpl(shoppingCoupon, merge);
105 }
106
107 public static com.liferay.portlet.shopping.model.ShoppingCoupon findByPrimaryKey(
108 long couponId)
109 throws com.liferay.portal.kernel.exception.SystemException,
110 com.liferay.portlet.shopping.NoSuchCouponException {
111 return getPersistence().findByPrimaryKey(couponId);
112 }
113
114 public static com.liferay.portlet.shopping.model.ShoppingCoupon fetchByPrimaryKey(
115 long couponId)
116 throws com.liferay.portal.kernel.exception.SystemException {
117 return getPersistence().fetchByPrimaryKey(couponId);
118 }
119
120 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findByGroupId(
121 long groupId)
122 throws com.liferay.portal.kernel.exception.SystemException {
123 return getPersistence().findByGroupId(groupId);
124 }
125
126 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findByGroupId(
127 long groupId, int start, int end)
128 throws com.liferay.portal.kernel.exception.SystemException {
129 return getPersistence().findByGroupId(groupId, start, end);
130 }
131
132 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findByGroupId(
133 long groupId, int start, int end,
134 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
135 throws com.liferay.portal.kernel.exception.SystemException {
136 return getPersistence()
137 .findByGroupId(groupId, start, end, orderByComparator);
138 }
139
140 public static com.liferay.portlet.shopping.model.ShoppingCoupon findByGroupId_First(
141 long groupId,
142 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
143 throws com.liferay.portal.kernel.exception.SystemException,
144 com.liferay.portlet.shopping.NoSuchCouponException {
145 return getPersistence().findByGroupId_First(groupId, orderByComparator);
146 }
147
148 public static com.liferay.portlet.shopping.model.ShoppingCoupon findByGroupId_Last(
149 long groupId,
150 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
151 throws com.liferay.portal.kernel.exception.SystemException,
152 com.liferay.portlet.shopping.NoSuchCouponException {
153 return getPersistence().findByGroupId_Last(groupId, orderByComparator);
154 }
155
156 public static com.liferay.portlet.shopping.model.ShoppingCoupon[] findByGroupId_PrevAndNext(
157 long couponId, 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()
162 .findByGroupId_PrevAndNext(couponId, groupId,
163 orderByComparator);
164 }
165
166 public static com.liferay.portlet.shopping.model.ShoppingCoupon findByCode(
167 java.lang.String code)
168 throws com.liferay.portal.kernel.exception.SystemException,
169 com.liferay.portlet.shopping.NoSuchCouponException {
170 return getPersistence().findByCode(code);
171 }
172
173 public static com.liferay.portlet.shopping.model.ShoppingCoupon fetchByCode(
174 java.lang.String code)
175 throws com.liferay.portal.kernel.exception.SystemException {
176 return getPersistence().fetchByCode(code);
177 }
178
179 public static com.liferay.portlet.shopping.model.ShoppingCoupon fetchByCode(
180 java.lang.String code, boolean retrieveFromCache)
181 throws com.liferay.portal.kernel.exception.SystemException {
182 return getPersistence().fetchByCode(code, retrieveFromCache);
183 }
184
185 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findAll()
186 throws com.liferay.portal.kernel.exception.SystemException {
187 return getPersistence().findAll();
188 }
189
190 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findAll(
191 int start, int end)
192 throws com.liferay.portal.kernel.exception.SystemException {
193 return getPersistence().findAll(start, end);
194 }
195
196 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findAll(
197 int start, int end,
198 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
199 throws com.liferay.portal.kernel.exception.SystemException {
200 return getPersistence().findAll(start, end, orderByComparator);
201 }
202
203 public static void removeByGroupId(long groupId)
204 throws com.liferay.portal.kernel.exception.SystemException {
205 getPersistence().removeByGroupId(groupId);
206 }
207
208 public static void removeByCode(java.lang.String code)
209 throws com.liferay.portal.kernel.exception.SystemException,
210 com.liferay.portlet.shopping.NoSuchCouponException {
211 getPersistence().removeByCode(code);
212 }
213
214 public static void removeAll()
215 throws com.liferay.portal.kernel.exception.SystemException {
216 getPersistence().removeAll();
217 }
218
219 public static int countByGroupId(long groupId)
220 throws com.liferay.portal.kernel.exception.SystemException {
221 return getPersistence().countByGroupId(groupId);
222 }
223
224 public static int countByCode(java.lang.String code)
225 throws com.liferay.portal.kernel.exception.SystemException {
226 return getPersistence().countByCode(code);
227 }
228
229 public static int countAll()
230 throws com.liferay.portal.kernel.exception.SystemException {
231 return getPersistence().countAll();
232 }
233
234 public static ShoppingCouponPersistence getPersistence() {
235 if (_persistence == null) {
236 _persistence = (ShoppingCouponPersistence)PortalBeanLocatorUtil.locate(ShoppingCouponPersistence.class.getName());
237 }
238
239 return _persistence;
240 }
241
242 public void setPersistence(ShoppingCouponPersistence persistence) {
243 _persistence = persistence;
244 }
245
246 private static ShoppingCouponPersistence _persistence;
247 }