001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.shopping.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.service.ServiceContext;
022    
023    import com.liferay.portlet.shopping.model.ShoppingCart;
024    
025    import java.util.List;
026    
027    /**
028     * The persistence utility for the shopping cart service.
029     *
030     * <p>
031     * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regnerate this class.
032     * </p>
033     *
034     * @author Brian Wing Shun Chan
035     * @see ShoppingCartPersistence
036     * @see ShoppingCartPersistenceImpl
037     * @generated
038     */
039    public class ShoppingCartUtil {
040            /**
041             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
042             */
043            public static void clearCache() {
044                    getPersistence().clearCache();
045            }
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
049             */
050            public static void clearCache(ShoppingCart shoppingCart) {
051                    getPersistence().clearCache(shoppingCart);
052            }
053    
054            /**
055             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
056             */
057            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
058                    throws SystemException {
059                    return getPersistence().countWithDynamicQuery(dynamicQuery);
060            }
061    
062            /**
063             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
064             */
065            public static List<ShoppingCart> findWithDynamicQuery(
066                    DynamicQuery dynamicQuery) throws SystemException {
067                    return getPersistence().findWithDynamicQuery(dynamicQuery);
068            }
069    
070            /**
071             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
072             */
073            public static List<ShoppingCart> findWithDynamicQuery(
074                    DynamicQuery dynamicQuery, int start, int end)
075                    throws SystemException {
076                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
077            }
078    
079            /**
080             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
081             */
082            public static List<ShoppingCart> findWithDynamicQuery(
083                    DynamicQuery dynamicQuery, int start, int end,
084                    OrderByComparator orderByComparator) throws SystemException {
085                    return getPersistence()
086                                       .findWithDynamicQuery(dynamicQuery, start, end,
087                            orderByComparator);
088            }
089    
090            /**
091             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
092             */
093            public static ShoppingCart remove(ShoppingCart shoppingCart)
094                    throws SystemException {
095                    return getPersistence().remove(shoppingCart);
096            }
097    
098            /**
099             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
100             */
101            public static ShoppingCart update(ShoppingCart shoppingCart, boolean merge)
102                    throws SystemException {
103                    return getPersistence().update(shoppingCart, merge);
104            }
105    
106            /**
107             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
108             */
109            public static ShoppingCart update(ShoppingCart shoppingCart, boolean merge,
110                    ServiceContext serviceContext) throws SystemException {
111                    return getPersistence().update(shoppingCart, merge, serviceContext);
112            }
113    
114            /**
115            * Caches the shopping cart in the entity cache if it is enabled.
116            *
117            * @param shoppingCart the shopping cart to cache
118            */
119            public static void cacheResult(
120                    com.liferay.portlet.shopping.model.ShoppingCart shoppingCart) {
121                    getPersistence().cacheResult(shoppingCart);
122            }
123    
124            /**
125            * Caches the shopping carts in the entity cache if it is enabled.
126            *
127            * @param shoppingCarts the shopping carts to cache
128            */
129            public static void cacheResult(
130                    java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> shoppingCarts) {
131                    getPersistence().cacheResult(shoppingCarts);
132            }
133    
134            /**
135            * Creates a new shopping cart with the primary key.
136            *
137            * @param cartId the primary key for the new shopping cart
138            * @return the new shopping cart
139            */
140            public static com.liferay.portlet.shopping.model.ShoppingCart create(
141                    long cartId) {
142                    return getPersistence().create(cartId);
143            }
144    
145            /**
146            * Removes the shopping cart with the primary key from the database. Also notifies the appropriate model listeners.
147            *
148            * @param cartId the primary key of the shopping cart to remove
149            * @return the shopping cart that was removed
150            * @throws com.liferay.portlet.shopping.NoSuchCartException if a shopping cart with the primary key could not be found
151            * @throws SystemException if a system exception occurred
152            */
153            public static com.liferay.portlet.shopping.model.ShoppingCart remove(
154                    long cartId)
155                    throws com.liferay.portal.kernel.exception.SystemException,
156                            com.liferay.portlet.shopping.NoSuchCartException {
157                    return getPersistence().remove(cartId);
158            }
159    
160            public static com.liferay.portlet.shopping.model.ShoppingCart updateImpl(
161                    com.liferay.portlet.shopping.model.ShoppingCart shoppingCart,
162                    boolean merge)
163                    throws com.liferay.portal.kernel.exception.SystemException {
164                    return getPersistence().updateImpl(shoppingCart, merge);
165            }
166    
167            /**
168            * Finds the shopping cart with the primary key or throws a {@link com.liferay.portlet.shopping.NoSuchCartException} if it could not be found.
169            *
170            * @param cartId the primary key of the shopping cart to find
171            * @return the shopping cart
172            * @throws com.liferay.portlet.shopping.NoSuchCartException if a shopping cart with the primary key could not be found
173            * @throws SystemException if a system exception occurred
174            */
175            public static com.liferay.portlet.shopping.model.ShoppingCart findByPrimaryKey(
176                    long cartId)
177                    throws com.liferay.portal.kernel.exception.SystemException,
178                            com.liferay.portlet.shopping.NoSuchCartException {
179                    return getPersistence().findByPrimaryKey(cartId);
180            }
181    
182            /**
183            * Finds the shopping cart with the primary key or returns <code>null</code> if it could not be found.
184            *
185            * @param cartId the primary key of the shopping cart to find
186            * @return the shopping cart, or <code>null</code> if a shopping cart with the primary key could not be found
187            * @throws SystemException if a system exception occurred
188            */
189            public static com.liferay.portlet.shopping.model.ShoppingCart fetchByPrimaryKey(
190                    long cartId) throws com.liferay.portal.kernel.exception.SystemException {
191                    return getPersistence().fetchByPrimaryKey(cartId);
192            }
193    
194            /**
195            * Finds all the shopping carts where groupId = &#63;.
196            *
197            * @param groupId the group id to search with
198            * @return the matching shopping carts
199            * @throws SystemException if a system exception occurred
200            */
201            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByGroupId(
202                    long groupId)
203                    throws com.liferay.portal.kernel.exception.SystemException {
204                    return getPersistence().findByGroupId(groupId);
205            }
206    
207            /**
208            * Finds a range of all the shopping carts where groupId = &#63;.
209            *
210            * <p>
211            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
212            * </p>
213            *
214            * @param groupId the group id to search with
215            * @param start the lower bound of the range of shopping carts to return
216            * @param end the upper bound of the range of shopping carts to return (not inclusive)
217            * @return the range of matching shopping carts
218            * @throws SystemException if a system exception occurred
219            */
220            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByGroupId(
221                    long groupId, int start, int end)
222                    throws com.liferay.portal.kernel.exception.SystemException {
223                    return getPersistence().findByGroupId(groupId, start, end);
224            }
225    
226            /**
227            * Finds an ordered range of all the shopping carts where groupId = &#63;.
228            *
229            * <p>
230            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
231            * </p>
232            *
233            * @param groupId the group id to search with
234            * @param start the lower bound of the range of shopping carts to return
235            * @param end the upper bound of the range of shopping carts to return (not inclusive)
236            * @param orderByComparator the comparator to order the results by
237            * @return the ordered range of matching shopping carts
238            * @throws SystemException if a system exception occurred
239            */
240            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByGroupId(
241                    long groupId, int start, int end,
242                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
243                    throws com.liferay.portal.kernel.exception.SystemException {
244                    return getPersistence()
245                                       .findByGroupId(groupId, start, end, orderByComparator);
246            }
247    
248            /**
249            * Finds the first shopping cart in the ordered set where groupId = &#63;.
250            *
251            * <p>
252            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
253            * </p>
254            *
255            * @param groupId the group id to search with
256            * @param orderByComparator the comparator to order the set by
257            * @return the first matching shopping cart
258            * @throws com.liferay.portlet.shopping.NoSuchCartException if a matching shopping cart could not be found
259            * @throws SystemException if a system exception occurred
260            */
261            public static com.liferay.portlet.shopping.model.ShoppingCart findByGroupId_First(
262                    long groupId,
263                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
264                    throws com.liferay.portal.kernel.exception.SystemException,
265                            com.liferay.portlet.shopping.NoSuchCartException {
266                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
267            }
268    
269            /**
270            * Finds the last shopping cart in the ordered set where groupId = &#63;.
271            *
272            * <p>
273            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
274            * </p>
275            *
276            * @param groupId the group id to search with
277            * @param orderByComparator the comparator to order the set by
278            * @return the last matching shopping cart
279            * @throws com.liferay.portlet.shopping.NoSuchCartException if a matching shopping cart could not be found
280            * @throws SystemException if a system exception occurred
281            */
282            public static com.liferay.portlet.shopping.model.ShoppingCart findByGroupId_Last(
283                    long groupId,
284                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
285                    throws com.liferay.portal.kernel.exception.SystemException,
286                            com.liferay.portlet.shopping.NoSuchCartException {
287                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
288            }
289    
290            /**
291            * Finds the shopping carts before and after the current shopping cart in the ordered set where groupId = &#63;.
292            *
293            * <p>
294            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
295            * </p>
296            *
297            * @param cartId the primary key of the current shopping cart
298            * @param groupId the group id to search with
299            * @param orderByComparator the comparator to order the set by
300            * @return the previous, current, and next shopping cart
301            * @throws com.liferay.portlet.shopping.NoSuchCartException if a shopping cart with the primary key could not be found
302            * @throws SystemException if a system exception occurred
303            */
304            public static com.liferay.portlet.shopping.model.ShoppingCart[] findByGroupId_PrevAndNext(
305                    long cartId, long groupId,
306                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
307                    throws com.liferay.portal.kernel.exception.SystemException,
308                            com.liferay.portlet.shopping.NoSuchCartException {
309                    return getPersistence()
310                                       .findByGroupId_PrevAndNext(cartId, groupId, orderByComparator);
311            }
312    
313            /**
314            * Finds all the shopping carts where userId = &#63;.
315            *
316            * @param userId the user id to search with
317            * @return the matching shopping carts
318            * @throws SystemException if a system exception occurred
319            */
320            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByUserId(
321                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
322                    return getPersistence().findByUserId(userId);
323            }
324    
325            /**
326            * Finds a range of all the shopping carts where userId = &#63;.
327            *
328            * <p>
329            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
330            * </p>
331            *
332            * @param userId the user id to search with
333            * @param start the lower bound of the range of shopping carts to return
334            * @param end the upper bound of the range of shopping carts to return (not inclusive)
335            * @return the range of matching shopping carts
336            * @throws SystemException if a system exception occurred
337            */
338            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByUserId(
339                    long userId, int start, int end)
340                    throws com.liferay.portal.kernel.exception.SystemException {
341                    return getPersistence().findByUserId(userId, start, end);
342            }
343    
344            /**
345            * Finds an ordered range of all the shopping carts where userId = &#63;.
346            *
347            * <p>
348            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
349            * </p>
350            *
351            * @param userId the user id to search with
352            * @param start the lower bound of the range of shopping carts to return
353            * @param end the upper bound of the range of shopping carts to return (not inclusive)
354            * @param orderByComparator the comparator to order the results by
355            * @return the ordered range of matching shopping carts
356            * @throws SystemException if a system exception occurred
357            */
358            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findByUserId(
359                    long userId, int start, int end,
360                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
361                    throws com.liferay.portal.kernel.exception.SystemException {
362                    return getPersistence()
363                                       .findByUserId(userId, start, end, orderByComparator);
364            }
365    
366            /**
367            * Finds the first shopping cart in the ordered set where userId = &#63;.
368            *
369            * <p>
370            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
371            * </p>
372            *
373            * @param userId the user id to search with
374            * @param orderByComparator the comparator to order the set by
375            * @return the first matching shopping cart
376            * @throws com.liferay.portlet.shopping.NoSuchCartException if a matching shopping cart could not be found
377            * @throws SystemException if a system exception occurred
378            */
379            public static com.liferay.portlet.shopping.model.ShoppingCart findByUserId_First(
380                    long userId,
381                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
382                    throws com.liferay.portal.kernel.exception.SystemException,
383                            com.liferay.portlet.shopping.NoSuchCartException {
384                    return getPersistence().findByUserId_First(userId, orderByComparator);
385            }
386    
387            /**
388            * Finds the last shopping cart in the ordered set where userId = &#63;.
389            *
390            * <p>
391            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
392            * </p>
393            *
394            * @param userId the user id to search with
395            * @param orderByComparator the comparator to order the set by
396            * @return the last matching shopping cart
397            * @throws com.liferay.portlet.shopping.NoSuchCartException if a matching shopping cart could not be found
398            * @throws SystemException if a system exception occurred
399            */
400            public static com.liferay.portlet.shopping.model.ShoppingCart findByUserId_Last(
401                    long userId,
402                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
403                    throws com.liferay.portal.kernel.exception.SystemException,
404                            com.liferay.portlet.shopping.NoSuchCartException {
405                    return getPersistence().findByUserId_Last(userId, orderByComparator);
406            }
407    
408            /**
409            * Finds the shopping carts before and after the current shopping cart in the ordered set where userId = &#63;.
410            *
411            * <p>
412            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
413            * </p>
414            *
415            * @param cartId the primary key of the current shopping cart
416            * @param userId the user id to search with
417            * @param orderByComparator the comparator to order the set by
418            * @return the previous, current, and next shopping cart
419            * @throws com.liferay.portlet.shopping.NoSuchCartException if a shopping cart with the primary key could not be found
420            * @throws SystemException if a system exception occurred
421            */
422            public static com.liferay.portlet.shopping.model.ShoppingCart[] findByUserId_PrevAndNext(
423                    long cartId, long userId,
424                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
425                    throws com.liferay.portal.kernel.exception.SystemException,
426                            com.liferay.portlet.shopping.NoSuchCartException {
427                    return getPersistence()
428                                       .findByUserId_PrevAndNext(cartId, userId, orderByComparator);
429            }
430    
431            /**
432            * Finds the shopping cart where groupId = &#63; and userId = &#63; or throws a {@link com.liferay.portlet.shopping.NoSuchCartException} if it could not be found.
433            *
434            * @param groupId the group id to search with
435            * @param userId the user id to search with
436            * @return the matching shopping cart
437            * @throws com.liferay.portlet.shopping.NoSuchCartException if a matching shopping cart could not be found
438            * @throws SystemException if a system exception occurred
439            */
440            public static com.liferay.portlet.shopping.model.ShoppingCart findByG_U(
441                    long groupId, long userId)
442                    throws com.liferay.portal.kernel.exception.SystemException,
443                            com.liferay.portlet.shopping.NoSuchCartException {
444                    return getPersistence().findByG_U(groupId, userId);
445            }
446    
447            /**
448            * Finds the shopping cart where groupId = &#63; and userId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
449            *
450            * @param groupId the group id to search with
451            * @param userId the user id to search with
452            * @return the matching shopping cart, or <code>null</code> if a matching shopping cart could not be found
453            * @throws SystemException if a system exception occurred
454            */
455            public static com.liferay.portlet.shopping.model.ShoppingCart fetchByG_U(
456                    long groupId, long userId)
457                    throws com.liferay.portal.kernel.exception.SystemException {
458                    return getPersistence().fetchByG_U(groupId, userId);
459            }
460    
461            /**
462            * Finds the shopping cart where groupId = &#63; and userId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
463            *
464            * @param groupId the group id to search with
465            * @param userId the user id to search with
466            * @return the matching shopping cart, or <code>null</code> if a matching shopping cart could not be found
467            * @throws SystemException if a system exception occurred
468            */
469            public static com.liferay.portlet.shopping.model.ShoppingCart fetchByG_U(
470                    long groupId, long userId, boolean retrieveFromCache)
471                    throws com.liferay.portal.kernel.exception.SystemException {
472                    return getPersistence().fetchByG_U(groupId, userId, retrieveFromCache);
473            }
474    
475            /**
476            * Finds all the shopping carts.
477            *
478            * @return the shopping carts
479            * @throws SystemException if a system exception occurred
480            */
481            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findAll()
482                    throws com.liferay.portal.kernel.exception.SystemException {
483                    return getPersistence().findAll();
484            }
485    
486            /**
487            * Finds a range of all the shopping carts.
488            *
489            * <p>
490            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
491            * </p>
492            *
493            * @param start the lower bound of the range of shopping carts to return
494            * @param end the upper bound of the range of shopping carts to return (not inclusive)
495            * @return the range of shopping carts
496            * @throws SystemException if a system exception occurred
497            */
498            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findAll(
499                    int start, int end)
500                    throws com.liferay.portal.kernel.exception.SystemException {
501                    return getPersistence().findAll(start, end);
502            }
503    
504            /**
505            * Finds an ordered range of all the shopping carts.
506            *
507            * <p>
508            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
509            * </p>
510            *
511            * @param start the lower bound of the range of shopping carts to return
512            * @param end the upper bound of the range of shopping carts to return (not inclusive)
513            * @param orderByComparator the comparator to order the results by
514            * @return the ordered range of shopping carts
515            * @throws SystemException if a system exception occurred
516            */
517            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> findAll(
518                    int start, int end,
519                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
520                    throws com.liferay.portal.kernel.exception.SystemException {
521                    return getPersistence().findAll(start, end, orderByComparator);
522            }
523    
524            /**
525            * Removes all the shopping carts where groupId = &#63; from the database.
526            *
527            * @param groupId the group id to search with
528            * @throws SystemException if a system exception occurred
529            */
530            public static void removeByGroupId(long groupId)
531                    throws com.liferay.portal.kernel.exception.SystemException {
532                    getPersistence().removeByGroupId(groupId);
533            }
534    
535            /**
536            * Removes all the shopping carts where userId = &#63; from the database.
537            *
538            * @param userId the user id to search with
539            * @throws SystemException if a system exception occurred
540            */
541            public static void removeByUserId(long userId)
542                    throws com.liferay.portal.kernel.exception.SystemException {
543                    getPersistence().removeByUserId(userId);
544            }
545    
546            /**
547            * Removes the shopping cart where groupId = &#63; and userId = &#63; from the database.
548            *
549            * @param groupId the group id to search with
550            * @param userId the user id to search with
551            * @throws SystemException if a system exception occurred
552            */
553            public static void removeByG_U(long groupId, long userId)
554                    throws com.liferay.portal.kernel.exception.SystemException,
555                            com.liferay.portlet.shopping.NoSuchCartException {
556                    getPersistence().removeByG_U(groupId, userId);
557            }
558    
559            /**
560            * Removes all the shopping carts from the database.
561            *
562            * @throws SystemException if a system exception occurred
563            */
564            public static void removeAll()
565                    throws com.liferay.portal.kernel.exception.SystemException {
566                    getPersistence().removeAll();
567            }
568    
569            /**
570            * Counts all the shopping carts where groupId = &#63;.
571            *
572            * @param groupId the group id to search with
573            * @return the number of matching shopping carts
574            * @throws SystemException if a system exception occurred
575            */
576            public static int countByGroupId(long groupId)
577                    throws com.liferay.portal.kernel.exception.SystemException {
578                    return getPersistence().countByGroupId(groupId);
579            }
580    
581            /**
582            * Counts all the shopping carts where userId = &#63;.
583            *
584            * @param userId the user id to search with
585            * @return the number of matching shopping carts
586            * @throws SystemException if a system exception occurred
587            */
588            public static int countByUserId(long userId)
589                    throws com.liferay.portal.kernel.exception.SystemException {
590                    return getPersistence().countByUserId(userId);
591            }
592    
593            /**
594            * Counts all the shopping carts where groupId = &#63; and userId = &#63;.
595            *
596            * @param groupId the group id to search with
597            * @param userId the user id to search with
598            * @return the number of matching shopping carts
599            * @throws SystemException if a system exception occurred
600            */
601            public static int countByG_U(long groupId, long userId)
602                    throws com.liferay.portal.kernel.exception.SystemException {
603                    return getPersistence().countByG_U(groupId, userId);
604            }
605    
606            /**
607            * Counts all the shopping carts.
608            *
609            * @return the number of shopping carts
610            * @throws SystemException if a system exception occurred
611            */
612            public static int countAll()
613                    throws com.liferay.portal.kernel.exception.SystemException {
614                    return getPersistence().countAll();
615            }
616    
617            public static ShoppingCartPersistence getPersistence() {
618                    if (_persistence == null) {
619                            _persistence = (ShoppingCartPersistence)PortalBeanLocatorUtil.locate(ShoppingCartPersistence.class.getName());
620                    }
621    
622                    return _persistence;
623            }
624    
625            public void setPersistence(ShoppingCartPersistence persistence) {
626                    _persistence = persistence;
627            }
628    
629            private static ShoppingCartPersistence _persistence;
630    }