Class DynamicPriceDiscreteOrderItemImpl
java.lang.Object
org.broadleafcommerce.core.order.domain.OrderItemImpl
org.broadleafcommerce.core.order.domain.DiscreteOrderItemImpl
org.broadleafcommerce.core.order.domain.DynamicPriceDiscreteOrderItemImpl
- All Implemented Interfaces:
Serializable,Cloneable,org.broadleafcommerce.common.admin.domain.AdminMainEntity,org.broadleafcommerce.common.copy.MultiTenantCloneable<OrderItem>,org.broadleafcommerce.common.currency.util.CurrencyCodeIdentifiable,DiscreteOrderItem,DynamicPriceDiscreteOrderItem,OrderItem,SkuAccessor
@Entity
public class DynamicPriceDiscreteOrderItemImpl
extends DiscreteOrderItemImpl
implements DynamicPriceDiscreteOrderItem
- Author:
- jfischer
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.broadleafcommerce.core.order.domain.DiscreteOrderItemImpl
DiscreteOrderItemImpl.Presentation -
Field Summary
Fields inherited from class org.broadleafcommerce.core.order.domain.DiscreteOrderItemImpl
additionalAttributes, baseRetailPrice, baseSalePrice, bundleOrderItem, deproxiedProduct, deproxiedSku, discreteOrderItemFeePrices, product, sku, skuBundleItemFields inherited from class org.broadleafcommerce.core.order.domain.OrderItemImpl
auditable, candidateItemOffers, cartMessages, category, childOrderItems, deproxiedCategory, discountsAllowed, giftWrapOrderItem, hasValidationError, id, itemTaxable, name, order, orderItemAdjustments, orderItemAttributeMap, orderItemPriceDetails, orderItemQualifiers, orderItemType, parentOrderItem, personalMessage, price, proratedOrderItemAdjustments, quantity, retailPrice, retailPriceOverride, salePrice, salePriceOverride, totalTaxFields inherited from interface org.broadleafcommerce.common.admin.domain.AdminMainEntity
MAIN_ENTITY_NAME_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanUsed 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, createOrRetrieveCopyInstance, equals, findParentItem, getAdditionalAttributes, getBaseRetailPrice, getBaseSalePrice, getBundleOrderItem, getDiscreteOrderItemFeePrices, getName, getOrder, getProduct, getSku, getSkuBundleItem, hashCode, isDiscountingAllowed, isSkuActive, isTaxable, setAdditionalAttributes, setBaseRetailPrice, setBaseSalePrice, setBundleOrderItem, setDiscreteOrderItemFeePrices, setOrder, setProduct, setSkuBundleItem, updateRetailPrice, updateSalePriceMethods inherited from class org.broadleafcommerce.core.order.domain.OrderItemImpl
addCandidateItemOffer, assignFinalPrice, checkCloneable, convertOrderItemType, finalizePrice, getAdjustmentValue, getAuditable, getAverageAdjustmentValue, getAveragePrice, getCandidateItemOffers, getCartMessages, getCategory, getChildOrderItems, getCurrencyCode, getFutureCreditTotalAdjustmentValue, getFutureCreditTotalAdjustmentValue, getGiftWrapOrderItem, getHasValidationError, getId, getIsDiscounted, getIsOnSale, getMainEntityName, getOrderItemAdjustments, getOrderItemAttributes, getOrderItemPriceDetails, getOrderItemQualifiers, getOrderItemType, getParentOrderItem, getPersonalMessage, getPrice, getPriceBeforeAdjustments, getPriceBeforeAdjustments, getProratedOrderItemAdjustments, getQuantity, getRetailPrice, getSalePrice, getTaxablePrice, getTotalAdjustmentValue, getTotalAdjustmentValue, getTotalPrice, getTotalPrice, getTotalPriceBeforeAdjustments, isAParentOf, isChildOrderItem, isInCategory, isRetailPriceOverride, isSalePriceOverride, removeAllAdjustments, removeAllCandidateItemOffers, setAuditable, setCandidateItemOffers, setCartMessages, setCategory, setChildOrderItems, setDiscountingAllowed, setGiftWrapOrderItem, setHasValidationError, setId, setName, setOrderItemAdjustments, setOrderItemAttributes, setOrderItemPriceDetails, setOrderItemQualifiers, setOrderItemType, setParentOrderItem, setPersonalMessage, setPrice, setProratedOrderItemAdjustments, setQuantity, setRetailPrice, setRetailPriceOverride, setSalePrice, setSalePriceOverride, setTaxable, shouldSumChildrenMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.broadleafcommerce.core.order.domain.DiscreteOrderItem
findParentItem, getAdditionalAttributes, getBaseRetailPrice, getBaseSalePrice, getBundleOrderItem, getDiscreteOrderItemFeePrices, getProduct, getSku, getSkuBundleItem, getTaxablePrice, isSkuActive, setAdditionalAttributes, setBaseRetailPrice, setBaseSalePrice, setBundleOrderItem, setDiscreteOrderItemFeePrices, setProduct, setSkuBundleItemMethods inherited from interface org.broadleafcommerce.common.copy.MultiTenantCloneable
createOrRetrieveCopyInstanceMethods inherited from interface org.broadleafcommerce.core.order.domain.OrderItem
addCandidateItemOffer, assignFinalPrice, clone, finalizePrice, getAdjustmentValue, getAuditable, getAverageAdjustmentValue, getAveragePrice, getCandidateItemOffers, getCartMessages, getCategory, getChildOrderItems, getFutureCreditTotalAdjustmentValue, getFutureCreditTotalAdjustmentValue, getGiftWrapOrderItem, getHasValidationError, getId, getIsDiscounted, getIsOnSale, getName, getOrder, getOrderItemAdjustments, getOrderItemAttributes, getOrderItemPriceDetails, getOrderItemQualifiers, getOrderItemType, getParentOrderItem, getPersonalMessage, getPrice, getPriceBeforeAdjustments, getPriceBeforeAdjustments, getProratedOrderItemAdjustments, getQuantity, getRetailPrice, getSalePrice, getTotalAdjustmentValue, getTotalAdjustmentValue, getTotalPrice, getTotalPrice, getTotalPriceBeforeAdjustments, isAParentOf, isChildOrderItem, isDiscountingAllowed, isInCategory, isRetailPriceOverride, isSalePriceOverride, isTaxable, removeAllAdjustments, removeAllCandidateItemOffers, setAuditable, setCandidateItemOffers, setCartMessages, setCategory, setChildOrderItems, setDiscountingAllowed, setGiftWrapOrderItem, setHasValidationError, setId, setName, setOrder, setOrderItemAdjustments, setOrderItemAttributes, setOrderItemPriceDetails, setOrderItemQualifiers, setOrderItemType, setParentOrderItem, setPersonalMessage, setPrice, setProratedOrderItemAdjustments, setQuantity, setRetailPrice, setRetailPriceOverride, setSalePrice, setSalePriceOverride, setTaxable
-
Constructor Details
-
DynamicPriceDiscreteOrderItemImpl
public DynamicPriceDiscreteOrderItemImpl()
-
-
Method Details
-
setSku
- Specified by:
setSkuin interfaceDiscreteOrderItem- Overrides:
setSkuin classDiscreteOrderItemImpl
-
updateSaleAndRetailPrices
public boolean updateSaleAndRetailPrices()Description copied from interface:OrderItemUsed 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:
updateSaleAndRetailPricesin interfaceOrderItem- Overrides:
updateSaleAndRetailPricesin classDiscreteOrderItemImpl- Returns:
- true if the base prices changed as a result of this call
-