com.ibm.commerce.negotiation.commands
Class EvaluateSingleQuantityOpenCryBidCmdImpl

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

public class EvaluateSingleQuantityOpenCryBidCmdImpl
extends TaskCommandImpl
implements EvaluateSingleQuantityOpenCryBidCmd

This task Evaluate Open Cry Single Item Bid. Access Bean used:

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          Copyright statement.
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.negotiation.commands. EvaluateSingleQuantityOpenCryBidCmd
defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.command. ECCommand
defaultCommandClassName
 
Constructor Summary
EvaluateSingleQuantityOpenCryBidCmdImpl()
          EvaluateSingleQuantityOpenCryBidCmdImpl default constructor.
 
Method Summary
protected  AutoBidAccessBean getAutoBid()
          Returns the new AutoBid object.
protected  AutoBidAccessBean getBestAutoBid()
          Returns the Best Auto Bid object of current Auction.
protected  BidAccessBean getBestBid()
          Returns the Best Bid object of current Auction.
protected  BidAccessBean getBid()
          Returns the new Bid object.
protected  java.lang.String getErrorTaskName()
          returns error task name that will be returned by the exceptions.
 BidAccessBean getRecentLostWinningBid()
          Returns the Bid object that was a winner before this evaluation.
 BidAccessBean getWinningBid()
          Returns the Bid object that results of the evaluation.
 boolean isBidEvaluated()
          Return if the new bid has been evaluated.
 void performExecute()
          Evaluate the 2 Bids, higher one becomes the winner.
 void reset()
          This resets the output properties to the values they had prior to calling the execute method, so that the get methods no longer work but the isReadyToCallExecute returns true.
 void setAuction(AuctionAccessBean auction)
          Sets the current auction Id value,
 void setAutoBid(AutoBidAccessBean abAutoBid)
          Sets the Best AutoBid object of current Auction.
 void setBestAutoBid(AutoBidAccessBean abBestAutoBid)
          Sets the Best Auto Bid object of current Auction.
 void setBestBid(BidAccessBean abBestBid)
          Sets the Best Bid object of current Auction.
 void setBid(BidAccessBean abBid)
          Sets the new Bid object.
 void setErrorTaskName(java.lang.String errorTaskName)
          Set error task name that will be returned by the exceptions.
protected  void setRecentLostWinningBid(BidAccessBean abRecentLostWinningBid)
          Sets the Bid object that was a winner before this evaluation.
protected  void setWinningBid(BidAccessBean abWinningBid)
          Sets the Bid object that results of the evaluation.
 void validateParameters()
          This is where parameter checking is done.
 
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
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail
public static final java.lang.String COPYRIGHT
Copyright statement.
See Also:
Constant Field Values
Constructor Detail

EvaluateSingleQuantityOpenCryBidCmdImpl

public EvaluateSingleQuantityOpenCryBidCmdImpl()
EvaluateSingleQuantityOpenCryBidCmdImpl default constructor.
Method Detail

setAuction

public void setAuction(AuctionAccessBean auction)
Sets the current auction Id value,
Specified by:
setAuction in interface EvaluateSingleQuantityOpenCryBidCmd
Parameters:
auction - AuctionAccessBean - Auction bean

getBid

protected BidAccessBean getBid()
Returns the new Bid object.
Returns:
BidAccessBean

setBid

public void setBid(BidAccessBean abBid)
Sets the new Bid object.
Specified by:
setBid in interface EvaluateSingleQuantityOpenCryBidCmd
Parameters:
abBid - BidAccessBean - Bid object.

getAutoBid

protected AutoBidAccessBean getAutoBid()
Returns the new AutoBid object.
Returns:
AutoBidAccessBean

setAutoBid

public void setAutoBid(AutoBidAccessBean abAutoBid)
Sets the Best AutoBid object of current Auction.
Specified by:
setAutoBid in interface EvaluateSingleQuantityOpenCryBidCmd
Parameters:
abAutoBid - AutoBidAccessBean - AutoBid object.

getBestBid

protected BidAccessBean getBestBid()
Returns the Best Bid object of current Auction.
Returns:
BidAccessBean

setBestBid

public void setBestBid(BidAccessBean abBestBid)
Sets the Best Bid object of current Auction.
Specified by:
setBestBid in interface EvaluateSingleQuantityOpenCryBidCmd
Parameters:
abBestBid - BidAccessBean

getBestAutoBid

protected AutoBidAccessBean getBestAutoBid()
Returns the Best Auto Bid object of current Auction. (if it exists)
Returns:
AutoBidAccessBean

setBestAutoBid

public void setBestAutoBid(AutoBidAccessBean abBestAutoBid)
Sets the Best Auto Bid object of current Auction.
Specified by:
setBestAutoBid in interface EvaluateSingleQuantityOpenCryBidCmd
Parameters:
abBestAutoBid - AutoBidAccessBean

getErrorTaskName

protected java.lang.String getErrorTaskName()
returns error task name that will be returned by the exceptions.
Returns:
java.lang.String - Error task name

setErrorTaskName

public void setErrorTaskName(java.lang.String errorTaskName)
Set error task name that will be returned by the exceptions.
Specified by:
setErrorTaskName in interface EvaluateSingleQuantityOpenCryBidCmd
Parameters:
errorTaskName - java.lang.String

isBidEvaluated

public boolean isBidEvaluated()
Return if the new bid has been evaluated.
Specified by:
isBidEvaluated in interface EvaluateSingleQuantityOpenCryBidCmd
Returns:
boolean

getWinningBid

public BidAccessBean getWinningBid()
Returns the Bid object that results of the evaluation.
Specified by:
getWinningBid in interface EvaluateSingleQuantityOpenCryBidCmd
Returns:
BidAccessBean

setWinningBid

protected void setWinningBid(BidAccessBean abWinningBid)
Sets the Bid object that results of the evaluation.

getRecentLostWinningBid

public BidAccessBean getRecentLostWinningBid()
Returns the Bid object that was a winner before this evaluation.
Specified by:
getRecentLostWinningBid in interface EvaluateSingleQuantityOpenCryBidCmd
Returns:
BidAccessBean

setRecentLostWinningBid

protected void setRecentLostWinningBid(BidAccessBean abRecentLostWinningBid)
Sets the Bid object that was a winner before this evaluation.

performExecute

public void performExecute()
                    throws ECException
Evaluate the 2 Bids, higher one becomes the winner. If both are normal bids, If one of them is an autobid, and the winner is the autobid, its bid price will be 1 increment above the other bid. If one of them is an autobid, and the winner is the normal bid, then the bid price of the autobid will be equal to its max bid amount. If both are autobids, the winner will be set to 1 increment of the max bid of the losing autobid. In any case is the max bid price are the same, the eariler bid will be the winner.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException - is thrown if anything goes wrong.

reset

public void reset()
This resets the output properties to the values they had prior to calling the execute method, so that the get methods no longer work but the isReadyToCallExecute returns true. It provides a convenient and efficient way to reuse the same command instance with changes in some input properties or in the CommandTarget.
Overrides:
reset in class AbstractECTargetableCommand

validateParameters

public void validateParameters()
                        throws ECException
This is where parameter checking is done. This method replaces checkParameters() in 5.1. The default implementation of validateParameters() is a no op. It is the responsibility of the command writers to implements this method if they want to perform server side parameter checking.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECException.
ECException