com.elasticpath.domain.catalog
Interface PriceTier

All Superinterfaces:
EpDomain, Persistence, java.io.Serializable, ValueObject
All Known Implementing Classes:
PriceTierImpl

public interface PriceTier
extends ValueObject

PriceTier represents different price for different minimum quantity A Price should at least have a PriceTier When shopping a product, if quantity is provided, Price should get the nearest PriceTier with the minimum quantity equal or less than the given quantity. If no quantity is provided, the Price will retrieve the first price tier, i.e. the one with smallest minimum quantity.


Method Summary
 void clearComputedPrice()
          Clear the computed price of the price tier, will set the computed price to null.
 java.math.BigDecimal getComputedPrice()
          Get the computed price of the price tier.
 java.math.BigDecimal getListPrice()
          Get the list price of the price tier.
 int getMinQty()
          Get the minimum quantity of the price tier.
 java.math.BigDecimal getPrePromotionPrice()
          Get the pre-promotion price to which promotions are to be applied.
 java.math.BigDecimal getSalePrice()
          Get the sale price of the price tier.
 void setComputedPrice(java.math.BigDecimal computedPrice)
          Set the computed price of the price tier.
 void setListPrice(java.math.BigDecimal listPrice)
          Set the list price for the price tier.
 void setMinQty(int minQty)
          Set the minimum quantity for the price tier.
 void setSalePrice(java.math.BigDecimal salePrice)
          Set the sale price for the price tier.
 
Methods inherited from interface com.elasticpath.domain.Persistence
executeBeforePersistAction, getUidPk, isPersistent, setDefaultValues, setUidPk
 
Methods inherited from interface com.elasticpath.domain.EpDomain
getElasticPath, setElasticPath
 

Method Detail

clearComputedPrice

void clearComputedPrice()
Clear the computed price of the price tier, will set the computed price to null.


getComputedPrice

java.math.BigDecimal getComputedPrice()
Get the computed price of the price tier.

Returns:
the computed price of the price tier

getListPrice

java.math.BigDecimal getListPrice()
Get the list price of the price tier.

Returns:
the list price of the price tier

getMinQty

int getMinQty()
Get the minimum quantity of the price tier.

Returns:
the minimum quantity of the price tier

getPrePromotionPrice

java.math.BigDecimal getPrePromotionPrice()
Get the pre-promotion price to which promotions are to be applied. This is currently the lower of the sale price and the list price.

Returns:
the lower of the sale price and the list price of the price tier

getSalePrice

java.math.BigDecimal getSalePrice()
Get the sale price of the price tier.

Returns:
the sale price of the price tier

setComputedPrice

void setComputedPrice(java.math.BigDecimal computedPrice)
Set the computed price of the price tier. If a computed price already exists, the specified computed price will only be set if it is lower than the previously existing computed price.

Parameters:
computedPrice - the computed price of the price tier

setListPrice

void setListPrice(java.math.BigDecimal listPrice)
Set the list price for the price tier.

Parameters:
listPrice - the list price of the price tier

setMinQty

void setMinQty(int minQty)
Set the minimum quantity for the price tier.

Parameters:
minQty - the minimum quantity of the price tier

setSalePrice

void setSalePrice(java.math.BigDecimal salePrice)
Set the sale price for the price tier.

Parameters:
salePrice - the sale price of the price tier