/** * Hook to perform additional processing on a {@link CartOrder} before usage. * * @param cartOrder the cartOrder to be processed * @return the processed CartOrder */ private CartOrder postProcessing(final CartOrder cartOrder) { if (cartOrder == null) { return null; } boolean cartOrderWasUpdated = getCartOrderShippingInformationSanitizer() .sanitize(getStoreCodeForCartOrder(cartOrder.getGuid()), cartOrder); if (cartOrderWasUpdated) { return cartOrderDao.saveOrUpdate(cartOrder); } return cartOrder; }
@Override public CartOrder findByShoppingCartGuid(final String guid) { return cartOrderDao.findByShoppingCartGuid(guid); }
@Override public List<String> findCartOrderGuidsByCustomerGuid( final String storeCode, final String customerGuid) { return cartOrderDao.findCartOrderGuidsByCustomerGuid(storeCode, customerGuid); }
@Override public int removeIfExistsByShoppingCartGuids(final List<String> shoppingCartGuids) { return cartOrderDao.removeByShoppingCartGuids(shoppingCartGuids); }
@Override public void removeIfExistsByShoppingCart(final ShoppingCart shoppingCart) { cartOrderDao.removeByShoppingCartGuid(shoppingCart.getGuid()); }
@Override public CartOrder saveOrUpdate(final CartOrder cartOrder) { touchShoppingCart(cartOrder); return cartOrderDao.saveOrUpdate(cartOrder); }
@Override public void remove(final CartOrder cartOrder) { cartOrderDao.remove(cartOrder); }