org.broadleafcommerce.core.order.domain
Class DynamicPriceDiscreteOrderItemImpl

java.lang.Object
  extended by org.broadleafcommerce.core.order.domain.OrderItemImpl
      extended by org.broadleafcommerce.core.order.domain.DiscreteOrderItemImpl
          extended by org.broadleafcommerce.core.order.domain.DynamicPriceDiscreteOrderItemImpl
All Implemented Interfaces:
Serializable, Cloneable, DiscreteOrderItem, DynamicPriceDiscreteOrderItem, OrderItem, SkuAccessor

@Entity
public class DynamicPriceDiscreteOrderItemImpl
extends DiscreteOrderItemImpl
implements DynamicPriceDiscreteOrderItem

Author:
jfischer
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.broadleafcommerce.core.order.domain.DiscreteOrderItemImpl
additionalAttributes, baseRetailPrice, baseSalePrice, bundleOrderItem, discreteOrderItemFeePrices, product, sku, skuBundleItem
 
Fields inherited from class org.broadleafcommerce.core.order.domain.OrderItemImpl
candidateItemOffers, category, discountsAllowed, giftWrapOrderItem, id, itemTaxable, name, order, orderItemAdjustments, orderItemAttributeMap, orderItemPriceDetails, orderItemQualifiers, orderItemType, personalMessage, price, quantity, retailPrice, retailPriceOverride, salePrice, salePriceOverride, totalTax
 
Constructor Summary
DynamicPriceDiscreteOrderItemImpl()
           
 
Method Summary
 void setSku(Sku sku)
           
 boolean updateSaleAndRetailPrices()
          Used to reset the base price of the item that the pricing engine uses.
 
Methods inherited from class org.broadleafcommerce.core.order.domain.DiscreteOrderItemImpl
clone, convertToMoney, equals, findParentItem, getAdditionalAttributes, getBaseRetailPrice, getBaseSalePrice, getBundleOrderItem, getDiscreteOrderItemFeePrices, getName, getOrder, getProduct, getSku, getSkuBundleItem, hashCode, isDiscountingAllowed, isTaxable, setAdditionalAttributes, setBaseRetailPrice, setBaseSalePrice, setBundleOrderItem, setDiscreteOrderItemFeePrices, setOrder, setProduct, setSkuBundleItem
 
Methods inherited from class org.broadleafcommerce.core.order.domain.OrderItemImpl
addCandidateItemOffer, assignFinalPrice, checkCloneable, convertOrderItemType, finalizePrice, getAdjustmentValue, getAverageAdjustmentValue, getAveragePrice, getCandidateItemOffers, getCategory, getGiftWrapOrderItem, getId, getIsDiscounted, getIsOnSale, getOrderItemAdjustments, getOrderItemAttributes, getOrderItemPriceDetails, getOrderItemQualifiers, getOrderItemType, getPersonalMessage, getPrice, getPriceBeforeAdjustments, getQuantity, getRetailPrice, getSalePrice, getTaxablePrice, getTotalAdjustmentValue, getTotalPrice, isInCategory, isRetailPriceOverride, isSalePriceOverride, removeAllAdjustments, removeAllCandidateItemOffers, setCandidateItemOffers, setCategory, setDiscountingAllowed, setGiftWrapOrderItem, setId, setName, setOrderItemAdjustments, setOrderItemAttributes, setOrderItemPriceDetails, setOrderItemQualifiers, setOrderItemType, setPersonalMessage, setPrice, setQuantity, setRetailPrice, setRetailPriceOverride, setSalePrice, setSalePriceOverride, setTaxable
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.broadleafcommerce.core.order.domain.DiscreteOrderItem
findParentItem, getAdditionalAttributes, getBaseRetailPrice, getBaseSalePrice, getBundleOrderItem, getDiscreteOrderItemFeePrices, getProduct, getSku, getSkuBundleItem, getTaxablePrice, setAdditionalAttributes, setBaseRetailPrice, setBaseSalePrice, setBundleOrderItem, setDiscreteOrderItemFeePrices, setProduct, setSkuBundleItem
 
Methods inherited from interface org.broadleafcommerce.core.order.domain.OrderItem
addCandidateItemOffer, assignFinalPrice, clone, finalizePrice, getAdjustmentValue, getAverageAdjustmentValue, getAveragePrice, getCandidateItemOffers, getCategory, getGiftWrapOrderItem, getId, getIsDiscounted, getIsOnSale, getName, getOrder, getOrderItemAdjustments, getOrderItemAttributes, getOrderItemPriceDetails, getOrderItemQualifiers, getOrderItemType, getPersonalMessage, getPrice, getPriceBeforeAdjustments, getQuantity, getRetailPrice, getSalePrice, getTotalAdjustmentValue, getTotalPrice, isDiscountingAllowed, isInCategory, isRetailPriceOverride, isSalePriceOverride, isTaxable, removeAllAdjustments, removeAllCandidateItemOffers, setCandidateItemOffers, setCategory, setDiscountingAllowed, setGiftWrapOrderItem, setId, setName, setOrder, setOrderItemAdjustments, setOrderItemAttributes, setOrderItemPriceDetails, setOrderItemQualifiers, setOrderItemType, setPersonalMessage, setPrice, setQuantity, setRetailPrice, setRetailPriceOverride, setSalePrice, setSalePriceOverride, setTaxable
 

Constructor Detail

DynamicPriceDiscreteOrderItemImpl

public DynamicPriceDiscreteOrderItemImpl()
Method Detail

setSku

public void setSku(Sku sku)
Specified by:
setSku in interface DiscreteOrderItem
Overrides:
setSku in class DiscreteOrderItemImpl

updateSaleAndRetailPrices

public boolean updateSaleAndRetailPrices()
Description copied from interface: OrderItem
Used to reset the base price of the item that the pricing engine uses. Generally, this will update the retailPrice and salePrice based on the corresponding value in the SKU. If the retail or sale price was manually set, this method will not change those prices. For non-manually set prices, prices can change based on system activities such as locale changes and customer authentication, this method is used to ensure that all cart items reflect the current base price before executing other pricing / adjustment operations. Other known scenarios that can effect the base prices include the automatic bundling or loading a stale cart from the database. See notes in subclasses for specific behavior of this method.

Specified by:
updateSaleAndRetailPrices in interface OrderItem
Overrides:
updateSaleAndRetailPrices in class DiscreteOrderItemImpl
Returns:
true if the base prices changed as a result of this call


Copyright © 2013. All Rights Reserved.