|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 Price
priceTier
- the price tier to be addedpublic void clearComputedPrice()
clearComputedPrice
in interface Price
public Money getComputedPrice()
getComputedPrice
in interface Price
MoneyImpl
public Money getComputedPrice(int qty)
getComputedPrice
in interface Price
qty
- the quantity of the product
MoneyImpl
Returns null if no computed price has been setpublic java.util.Currency getCurrency()
getCurrency
in interface Price
Currency
public Money getDollarSavings()
MoneyImpl
savings if the price has a discount.
getDollarSavings
in interface Price
MoneyImpl
public Money getDollarSavings(int qty)
MoneyImpl
savings if the price has a discount.
getDollarSavings
in interface Price
qty
- the quantity of the product
MoneyImpl
public Money getListPrice()
getListPrice
in interface Price
MoneyImpl
public Money getListPrice(int qty)
getListPrice
in interface Price
qty
- the quantity of the product
MoneyImpl
public Money getLowestPrice()
getLowestPrice
in interface Price
MoneyImpl
public Money getLowestPrice(int qty)
Price
.
getLowestPrice
in interface Price
qty
- the quantity of the product
MoneyImpl
public Money getPrePromotionPrice()
getPrePromotionPrice
in interface Price
Money
object representing the pre-promotion pricepublic Money getPrePromotionPrice(int qty)
getPrePromotionPrice
in interface Price
qty
- the quantity of the product
Money
object representing the pre-promotion pricepublic PriceTier getPriceTierByExactMinQty(int minQty)
getPriceTierByExactMinQty
in interface Price
minQty
- the minumum quantity to be matched
PriceTier
public java.util.Map getPriceTiers()
getPriceTiers
in interface Price
PriceTierImpl
public Money getSalePrice()
getSalePrice
in interface Price
MoneyImpl
public Money getSalePrice(int qty)
getSalePrice
in interface Price
qty
- the quantity of the product
MoneyImpl
public boolean hasPriceTiers()
hasPriceTiers
in interface Price
public boolean isLowestLessThanList()
isLowestLessThanList
in interface Price
public boolean isLowestLessThanList(int qty)
isLowestLessThanList
in interface Price
qty
- the quantity of the product
public void setComputedPrice(Money computedPrice)
setComputedPrice
in interface Price
computedPrice
- the computed price as a MoneyImpl
public void setComputedPrice(Money computedPrice, int minQty)
setComputedPrice
in interface Price
computedPrice
- the product's computed price as a MoneyImpl
minQty
- the minimum quantity of the PriceTier
public void setCurrency(java.util.Currency currency)
setCurrency
in interface Price
currency
- of the price as a Currency
public void setDefaultValues()
setDefaultValues
in interface Persistence
setDefaultValues
in class AbstractPersistenceImpl
public void setListPrice(Money listPrice)
setListPrice
in interface Price
listPrice
- the product's list price as a MoneyImpl
public void setListPrice(Money listPrice, int minQty)
setListPrice
in interface Price
listPrice
- the product's list price as a MoneyImpl
minQty
- the minimum quantity of the PriceTier
public void setPriceTiers(java.util.Map priceTiers)
setPriceTiers
in interface Price
priceTiers
- the price tiers as a map of PriceTier
public void setSalePrice(Money salePrice)
setSalePrice
in interface Price
salePrice
- the product's sale price as a MoneyImpl
public void setSalePrice(Money salePrice, int minQty)
setSalePrice
in interface Price
salePrice
- the product's sale price as a MoneyImpl
minQty
- the minimum quantity of the PriceTier
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |