com.ibm.commerce.negotiation.commands
Class SetWinnerCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.TaskCommandImpl
                    |
                    +--com.ibm.commerce.negotiation.commands.SetWinnerCmdImpl
All Implemented Interfaces:
ECCommand, ECTargetableCommand, SetWinnerCmd, TaskCommand

public class SetWinnerCmdImpl
extends TaskCommandImpl
implements SetWinnerCmd

Set winner command implementation. This command calls the following TaskCommands:

This command uses the following AccessBeans:
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.negotiation.commands. SetWinnerCmd
COPYRIGHT, defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.command. ECTargetableCommand
COPYRIGHT
 
Fields inherited from interface com.ibm.commerce.command. ECCommand
defaultCommandClassName
 
Constructor Summary
SetWinnerCmdImpl()
          SetWinnerCmdImpl constructor.
 
Method Summary
 AuctionAccessBean getAuctionAccessBean()
          Gets the auction access bean associated with the current auction reference number.
 java.lang.Long getAuctionReferenceNumber()
          Gets auction ID.
 java.lang.Long getItemReferenceNumber()
          Gets the item reference number.
 java.util.Vector getWinningBids()
          Fetches a list of the winning bids.
 void performExecute()
          Determines the winning bids.
 void refundDeposit(java.lang.Long bidId, java.math.BigDecimal amount)
          Refunds the auction deposit for the incoming bid.
 void reset()
          Method initializes/resets the command.
 void setAuctionAccessBean(com.ibm.commerce.negotiation.objects.AuctionAccessBean newAuctionAccessBean)
          Sets the auction access bean.
 void setAuctionReferenceNumber(java.lang.Long newAuctionReferenceNumber)
          Sets the auction ID.
 void setItemReferenceNumber(java.lang.Long newItemReferenceNumber)
          Sets the item reference number.
 
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.commerce.negotiation.commands. SetWinnerCmd
setAuctionAccessBean
 

Constructor Detail

SetWinnerCmdImpl

public SetWinnerCmdImpl()
SetWinnerCmdImpl constructor.
Method Detail

getAuctionAccessBean

public AuctionAccessBean getAuctionAccessBean()
                                       throws FinderException,
                                              java.rmi.RemoteException,
                                              javax.naming.NamingException,
                                              CreateException
Gets the auction access bean associated with the current auction reference number.
Returns:
com.ibm.commerce.negotiation.objects.AuctionAccessBean
Throws:
FinderException - if thrown by the EJB.
java.rmi.RemoteException - if thrown by the EJB.
javax.naming.NamingException - if thrown by the EJB.
CreateException - if thrown by the EJB.

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
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,
                          java.rmi.RemoteException,
                          FinderException,
                          javax.naming.NamingException,
                          CreateException
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.
java.rmi.RemoteException - This exception is allowed to percolate.
FinderException - This exception is allowed to percolate.
javax.naming.NamingException - This exception is allowed to percolate.
CreateException - This exception is allowed to percolate.

reset

public void reset()
Method initializes/resets the command.
Overrides:
reset in class AbstractECTargetableCommand

setAuctionAccessBean

public void setAuctionAccessBean(com.ibm.commerce.negotiation.objects.AuctionAccessBean newAuctionAccessBean)
                          throws FinderException,
                                 java.rmi.RemoteException,
                                 javax.naming.NamingException,
                                 CreateException
Sets the auction access bean.
Parameters:
newAuctionAccessBean - The auction access bean.
Throws:
FinderException - if thrown by the EJB.
java.rmi.RemoteException - if thrown by the EJB.
javax.naming.NamingException - if thrown by the EJB.
CreateException - if thrown by the EJB.

setAuctionReferenceNumber

public void setAuctionReferenceNumber(java.lang.Long newAuctionReferenceNumber)
                               throws FinderException,
                                      java.rmi.RemoteException,
                                      javax.naming.NamingException,
                                      CreateException
Sets the auction ID.
Specified by:
setAuctionReferenceNumber in interface SetWinnerCmd
Parameters:
newAuctionReferenceNumber - The auction ID.
Throws:
java.rmi.RemoteException - This exception is allowed to percolate.
FinderException - This exception is allowed to percolate.
javax.naming.NamingException - This exception is allowed to percolate.
CreateException - This exception is allowed to percolate.

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