com.ibm.commerce.negotiation.commands

Class SetWinnerCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, SetWinnerCmd, 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 SetWinnerCmdImpl
    extends TaskCommandImpl
    implements SetWinnerCmd
    Sets winner command implementation. This command calls the following TaskCommands:
    • ApplyCalculationUsageCmd
    This command uses the following AccessBeans:
    See Also:
    Serialized Form
    • Constructor Detail

      • SetWinnerCmdImpl

        public SetWinnerCmdImpl()
        SetWinnerCmdImpl constructor.
    • Method Detail

      • getAuctionAccessBean

        public AuctionAccessBean getAuctionAccessBean()
        Gets the auction access bean associated with the current auction reference number.
        Returns:
        com.ibm.commerce.negotiation.objects.AuctionAccessBean
      • getAuctionReferenceNumber

        public java.lang.Long getAuctionReferenceNumber()
        Gets auction ID.
        Returns:
        The auction ID.
      • getItemReferenceNumber

        public java.lang.Long getItemReferenceNumber()
        Gets the item reference number.
        Returns:
        The item reference number.
      • getWinningBids

        public java.util.Vector getWinningBids()
        Fetches a list of the winning bids.
        Specified by:
        getWinningBids in interface SetWinnerCmd
        Returns:
        The vector of winning bids.
      • performExecute

        public void performExecute()
                            throws ECException
        Determines the winning bids.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        Throws:
        ECException - Raised with the following messages based on the corresponding error: _ERR_SQL_EXCEPTION, _ERR_FINDER_EXCEPTION, _ERR_REMOTE_EXCEPTION, _ERR_NAMING_EXCEPTION, _ERR_CREATE_EXCEPTION.
      • refundDeposit

        public void refundDeposit(java.lang.Long bidId,
                                  java.math.BigDecimal amount)
                           throws ECException
        Refunds the auction deposit for the incoming bid.
        Parameters:
        bidId - The bid ID.
        amount - The amount to refund.
        Throws:
        ECException - This exception is allowed to percolate.
      • reset

        public void reset()
        Method initializes/resets the command.
        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractECTargetableCommand
      • setAuctionAccessBean

        public void setAuctionAccessBean(AuctionAccessBean newAuctionAccessBean)
        Sets the auction access bean.
        Specified by:
        setAuctionAccessBean in interface SetWinnerCmd
        Parameters:
        newAuctionAccessBean - The auction access bean.
      • setAuctionReferenceNumber

        public void setAuctionReferenceNumber(java.lang.Long newAuctionReferenceNumber)
        Sets the auction ID.
        Specified by:
        setAuctionReferenceNumber in interface SetWinnerCmd
        Parameters:
        newAuctionReferenceNumber - The auction ID.
      • setItemReferenceNumber

        public void setItemReferenceNumber(java.lang.Long newItemReferenceNumber)
        Sets the item reference number.
        Specified by:
        setItemReferenceNumber in interface SetWinnerCmd
        Parameters:
        newItemReferenceNumber - The item reference number