public class InventoryBaseCmdImpl extends TaskCommandImpl implements CheckInventoryCmd, UpdateInventoryCmd, ReverseUpdateInventoryCmd
Modifier and Type | Field and Description |
---|---|
static java.lang.String | CHECK_INVENTORY |
static java.lang.String | COPYRIGHT
the internal copyright field
|
static java.lang.String | ERR_CHECK_INV |
protected java.lang.String | iAction |
protected java.lang.Integer | iAllocatedQuantity |
protected java.lang.Integer | iAskedQuantity |
protected java.lang.Long | iCatEntryId |
protected java.lang.Integer | iFulfillmentCenterId |
protected OrderItemAccessBean[] | iOrderItems |
protected java.lang.Double | iQuantity |
protected java.lang.String | iQuantityMeasure |
protected boolean | iReturnError |
protected java.lang.Integer | iShipModeId |
protected java.lang.Integer | iStoreId |
static int | NO_CHECK |
static int | NO_RECOMMENDATION |
static int | NO_UPDATE |
protected java.util.Hashtable | orderItemsHash |
static java.lang.String | REVERSE_UPDATE_INVENTORY |
static java.lang.String | UPDATE_INVENTORY |
protected java.util.Vector | vOutOfStockOrderItems |
Constructor and Description |
---|
InventoryBaseCmdImpl() |
Modifier and Type | Method and Description |
---|---|
protected boolean | checkUpdateInventory(InventoryAccessBean inventoryAB, java.lang.Double askQuantity)
This method checks, updates or reverses inventory according to the action.
|
protected java.lang.Double | convertQuantity(java.lang.Double quantity, java.lang.String quantityUnit, java.lang.String newQuantityUnit)
convert quantity amount to a new quantity unit
|
protected java.lang.Double | convertQuantity(java.lang.Long catEntryId, java.lang.Double quantity, java.lang.String newQuantityUnit)
This method converts quantity using new quantity unit for specified catalog entry
|
protected java.lang.Double | convertQuantity(OrderItemAccessBean orderItemAB)
convert order item's quantity
|
protected java.lang.Double | convertQuantity(OrderItemAccessBean orderItemAB, java.lang.String newQuantityUnit)
convert new quantity unit to order item
|
protected InventoryAccessBean | findByCatalogEntryAndFulfillmentCenterAndStore(java.lang.Long catalogEntryId, java.lang.Integer fulfillmentCenterId, java.lang.Integer storeId)
find inventory by catalog entry, fulfillment center and store
|
InventoryAccessBean | findInventory(java.lang.Long catalogEntryId, java.lang.Integer fulfillmentCenterId, java.lang.Integer inventoryStoreId)
This method is to find inventory for specified catalog entry id, fulfillment center id and store id.
|
protected boolean | flagIsSet(int flag)
check whether the flag is set for updating and checking
|
java.lang.Integer | getAllocatedQuantity() |
protected java.lang.Long | getCatEntryId()
get catalog entry id
|
protected java.util.HashMap | getCatEntryStoreMap() |
protected java.lang.Integer | getFulfillmentCenterId()
get fulfillment center id
|
java.lang.String | getIstrContinue()
Returns the istrContinue.
|
protected OrderItemAccessBean[] | getOrderItem()
get order item
|
java.util.Vector | getOutOfInventoryOrderItems()
Return a Vector of OrderItems that are not available in inventory
|
protected java.lang.Double | getQuantity()
get quantity
|
protected java.lang.String | getQuantityMeasure()
get quantity measure
|
protected boolean | handleCatEntryInventory(java.lang.Long catalogEntryId, java.lang.Integer fulfillmentCenterId, java.lang.Integer storeId)
This method checks or updates inventory for specified catalog entry id, fulfillment center id and store id.
|
protected boolean | handleOrderItemInventory(OrderItemAccessBean orderItemAB)
This method checks or updates inventory for order item
|
boolean | isReadyToCallExecute()
This method is called by the Targettable Command frame work before the execution of the command.
|
void | performExecute()
Executes the main Business Logic of this Command
|
void | reset()
reset iAllocatedQuantity
|
void | setAllocatedQuantity(java.lang.Integer allocatedQuantity)
Set the allocated quantity which need to reverse.
|
void | setCatEntryId(java.lang.Long aCatEntryId)
Set a Catalog Entry Id.
|
protected void | setCatEntryStoreMap(java.util.HashMap aCatEntryStoreMap)
This method sets iCatEntryStoreMap
|
void | setContinue(java.lang.String aContinue)
Set the istrContinue.
|
void | setFulfillmentCenterId(java.lang.Integer aFulfillmentCenterId)
Set a fulfillment center Id.
|
void | setIstrContinue(java.lang.String aIstrContinue)
Sets the istrContinue.
|
void | setOrderItem(OrderItemAccessBean anOrderItem)
Set an OrderItem.
|
void | setOrderItem(OrderItemAccessBean[] orderItems)
Set a list of OrderItems.
|
void | setOrderItem(java.util.Vector anOrderItemList)
Set a list of OrderItems.
|
void | setQuantity(java.lang.Double aQuantity)
Set a quantity.
|
void | setQuantityMeasure(java.lang.String quantityMeasure)
Set a quantity measure.
|
void | setReturnErrorIfNoInventory(boolean returnError)
Sets the iReturnError with boolean value
|
void | setStoreId(java.lang.Integer aStoreId)
Set a store id.
|
void | validateParameters()
Validates parameters.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String ERR_CHECK_INV
protected OrderItemAccessBean[] iOrderItems
protected java.util.Vector vOutOfStockOrderItems
protected java.lang.Integer iShipModeId
protected java.lang.Long iCatEntryId
protected java.lang.Double iQuantity
protected java.lang.Integer iAllocatedQuantity
protected java.lang.String iQuantityMeasure
protected java.lang.Integer iFulfillmentCenterId
protected java.lang.Integer iStoreId
protected java.lang.String iAction
protected java.lang.Integer iAskedQuantity
protected boolean iReturnError
public static final java.lang.String CHECK_INVENTORY
public static final java.lang.String UPDATE_INVENTORY
public static final java.lang.String REVERSE_UPDATE_INVENTORY
public static final int NO_UPDATE
public static final int NO_CHECK
public static final int NO_RECOMMENDATION
protected java.util.Hashtable orderItemsHash
protected boolean checkUpdateInventory(InventoryAccessBean inventoryAB, java.lang.Double askQuantity) throws ECException
protected java.lang.Double convertQuantity(OrderItemAccessBean orderItemAB, java.lang.String newQuantityUnit) throws java.rmi.RemoteException, javax.ejb.CreateException, javax.naming.NamingException, javax.ejb.FinderException, ECException
protected java.lang.Double convertQuantity(OrderItemAccessBean orderItemAB) throws ECException
protected java.lang.Double convertQuantity(java.lang.Double quantity, java.lang.String quantityUnit, java.lang.String newQuantityUnit) throws ECException
protected InventoryAccessBean findByCatalogEntryAndFulfillmentCenterAndStore(java.lang.Long catalogEntryId, java.lang.Integer fulfillmentCenterId, java.lang.Integer storeId) throws java.rmi.RemoteException, javax.ejb.CreateException, javax.naming.NamingException, javax.ejb.FinderException, ECException
protected boolean flagIsSet(int flag)
protected java.lang.Long getCatEntryId()
protected java.lang.Integer getFulfillmentCenterId()
protected OrderItemAccessBean[] getOrderItem()
protected java.lang.Double getQuantity()
protected java.lang.String getQuantityMeasure()
public boolean isReadyToCallExecute()
public void performExecute() throws ECException
public void reset()
public void setCatEntryId(java.lang.Long aCatEntryId)
public void setFulfillmentCenterId(java.lang.Integer aFulfillmentCenterId)
public void setOrderItem(OrderItemAccessBean[] orderItems)
public void setOrderItem(OrderItemAccessBean anOrderItem)
public void setOrderItem(java.util.Vector anOrderItemList)
public void setQuantity(java.lang.Double aQuantity)
public void setQuantityMeasure(java.lang.String quantityMeasure)
public void setStoreId(java.lang.Integer aStoreId)
public void validateParameters() throws ECException
protected java.lang.Double convertQuantity(java.lang.Long catEntryId, java.lang.Double quantity, java.lang.String newQuantityUnit) throws java.rmi.RemoteException, javax.ejb.CreateException, javax.naming.NamingException, javax.ejb.FinderException, ECException
public java.util.Vector getOutOfInventoryOrderItems()
public void setReturnErrorIfNoInventory(boolean returnError)
public java.lang.String getIstrContinue()
public void setIstrContinue(java.lang.String aIstrContinue)
public void setContinue(java.lang.String aContinue)
public java.lang.Integer getAllocatedQuantity()
public void setAllocatedQuantity(java.lang.Integer allocatedQuantity)
protected boolean handleOrderItemInventory(OrderItemAccessBean orderItemAB) throws ECException
protected boolean handleCatEntryInventory(java.lang.Long catalogEntryId, java.lang.Integer fulfillmentCenterId, java.lang.Integer storeId) throws ECException
public InventoryAccessBean findInventory(java.lang.Long catalogEntryId, java.lang.Integer fulfillmentCenterId, java.lang.Integer inventoryStoreId) throws ECException
protected java.util.HashMap getCatEntryStoreMap()
protected void setCatEntryStoreMap(java.util.HashMap aCatEntryStoreMap)