com.ibm.commerce.orderitems.commands

Class RetrieveTradingsTaskCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, RetrieveTradingsTaskCmd, 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 RetrieveTradingsTaskCmdImpl
    extends TaskCommandImpl
    implements RetrieveTradingsTaskCmd
    This is the default implementation of the RetrieveTradingsTaskCmd task command.

    Behaviour:

    • If the STORE.PRICEREFFLAGS is 4, it retrieves valid trading agreements previously searched and saved for the order item.
    • Otherwise, if the STORE.PRICEREFFLAGS is not 4, it retrieves valid trading agreements currently used by the order item.
    See Also:
    Serialized Form
    • Constructor Detail

      • RetrieveTradingsTaskCmdImpl

        public RetrieveTradingsTaskCmdImpl()
    • Method Detail

      • getOrderItem

        public OrderItemAccessBean getOrderItem()
        This method gets the order item to retrieve trading agreements for.
        Returns:
        the order item access bean.
      • setPriceRefreshFlag

        public void setPriceRefreshFlag(java.lang.Integer anRefreshFlag)
        This method sets the price refresh flag. Below is the usage of the flag STORE.PRICEREFFLAGS:
         0: Default, same as 1 except that it will not save the trading agreement id.
         1: This means useCurrentOnly. This uses the price directly referenced by the order items. 
            It fails if they can no longer be used. 
         2: This means useCurrentOrSearchAgain. This is the same as useCurrentOnly.
            But instead of failing when they can no longer be used, it searches the ones that were 
            originally searched for the order items. These tradings are saved when the order items were created or updated with new 
            trading agreement id specified. 
         4: This means alwaysSearchAgain. This option always searches the price that was 
            originally searched when the order items were created or updated with new 
            trading agreement id specified.
         8: Before calling price command, sum the quantity for the order items with same catentry.
            It will get the best price and update the order item's trading agreement id. 
            It will not save the tradingId in the ORDITRD.
         
        Specified by:
        setPriceRefreshFlag in interface RetrieveTradingsTaskCmd
        Parameters:
        anRefreshFlag - the price refresh flag.
      • getPriceRefreshFlag

        public java.lang.Integer getPriceRefreshFlag()
        This method gets the price refresh flag.
        Returns:
        the price refresh flag.
      • getTradingAgreements

        public java.lang.Long[] getTradingAgreements()
        This method returns the array of trading agreement identifiers retrieved.
        Specified by:
        getTradingAgreements in interface RetrieveTradingsTaskCmd
        Returns:
        the array of trading agreement identifiers.
      • setTradingAgreements

        public void setTradingAgreements(java.lang.Long[] argTradingIds)
        This method sets the array of trading agreement identifiers.
        Parameters:
        argTradingIds - the array of trading agreement identifiers.
      • reset

        public void reset()
        This method resets the command.
        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractECTargetableCommand