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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.shopping.model.impl.ShoppingCartModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.shopping.model.impl.ShoppingCartModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.shopping.model.impl.ShoppingCartModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 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 * Returns the Spring bean ID for this bean. 233 * 234 * @return the Spring bean ID for this bean 235 */ 236 public java.lang.String getBeanIdentifier() { 237 return _shoppingCartLocalService.getBeanIdentifier(); 238 } 239 240 /** 241 * Sets the Spring bean ID for this bean. 242 * 243 * @param beanIdentifier the Spring bean ID for this bean 244 */ 245 public void setBeanIdentifier(java.lang.String beanIdentifier) { 246 _shoppingCartLocalService.setBeanIdentifier(beanIdentifier); 247 } 248 249 public void deleteGroupCarts(long groupId) 250 throws com.liferay.portal.kernel.exception.SystemException { 251 _shoppingCartLocalService.deleteGroupCarts(groupId); 252 } 253 254 public void deleteUserCarts(long userId) 255 throws com.liferay.portal.kernel.exception.SystemException { 256 _shoppingCartLocalService.deleteUserCarts(userId); 257 } 258 259 public com.liferay.portlet.shopping.model.ShoppingCart getCart( 260 long userId, long groupId) 261 throws com.liferay.portal.kernel.exception.PortalException, 262 com.liferay.portal.kernel.exception.SystemException { 263 return _shoppingCartLocalService.getCart(userId, groupId); 264 } 265 266 public java.util.Map<com.liferay.portlet.shopping.model.ShoppingCartItem, java.lang.Integer> getItems( 267 long groupId, java.lang.String itemIds) 268 throws com.liferay.portal.kernel.exception.SystemException { 269 return _shoppingCartLocalService.getItems(groupId, itemIds); 270 } 271 272 public com.liferay.portlet.shopping.model.ShoppingCart updateCart( 273 long userId, long groupId, java.lang.String itemIds, 274 java.lang.String couponCodes, int altShipping, boolean insure) 275 throws com.liferay.portal.kernel.exception.PortalException, 276 com.liferay.portal.kernel.exception.SystemException { 277 return _shoppingCartLocalService.updateCart(userId, groupId, itemIds, 278 couponCodes, altShipping, insure); 279 } 280 281 /** 282 * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} 283 */ 284 public ShoppingCartLocalService getWrappedShoppingCartLocalService() { 285 return _shoppingCartLocalService; 286 } 287 288 /** 289 * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} 290 */ 291 public void setWrappedShoppingCartLocalService( 292 ShoppingCartLocalService shoppingCartLocalService) { 293 _shoppingCartLocalService = shoppingCartLocalService; 294 } 295 296 public ShoppingCartLocalService getWrappedService() { 297 return _shoppingCartLocalService; 298 } 299 300 public void setWrappedService( 301 ShoppingCartLocalService shoppingCartLocalService) { 302 _shoppingCartLocalService = shoppingCartLocalService; 303 } 304 305 private ShoppingCartLocalService _shoppingCartLocalService; 306 }