com.ibm.commerce.order.calculation

Class ItemTaxInfo

  • java.lang.Object
    • com.ibm.commerce.order.calculation.ItemTaxInfo


  • public class ItemTaxInfo
    extends java.lang.Object
    This is a data object to record the order item's tax information.
    • Field Summary

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

      Constructors 
      Constructor and Description
      ItemTaxInfo()
      The default constructor.
      ItemTaxInfo(java.lang.Long itemId, boolean isOrderItem)
      Either the order item ID or catalog entry ID is set by constructor.
      ItemTaxInfo(java.lang.Long itemId, boolean isOrderItem, java.util.HashMap hshArrValues) 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addTaxInfo(java.lang.Integer taxCategoryId, java.math.BigDecimal taxRate, java.math.BigDecimal taxAmount)
      This method adds the tax rate and tax amount for the specified tax category.
      boolean equals(java.lang.Object aObj)
      This method implements the equals method.
      java.lang.Integer[] getAppliedTaxCategories()
      The method gets the applied tax categories for the item.
      java.lang.Long getCatalogEntryId()
      This method gets the catalog entry id.
      java.util.HashMap getHshArrValues()
      This method gets the hash map which contains the tax info for this item.
      java.lang.Long getOrderItemId()
      This method gets the order item id.
      java.math.BigDecimal getTaxAmountForCategory(java.lang.Integer taxCategoryId)
      This method gets the tax amount for the specified tax category.
      java.math.BigDecimal[] getTaxInfoForCategory(java.lang.Integer taxCategoryId)
      This method gets the tax info for the specified tax category.
      java.math.BigDecimal getTaxRateForCategory(java.lang.Integer taxCategoryId)
      This method gets the tax rate for the specified tax category.
      int hashCode()
      This method implements the hashCode method.
      void setCatalogEntryId(java.lang.Long nCatalogEntryId)
      This method sets the catalog entry id.
      void setHshArrValues(java.util.HashMap ahshArrValues)
      This method sets the tax info hash map for this item.
      void setOrderItemId(java.lang.Long nOrderItemId)
      This method sets the order item id.
      java.lang.String toString()
      This method implements the toString method.
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • COPYRIGHT

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

      • ItemTaxInfo

        public ItemTaxInfo()
        The default constructor.
      • ItemTaxInfo

        public ItemTaxInfo(java.lang.Long itemId,
                           boolean isOrderItem)
        Either the order item ID or catalog entry ID is set by constructor. When it's time to record an order item's tax, inOrderItemId is used. When it's time to record an catalog entry's tax, inCatalogEntryId is used.
        Parameters:
        itemId -
        isOrderItem -
      • ItemTaxInfo

        public ItemTaxInfo(java.lang.Long itemId,
                           boolean isOrderItem,
                           java.util.HashMap hshArrValues)
    • Method Detail

      • getTaxRateForCategory

        public java.math.BigDecimal getTaxRateForCategory(java.lang.Integer taxCategoryId)
        This method gets the tax rate for the specified tax category.
        Parameters:
        taxCategoryId -
        Returns:
        tax rate
      • getTaxAmountForCategory

        public java.math.BigDecimal getTaxAmountForCategory(java.lang.Integer taxCategoryId)
        This method gets the tax amount for the specified tax category.
        Parameters:
        taxCategoryId -
        Returns:
        tax amount
      • getTaxInfoForCategory

        public java.math.BigDecimal[] getTaxInfoForCategory(java.lang.Integer taxCategoryId)
        This method gets the tax info for the specified tax category.
        Parameters:
        taxCategoryId -
        Returns:
        taxInfo , taxInfo[0] is the tax rate, taxInfo[1] is the tax amount.
      • getAppliedTaxCategories

        public java.lang.Integer[] getAppliedTaxCategories()
        The method gets the applied tax categories for the item.
        Returns:
        applied tax categories
      • addTaxInfo

        public void addTaxInfo(java.lang.Integer taxCategoryId,
                               java.math.BigDecimal taxRate,
                               java.math.BigDecimal taxAmount)
        This method adds the tax rate and tax amount for the specified tax category.
        Parameters:
        taxCategoryId -
        taxRate -
        taxAmount -
      • equals

        public boolean equals(java.lang.Object aObj)
        This method implements the equals method.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        aObj -
        Returns:
        boolean
      • hashCode

        public int hashCode()
        This method implements the hashCode method.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        int
      • toString

        public java.lang.String toString()
        This method implements the toString method.
        Overrides:
        toString in class java.lang.Object
        Returns:
        String
      • getOrderItemId

        public java.lang.Long getOrderItemId()
        This method gets the order item id.
        Returns:
        order item id
      • setOrderItemId

        public void setOrderItemId(java.lang.Long nOrderItemId)
        This method sets the order item id.
        Parameters:
        nOrderItemId -
      • getCatalogEntryId

        public java.lang.Long getCatalogEntryId()
        This method gets the catalog entry id.
        Returns:
        catalogEntryId
      • setCatalogEntryId

        public void setCatalogEntryId(java.lang.Long nCatalogEntryId)
        This method sets the catalog entry id.
        Parameters:
        nCatalogEntryId -
      • getHshArrValues

        public java.util.HashMap getHshArrValues()
        This method gets the hash map which contains the tax info for this item.
        Returns:
        ihshArrValues
      • setHshArrValues

        public void setHshArrValues(java.util.HashMap ahshArrValues)
        This method sets the tax info hash map for this item.
        Parameters:
        ahshArrValues -