com.ibm.commerce.inventory.scheduled.commands
Class CheckReleaseExpiredAllocationsCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.TaskCommandImpl
                    |
                    +--com.ibm.commerce.inventory.scheduled.commands.CheckReleaseExpiredAllocationsCmdImpl
All Implemented Interfaces:
CheckForWorkCmd, CheckReleaseExpiredAllocationsCmd, ECCommand, ECTargetableCommand, TaskCommand

public class CheckReleaseExpiredAllocationsCmdImpl
extends TaskCommandImpl
implements CheckReleaseExpiredAllocationsCmd

This CheckReleaseExpiredAllocationsCmd implementation figures out which stores actually have something that needs to be done.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.inventory.scheduled.commands. CheckReleaseExpiredAllocationsCmd
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
CheckReleaseExpiredAllocationsCmdImpl()
          This is the class constructor.
 
Method Summary
 boolean checkProcessingNeeded()
          Return the boolean ibIsThereWork.
 boolean isReadyToCallExecute()
          Checks to see if store id has been set
 void performExecute()
          Call the Order query to see if there are expired orderitems.
 void reset()
          Reset all instance variables.
 void setStoreId(java.lang.Integer argStoreToCheck)
          Set the store id.
 
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, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CheckReleaseExpiredAllocationsCmdImpl

public CheckReleaseExpiredAllocationsCmdImpl()
This is the class constructor.
Method Detail

checkProcessingNeeded

public boolean checkProcessingNeeded()
Return the boolean ibIsThereWork.
Specified by:
checkProcessingNeeded in interface CheckForWorkCmd
Returns:
True indicates that there is work to do.

isReadyToCallExecute

public boolean isReadyToCallExecute()
Checks to see if store id has been set
Overrides:
isReadyToCallExecute in class AbstractECTargetableCommand
Returns:
true if exists, otherwise return false.

performExecute

public void performExecute()
                    throws ECException
Call the Order query to see if there are expired orderitems. If there are then set a flag to indicate that there is work to do.

This command uses the following AccessBean:

OrderJDBCHelperAccessBean calling method checkStaleOrderItems
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECSystemException - when receive java.sql.SQLException
ECSystemException - when receive javax.ejb.CreateException
ECSystemException - when receive javax.naming.NamingException
ECSystemException - when receive java.rmi.RemoteException
ECException

reset

public void reset()
Reset all instance variables.
Overrides:
reset in class AbstractECTargetableCommand

setStoreId

public void setStoreId(java.lang.Integer argStoreToCheck)
Set the store id.
Specified by:
setStoreId in interface CheckForWorkCmd
Parameters:
argStoreToCheck - store id to check