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 specificPriceableTarget.- Author:
- Chad Harchar (charchar)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PriceData()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)intcompareTo(PriceData o)Compares price.booleanequals(Object o)InstantgetActiveEndDate()Defines the ending time for which this price data is activeInstantgetActiveStartDate()Defines the beginning time for which this price data is active.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStategetContextState()A subset ofTrackinginformation to expose the context state for this object.StringgetId()javax.money.MonetaryAmountgetPrice()StringgetPriceListId()The contextId of the parent price list.StringgetPriceListName()com.broadleafcommerce.pricing.client.domain.PriceableTargetRefgetTarget()List<PriceDataTier>getTiers()Defines specific pricing for minimum quantities.inthashCode()voidsetActiveEndDate(Instant activeEndDate)Defines the ending time for which this price data is activevoidsetActiveStartDate(Instant activeStartDate)Defines the beginning time for which this price data is active.voidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)A subset ofTrackinginformation to expose the context state for this object.voidsetId(String id)voidsetPrice(javax.money.MonetaryAmount price)voidsetPriceListId(String priceListId)The contextId of the parent price list.voidsetPriceListName(String priceListName)voidsetTarget(com.broadleafcommerce.pricing.client.domain.PriceableTargetRef target)voidsetTiers(List<PriceDataTier> tiers)Defines specific pricing for minimum quantities.StringtoString()
-
-
-
Method Detail
-
compareTo
public int compareTo(PriceData o)
Compares price. Null is more than non-null.- Specified by:
compareToin interfaceComparable<PriceData>
-
getId
public String getId()
-
getPriceListId
public String getPriceListId()
The contextId of the parent price list.- See Also:
PriceList.getId()
-
getPriceListName
public String getPriceListName()
- See Also:
PriceList.getName()
-
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 ofTrackinginformation to expose the context state for this object.- Specified by:
getContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Returns:
- a subset of
Trackinginformation 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:
PriceList.getId()
-
setPriceListName
public void setPriceListName(String priceListName)
- See Also:
PriceList.getName()
-
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 ofTrackinginformation to expose the context state for this object.- Specified by:
setContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Parameters:
contextState- a subset ofTrackinginformation to expose the context state for this object
-
canEqual
protected boolean canEqual(Object other)
-
-