001    /**
002     * Copyright (c) 2000-2012 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;
016    
017    import com.liferay.portal.service.ServiceWrapper;
018    
019    /**
020     * <p>
021     * This class is a wrapper for {@link ShoppingCartLocalService}.
022     * </p>
023     *
024     * @author    Brian Wing Shun Chan
025     * @see       ShoppingCartLocalService
026     * @generated
027     */
028    public class ShoppingCartLocalServiceWrapper implements ShoppingCartLocalService,
029            ServiceWrapper<ShoppingCartLocalService> {
030            public ShoppingCartLocalServiceWrapper(
031                    ShoppingCartLocalService shoppingCartLocalService) {
032                    _shoppingCartLocalService = shoppingCartLocalService;
033            }
034    
035            /**
036            * Adds the shopping cart to the database. Also notifies the appropriate model listeners.
037            *
038            * @param shoppingCart the shopping cart
039            * @return the shopping cart that was added
040            * @throws SystemException if a system exception occurred
041            */
042            public com.liferay.portlet.shopping.model.ShoppingCart addShoppingCart(
043                    com.liferay.portlet.shopping.model.ShoppingCart shoppingCart)
044                    throws com.liferay.portal.kernel.exception.SystemException {
045                    return _shoppingCartLocalService.addShoppingCart(shoppingCart);
046            }
047    
048            /**
049            * Creates a new shopping cart with the primary key. Does not add the shopping cart to the database.
050            *
051            * @param cartId the primary key for the new shopping cart
052            * @return the new shopping cart
053            */
054            public com.liferay.portlet.shopping.model.ShoppingCart createShoppingCart(
055                    long cartId) {
056                    return _shoppingCartLocalService.createShoppingCart(cartId);
057            }
058    
059            /**
060            * Deletes the shopping cart with the primary key from the database. Also notifies the appropriate model listeners.
061            *
062            * @param cartId the primary key of the shopping cart
063            * @throws PortalException if a shopping cart with the primary key could not be found
064            * @throws SystemException if a system exception occurred
065            */
066            public void deleteShoppingCart(long cartId)
067                    throws com.liferay.portal.kernel.exception.PortalException,
068                            com.liferay.portal.kernel.exception.SystemException {
069                    _shoppingCartLocalService.deleteShoppingCart(cartId);
070            }
071    
072            /**
073            * Deletes the shopping cart from the database. Also notifies the appropriate model listeners.
074            *
075            * @param shoppingCart the shopping cart
076            * @throws SystemException if a system exception occurred
077            */
078            public void deleteShoppingCart(
079                    com.liferay.portlet.shopping.model.ShoppingCart shoppingCart)
080                    throws com.liferay.portal.kernel.exception.SystemException {
081                    _shoppingCartLocalService.deleteShoppingCart(shoppingCart);
082            }
083    
084            /**
085            * Performs a dynamic query on the database and returns the matching rows.
086            *
087            * @param dynamicQuery the dynamic query
088            * @return the matching rows
089            * @throws SystemException if a system exception occurred
090            */
091            @SuppressWarnings("rawtypes")
092            public java.util.List dynamicQuery(
093                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
094                    throws com.liferay.portal.kernel.exception.SystemException {
095                    return _shoppingCartLocalService.dynamicQuery(dynamicQuery);
096            }
097    
098            /**
099            * Performs a dynamic query on the database and returns a range of the matching rows.
100            *
101            * <p>
102            * 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.
103            * </p>
104            *
105            * @param dynamicQuery the dynamic query
106            * @param start the lower bound of the range of model instances
107            * @param end the upper bound of the range of model instances (not inclusive)
108            * @return the range of matching rows
109            * @throws SystemException if a system exception occurred
110            */
111            @SuppressWarnings("rawtypes")
112            public java.util.List dynamicQuery(
113                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
114                    int end) throws com.liferay.portal.kernel.exception.SystemException {
115                    return _shoppingCartLocalService.dynamicQuery(dynamicQuery, start, end);
116            }
117    
118            /**
119            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
120            *
121            * <p>
122            * 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.
123            * </p>
124            *
125            * @param dynamicQuery the dynamic query
126            * @param start the lower bound of the range of model instances
127            * @param end the upper bound of the range of model instances (not inclusive)
128            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
129            * @return the ordered range of matching rows
130            * @throws SystemException if a system exception occurred
131            */
132            @SuppressWarnings("rawtypes")
133            public java.util.List dynamicQuery(
134                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
135                    int end,
136                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
137                    throws com.liferay.portal.kernel.exception.SystemException {
138                    return _shoppingCartLocalService.dynamicQuery(dynamicQuery, start, end,
139                            orderByComparator);
140            }
141    
142            /**
143            * Returns the number of rows that match the dynamic query.
144            *
145            * @param dynamicQuery the dynamic query
146            * @return the number of rows that match the dynamic query
147            * @throws SystemException if a system exception occurred
148            */
149            public long dynamicQueryCount(
150                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
151                    throws com.liferay.portal.kernel.exception.SystemException {
152                    return _shoppingCartLocalService.dynamicQueryCount(dynamicQuery);
153            }
154    
155            public com.liferay.portlet.shopping.model.ShoppingCart fetchShoppingCart(
156                    long cartId) throws com.liferay.portal.kernel.exception.SystemException {
157                    return _shoppingCartLocalService.fetchShoppingCart(cartId);
158            }
159    
160            /**
161            * Returns the shopping cart with the primary key.
162            *
163            * @param cartId the primary key of the shopping cart
164            * @return the shopping cart
165            * @throws PortalException if a shopping cart with the primary key could not be found
166            * @throws SystemException if a system exception occurred
167            */
168            public com.liferay.portlet.shopping.model.ShoppingCart getShoppingCart(
169                    long cartId)
170                    throws com.liferay.portal.kernel.exception.PortalException,
171                            com.liferay.portal.kernel.exception.SystemException {
172                    return _shoppingCartLocalService.getShoppingCart(cartId);
173            }
174    
175            public com.liferay.portal.model.PersistedModel getPersistedModel(
176                    java.io.Serializable primaryKeyObj)
177                    throws com.liferay.portal.kernel.exception.PortalException,
178                            com.liferay.portal.kernel.exception.SystemException {
179                    return _shoppingCartLocalService.getPersistedModel(primaryKeyObj);
180            }
181    
182            /**
183            * Returns a range of all the shopping carts.
184            *
185            * <p>
186            * 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.
187            * </p>
188            *
189            * @param start the lower bound of the range of shopping carts
190            * @param end the upper bound of the range of shopping carts (not inclusive)
191            * @return the range of shopping carts
192            * @throws SystemException if a system exception occurred
193            */
194            public java.util.List<com.liferay.portlet.shopping.model.ShoppingCart> getShoppingCarts(
195                    int start, int end)
196                    throws com.liferay.portal.kernel.exception.SystemException {
197                    return _shoppingCartLocalService.getShoppingCarts(start, end);
198            }
199    
200            /**
201            * Returns the number of shopping carts.
202            *
203            * @return the number of shopping carts
204            * @throws SystemException if a system exception occurred
205            */
206            public int getShoppingCartsCount()
207                    throws com.liferay.portal.kernel.exception.SystemException {
208                    return _shoppingCartLocalService.getShoppingCartsCount();
209            }
210    
211            /**
212            * Updates the shopping cart in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
213            *
214            * @param shoppingCart the shopping cart
215            * @return the shopping cart that was updated
216            * @throws SystemException if a system exception occurred
217            */
218            public com.liferay.portlet.shopping.model.ShoppingCart updateShoppingCart(
219                    com.liferay.portlet.shopping.model.ShoppingCart shoppingCart)
220                    throws com.liferay.portal.kernel.exception.SystemException {
221                    return _shoppingCartLocalService.updateShoppingCart(shoppingCart);
222            }
223    
224            /**
225            * Updates the shopping cart in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
226            *
227            * @param shoppingCart the shopping cart
228            * @param merge whether to merge the shopping cart with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
229            * @return the shopping cart that was updated
230            * @throws SystemException if a system exception occurred
231            */
232            public com.liferay.portlet.shopping.model.ShoppingCart updateShoppingCart(
233                    com.liferay.portlet.shopping.model.ShoppingCart shoppingCart,
234                    boolean merge)
235                    throws com.liferay.portal.kernel.exception.SystemException {
236                    return _shoppingCartLocalService.updateShoppingCart(shoppingCart, merge);
237            }
238    
239            /**
240            * Returns the Spring bean ID for this bean.
241            *
242            * @return the Spring bean ID for this bean
243            */
244            public java.lang.String getBeanIdentifier() {
245                    return _shoppingCartLocalService.getBeanIdentifier();
246            }
247    
248            /**
249            * Sets the Spring bean ID for this bean.
250            *
251            * @param beanIdentifier the Spring bean ID for this bean
252            */
253            public void setBeanIdentifier(java.lang.String beanIdentifier) {
254                    _shoppingCartLocalService.setBeanIdentifier(beanIdentifier);
255            }
256    
257            public void deleteGroupCarts(long groupId)
258                    throws com.liferay.portal.kernel.exception.SystemException {
259                    _shoppingCartLocalService.deleteGroupCarts(groupId);
260            }
261    
262            public void deleteUserCarts(long userId)
263                    throws com.liferay.portal.kernel.exception.SystemException {
264                    _shoppingCartLocalService.deleteUserCarts(userId);
265            }
266    
267            public com.liferay.portlet.shopping.model.ShoppingCart getCart(
268                    long userId, long groupId)
269                    throws com.liferay.portal.kernel.exception.PortalException,
270                            com.liferay.portal.kernel.exception.SystemException {
271                    return _shoppingCartLocalService.getCart(userId, groupId);
272            }
273    
274            public java.util.Map<com.liferay.portlet.shopping.model.ShoppingCartItem, java.lang.Integer> getItems(
275                    long groupId, java.lang.String itemIds)
276                    throws com.liferay.portal.kernel.exception.SystemException {
277                    return _shoppingCartLocalService.getItems(groupId, itemIds);
278            }
279    
280            public com.liferay.portlet.shopping.model.ShoppingCart updateCart(
281                    long userId, long groupId, java.lang.String itemIds,
282                    java.lang.String couponCodes, int altShipping, boolean insure)
283                    throws com.liferay.portal.kernel.exception.PortalException,
284                            com.liferay.portal.kernel.exception.SystemException {
285                    return _shoppingCartLocalService.updateCart(userId, groupId, itemIds,
286                            couponCodes, altShipping, insure);
287            }
288    
289            /**
290             * @deprecated Renamed to {@link #getWrappedService}
291             */
292            public ShoppingCartLocalService getWrappedShoppingCartLocalService() {
293                    return _shoppingCartLocalService;
294            }
295    
296            /**
297             * @deprecated Renamed to {@link #setWrappedService}
298             */
299            public void setWrappedShoppingCartLocalService(
300                    ShoppingCartLocalService shoppingCartLocalService) {
301                    _shoppingCartLocalService = shoppingCartLocalService;
302            }
303    
304            public ShoppingCartLocalService getWrappedService() {
305                    return _shoppingCartLocalService;
306            }
307    
308            public void setWrappedService(
309                    ShoppingCartLocalService shoppingCartLocalService) {
310                    _shoppingCartLocalService = shoppingCartLocalService;
311            }
312    
313            private ShoppingCartLocalService _shoppingCartLocalService;
314    }