1
14
15 package com.liferay.portlet.shopping.service.persistence;
16
17 import com.liferay.portal.SystemException;
18 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
19 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
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.SystemException,
96 com.liferay.portlet.shopping.NoSuchCouponException {
97 return getPersistence().remove(couponId);
98 }
99
100
103 public static com.liferay.portlet.shopping.model.ShoppingCoupon update(
104 com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon)
105 throws com.liferay.portal.SystemException {
106 return getPersistence().update(shoppingCoupon);
107 }
108
109 public static com.liferay.portlet.shopping.model.ShoppingCoupon updateImpl(
110 com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon,
111 boolean merge) throws com.liferay.portal.SystemException {
112 return getPersistence().updateImpl(shoppingCoupon, merge);
113 }
114
115 public static com.liferay.portlet.shopping.model.ShoppingCoupon findByPrimaryKey(
116 long couponId)
117 throws com.liferay.portal.SystemException,
118 com.liferay.portlet.shopping.NoSuchCouponException {
119 return getPersistence().findByPrimaryKey(couponId);
120 }
121
122 public static com.liferay.portlet.shopping.model.ShoppingCoupon fetchByPrimaryKey(
123 long couponId) throws com.liferay.portal.SystemException {
124 return getPersistence().fetchByPrimaryKey(couponId);
125 }
126
127 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findByGroupId(
128 long groupId) throws com.liferay.portal.SystemException {
129 return getPersistence().findByGroupId(groupId);
130 }
131
132 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findByGroupId(
133 long groupId, int start, int end)
134 throws com.liferay.portal.SystemException {
135 return getPersistence().findByGroupId(groupId, start, end);
136 }
137
138 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findByGroupId(
139 long groupId, int start, int end,
140 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
141 throws com.liferay.portal.SystemException {
142 return getPersistence()
143 .findByGroupId(groupId, start, end, orderByComparator);
144 }
145
146 public static com.liferay.portlet.shopping.model.ShoppingCoupon findByGroupId_First(
147 long groupId,
148 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
149 throws com.liferay.portal.SystemException,
150 com.liferay.portlet.shopping.NoSuchCouponException {
151 return getPersistence().findByGroupId_First(groupId, orderByComparator);
152 }
153
154 public static com.liferay.portlet.shopping.model.ShoppingCoupon findByGroupId_Last(
155 long groupId,
156 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
157 throws com.liferay.portal.SystemException,
158 com.liferay.portlet.shopping.NoSuchCouponException {
159 return getPersistence().findByGroupId_Last(groupId, orderByComparator);
160 }
161
162 public static com.liferay.portlet.shopping.model.ShoppingCoupon[] findByGroupId_PrevAndNext(
163 long couponId, long groupId,
164 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
165 throws com.liferay.portal.SystemException,
166 com.liferay.portlet.shopping.NoSuchCouponException {
167 return getPersistence()
168 .findByGroupId_PrevAndNext(couponId, groupId,
169 orderByComparator);
170 }
171
172 public static com.liferay.portlet.shopping.model.ShoppingCoupon findByCode(
173 java.lang.String code)
174 throws com.liferay.portal.SystemException,
175 com.liferay.portlet.shopping.NoSuchCouponException {
176 return getPersistence().findByCode(code);
177 }
178
179 public static com.liferay.portlet.shopping.model.ShoppingCoupon fetchByCode(
180 java.lang.String code) throws com.liferay.portal.SystemException {
181 return getPersistence().fetchByCode(code);
182 }
183
184 public static com.liferay.portlet.shopping.model.ShoppingCoupon fetchByCode(
185 java.lang.String code, boolean retrieveFromCache)
186 throws com.liferay.portal.SystemException {
187 return getPersistence().fetchByCode(code, retrieveFromCache);
188 }
189
190 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findAll()
191 throws com.liferay.portal.SystemException {
192 return getPersistence().findAll();
193 }
194
195 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findAll(
196 int start, int end) throws com.liferay.portal.SystemException {
197 return getPersistence().findAll(start, end);
198 }
199
200 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findAll(
201 int start, int end,
202 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
203 throws com.liferay.portal.SystemException {
204 return getPersistence().findAll(start, end, orderByComparator);
205 }
206
207 public static void removeByGroupId(long groupId)
208 throws com.liferay.portal.SystemException {
209 getPersistence().removeByGroupId(groupId);
210 }
211
212 public static void removeByCode(java.lang.String code)
213 throws com.liferay.portal.SystemException,
214 com.liferay.portlet.shopping.NoSuchCouponException {
215 getPersistence().removeByCode(code);
216 }
217
218 public static void removeAll() throws com.liferay.portal.SystemException {
219 getPersistence().removeAll();
220 }
221
222 public static int countByGroupId(long groupId)
223 throws com.liferay.portal.SystemException {
224 return getPersistence().countByGroupId(groupId);
225 }
226
227 public static int countByCode(java.lang.String code)
228 throws com.liferay.portal.SystemException {
229 return getPersistence().countByCode(code);
230 }
231
232 public static int countAll() throws com.liferay.portal.SystemException {
233 return getPersistence().countAll();
234 }
235
236 public static ShoppingCouponPersistence getPersistence() {
237 if (_persistence == null) {
238 _persistence = (ShoppingCouponPersistence)PortalBeanLocatorUtil.locate(ShoppingCouponPersistence.class.getName());
239 }
240
241 return _persistence;
242 }
243
244 public void setPersistence(ShoppingCouponPersistence persistence) {
245 _persistence = persistence;
246 }
247
248 private static ShoppingCouponPersistence _persistence;
249 }