Class PriceData

java.lang.Object
com.broadleafcommerce.pricing.domain.PriceData
All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware, Serializable, Comparable<PriceData>

public class PriceData extends Object implements Serializable, Comparable<PriceData>, com.broadleafcommerce.data.tracking.core.ContextStateAware
Data storing a specific price for a specific PriceableTarget.
Author:
Chad Harchar (charchar)
See Also:
  • Constructor Details

    • PriceData

      public PriceData()
  • Method Details

    • compareTo

      public int compareTo(PriceData o)
      Compares price. Null is more than non-null.
      Specified by:
      compareTo in interface Comparable<PriceData>
    • getId

      public String getId()
    • getPriceListId

      public String getPriceListId()
      The contextId of the parent price list.
      See Also:
    • getPriceListName

      public String getPriceListName()
      See Also:
    • getTarget

      public com.broadleafcommerce.pricing.client.domain.PriceableTargetRef getTarget()
      See Also:
      • PriceableTargetRef
      • PriceableTarget
    • getPrice

      public javax.money.MonetaryAmount getPrice()
    • getActiveStartDate

      public Instant getActiveStartDate()
      Defines the beginning time for which this price data is active.
    • getActiveEndDate

      public Instant getActiveEndDate()
      Defines the ending time for which this price data is active
    • getTiers

      public List<PriceDataTier> getTiers()
      Defines specific pricing for minimum quantities.
    • getContextState

      public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()
      A subset of Tracking information to expose the context state for this object.
      Specified by:
      getContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
      Returns:
      a subset of Tracking information to expose the context state for this object
    • setId

      public void setId(String id)
    • setPriceListId

      public void setPriceListId(String priceListId)
      The contextId of the parent price list.
      See Also:
    • setPriceListName

      public void setPriceListName(String priceListName)
      See Also:
    • setTarget

      public void setTarget(com.broadleafcommerce.pricing.client.domain.PriceableTargetRef target)
      See Also:
      • PriceableTargetRef
      • PriceableTarget
    • setPrice

      public void setPrice(javax.money.MonetaryAmount price)
    • setActiveStartDate

      public void setActiveStartDate(Instant activeStartDate)
      Defines the beginning time for which this price data is active.
    • setActiveEndDate

      public void setActiveEndDate(Instant activeEndDate)
      Defines the ending time for which this price data is active
    • setTiers

      public void setTiers(List<PriceDataTier> tiers)
      Defines specific pricing for minimum quantities.
    • setContextState

      public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
      A subset of Tracking information to expose the context state for this object.
      Specified by:
      setContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
      Parameters:
      contextState - a subset of Tracking information to expose the context state for this object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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