Interface PriceModel
-
- All Superinterfaces:
BaseModel,java.lang.Cloneable
- All Known Implementing Classes:
PriceModelImpl,ZeroPriceModelImpl
public interface PriceModel extends BaseModel
Represents the price model including currency.
-
-
Field Summary
Fields Modifier and Type Field Description static PriceModelNO_PRICEValue-Object to model the case, when no price information is availablestatic PriceModelPRICE_NAValue-Object to model the case, when no price information was not fetched, yet.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetCurrency()java.math.BigDecimalgetObsoletePriceValue()java.math.BigDecimalgetPriceValue()booleanhasValidPrice()Checks whether this is a valid pricevoidsetCurrency(java.lang.String currency)voidsetObsoletePriceValue(java.math.BigDecimal obsoletePriceValue)voidsetPriceValue(java.math.BigDecimal priceValue)
-
-
-
Field Detail
-
NO_PRICE
static final PriceModel NO_PRICE
Value-Object to model the case, when no price information is available
-
PRICE_NA
static final PriceModel PRICE_NA
Value-Object to model the case, when no price information was not fetched, yet.
-
-
Method Detail
-
setCurrency
void setCurrency(java.lang.String currency)
- Parameters:
currency- price currency
-
getCurrency
java.lang.String getCurrency()
- Returns:
- price currency
-
getPriceValue
java.math.BigDecimal getPriceValue()
- Returns:
- price value
-
setPriceValue
void setPriceValue(java.math.BigDecimal priceValue)
- Parameters:
priceValue- price value
-
hasValidPrice
boolean hasValidPrice()
Checks whether this is a valid price- Returns:
trueonly if a NON-Zero price value and a currency are assigned
-
getObsoletePriceValue
java.math.BigDecimal getObsoletePriceValue()
- Returns:
- old price without discount
-
setObsoletePriceValue
void setObsoletePriceValue(java.math.BigDecimal obsoletePriceValue)
- Parameters:
obsoletePriceValue- old price without discount
-
-