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