com.ibm.commerce.price.beans

Interface DiscountSmartDataBean

  • All Superinterfaces:
    com.ibm.commerce.beans.DataBean, com.ibm.commerce.beans.InputDataBean, java.io.Serializable, com.ibm.commerce.beans.SmartDataBean
    All Known Implementing Classes:
    DiscountDataBean


    public interface DiscountSmartDataBean
    extends com.ibm.commerce.beans.SmartDataBean
    This interface extends SmartDataBean to provide an interface to get adjustment values from the DiscountDataBean.
    • Field Summary

      • Fields inherited from interface com.ibm.commerce.beans.SmartDataBean

        COPYRIGHT
      • Fields inherited from interface com.ibm.commerce.beans.DataBean

        emptyString
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      java.math.BigDecimal getDiscountValue()
      Returns the first catalog entry's total adjustment that applies at the catalog entry level.
      java.math.BigDecimal[] getDiscountValues()
      Returns the total adjustment for all catalog entries that apply at the catalog entry level.
      • Methods inherited from interface com.ibm.commerce.beans.SmartDataBean

        getCommandContext, populate, setCommandContext
      • Methods inherited from interface com.ibm.commerce.beans.InputDataBean

        getRequestProperties, setRequestProperties
    • Method Detail

      • getDiscountValue

        java.math.BigDecimal getDiscountValue()
        Returns the first catalog entry's total adjustment that applies at the catalog entry level. For example, if the catalog entry has a 20% markdown, -0.2 will be returned. The returned value could also be a fixed price adjustment. The type of adjustment must be determined from the promotion component.

        If only one catalog entry ID was set using DiscountInputDataBean.setCatalogEntryId(Long), then the returned value is for that. Otherwise the returned value corresponds to the first catalog entry ID that was set using DiscountInputDataBean.setCatalogEntryId(Long[]). (Similar for the String-based set methods.)

        Returns:
        The adjustment for the catalog entry ID.
      • getDiscountValues

        java.math.BigDecimal[] getDiscountValues()
        Returns the total adjustment for all catalog entries that apply at the catalog entry level. For example, if two catalog entries have a 20% markdown and a 15% markup, {-0.2, 0.15} will be returned. The returned values could also be fixed price adjustments. The type of adjustment must be determined from the promotion component.

        The returned values correspond to the catalog entry IDs given by DiscountInputDataBean.setCatalogEntryId(Long[]). If DiscountInputDataBean.setCatalogEntryId(Long) was used to set the catalog entry IDs, the returned array will have a length of 1. (Similar for the String-based set methods.)

        Returns:
        The adjustments for the catalog entry IDs.