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.ShoppingOrderItem;
024    
025    import java.util.List;
026    
027    /**
028     * @author    Brian Wing Shun Chan
029     * @see       ShoppingOrderItemPersistence
030     * @see       ShoppingOrderItemPersistenceImpl
031     * @generated
032     */
033    public class ShoppingOrderItemUtil {
034            /**
035             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
036             */
037            public static void clearCache() {
038                    getPersistence().clearCache();
039            }
040    
041            /**
042             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
043             */
044            public static void clearCache(ShoppingOrderItem shoppingOrderItem) {
045                    getPersistence().clearCache(shoppingOrderItem);
046            }
047    
048            /**
049             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
050             */
051            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
052                    throws SystemException {
053                    return getPersistence().countWithDynamicQuery(dynamicQuery);
054            }
055    
056            /**
057             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
058             */
059            public static List<ShoppingOrderItem> findWithDynamicQuery(
060                    DynamicQuery dynamicQuery) throws SystemException {
061                    return getPersistence().findWithDynamicQuery(dynamicQuery);
062            }
063    
064            /**
065             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
066             */
067            public static List<ShoppingOrderItem> findWithDynamicQuery(
068                    DynamicQuery dynamicQuery, int start, int end)
069                    throws SystemException {
070                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
071            }
072    
073            /**
074             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
075             */
076            public static List<ShoppingOrderItem> findWithDynamicQuery(
077                    DynamicQuery dynamicQuery, int start, int end,
078                    OrderByComparator orderByComparator) throws SystemException {
079                    return getPersistence()
080                                       .findWithDynamicQuery(dynamicQuery, start, end,
081                            orderByComparator);
082            }
083    
084            /**
085             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
086             */
087            public static ShoppingOrderItem remove(ShoppingOrderItem shoppingOrderItem)
088                    throws SystemException {
089                    return getPersistence().remove(shoppingOrderItem);
090            }
091    
092            /**
093             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
094             */
095            public static ShoppingOrderItem update(
096                    ShoppingOrderItem shoppingOrderItem, boolean merge)
097                    throws SystemException {
098                    return getPersistence().update(shoppingOrderItem, merge);
099            }
100    
101            /**
102             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
103             */
104            public static ShoppingOrderItem update(
105                    ShoppingOrderItem shoppingOrderItem, boolean merge,
106                    ServiceContext serviceContext) throws SystemException {
107                    return getPersistence().update(shoppingOrderItem, merge, serviceContext);
108            }
109    
110            public static void cacheResult(
111                    com.liferay.portlet.shopping.model.ShoppingOrderItem shoppingOrderItem) {
112                    getPersistence().cacheResult(shoppingOrderItem);
113            }
114    
115            public static void cacheResult(
116                    java.util.List<com.liferay.portlet.shopping.model.ShoppingOrderItem> shoppingOrderItems) {
117                    getPersistence().cacheResult(shoppingOrderItems);
118            }
119    
120            public static com.liferay.portlet.shopping.model.ShoppingOrderItem create(
121                    long orderItemId) {
122                    return getPersistence().create(orderItemId);
123            }
124    
125            public static com.liferay.portlet.shopping.model.ShoppingOrderItem remove(
126                    long orderItemId)
127                    throws com.liferay.portal.kernel.exception.SystemException,
128                            com.liferay.portlet.shopping.NoSuchOrderItemException {
129                    return getPersistence().remove(orderItemId);
130            }
131    
132            public static com.liferay.portlet.shopping.model.ShoppingOrderItem updateImpl(
133                    com.liferay.portlet.shopping.model.ShoppingOrderItem shoppingOrderItem,
134                    boolean merge)
135                    throws com.liferay.portal.kernel.exception.SystemException {
136                    return getPersistence().updateImpl(shoppingOrderItem, merge);
137            }
138    
139            public static com.liferay.portlet.shopping.model.ShoppingOrderItem findByPrimaryKey(
140                    long orderItemId)
141                    throws com.liferay.portal.kernel.exception.SystemException,
142                            com.liferay.portlet.shopping.NoSuchOrderItemException {
143                    return getPersistence().findByPrimaryKey(orderItemId);
144            }
145    
146            public static com.liferay.portlet.shopping.model.ShoppingOrderItem fetchByPrimaryKey(
147                    long orderItemId)
148                    throws com.liferay.portal.kernel.exception.SystemException {
149                    return getPersistence().fetchByPrimaryKey(orderItemId);
150            }
151    
152            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingOrderItem> findByOrderId(
153                    long orderId)
154                    throws com.liferay.portal.kernel.exception.SystemException {
155                    return getPersistence().findByOrderId(orderId);
156            }
157    
158            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingOrderItem> findByOrderId(
159                    long orderId, int start, int end)
160                    throws com.liferay.portal.kernel.exception.SystemException {
161                    return getPersistence().findByOrderId(orderId, start, end);
162            }
163    
164            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingOrderItem> findByOrderId(
165                    long orderId, int start, int end,
166                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
167                    throws com.liferay.portal.kernel.exception.SystemException {
168                    return getPersistence()
169                                       .findByOrderId(orderId, start, end, orderByComparator);
170            }
171    
172            public static com.liferay.portlet.shopping.model.ShoppingOrderItem findByOrderId_First(
173                    long orderId,
174                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
175                    throws com.liferay.portal.kernel.exception.SystemException,
176                            com.liferay.portlet.shopping.NoSuchOrderItemException {
177                    return getPersistence().findByOrderId_First(orderId, orderByComparator);
178            }
179    
180            public static com.liferay.portlet.shopping.model.ShoppingOrderItem findByOrderId_Last(
181                    long orderId,
182                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
183                    throws com.liferay.portal.kernel.exception.SystemException,
184                            com.liferay.portlet.shopping.NoSuchOrderItemException {
185                    return getPersistence().findByOrderId_Last(orderId, orderByComparator);
186            }
187    
188            public static com.liferay.portlet.shopping.model.ShoppingOrderItem[] findByOrderId_PrevAndNext(
189                    long orderItemId, long orderId,
190                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
191                    throws com.liferay.portal.kernel.exception.SystemException,
192                            com.liferay.portlet.shopping.NoSuchOrderItemException {
193                    return getPersistence()
194                                       .findByOrderId_PrevAndNext(orderItemId, orderId,
195                            orderByComparator);
196            }
197    
198            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingOrderItem> findAll()
199                    throws com.liferay.portal.kernel.exception.SystemException {
200                    return getPersistence().findAll();
201            }
202    
203            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingOrderItem> findAll(
204                    int start, int end)
205                    throws com.liferay.portal.kernel.exception.SystemException {
206                    return getPersistence().findAll(start, end);
207            }
208    
209            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingOrderItem> findAll(
210                    int start, int end,
211                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
212                    throws com.liferay.portal.kernel.exception.SystemException {
213                    return getPersistence().findAll(start, end, orderByComparator);
214            }
215    
216            public static void removeByOrderId(long orderId)
217                    throws com.liferay.portal.kernel.exception.SystemException {
218                    getPersistence().removeByOrderId(orderId);
219            }
220    
221            public static void removeAll()
222                    throws com.liferay.portal.kernel.exception.SystemException {
223                    getPersistence().removeAll();
224            }
225    
226            public static int countByOrderId(long orderId)
227                    throws com.liferay.portal.kernel.exception.SystemException {
228                    return getPersistence().countByOrderId(orderId);
229            }
230    
231            public static int countAll()
232                    throws com.liferay.portal.kernel.exception.SystemException {
233                    return getPersistence().countAll();
234            }
235    
236            public static ShoppingOrderItemPersistence getPersistence() {
237                    if (_persistence == null) {
238                            _persistence = (ShoppingOrderItemPersistence)PortalBeanLocatorUtil.locate(ShoppingOrderItemPersistence.class.getName());
239                    }
240    
241                    return _persistence;
242            }
243    
244            public void setPersistence(ShoppingOrderItemPersistence persistence) {
245                    _persistence = persistence;
246            }
247    
248            private static ShoppingOrderItemPersistence _persistence;
249    }