com.ibm.commerce.marketing.promotion.reward

Class Range

  • java.lang.Object
    • com.ibm.commerce.marketing.promotion.reward.Range
  • All Implemented Interfaces:
    XMLizable, java.io.Serializable


    public class Range
    extends java.lang.Object
    implements XMLizable
    Used by composite adjustment to define tiered and volume based adjustments. Note the difference between this and the tiered or volume based distributions:
  • Tiered distribution is used to associate different rewards to matched patterns. The logic is based on either the spending total of all matched pattern or the total number of matched patterns.
  • Composite adjustment is used to associate different adjustments to a single matched pattern. The logic is based on the sub total of that pattern or the number of matched items in the matched pattern.
See Also:
Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
    • Constructor Summary

      Constructors 
      Constructor and Description
      Range()
      Constructor for Range.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void fromXML(org.w3c.dom.Node anXMLNode)
      Transforms the XML node into its corresponding real Object.
      java.math.BigDecimal getAmount()
      This method gets the rewards in the Range.
      java.lang.String getCurrency()
      This method returns the currency.
      java.math.BigDecimal getlowerBound()
      This method gets the lowerBound of the range.
      java.math.BigDecimal getUpperBound()
      This method gets the upperBound of the range.
      boolean isInRange(java.math.BigDecimal x)
      This method checks if the given number falls in the Range.
      boolean isLowerBoundIncludedInRange()
      Returns a boolean value which indicates whether the lower bound is included in the range or not.
      boolean isUpperBoundIncludedInRange()
      Returns a boolean value which indicates whether the upper bound is included in the range or not.
      void setAmount(java.math.BigDecimal _amount)
      This method sets the rewards in the Range.
      void setCurrency(java.lang.String string)
      This method sets the currency, for example USD.
      void setLowerBound(java.math.BigDecimal _lowerBound)
      This method sets the lowerBound of the range.
      void setLowerBoundIncludedInRange(boolean b)
      Sets the boolean attribute lowerBoundIncludedInRange.
      void setUpperBound(java.math.BigDecimal _upperBound)
      This methods sets the upperBound of the range.
      void setUpperBoundIncludedInRange(boolean b)
      Sets the boolean attribute upperBoundIncludedInRange.
      java.lang.String toXML()
      Converts the object into its corresponding XML format representation.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Range

        public Range()
        Constructor for Range.
    • Method Detail

      • getlowerBound

        public java.math.BigDecimal getlowerBound()
        This method gets the lowerBound of the range.
        Returns:
        java.math.BigDecimal lowerBound of the range
      • getUpperBound

        public java.math.BigDecimal getUpperBound()
        This method gets the upperBound of the range.
        Returns:
        java.math.BigDecimal upperBound of the range
      • setUpperBound

        public void setUpperBound(java.math.BigDecimal _upperBound)
        This methods sets the upperBound of the range.
        Parameters:
        _upperBound - java.math.BigDecimal upperBound of the range
      • setLowerBound

        public void setLowerBound(java.math.BigDecimal _lowerBound)
        This method sets the lowerBound of the range.
        Parameters:
        _lowerBound - java.math.BigDecimal lowerBound the range
      • getAmount

        public java.math.BigDecimal getAmount()
        This method gets the rewards in the Range.
        Returns:
        monetary value
      • setAmount

        public void setAmount(java.math.BigDecimal _amount)
        This method sets the rewards in the Range.
        Parameters:
        _amount - the amount to be rewarded.
      • isInRange

        public boolean isInRange(java.math.BigDecimal x)
        This method checks if the given number falls in the Range.
        Parameters:
        x - java.math.BigDecimal
        Returns:
        boolean true if number falls in the Range, false otherwise;
      • isLowerBoundIncludedInRange

        public boolean isLowerBoundIncludedInRange()
        Returns a boolean value which indicates whether the lower bound is included in the range or not. true indicates the lower bound is included in the range, which is the default value, false indicates the lower bound is not included in the range.
        Returns:
        a boolean value indicating whether the lower bound is included in the range or not.
      • isUpperBoundIncludedInRange

        public boolean isUpperBoundIncludedInRange()
        Returns a boolean value which indicates whether the upper bound is included in the range or not. true indicates the upper bound is included in the range, which is the default value, false indicates the upper bound is not included in the range.
        Returns:
        a boolean value indicating whether the upper bound is included in the range or not.
      • setLowerBoundIncludedInRange

        public void setLowerBoundIncludedInRange(boolean b)
        Sets the boolean attribute lowerBoundIncludedInRange. A true value indicates the lower bound is included in the range, a false indicates the lower bound is not included in the range.
        Parameters:
        b - new boolean value for the lowerBoundINcludedInRange attribute
      • setUpperBoundIncludedInRange

        public void setUpperBoundIncludedInRange(boolean b)
        Sets the boolean attribute upperBoundIncludedInRange. A true value indicates the upper bound is included in the range, a false indicates the upper bound is not included in the range.
        Parameters:
        b - new boolean value for the upperBoundINcludedInRange attribute
      • getCurrency

        public java.lang.String getCurrency()
        This method returns the currency.
        Returns:
        String The currency.
      • setCurrency

        public void setCurrency(java.lang.String string)
        This method sets the currency, for example USD.
        Parameters:
        string - The currency.