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.ShoppingCart;
22
23 import java.util.List;
24
25
38 public class ShoppingCartUtil {
39
42 public static void clearCache() {
43 getPersistence().clearCache();
44 }
45
46
49 public static void clearCache(ShoppingCart shoppingCart) {
50 getPersistence().clearCache(shoppingCart);
51 }
52
53
56 public long countWithDynamicQuery(DynamicQuery dynamicQuery)
57 throws SystemException {
58 return getPersistence().countWithDynamicQuery(dynamicQuery);
59 }
60
61
64 public static List<ShoppingCart> findWithDynamicQuery(
65 DynamicQuery dynamicQuery) throws SystemException {
66 return getPersistence().findWithDynamicQuery(dynamicQuery);
67 }
68
69
72 public static List<ShoppingCart> findWithDynamicQuery(
73 DynamicQuery dynamicQuery, int start, int end)
74 throws SystemException {
75 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
76 }
77
78
81 public static ShoppingCart remove(ShoppingCart shoppingCart)
82 throws SystemException {
83 return getPersistence().remove(shoppingCart);
84 }
85
86
89 public static ShoppingCart update(ShoppingCart shoppingCart, boolean merge)
90 throws SystemException {
91 return getPersistence().update(shoppingCart, merge);
92 }
93
94 public static void cacheResult(
95 com.liferay.portlet.shopping.model.ShoppingCart shoppingCart) {
96 getPersistence().cacheResult(shoppingCart);
97 }
98
99 public static void cacheResult(
100 java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> shoppingCarts) {
101 getPersistence().cacheResult(shoppingCarts);
102 }
103
104 public static com.liferay.portlet.shopping.model.ShoppingCart create(
105 long cartId) {
106 return getPersistence().create(cartId);
107 }
108
109 public static com.liferay.portlet.shopping.model.ShoppingCart remove(
110 long cartId)
111 throws com.liferay.portal.kernel.exception.SystemException,
112 com.liferay.portlet.shopping.NoSuchCartException {
113 return getPersistence().remove(cartId);
114 }
115
116 public static com.liferay.portlet.shopping.model.ShoppingCart updateImpl(
117 com.liferay.portlet.shopping.model.ShoppingCart shoppingCart,
118 boolean merge)
119 throws com.liferay.portal.kernel.exception.SystemException {
120 return getPersistence().updateImpl(shoppingCart, merge);
121 }
122
123 public static com.liferay.portlet.shopping.model.ShoppingCart findByPrimaryKey(
124 long cartId)
125 throws com.liferay.portal.kernel.exception.SystemException,
126 com.liferay.portlet.shopping.NoSuchCartException {
127 return getPersistence().findByPrimaryKey(cartId);
128 }
129
130 public static com.liferay.portlet.shopping.model.ShoppingCart fetchByPrimaryKey(
131 long cartId) throws com.liferay.portal.kernel.exception.SystemException {
132 return getPersistence().fetchByPrimaryKey(cartId);
133 }
134
135 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByGroupId(
136 long groupId)
137 throws com.liferay.portal.kernel.exception.SystemException {
138 return getPersistence().findByGroupId(groupId);
139 }
140
141 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByGroupId(
142 long groupId, int start, int end)
143 throws com.liferay.portal.kernel.exception.SystemException {
144 return getPersistence().findByGroupId(groupId, start, end);
145 }
146
147 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByGroupId(
148 long groupId, int start, int end,
149 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
150 throws com.liferay.portal.kernel.exception.SystemException {
151 return getPersistence()
152 .findByGroupId(groupId, start, end, orderByComparator);
153 }
154
155 public static com.liferay.portlet.shopping.model.ShoppingCart findByGroupId_First(
156 long groupId,
157 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
158 throws com.liferay.portal.kernel.exception.SystemException,
159 com.liferay.portlet.shopping.NoSuchCartException {
160 return getPersistence().findByGroupId_First(groupId, orderByComparator);
161 }
162
163 public static com.liferay.portlet.shopping.model.ShoppingCart findByGroupId_Last(
164 long groupId,
165 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
166 throws com.liferay.portal.kernel.exception.SystemException,
167 com.liferay.portlet.shopping.NoSuchCartException {
168 return getPersistence().findByGroupId_Last(groupId, orderByComparator);
169 }
170
171 public static com.liferay.portlet.shopping.model.ShoppingCart[] findByGroupId_PrevAndNext(
172 long cartId, long groupId,
173 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
174 throws com.liferay.portal.kernel.exception.SystemException,
175 com.liferay.portlet.shopping.NoSuchCartException {
176 return getPersistence()
177 .findByGroupId_PrevAndNext(cartId, groupId, orderByComparator);
178 }
179
180 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByUserId(
181 long userId) throws com.liferay.portal.kernel.exception.SystemException {
182 return getPersistence().findByUserId(userId);
183 }
184
185 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByUserId(
186 long userId, int start, int end)
187 throws com.liferay.portal.kernel.exception.SystemException {
188 return getPersistence().findByUserId(userId, start, end);
189 }
190
191 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByUserId(
192 long userId, int start, int end,
193 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
194 throws com.liferay.portal.kernel.exception.SystemException {
195 return getPersistence()
196 .findByUserId(userId, start, end, orderByComparator);
197 }
198
199 public static com.liferay.portlet.shopping.model.ShoppingCart findByUserId_First(
200 long userId,
201 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
202 throws com.liferay.portal.kernel.exception.SystemException,
203 com.liferay.portlet.shopping.NoSuchCartException {
204 return getPersistence().findByUserId_First(userId, orderByComparator);
205 }
206
207 public static com.liferay.portlet.shopping.model.ShoppingCart findByUserId_Last(
208 long userId,
209 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
210 throws com.liferay.portal.kernel.exception.SystemException,
211 com.liferay.portlet.shopping.NoSuchCartException {
212 return getPersistence().findByUserId_Last(userId, orderByComparator);
213 }
214
215 public static com.liferay.portlet.shopping.model.ShoppingCart[] findByUserId_PrevAndNext(
216 long cartId, long userId,
217 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
218 throws com.liferay.portal.kernel.exception.SystemException,
219 com.liferay.portlet.shopping.NoSuchCartException {
220 return getPersistence()
221 .findByUserId_PrevAndNext(cartId, userId, orderByComparator);
222 }
223
224 public static com.liferay.portlet.shopping.model.ShoppingCart findByG_U(
225 long groupId, long userId)
226 throws com.liferay.portal.kernel.exception.SystemException,
227 com.liferay.portlet.shopping.NoSuchCartException {
228 return getPersistence().findByG_U(groupId, userId);
229 }
230
231 public static com.liferay.portlet.shopping.model.ShoppingCart fetchByG_U(
232 long groupId, long userId)
233 throws com.liferay.portal.kernel.exception.SystemException {
234 return getPersistence().fetchByG_U(groupId, userId);
235 }
236
237 public static com.liferay.portlet.shopping.model.ShoppingCart fetchByG_U(
238 long groupId, long userId, boolean retrieveFromCache)
239 throws com.liferay.portal.kernel.exception.SystemException {
240 return getPersistence().fetchByG_U(groupId, userId, retrieveFromCache);
241 }
242
243 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findAll()
244 throws com.liferay.portal.kernel.exception.SystemException {
245 return getPersistence().findAll();
246 }
247
248 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findAll(
249 int start, int end)
250 throws com.liferay.portal.kernel.exception.SystemException {
251 return getPersistence().findAll(start, end);
252 }
253
254 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findAll(
255 int start, int end,
256 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
257 throws com.liferay.portal.kernel.exception.SystemException {
258 return getPersistence().findAll(start, end, orderByComparator);
259 }
260
261 public static void removeByGroupId(long groupId)
262 throws com.liferay.portal.kernel.exception.SystemException {
263 getPersistence().removeByGroupId(groupId);
264 }
265
266 public static void removeByUserId(long userId)
267 throws com.liferay.portal.kernel.exception.SystemException {
268 getPersistence().removeByUserId(userId);
269 }
270
271 public static void removeByG_U(long groupId, long userId)
272 throws com.liferay.portal.kernel.exception.SystemException,
273 com.liferay.portlet.shopping.NoSuchCartException {
274 getPersistence().removeByG_U(groupId, userId);
275 }
276
277 public static void removeAll()
278 throws com.liferay.portal.kernel.exception.SystemException {
279 getPersistence().removeAll();
280 }
281
282 public static int countByGroupId(long groupId)
283 throws com.liferay.portal.kernel.exception.SystemException {
284 return getPersistence().countByGroupId(groupId);
285 }
286
287 public static int countByUserId(long userId)
288 throws com.liferay.portal.kernel.exception.SystemException {
289 return getPersistence().countByUserId(userId);
290 }
291
292 public static int countByG_U(long groupId, long userId)
293 throws com.liferay.portal.kernel.exception.SystemException {
294 return getPersistence().countByG_U(groupId, userId);
295 }
296
297 public static int countAll()
298 throws com.liferay.portal.kernel.exception.SystemException {
299 return getPersistence().countAll();
300 }
301
302 public static ShoppingCartPersistence getPersistence() {
303 if (_persistence == null) {
304 _persistence = (ShoppingCartPersistence)PortalBeanLocatorUtil.locate(ShoppingCartPersistence.class.getName());
305 }
306
307 return _persistence;
308 }
309
310 public void setPersistence(ShoppingCartPersistence persistence) {
311 _persistence = persistence;
312 }
313
314 private static ShoppingCartPersistence _persistence;
315 }