com.ibm.commerce.orderitems.commands

Class CheckAndResetOrderItemPriceFlagCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, CheckAndResetOrderItemPriceFlagCmd, 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


    public class CheckAndResetOrderItemPriceFlagCmdImpl
    extends TaskCommandImpl
    implements CheckAndResetOrderItemPriceFlagCmd
    This is the default implementation of the CheckAndResetOrderItemPriceFlagCmd task command.

    Behaviour:

    This command checks and resets the bit price flag "PRICE_REFRESHED" for the order items if price is expired. The flag PRICE_REFRESHED indicates whether the price should be recalculated. If the price is expired, the flag should be reset to 0 and price should be recalculated.
    To judge whether the price is expired, uses the below method: If current time - orderitems.lastcreate > store.quotegoodfor, the flag PRICE_REFRESHED will be reset to zero.
    Below is the logic of the command:
    • If the STORE.PRICEREFFLAG is 8, it first groups the order items with the same catentryId. If one of the order items for the catentryId has been expired or its binary price flag PREPAREFLAGS_PRICE_REFRESHED is 0. It will reset the binary price flag PREPAREFLAGS_PRICE_REFRESHED for all the order items in the group with same catentryId.
    • If the STORE.PRICEREFFLAG is not 8. For each order item, check whether the order item has been expired. If so, resets the binary price flag PREPAREFLAGS_PRICE_REFRESHED for the order item.
    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

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

      • CheckAndResetOrderItemPriceFlagCmdImpl

        public CheckAndResetOrderItemPriceFlagCmdImpl()
    • Method Detail

      • setOrderItems

        public void setOrderItems(java.util.Vector argVecOrderItemAB)
        This method sets the vector of order item access beans whose price flags will be checked and reset.
        Specified by:
        setOrderItems in interface CheckAndResetOrderItemPriceFlagCmd
        Parameters:
        argVecOrderItemAB - the vector of order item access beans.
      • getOrderItems

        public java.util.Vector getOrderItems()
        This method gets the vector of order item access beans whose price flags will be checked and reset.
        Returns:
        the vector of order item access beans.