com.ibm.commerce.price.commands

Class DiscountCalculationCodeApplyCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, com.ibm.commerce.order.utils.CalculationCmd, com.ibm.commerce.order.utils.CalculationCodeApplyCmd, com.ibm.commerce.order.utils.ShippingCalculationCodeApplyCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable

    Deprecated. 

    public class DiscountCalculationCodeApplyCmdImpl
    extends com.ibm.commerce.order.utils.CalculationCmdImpl
    implements com.ibm.commerce.order.utils.ShippingCalculationCodeApplyCmd
    The default implementation for the discount calculationUsage adds the specified MonetaryAmounts to the total adjustment of the orderItem. Order item adjustments and an order adjustment are also created for each calculation code applied.

    NOTE : Order adjustments can not make the net price of an order item cross the zero boundary. That is, if an order item has a gross price, that is on the opposite side of zero from the resulting net price. (after applying the discount). Then the net price is adjusted to zero and the discount is changed accordingly. Any left-over discount is distributed over the other order items that also qualify for the same discount. The distribution is done in proportion to the original discount. Any order item that has a gross price that is zero can only have a net price (price after applying discounts) that is positive.

    This command calls the following TaskCommands:

    This command uses the following AccessBeans:

    See Also:
    Serialized Form
    • Constructor Detail

      • DiscountCalculationCodeApplyCmdImpl

        public DiscountCalculationCodeApplyCmdImpl()
        Deprecated. 
        DiscountCalculationCodeApplyCmdImpl constructor.
    • Method Detail

      • setCalculationCodeAB

        public void setCalculationCodeAB(CalculationCodeAccessBean calculationCodeAB)
        Deprecated. 
        Set the CalculationCodeAccessBean.
        Specified by:
        setCalculationCodeAB in interface com.ibm.commerce.order.utils.CalculationCodeApplyCmd
        Parameters:
        calculationCodeAB - A CalculationCodeAccessBean.
      • setOrderItemABHash

        public void setOrderItemABHash(java.util.Hashtable orderItemABHash)
        Deprecated. 
        Set the orderItemABHash.
        Specified by:
        setOrderItemABHash in interface com.ibm.commerce.order.utils.CalculationCodeApplyCmd
        Parameters:
        orderItemABHash - An orderItemABHash.

        java.util.Hashtable orderItemABHash

        • key: com.ibm.commerce.order.objects.OrderItemAccessBean orderItemAB
        • element: com.ibm.commerce.price.CategorizedMonetaryAmount monetaryAmount