public class MakeReceiptAvailableCmdImpl extends TaskCommandImpl implements MakeReceiptAvailableCmd
MakeReceiptAvailableCmd
interface.
Makes a receipt available to the distribution arrangement.
Uses the following access beans:
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
The internal copyright field.
|
defaultCommandClassName, NAME
Constructor and Description |
---|
MakeReceiptAvailableCmdImpl() |
Modifier and Type | Method and Description |
---|---|
java.lang.Long |
getDistArrangId()
Returns distribution arrangement identifier.
|
java.lang.Long |
getItemspcId()
Return item identifier.
|
java.lang.Long |
getRcptAvailId()
Return available receipt identifier.
|
java.lang.Long |
getReceiptId()
Return the receipt identifier.
|
boolean |
isReadyToCallExecute()
Identifies whether this command is ready to be executed.
|
void |
performExecute()
Makes a receipt available to the distribution arrangement.
|
void |
reset()
Resets the command local variable.
|
void |
setDistArrangId(java.lang.Long newDistArrangId)
Set distribution arrangement identifier.
|
void |
setItemspcId(java.lang.Long newItemspcId)
Set item identifier.
|
void |
setRcptAvailId(java.lang.Long newRcptAvailId)
Set available receipt identifier.
|
void |
setReceiptId(java.lang.Long newReceiptId)
Set the receipt identifier.
|
void |
setRequestProperties(TypedProperty newRequestProperties)
Set request properties.
|
void |
validateParameters()
Checks the information needed for making a receipt available.
|
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
public static final java.lang.String COPYRIGHT
public java.lang.Long getDistArrangId()
MakeReceiptAvailableCmd
getDistArrangId
in interface MakeReceiptAvailableCmd
MakeReceiptAvailableCmd.getDistArrangId()
,
setDistArrangId(java.lang.Long)
public java.lang.Long getItemspcId()
MakeReceiptAvailableCmd
getItemspcId
in interface MakeReceiptAvailableCmd
MakeReceiptAvailableCmd.getItemspcId()
,
setItemspcId(java.lang.Long)
public java.lang.Long getRcptAvailId()
MakeReceiptAvailableCmd
getRcptAvailId
in interface MakeReceiptAvailableCmd
MakeReceiptAvailableCmd.getRcptAvailId()
,
setRcptAvailId(java.lang.Long)
public java.lang.Long getReceiptId()
MakeReceiptAvailableCmd
getReceiptId
in interface MakeReceiptAvailableCmd
MakeReceiptAvailableCmd.getReceiptId()
,
setReceiptId(java.lang.Long)
public void setDistArrangId(java.lang.Long newDistArrangId)
MakeReceiptAvailableCmd
setDistArrangId
in interface MakeReceiptAvailableCmd
newDistArrangId
- distribution arrangement identifierMakeReceiptAvailableCmd.setDistArrangId(java.lang.Long)
,
getDistArrangId()
public void setItemspcId(java.lang.Long newItemspcId)
MakeReceiptAvailableCmd
setItemspcId
in interface MakeReceiptAvailableCmd
newItemspcId
- item identifierMakeReceiptAvailableCmd.setItemspcId(java.lang.Long)
,
getItemspcId()
public void setRcptAvailId(java.lang.Long newRcptAvailId)
MakeReceiptAvailableCmd
setRcptAvailId
in interface MakeReceiptAvailableCmd
newRcptAvailId
- available receipt identifierMakeReceiptAvailableCmd.setRcptAvailId(java.lang.Long)
,
getRcptAvailId()
public void setReceiptId(java.lang.Long newReceiptId)
MakeReceiptAvailableCmd
setReceiptId
in interface MakeReceiptAvailableCmd
newReceiptId
- receipt identifierMakeReceiptAvailableCmd.setReceiptId(java.lang.Long)
,
getReceiptId()
public void setRequestProperties(TypedProperty newRequestProperties) throws ECApplicationException
setRequestProperties
in interface MakeReceiptAvailableCmd
newRequestProperties
- request propertiesECApplicationException
public boolean isReadyToCallExecute()
isReadyToCallExecute
in interface com.ibm.websphere.command.Command
isReadyToCallExecute
in class AbstractECTargetableCommand
public void validateParameters() throws ECException
Parameters:
validateParameters
in interface ECCommand
validateParameters
in class AbstractECTargetableCommand
ECApplicationException
- If mandatory parameters are not passed in, specify
_ERR_BAD_MISSING_CMD_PARAMETERECException
public void performExecute() throws ECException
This is done by inserting a row into RCPTAVAIL table associating the receipt with the distribution arrangement.
The distribution arrangement will have a picking method of either LIFO or FIFO. If the picking method of the distribution arrangement is FIFO, the precedence of the rcptavail row will be MAX(precedence)+1. If the picking method of the distribution arrangement is LIFO, the precedence of the rcptavail row will be MIN(precedence)-1. If there are no rows in the rcptavail table, the precedence of the rcptavail row will be 1.
If distribution arrangement parameter is null, uses ItemSpecificationAccessBean and DistributionArrangementAccessBean to retrieve the base item id from the item specified id. Or if there is still no distribution arrangement, create one. This behavior allows a store to always allocate from inventory that it owns.
Uses InventoryJDBCHelperAccessBean().findAvailableReceiptMaxAndMinPrecedence to get the next precedence to use for new RCPTAVAIL row. Uses AvailableReceiptAccessBean to create and populate the row.
performExecute
in interface ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AbstractECTargetableCommand
ECException
- public void reset()
reset
in interface com.ibm.websphere.command.Command
reset
in class AbstractECTargetableCommand