public class SkuPriceDataDTO extends Object implements SkuPriceData
Constructor and Description |
---|
SkuPriceDataDTO() |
Modifier and Type | Method and Description |
---|---|
<G extends SkuPriceData> |
createOrRetrieveCopyInstance(org.broadleafcommerce.common.copy.MultiTenantCopyContext context) |
Date |
getActiveEndDate()
Returns the the last date that the
Sku should be available for sale. |
Date |
getActiveStartDate()
Returns the the last date that the
Sku should be available for sale. |
String |
getCurrencyCode() |
Long |
getDefaultProductId() |
Long |
getId()
The unique id of this PriceData
|
Integer |
getMaxQuantity()
This field is not used out-of-box
|
BigDecimal |
getPrice()
Gets the price to be used for the sku using this pricelist.returns getSalePrice if not null; otherwise, returns getRetailPrice
|
PriceList |
getPriceList()
Returns the associated PriceList
|
Long |
getPriceListId() |
BigDecimal |
getRetailPrice()
Allows the PriceList to modify the RetailPrice for the
Sku .Typically is used to return the MSRP. |
BigDecimal |
getSalePrice()
sku sale price
|
org.broadleafcommerce.core.catalog.domain.Sku |
getSku()
Returns the associated
Sku . |
Long |
getSkuId() |
List<SkuPriceDataTier> |
getSkuPriceDataTierList()
return the list of
SkuPriceDataTier that is associated with the PriceData |
Boolean |
getUsePricingTiers()
return flag to verify if there a
SkuPriceDataTier is associated with this PriceData |
boolean |
isAvailable()
Returns true if this item is available
|
void |
populatePricingTiersCollection()
Convenience method that populates the lazy-loaded collection.
|
void |
setActiveEndDate(Date activeEndDate)
Sets the end date for the sku in the context of this PriceList.
|
void |
setActiveStartDate(Date activeStartDate)
Sets the the first date that the
Sku should be available for sale. |
void |
setCurrencyCode(String currencyCode) |
void |
setDefaultProductId(Long defaultProductId) |
void |
setId(Long id)
Sets the unique id of this PriceData
|
void |
setMaxQuantity(Integer maxQuantity)
This field is not used out-of-box
|
void |
setPriceList(PriceList priceList)
Sets the associated priceList.
|
void |
setPriceListId(Long priceListId) |
void |
setRetailPrice(BigDecimal retailPrice)
Sets RetailPrice for the
Sku . |
void |
setSalePrice(BigDecimal salePrice)
sku sale price
returns the price to charge when using this price list.
|
void |
setSku(org.broadleafcommerce.core.catalog.domain.Sku sku)
Sets the associated
Sku |
void |
setSkuId(Long skuId) |
void |
setSkuPriceDataTierList(List<SkuPriceDataTier> skuPriceDataTierList)
Set the list of
SkuPriceDataTier to be associated with the PriceData |
void |
setUsePricingTiers(Boolean usePricingTiers)
Set flag if there is
SkuPriceDataTier associated with this PriceData |
public Date getActiveStartDate()
SkuPriceData
Sku
should be available for sale. This field is used to determine
whether a user can add the Sku
to their cart. If null, will default to the parentPriceList's
activeDate or if that is unset the SKU's activeStartDate.getActiveStartDate
in interface SkuPriceData
getActiveStartDate
in interface org.broadleafcommerce.core.catalog.domain.pricing.PriceDataItem
Sku
public void setActiveStartDate(Date activeStartDate)
SkuPriceData
Sku
should be available for sale. This field is used to determine
whether a user can add the Sku
to their cart.setActiveStartDate
in interface SkuPriceData
public Date getActiveEndDate()
SkuPriceData
Sku
should be available for sale. This field is used to determine
whether a user can add the Sku
to their cart.getActiveEndDate
in interface SkuPriceData
getActiveEndDate
in interface org.broadleafcommerce.core.catalog.domain.pricing.PriceDataItem
public void setActiveEndDate(Date activeEndDate)
SkuPriceData
setActiveEndDate
in interface SkuPriceData
public boolean isAvailable()
SkuPriceData
isAvailable
in interface SkuPriceData
public BigDecimal getPrice()
SkuPriceData
getPrice
in interface SkuPriceData
public void setMaxQuantity(Integer maxQuantity)
SkuPriceData
setMaxQuantity
in interface SkuPriceData
public Integer getMaxQuantity()
SkuPriceData
getMaxQuantity
in interface SkuPriceData
public void setUsePricingTiers(Boolean usePricingTiers)
SkuPriceData
SkuPriceDataTier
associated with this PriceDatasetUsePricingTiers
in interface SkuPriceData
public Boolean getUsePricingTiers()
SkuPriceData
SkuPriceDataTier
is associated with this PriceDatagetUsePricingTiers
in interface SkuPriceData
public void setSkuPriceDataTierList(List<SkuPriceDataTier> skuPriceDataTierList)
SkuPriceData
SkuPriceDataTier
to be associated with the PriceDatasetSkuPriceDataTierList
in interface SkuPriceData
public List<SkuPriceDataTier> getSkuPriceDataTierList()
SkuPriceData
SkuPriceDataTier
that is associated with the PriceDatagetSkuPriceDataTierList
in interface SkuPriceData
public void populatePricingTiersCollection()
SkuPriceData
populatePricingTiersCollection
in interface SkuPriceData
public BigDecimal getRetailPrice()
SkuPriceData
Sku
.Typically is used to return the MSRP.getRetailPrice
in interface SkuPriceData
getRetailPrice
in interface org.broadleafcommerce.core.catalog.domain.pricing.PriceDataItem
public void setRetailPrice(BigDecimal retailPrice)
SkuPriceData
Sku
.setRetailPrice
in interface SkuPriceData
public Long getId()
SkuPriceData
getId
in interface SkuPriceData
public void setId(Long id)
SkuPriceData
setId
in interface SkuPriceData
public PriceList getPriceList()
SkuPriceData
getPriceList
in interface SkuPriceData
public void setPriceList(PriceList priceList)
SkuPriceData
setPriceList
in interface SkuPriceData
public org.broadleafcommerce.core.catalog.domain.Sku getSku()
SkuPriceData
Sku
.getSku
in interface SkuPriceData
public void setSku(org.broadleafcommerce.core.catalog.domain.Sku sku)
SkuPriceData
Sku
setSku
in interface SkuPriceData
public BigDecimal getSalePrice()
SkuPriceData
getSalePrice
in interface SkuPriceData
getSalePrice
in interface org.broadleafcommerce.core.catalog.domain.pricing.PriceDataItem
public void setSalePrice(BigDecimal salePrice)
SkuPriceData
setSalePrice
in interface SkuPriceData
public Long getPriceListId()
getPriceListId
in interface org.broadleafcommerce.core.catalog.domain.pricing.PriceDataItem
public void setPriceListId(Long priceListId)
public <G extends SkuPriceData> org.broadleafcommerce.common.copy.CreateResponse<G> createOrRetrieveCopyInstance(org.broadleafcommerce.common.copy.MultiTenantCopyContext context) throws CloneNotSupportedException
createOrRetrieveCopyInstance
in interface org.broadleafcommerce.common.copy.MultiTenantCloneable<SkuPriceData>
CloneNotSupportedException
public String getCurrencyCode()
public void setCurrencyCode(String currencyCode)
public Long getSkuId()
public void setSkuId(Long skuId)
public Long getDefaultProductId()
public void setDefaultProductId(Long defaultProductId)
Copyright © 2019. All rights reserved.