Interface PriceModel
- All Superinterfaces:
BaseModel,Cloneable,Serializable
- All Known Implementing Classes:
PriceModelImpl,ZeroPriceModelImpl
Represents the price model including currency.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PriceModelValue-Object to model the case, when no price information is availablestatic final PriceModelValue-Object to model the case, when no price information was not fetched, yet. -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks whether this is a valid pricevoidsetCurrency(String currency) voidsetObsoletePriceValue(BigDecimal obsoletePriceValue) voidsetPriceValue(BigDecimal priceValue)
-
Field Details
-
NO_PRICE
Value-Object to model the case, when no price information is available -
PRICE_NA
Value-Object to model the case, when no price information was not fetched, yet.
-
-
Method Details
-
setCurrency
- Parameters:
currency- price currency
-
getCurrency
String getCurrency()- Returns:
- price currency
-
getPriceValue
BigDecimal getPriceValue()- Returns:
- price value
-
setPriceValue
- 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
BigDecimal getObsoletePriceValue()- Returns:
- old price without discount
-
setObsoletePriceValue
- Parameters:
obsoletePriceValue- old price without discount
-