org.broadleafcommerce.core.catalog.domain
Class SkuBundleItemImpl

java.lang.Object
  extended by org.broadleafcommerce.core.catalog.domain.SkuBundleItemImpl
All Implemented Interfaces:
Serializable, SkuBundleItem

@Entity
public class SkuBundleItemImpl
extends Object
implements SkuBundleItem

See Also:
Serialized Form

Field Summary
protected  ProductBundle bundle
           
protected  DynamicSkuPrices dynamicPrices
           
protected  Long id
          The id.
protected  BigDecimal itemSalePrice
           
protected  Integer quantity
           
 
Constructor Summary
SkuBundleItemImpl()
           
 
Method Summary
 ProductBundle getBundle()
           
protected  Money getDynamicSalePrice(Sku sku, BigDecimal salePrice)
           
 Long getId()
           
 Integer getQuantity()
           
 Money getRetailPrice()
           
 Money getSalePrice()
           
 Sku getSku()
           
 void setBundle(ProductBundle bundle)
           
 void setId(Long id)
           
 void setQuantity(Integer quantity)
           
 void setSalePrice(Money salePrice)
          Allows for overriding the related Product's sale price.
 void setSku(Sku sku)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected Long id
The id.


quantity

protected Integer quantity

itemSalePrice

protected BigDecimal itemSalePrice

bundle

protected ProductBundle bundle

dynamicPrices

protected DynamicSkuPrices dynamicPrices
Constructor Detail

SkuBundleItemImpl

public SkuBundleItemImpl()
Method Detail

getId

public Long getId()
Specified by:
getId in interface SkuBundleItem

setId

public void setId(Long id)
Specified by:
setId in interface SkuBundleItem

getQuantity

public Integer getQuantity()
Specified by:
getQuantity in interface SkuBundleItem

setQuantity

public void setQuantity(Integer quantity)
Specified by:
setQuantity in interface SkuBundleItem

getDynamicSalePrice

protected Money getDynamicSalePrice(Sku sku,
                                    BigDecimal salePrice)

setSalePrice

public void setSalePrice(Money salePrice)
Description copied from interface: SkuBundleItem
Allows for overriding the related Product's sale price. This is only used if the pricing model for the bundle is a composition of its parts getProduct().getDefaultSku().getSalePrice()

Specified by:
setSalePrice in interface SkuBundleItem

getSalePrice

public Money getSalePrice()
Specified by:
getSalePrice in interface SkuBundleItem
Returns:
this itemSalePrice if it is set, getProduct().getDefaultSku().getSalePrice() if this item's itemSalePrice is null

getRetailPrice

public Money getRetailPrice()
Specified by:
getRetailPrice in interface SkuBundleItem

getBundle

public ProductBundle getBundle()
Specified by:
getBundle in interface SkuBundleItem

setBundle

public void setBundle(ProductBundle bundle)
Specified by:
setBundle in interface SkuBundleItem

getSku

public Sku getSku()
Specified by:
getSku in interface SkuBundleItem

setSku

public void setSku(Sku sku)
Specified by:
setSku in interface SkuBundleItem


Copyright © 2012. All Rights Reserved.