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 obc)
141 throws com.liferay.portal.SystemException {
142 return getPersistence().findByGroupId(groupId, start, end, obc);
143 }
144
145 public static com.liferay.portlet.shopping.model.ShoppingCoupon findByGroupId_First(
146 long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
147 throws com.liferay.portal.SystemException,
148 com.liferay.portlet.shopping.NoSuchCouponException {
149 return getPersistence().findByGroupId_First(groupId, obc);
150 }
151
152 public static com.liferay.portlet.shopping.model.ShoppingCoupon findByGroupId_Last(
153 long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
154 throws com.liferay.portal.SystemException,
155 com.liferay.portlet.shopping.NoSuchCouponException {
156 return getPersistence().findByGroupId_Last(groupId, obc);
157 }
158
159 public static com.liferay.portlet.shopping.model.ShoppingCoupon[] findByGroupId_PrevAndNext(
160 long couponId, long groupId,
161 com.liferay.portal.kernel.util.OrderByComparator obc)
162 throws com.liferay.portal.SystemException,
163 com.liferay.portlet.shopping.NoSuchCouponException {
164 return getPersistence().findByGroupId_PrevAndNext(couponId, groupId, obc);
165 }
166
167 public static com.liferay.portlet.shopping.model.ShoppingCoupon findByCode(
168 java.lang.String code)
169 throws com.liferay.portal.SystemException,
170 com.liferay.portlet.shopping.NoSuchCouponException {
171 return getPersistence().findByCode(code);
172 }
173
174 public static com.liferay.portlet.shopping.model.ShoppingCoupon fetchByCode(
175 java.lang.String code) throws com.liferay.portal.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.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.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) throws com.liferay.portal.SystemException {
192 return getPersistence().findAll(start, end);
193 }
194
195 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findAll(
196 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
197 throws com.liferay.portal.SystemException {
198 return getPersistence().findAll(start, end, obc);
199 }
200
201 public static void removeByGroupId(long groupId)
202 throws com.liferay.portal.SystemException {
203 getPersistence().removeByGroupId(groupId);
204 }
205
206 public static void removeByCode(java.lang.String code)
207 throws com.liferay.portal.SystemException,
208 com.liferay.portlet.shopping.NoSuchCouponException {
209 getPersistence().removeByCode(code);
210 }
211
212 public static void removeAll() throws com.liferay.portal.SystemException {
213 getPersistence().removeAll();
214 }
215
216 public static int countByGroupId(long groupId)
217 throws com.liferay.portal.SystemException {
218 return getPersistence().countByGroupId(groupId);
219 }
220
221 public static int countByCode(java.lang.String code)
222 throws com.liferay.portal.SystemException {
223 return getPersistence().countByCode(code);
224 }
225
226 public static int countAll() throws com.liferay.portal.SystemException {
227 return getPersistence().countAll();
228 }
229
230 public static ShoppingCouponPersistence getPersistence() {
231 if (_persistence == null) {
232 _persistence = (ShoppingCouponPersistence)PortalBeanLocatorUtil.locate(ShoppingCouponPersistence.class.getName());
233 }
234
235 return _persistence;
236 }
237
238 public void setPersistence(ShoppingCouponPersistence persistence) {
239 _persistence = persistence;
240 }
241
242 private static ShoppingCouponPersistence _persistence;
243 }