|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.elasticpath.domain.impl.AbstractEpDomainImpl
com.elasticpath.domain.impl.AbstractPersistenceImpl
com.elasticpath.domain.impl.AbstractValueObjectImpl
com.elasticpath.domain.catalog.impl.AbstractPriceImpl
public class AbstractPriceImpl
The abstact implementation of Price. ProductPriceImpl and SkuPriceImpl will extend
AbstractPriceImpl
| Field Summary | |
|---|---|
static long |
serialVersionUID
Serial version id. |
| Constructor Summary | |
|---|---|
AbstractPriceImpl()
|
|
| Method Summary | |
|---|---|
void |
addOrUpdatePriceTier(PriceTier priceTier)
Add the price Tiers. |
void |
clearComputedPrice()
Removes the computed price for all price tier. |
Money |
getComputedPrice()
Get the product's computed price of the first price tier. |
Money |
getComputedPrice(int qty)
Get the product's computed price (e.g. |
java.util.Currency |
getCurrency()
Get the currency for this product price. |
Money |
getDollarSavings()
Calculates the MoneyImpl savings if the price has a discount. |
Money |
getDollarSavings(int qty)
Calculates the MoneyImpl savings if the price has a discount. |
Money |
getListPrice()
Get the product's list price of the first price tier. |
Money |
getListPrice(int qty)
Get the product's list price. |
Money |
getLowestPrice()
Get the lowest of the price values of the first price tier. |
Money |
getLowestPrice(int qty)
Get the lowest of the price values specified in this Price. |
Money |
getPrePromotionPrice()
Get the pre-promotion price of the first price tier to which promotions are to be applied. |
Money |
getPrePromotionPrice(int qty)
Get the pre-promotion price of the corresponding price tier, which promotions are to be applied. |
PriceTier |
getPriceTierByExactMinQty(int minQty)
Get the Price tier with the same minimum quantity with the inputed min Qty. |
java.util.Map |
getPriceTiers()
Get the price Tiers. |
Money |
getSalePrice()
Get the product's sale price of the first price tier. |
Money |
getSalePrice(int qty)
Get the product's sale price. |
boolean |
hasPriceTiers()
Check if the product has price tiers. |
boolean |
isLowestLessThanList()
Check if the lowest price is less than the list price, i.e. |
boolean |
isLowestLessThanList(int qty)
Check if the lowest price is less than the list price, i.e. |
void |
setComputedPrice(Money computedPrice)
Set the computed price for the first price tier. |
void |
setComputedPrice(Money computedPrice,
int minQty)
Set the product's computed price (e.g. |
void |
setCurrency(java.util.Currency currency)
Set the currency for the price. |
void |
setDefaultValues()
Set default values for those fields need default values. |
void |
setListPrice(Money listPrice)
Set the product's list price for the first price tier. |
void |
setListPrice(Money listPrice,
int minQty)
Set the product's list price. |
void |
setPriceTiers(java.util.Map priceTiers)
set the price Tiers. |
void |
setSalePrice(Money salePrice)
Set the product's sale price for the first price tier. |
void |
setSalePrice(Money salePrice,
int minQty)
Set the product's sale price. |
| Methods inherited from class com.elasticpath.domain.impl.AbstractPersistenceImpl |
|---|
executeBeforePersistAction, getUidPk, isPersistent, setUidPk |
| Methods inherited from class com.elasticpath.domain.impl.AbstractEpDomainImpl |
|---|
getElasticPath, setElasticPath |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.elasticpath.domain.Persistence |
|---|
executeBeforePersistAction, getUidPk, isPersistent, setUidPk |
| Methods inherited from interface com.elasticpath.domain.EpDomain |
|---|
getElasticPath, setElasticPath |
| Field Detail |
|---|
public static final long serialVersionUID
| Constructor Detail |
|---|
public AbstractPriceImpl()
| Method Detail |
|---|
public void addOrUpdatePriceTier(PriceTier priceTier)
addOrUpdatePriceTier in interface PricepriceTier - the price tier to be addedpublic void clearComputedPrice()
clearComputedPrice in interface Pricepublic Money getComputedPrice()
getComputedPrice in interface PriceMoneyImplpublic Money getComputedPrice(int qty)
getComputedPrice in interface Priceqty - the quantity of the product
MoneyImpl Returns null if no computed price has been setpublic java.util.Currency getCurrency()
getCurrency in interface PriceCurrencypublic Money getDollarSavings()
MoneyImpl savings if the price has a discount.
getDollarSavings in interface PriceMoneyImplpublic Money getDollarSavings(int qty)
MoneyImpl savings if the price has a discount.
getDollarSavings in interface Priceqty - the quantity of the product
MoneyImplpublic Money getListPrice()
getListPrice in interface PriceMoneyImplpublic Money getListPrice(int qty)
getListPrice in interface Priceqty - the quantity of the product
MoneyImplpublic Money getLowestPrice()
getLowestPrice in interface PriceMoneyImplpublic Money getLowestPrice(int qty)
Price.
getLowestPrice in interface Priceqty - the quantity of the product
MoneyImplpublic Money getPrePromotionPrice()
getPrePromotionPrice in interface PriceMoney object representing the pre-promotion pricepublic Money getPrePromotionPrice(int qty)
getPrePromotionPrice in interface Priceqty - the quantity of the product
Money object representing the pre-promotion pricepublic PriceTier getPriceTierByExactMinQty(int minQty)
getPriceTierByExactMinQty in interface PriceminQty - the minumum quantity to be matched
PriceTierpublic java.util.Map getPriceTiers()
getPriceTiers in interface PricePriceTierImplpublic Money getSalePrice()
getSalePrice in interface PriceMoneyImplpublic Money getSalePrice(int qty)
getSalePrice in interface Priceqty - the quantity of the product
MoneyImplpublic boolean hasPriceTiers()
hasPriceTiers in interface Pricepublic boolean isLowestLessThanList()
isLowestLessThanList in interface Pricepublic boolean isLowestLessThanList(int qty)
isLowestLessThanList in interface Priceqty - the quantity of the product
public void setComputedPrice(Money computedPrice)
setComputedPrice in interface PricecomputedPrice - the computed price as a MoneyImpl
public void setComputedPrice(Money computedPrice,
int minQty)
setComputedPrice in interface PricecomputedPrice - the product's computed price as a MoneyImplminQty - the minimum quantity of the PriceTierpublic void setCurrency(java.util.Currency currency)
setCurrency in interface Pricecurrency - of the price as a Currencypublic void setDefaultValues()
setDefaultValues in interface PersistencesetDefaultValues in class AbstractPersistenceImplpublic void setListPrice(Money listPrice)
setListPrice in interface PricelistPrice - the product's list price as a MoneyImpl
public void setListPrice(Money listPrice,
int minQty)
setListPrice in interface PricelistPrice - the product's list price as a MoneyImplminQty - the minimum quantity of the PriceTierpublic void setPriceTiers(java.util.Map priceTiers)
setPriceTiers in interface PricepriceTiers - the price tiers as a map of PriceTierpublic void setSalePrice(Money salePrice)
setSalePrice in interface PricesalePrice - the product's sale price as a MoneyImpl
public void setSalePrice(Money salePrice,
int minQty)
setSalePrice in interface PricesalePrice - the product's sale price as a MoneyImplminQty - the minimum quantity of the PriceTier
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||