Class PriceInfo
java.lang.Object
com.broadleafcommerce.catalog.domain.commerce.PriceInfo
- All Implemented Interfaces:
Serializable
Pricing information for a target (e.g., Product or Variant), providing the target, best price,
and some details about the other candidate prices. If the best overall price is a 'sale price',
then the details could contain the best standard/retail price if there was one.
- Author:
- Nathan Moore (nathandmoore)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanCopies values fromorigintothis.javax.money.MonetaryAmountgetPrice()Determined best price for a target.The type ofpricewhether salePrice, standardPrice, contractPrice, etc.Map of each type of price to each correspondingPriceTypeDetail, which contains the best overall price for that type.inthashCode()voidsetPrice(javax.money.MonetaryAmount price) Determined best price for a target.voidsetPriceType(String priceType) The type ofpricewhether salePrice, standardPrice, contractPrice, etc.voidsetPriceTypeDetails(Map<String, PriceTypeDetail> priceTypeDetails) Map of each type of price to each correspondingPriceTypeDetail, which contains the best overall price for that type.toString()
-
Constructor Details
-
PriceInfo
public PriceInfo() -
PriceInfo
public PriceInfo(javax.money.MonetaryAmount price, String priceType, Map<String, PriceTypeDetail> priceTypeDetails)
-
-
Method Details
-
from
Copies values fromorigintothis. Iforiginis null, then returnsthiswith all values cleared.- Parameters:
origin- OriginalPriceInfoto copy values from.- Returns:
this
-
getPrice
public javax.money.MonetaryAmount getPrice()Determined best price for a target.- Returns:
- Determined best price for a target.
-
getPriceType
The type ofpricewhether salePrice, standardPrice, contractPrice, etc.- Returns:
- The type of
pricewhether salePrice, standardPrice, contractPrice, etc.
-
getPriceTypeDetails
Map of each type of price to each correspondingPriceTypeDetail, which contains the best overall price for that type.- Returns:
- Map of each type of price to each corresponding
PriceTypeDetail
-
setPrice
public void setPrice(javax.money.MonetaryAmount price) Determined best price for a target.- Parameters:
price- Determined best price for a target.
-
setPriceType
The type ofpricewhether salePrice, standardPrice, contractPrice, etc.- Parameters:
priceType- The type ofpricewhether salePrice, standardPrice, contractPrice, etc.
-
setPriceTypeDetails
Map of each type of price to each correspondingPriceTypeDetail, which contains the best overall price for that type.- Parameters:
Map- of each type of price to each correspondingPriceTypeDetail
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-