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