com.ibm.commerce.order.calculation

Class Group

  • java.lang.Object
    • com.ibm.commerce.order.calculation.Group
  • All Implemented Interfaces:
    java.lang.Comparable


    public class Group
    extends java.lang.Object
    implements java.lang.Comparable
    Each group is composed of:
    • a calculation code
    • a list of items
    • an optional list of values for each tax category
    • Field Detail

      • COPYRIGHT

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

      • Group

        public Group(CalculationCodeAccessBean aabCode,
                     Item[] aItems)
        Constructor
        Parameters:
        aabCode - the calculation code
        aItems - the items
    • Method Detail

      • compareTo

        public int compareTo(java.lang.Object a)
        The comparison to another object.
        Specified by:
        compareTo in interface java.lang.Comparable
        Parameters:
        a - the object to be compared to
        Returns:
        the result of the comparison
      • getItems

        public Item[] getItems()
        Returns the items.
        Returns:
        the items
      • getValues

        public java.math.BigDecimal[] getValues()
        Returns the values.
        Returns:
        the values
      • getValues

        public java.math.BigDecimal[] getValues(java.lang.Integer anTaxCategoryId)
        Returns the values of a particular tax category.
        Parameters:
        anTaxCategoryId - the tax category id
        Returns:
        the values of a particular tax category.
      • isCalculated

        public boolean isCalculated()
        Returns whether this group is calculated.
        Returns:
        true if the group is calculated
      • isEmpty

        public boolean isEmpty()
        Returns whether this group is empty.
        Returns:
        true if it is empty.
      • setCalculated

        public void setCalculated(boolean abCalculated)
        Sets whether the group is calculated.
        Parameters:
        abCalculated - the boolean value
      • setCode

        public void setCode(CalculationCodeAccessBean aabCode)
        Sets the calculation code.
        Parameters:
        aabCode - the calculation code.
      • setItems

        public void setItems(Item[] aItems)
        Sets the items.
        Parameters:
        aItems - the array of items
      • setValues

        public void setValues(java.math.BigDecimal[] adValues)
        Sets the values.
        Parameters:
        adValues - the values
      • setValues

        public void setValues(java.lang.Integer anTaxCategoryId,
                              java.math.BigDecimal[] adValues)
        Sets the values of a particular tax category.
        Parameters:
        anTaxCategoryId - the tax category id
        adValues - the value
      • setPromotionExecutionRecord

        public void setPromotionExecutionRecord(PromotionExecutionRecord aPromotionExecutionRecord)
        Sets the promotion execution record. This is set in place of orderitem adjustment amounts when Promotion Engine is enabled.
        Parameters:
        aPromotionExecutionRecord -
        See Also:
        setValues(BigDecimal[])
      • getPromotionExecutionRecord

        public PromotionExecutionRecord getPromotionExecutionRecord()
        Returns the promotion execution record. This is set in place of orderitem adjustment amounts when Promotion Engine is enabled.
        Returns:
        the promotion execution record.
        See Also:
        getValues()