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