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
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
Copies values fromorigin
tothis
.javax.money.MonetaryAmount
getPrice()
Determined best price for a target.The type ofprice
whether salePrice, standardPrice, contractPrice, etc.Map of each type of price to each correspondingPriceTypeDetail
, which contains the best overall price for that type.int
hashCode()
void
setPrice
(javax.money.MonetaryAmount price) Determined best price for a target.void
setPriceType
(String priceType) The type ofprice
whether salePrice, standardPrice, contractPrice, etc.void
setPriceTypeDetails
(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 fromorigin
tothis
. Iforigin
is null, then returnsthis
with all values cleared.- Parameters:
origin
- OriginalPriceInfo
to 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 ofprice
whether salePrice, standardPrice, contractPrice, etc.- Returns:
- The type of
price
whether 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 ofprice
whether salePrice, standardPrice, contractPrice, etc.- Parameters:
priceType
- The type ofprice
whether 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
-