Class PriceModelImpl
- java.lang.Object
-
- de.hybris.platform.sap.productconfig.runtime.interf.model.impl.BaseModelImpl
-
- de.hybris.platform.sap.productconfig.runtime.interf.model.impl.PriceModelImpl
-
- All Implemented Interfaces:
BaseModel,PriceModel,java.lang.Cloneable
- Direct Known Subclasses:
ZeroPriceModelImpl
public class PriceModelImpl extends BaseModelImpl implements PriceModel
Default implementation of thePriceModel
-
-
Field Summary
-
Fields inherited from interface de.hybris.platform.sap.productconfig.runtime.interf.model.PriceModel
NO_PRICE, PRICE_NA
-
-
Constructor Summary
Constructors Constructor Description PriceModelImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetCurrency()java.math.BigDecimalgetObsoletePriceValue()java.math.BigDecimalgetPriceValue()inthashCode()protected booleanhasNoCurrency()protected booleanhasNoPrice()booleanhasValidPrice()Checks whether this is a valid pricevoidsetCurrency(java.lang.String currency)voidsetObsoletePriceValue(java.math.BigDecimal strikeThroughValue)voidsetPriceValue(java.math.BigDecimal priceValue)java.lang.StringtoString()
-
-
-
Method Detail
-
setCurrency
public void setCurrency(java.lang.String currency)
- Specified by:
setCurrencyin interfacePriceModel- Parameters:
currency- price currency
-
getCurrency
public java.lang.String getCurrency()
- Specified by:
getCurrencyin interfacePriceModel- Returns:
- price currency
-
getPriceValue
public java.math.BigDecimal getPriceValue()
- Specified by:
getPriceValuein interfacePriceModel- Returns:
- price value
-
setPriceValue
public void setPriceValue(java.math.BigDecimal priceValue)
- Specified by:
setPriceValuein interfacePriceModel- Parameters:
priceValue- price value
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hasValidPrice
public boolean hasValidPrice()
Description copied from interface:PriceModelChecks whether this is a valid price- Specified by:
hasValidPricein interfacePriceModel- Returns:
trueonly if a NON-Zero price value and a currency are assigned
-
hasNoCurrency
protected boolean hasNoCurrency()
-
hasNoPrice
protected boolean hasNoPrice()
-
getObsoletePriceValue
public java.math.BigDecimal getObsoletePriceValue()
- Specified by:
getObsoletePriceValuein interfacePriceModel- Returns:
- old price without discount
-
setObsoletePriceValue
public void setObsoletePriceValue(java.math.BigDecimal strikeThroughValue)
- Specified by:
setObsoletePriceValuein interfacePriceModel- Parameters:
strikeThroughValue- old price without discount
-
-