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 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.ShoppingCart findByGroupId_First(
146 long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
147 throws com.liferay.portal.SystemException,
148 com.liferay.portlet.shopping.NoSuchCartException {
149 return getPersistence().findByGroupId_First(groupId, obc);
150 }
151
152 public static com.liferay.portlet.shopping.model.ShoppingCart findByGroupId_Last(
153 long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
154 throws com.liferay.portal.SystemException,
155 com.liferay.portlet.shopping.NoSuchCartException {
156 return getPersistence().findByGroupId_Last(groupId, obc);
157 }
158
159 public static com.liferay.portlet.shopping.model.ShoppingCart[] findByGroupId_PrevAndNext(
160 long cartId, long groupId,
161 com.liferay.portal.kernel.util.OrderByComparator obc)
162 throws com.liferay.portal.SystemException,
163 com.liferay.portlet.shopping.NoSuchCartException {
164 return getPersistence().findByGroupId_PrevAndNext(cartId, groupId, obc);
165 }
166
167 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByUserId(
168 long userId) throws com.liferay.portal.SystemException {
169 return getPersistence().findByUserId(userId);
170 }
171
172 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByUserId(
173 long userId, int start, int end)
174 throws com.liferay.portal.SystemException {
175 return getPersistence().findByUserId(userId, start, end);
176 }
177
178 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByUserId(
179 long userId, int start, int end,
180 com.liferay.portal.kernel.util.OrderByComparator obc)
181 throws com.liferay.portal.SystemException {
182 return getPersistence().findByUserId(userId, start, end, obc);
183 }
184
185 public static com.liferay.portlet.shopping.model.ShoppingCart findByUserId_First(
186 long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
187 throws com.liferay.portal.SystemException,
188 com.liferay.portlet.shopping.NoSuchCartException {
189 return getPersistence().findByUserId_First(userId, obc);
190 }
191
192 public static com.liferay.portlet.shopping.model.ShoppingCart findByUserId_Last(
193 long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
194 throws com.liferay.portal.SystemException,
195 com.liferay.portlet.shopping.NoSuchCartException {
196 return getPersistence().findByUserId_Last(userId, obc);
197 }
198
199 public static com.liferay.portlet.shopping.model.ShoppingCart[] findByUserId_PrevAndNext(
200 long cartId, long userId,
201 com.liferay.portal.kernel.util.OrderByComparator obc)
202 throws com.liferay.portal.SystemException,
203 com.liferay.portlet.shopping.NoSuchCartException {
204 return getPersistence().findByUserId_PrevAndNext(cartId, userId, obc);
205 }
206
207 public static com.liferay.portlet.shopping.model.ShoppingCart findByG_U(
208 long groupId, long userId)
209 throws com.liferay.portal.SystemException,
210 com.liferay.portlet.shopping.NoSuchCartException {
211 return getPersistence().findByG_U(groupId, userId);
212 }
213
214 public static com.liferay.portlet.shopping.model.ShoppingCart fetchByG_U(
215 long groupId, long userId) throws com.liferay.portal.SystemException {
216 return getPersistence().fetchByG_U(groupId, userId);
217 }
218
219 public static com.liferay.portlet.shopping.model.ShoppingCart fetchByG_U(
220 long groupId, long userId, boolean retrieveFromCache)
221 throws com.liferay.portal.SystemException {
222 return getPersistence().fetchByG_U(groupId, userId, retrieveFromCache);
223 }
224
225 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findAll()
226 throws com.liferay.portal.SystemException {
227 return getPersistence().findAll();
228 }
229
230 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findAll(
231 int start, int end) throws com.liferay.portal.SystemException {
232 return getPersistence().findAll(start, end);
233 }
234
235 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findAll(
236 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
237 throws com.liferay.portal.SystemException {
238 return getPersistence().findAll(start, end, obc);
239 }
240
241 public static void removeByGroupId(long groupId)
242 throws com.liferay.portal.SystemException {
243 getPersistence().removeByGroupId(groupId);
244 }
245
246 public static void removeByUserId(long userId)
247 throws com.liferay.portal.SystemException {
248 getPersistence().removeByUserId(userId);
249 }
250
251 public static void removeByG_U(long groupId, long userId)
252 throws com.liferay.portal.SystemException,
253 com.liferay.portlet.shopping.NoSuchCartException {
254 getPersistence().removeByG_U(groupId, userId);
255 }
256
257 public static void removeAll() throws com.liferay.portal.SystemException {
258 getPersistence().removeAll();
259 }
260
261 public static int countByGroupId(long groupId)
262 throws com.liferay.portal.SystemException {
263 return getPersistence().countByGroupId(groupId);
264 }
265
266 public static int countByUserId(long userId)
267 throws com.liferay.portal.SystemException {
268 return getPersistence().countByUserId(userId);
269 }
270
271 public static int countByG_U(long groupId, long userId)
272 throws com.liferay.portal.SystemException {
273 return getPersistence().countByG_U(groupId, userId);
274 }
275
276 public static int countAll() throws com.liferay.portal.SystemException {
277 return getPersistence().countAll();
278 }
279
280 public static ShoppingCartPersistence getPersistence() {
281 if (_persistence == null) {
282 _persistence = (ShoppingCartPersistence)PortalBeanLocatorUtil.locate(ShoppingCartPersistence.class.getName());
283 }
284
285 return _persistence;
286 }
287
288 public void setPersistence(ShoppingCartPersistence persistence) {
289 _persistence = persistence;
290 }
291
292 private static ShoppingCartPersistence _persistence;
293 }