java.lang.Object
com.broadleafcommerce.catalog.domain.commerce.PriceInfo
All Implemented Interfaces:
Serializable

public class PriceInfo extends Object implements 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 Details

    • PriceInfo

      public PriceInfo()
    • PriceInfo

      public PriceInfo(javax.money.MonetaryAmount price, String priceType, Map<String,PriceTypeDetail> priceTypeDetails)
  • Method Details

    • from

      public PriceInfo from(PriceInfo origin)
      Copies values from origin to this. If origin is null, then returns this with all values cleared.
      Parameters:
      origin - Original PriceInfo 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

      public String getPriceType()
      The type of price whether salePrice, standardPrice, contractPrice, etc.
      Returns:
      The type of price whether salePrice, standardPrice, contractPrice, etc.
    • getPriceTypeDetails

      public Map<String,PriceTypeDetail> getPriceTypeDetails()
      Map of each type of price to each corresponding PriceTypeDetail, 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

      public void setPriceType(String priceType)
      The type of price whether salePrice, standardPrice, contractPrice, etc.
      Parameters:
      priceType - The type of price whether salePrice, standardPrice, contractPrice, etc.
    • setPriceTypeDetails

      public void setPriceTypeDetails(Map<String,PriceTypeDetail> priceTypeDetails)
      Map of each type of price to each corresponding PriceTypeDetail, which contains the best overall price for that type.
      Parameters:
      Map - of each type of price to each corresponding PriceTypeDetail
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object