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 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.kernel.exception.SystemException,
96 com.liferay.portlet.shopping.NoSuchCartException {
97 return getPersistence().remove(cartId);
98 }
99
100 public static com.liferay.portlet.shopping.model.ShoppingCart updateImpl(
101 com.liferay.portlet.shopping.model.ShoppingCart shoppingCart,
102 boolean merge)
103 throws com.liferay.portal.kernel.exception.SystemException {
104 return getPersistence().updateImpl(shoppingCart, merge);
105 }
106
107 public static com.liferay.portlet.shopping.model.ShoppingCart findByPrimaryKey(
108 long cartId)
109 throws com.liferay.portal.kernel.exception.SystemException,
110 com.liferay.portlet.shopping.NoSuchCartException {
111 return getPersistence().findByPrimaryKey(cartId);
112 }
113
114 public static com.liferay.portlet.shopping.model.ShoppingCart fetchByPrimaryKey(
115 long cartId) throws com.liferay.portal.kernel.exception.SystemException {
116 return getPersistence().fetchByPrimaryKey(cartId);
117 }
118
119 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByGroupId(
120 long groupId)
121 throws com.liferay.portal.kernel.exception.SystemException {
122 return getPersistence().findByGroupId(groupId);
123 }
124
125 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByGroupId(
126 long groupId, int start, int end)
127 throws com.liferay.portal.kernel.exception.SystemException {
128 return getPersistence().findByGroupId(groupId, start, end);
129 }
130
131 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByGroupId(
132 long groupId, int start, int end,
133 com.liferay.portal.kernel.util.OrderByComparator obc)
134 throws com.liferay.portal.kernel.exception.SystemException {
135 return getPersistence().findByGroupId(groupId, start, end, obc);
136 }
137
138 public static com.liferay.portlet.shopping.model.ShoppingCart findByGroupId_First(
139 long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
140 throws com.liferay.portal.kernel.exception.SystemException,
141 com.liferay.portlet.shopping.NoSuchCartException {
142 return getPersistence().findByGroupId_First(groupId, obc);
143 }
144
145 public static com.liferay.portlet.shopping.model.ShoppingCart findByGroupId_Last(
146 long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
147 throws com.liferay.portal.kernel.exception.SystemException,
148 com.liferay.portlet.shopping.NoSuchCartException {
149 return getPersistence().findByGroupId_Last(groupId, obc);
150 }
151
152 public static com.liferay.portlet.shopping.model.ShoppingCart[] findByGroupId_PrevAndNext(
153 long cartId, long groupId,
154 com.liferay.portal.kernel.util.OrderByComparator obc)
155 throws com.liferay.portal.kernel.exception.SystemException,
156 com.liferay.portlet.shopping.NoSuchCartException {
157 return getPersistence().findByGroupId_PrevAndNext(cartId, groupId, obc);
158 }
159
160 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByUserId(
161 long userId) throws com.liferay.portal.kernel.exception.SystemException {
162 return getPersistence().findByUserId(userId);
163 }
164
165 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByUserId(
166 long userId, int start, int end)
167 throws com.liferay.portal.kernel.exception.SystemException {
168 return getPersistence().findByUserId(userId, start, end);
169 }
170
171 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByUserId(
172 long userId, int start, int end,
173 com.liferay.portal.kernel.util.OrderByComparator obc)
174 throws com.liferay.portal.kernel.exception.SystemException {
175 return getPersistence().findByUserId(userId, start, end, obc);
176 }
177
178 public static com.liferay.portlet.shopping.model.ShoppingCart findByUserId_First(
179 long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
180 throws com.liferay.portal.kernel.exception.SystemException,
181 com.liferay.portlet.shopping.NoSuchCartException {
182 return getPersistence().findByUserId_First(userId, obc);
183 }
184
185 public static com.liferay.portlet.shopping.model.ShoppingCart findByUserId_Last(
186 long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
187 throws com.liferay.portal.kernel.exception.SystemException,
188 com.liferay.portlet.shopping.NoSuchCartException {
189 return getPersistence().findByUserId_Last(userId, obc);
190 }
191
192 public static com.liferay.portlet.shopping.model.ShoppingCart[] findByUserId_PrevAndNext(
193 long cartId, long userId,
194 com.liferay.portal.kernel.util.OrderByComparator obc)
195 throws com.liferay.portal.kernel.exception.SystemException,
196 com.liferay.portlet.shopping.NoSuchCartException {
197 return getPersistence().findByUserId_PrevAndNext(cartId, userId, obc);
198 }
199
200 public static com.liferay.portlet.shopping.model.ShoppingCart findByG_U(
201 long groupId, long userId)
202 throws com.liferay.portal.kernel.exception.SystemException,
203 com.liferay.portlet.shopping.NoSuchCartException {
204 return getPersistence().findByG_U(groupId, userId);
205 }
206
207 public static com.liferay.portlet.shopping.model.ShoppingCart fetchByG_U(
208 long groupId, long userId)
209 throws com.liferay.portal.kernel.exception.SystemException {
210 return getPersistence().fetchByG_U(groupId, userId);
211 }
212
213 public static com.liferay.portlet.shopping.model.ShoppingCart fetchByG_U(
214 long groupId, long userId, boolean retrieveFromCache)
215 throws com.liferay.portal.kernel.exception.SystemException {
216 return getPersistence().fetchByG_U(groupId, userId, retrieveFromCache);
217 }
218
219 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findAll()
220 throws com.liferay.portal.kernel.exception.SystemException {
221 return getPersistence().findAll();
222 }
223
224 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findAll(
225 int start, int end)
226 throws com.liferay.portal.kernel.exception.SystemException {
227 return getPersistence().findAll(start, end);
228 }
229
230 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findAll(
231 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
232 throws com.liferay.portal.kernel.exception.SystemException {
233 return getPersistence().findAll(start, end, obc);
234 }
235
236 public static void removeByGroupId(long groupId)
237 throws com.liferay.portal.kernel.exception.SystemException {
238 getPersistence().removeByGroupId(groupId);
239 }
240
241 public static void removeByUserId(long userId)
242 throws com.liferay.portal.kernel.exception.SystemException {
243 getPersistence().removeByUserId(userId);
244 }
245
246 public static void removeByG_U(long groupId, long userId)
247 throws com.liferay.portal.kernel.exception.SystemException,
248 com.liferay.portlet.shopping.NoSuchCartException {
249 getPersistence().removeByG_U(groupId, userId);
250 }
251
252 public static void removeAll()
253 throws com.liferay.portal.kernel.exception.SystemException {
254 getPersistence().removeAll();
255 }
256
257 public static int countByGroupId(long groupId)
258 throws com.liferay.portal.kernel.exception.SystemException {
259 return getPersistence().countByGroupId(groupId);
260 }
261
262 public static int countByUserId(long userId)
263 throws com.liferay.portal.kernel.exception.SystemException {
264 return getPersistence().countByUserId(userId);
265 }
266
267 public static int countByG_U(long groupId, long userId)
268 throws com.liferay.portal.kernel.exception.SystemException {
269 return getPersistence().countByG_U(groupId, userId);
270 }
271
272 public static int countAll()
273 throws com.liferay.portal.kernel.exception.SystemException {
274 return getPersistence().countAll();
275 }
276
277 public static ShoppingCartPersistence getPersistence() {
278 if (_persistence == null) {
279 _persistence = (ShoppingCartPersistence)PortalBeanLocatorUtil.locate(ShoppingCartPersistence.class.getName());
280 }
281
282 return _persistence;
283 }
284
285 public void setPersistence(ShoppingCartPersistence persistence) {
286 _persistence = persistence;
287 }
288
289 private static ShoppingCartPersistence _persistence;
290 }