1
22
23 package com.liferay.portlet.shopping.service.persistence;
24
25 import com.liferay.portal.SystemException;
26 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
27 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
28
29 import com.liferay.portlet.shopping.model.ShoppingCart;
30
31 import java.util.List;
32
33
46 public class ShoppingCartUtil {
47
50 public static void clearCache() {
51 getPersistence().clearCache();
52 }
53
54
57 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
58 throws SystemException {
59 return getPersistence().findWithDynamicQuery(dynamicQuery);
60 }
61
62
65 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
66 int start, int end) throws SystemException {
67 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
68 }
69
70
73 public static ShoppingCart remove(ShoppingCart shoppingCart)
74 throws SystemException {
75 return getPersistence().remove(shoppingCart);
76 }
77
78
81 public static ShoppingCart update(ShoppingCart shoppingCart, boolean merge)
82 throws SystemException {
83 return getPersistence().update(shoppingCart, merge);
84 }
85
86 public static void cacheResult(
87 com.liferay.portlet.shopping.model.ShoppingCart shoppingCart) {
88 getPersistence().cacheResult(shoppingCart);
89 }
90
91 public static void cacheResult(
92 java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> shoppingCarts) {
93 getPersistence().cacheResult(shoppingCarts);
94 }
95
96 public static com.liferay.portlet.shopping.model.ShoppingCart create(
97 long cartId) {
98 return getPersistence().create(cartId);
99 }
100
101 public static com.liferay.portlet.shopping.model.ShoppingCart remove(
102 long cartId)
103 throws com.liferay.portal.SystemException,
104 com.liferay.portlet.shopping.NoSuchCartException {
105 return getPersistence().remove(cartId);
106 }
107
108
111 public static com.liferay.portlet.shopping.model.ShoppingCart update(
112 com.liferay.portlet.shopping.model.ShoppingCart shoppingCart)
113 throws com.liferay.portal.SystemException {
114 return getPersistence().update(shoppingCart);
115 }
116
117 public static com.liferay.portlet.shopping.model.ShoppingCart updateImpl(
118 com.liferay.portlet.shopping.model.ShoppingCart shoppingCart,
119 boolean merge) throws com.liferay.portal.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.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.SystemException {
132 return getPersistence().fetchByPrimaryKey(cartId);
133 }
134
135 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByGroupId(
136 long groupId) throws com.liferay.portal.SystemException {
137 return getPersistence().findByGroupId(groupId);
138 }
139
140 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByGroupId(
141 long groupId, int start, int end)
142 throws com.liferay.portal.SystemException {
143 return getPersistence().findByGroupId(groupId, start, end);
144 }
145
146 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByGroupId(
147 long groupId, int start, int end,
148 com.liferay.portal.kernel.util.OrderByComparator obc)
149 throws com.liferay.portal.SystemException {
150 return getPersistence().findByGroupId(groupId, start, end, obc);
151 }
152
153 public static com.liferay.portlet.shopping.model.ShoppingCart findByGroupId_First(
154 long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
155 throws com.liferay.portal.SystemException,
156 com.liferay.portlet.shopping.NoSuchCartException {
157 return getPersistence().findByGroupId_First(groupId, obc);
158 }
159
160 public static com.liferay.portlet.shopping.model.ShoppingCart findByGroupId_Last(
161 long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
162 throws com.liferay.portal.SystemException,
163 com.liferay.portlet.shopping.NoSuchCartException {
164 return getPersistence().findByGroupId_Last(groupId, obc);
165 }
166
167 public static com.liferay.portlet.shopping.model.ShoppingCart[] findByGroupId_PrevAndNext(
168 long cartId, long groupId,
169 com.liferay.portal.kernel.util.OrderByComparator obc)
170 throws com.liferay.portal.SystemException,
171 com.liferay.portlet.shopping.NoSuchCartException {
172 return getPersistence().findByGroupId_PrevAndNext(cartId, groupId, obc);
173 }
174
175 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByUserId(
176 long userId) throws com.liferay.portal.SystemException {
177 return getPersistence().findByUserId(userId);
178 }
179
180 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByUserId(
181 long userId, int start, int end)
182 throws com.liferay.portal.SystemException {
183 return getPersistence().findByUserId(userId, start, end);
184 }
185
186 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByUserId(
187 long userId, int start, int end,
188 com.liferay.portal.kernel.util.OrderByComparator obc)
189 throws com.liferay.portal.SystemException {
190 return getPersistence().findByUserId(userId, start, end, obc);
191 }
192
193 public static com.liferay.portlet.shopping.model.ShoppingCart findByUserId_First(
194 long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
195 throws com.liferay.portal.SystemException,
196 com.liferay.portlet.shopping.NoSuchCartException {
197 return getPersistence().findByUserId_First(userId, obc);
198 }
199
200 public static com.liferay.portlet.shopping.model.ShoppingCart findByUserId_Last(
201 long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
202 throws com.liferay.portal.SystemException,
203 com.liferay.portlet.shopping.NoSuchCartException {
204 return getPersistence().findByUserId_Last(userId, obc);
205 }
206
207 public static com.liferay.portlet.shopping.model.ShoppingCart[] findByUserId_PrevAndNext(
208 long cartId, long userId,
209 com.liferay.portal.kernel.util.OrderByComparator obc)
210 throws com.liferay.portal.SystemException,
211 com.liferay.portlet.shopping.NoSuchCartException {
212 return getPersistence().findByUserId_PrevAndNext(cartId, userId, obc);
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, com.liferay.portal.kernel.util.OrderByComparator obc)
245 throws com.liferay.portal.SystemException {
246 return getPersistence().findAll(start, end, obc);
247 }
248
249 public static void removeByGroupId(long groupId)
250 throws com.liferay.portal.SystemException {
251 getPersistence().removeByGroupId(groupId);
252 }
253
254 public static void removeByUserId(long userId)
255 throws com.liferay.portal.SystemException {
256 getPersistence().removeByUserId(userId);
257 }
258
259 public static void removeByG_U(long groupId, long userId)
260 throws com.liferay.portal.SystemException,
261 com.liferay.portlet.shopping.NoSuchCartException {
262 getPersistence().removeByG_U(groupId, userId);
263 }
264
265 public static void removeAll() throws com.liferay.portal.SystemException {
266 getPersistence().removeAll();
267 }
268
269 public static int countByGroupId(long groupId)
270 throws com.liferay.portal.SystemException {
271 return getPersistence().countByGroupId(groupId);
272 }
273
274 public static int countByUserId(long userId)
275 throws com.liferay.portal.SystemException {
276 return getPersistence().countByUserId(userId);
277 }
278
279 public static int countByG_U(long groupId, long userId)
280 throws com.liferay.portal.SystemException {
281 return getPersistence().countByG_U(groupId, userId);
282 }
283
284 public static int countAll() throws com.liferay.portal.SystemException {
285 return getPersistence().countAll();
286 }
287
288 public static ShoppingCartPersistence getPersistence() {
289 if (_persistence == null) {
290 _persistence = (ShoppingCartPersistence)PortalBeanLocatorUtil.locate(ShoppingCartPersistence.class.getName());
291 }
292
293 return _persistence;
294 }
295
296 public void setPersistence(ShoppingCartPersistence persistence) {
297 _persistence = persistence;
298 }
299
300 private static ShoppingCartPersistence _persistence;
301 }