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