Class ReturnItemToInventoryCmdImpl

  • All Implemented Interfaces:, ECCommand, ECTargetableCommand, TaskCommand, ReturnItemToInventoryCmd,,,,,,

    public class ReturnItemToInventoryCmdImpl
    extends TaskCommandImpl
    implements ReturnItemToInventoryCmd
    Default implementation of the task command ReturnItemToInventoryCmd interface. Command used to return merchandise to pool of inventory which can be used for new inventory allocations. If a new receipt must be created because of the trackable status of the item, it is done by calling CreateReceiptCmd. The values required by CreateReceiptCmd are calculated within this command.

Utilizes these access beans

See Also:
Serialized Form
    • Constructor Detail

      • ReturnItemToInventoryCmdImpl

        public ReturnItemToInventoryCmdImpl()
        ReturnItemToInventoryCmdImpl constructor.
    • Method Detail

      • performExecute

        public void performExecute()
                            throws ECException
        Execute the command.

        There are 4 different scenarios that have to be covered and how we handle them

        • 1.) Item is currently Not Tracked Do not create a new receipt at all
        • 2.) Order Item was Not Tracked at Allocation but is now. Don't try to look up old precedence, create new receipt with cost of 0.00, vendor of ??
        • 3.) Order Item was Tracked at Allocation and is still Tracked Look up old receipt(s) and create new one with same cost and vendor
        • 4.) Item is now tracked, receipt allocation is not determinable.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface
        performExecute in class AbstractECTargetableCommand
      • reset

        public void reset()
        Description copied from class: AbstractECTargetableCommand
        This method is called after a command has been executed. It is used to reset its states variables. After the call to reset, the command should be able to be executed again.
        Specified by:
        reset in interface
        reset in class AbstractECTargetableCommand
      • setDispositionDate

        public void setDispositionDate(java.sql.Timestamp DispositionDate)
        This method sets the date the new inventory receipt(s) are for
        Specified by:
        setDispositionDate in interface ReturnItemToInventoryCmd
        DispositionDate - Return Receipt Dispostion Date
      • setFulfillmentCenter

        public void setFulfillmentCenter(java.lang.Integer ffmCenterId)
        This method sets the fulfillment center to which inventory is being returned.
        Specified by:
        setFulfillmentCenter in interface ReturnItemToInventoryCmd
        ffmCenterId - Fulfillment Center identifier
      • setOrderItemsId

        public void setOrderItemsId(java.lang.Long orderItemsId)
        This method sets the order item from which the merchandise in question came.
        Specified by:
        setOrderItemsId in interface ReturnItemToInventoryCmd
        orderItemsId - Order Item identifier
      • setQuantity

        public void setQuantity(java.lang.Integer quantity)
        This method sets the quantity to returned to inventory.
        Specified by:
        setQuantity in interface ReturnItemToInventoryCmd
        quantity - Inventory Quantity
      • setRtnRcptDspId

        public void setRtnRcptDspId(java.lang.Long rtnRcptDspId)
        This method sets the Return Receipt Disposition id.
        Specified by:
        setRtnRcptDspId in interface ReturnItemToInventoryCmd
        rtnRcptDspId - Return Receipt Disposition ID
      • setVersionSpecId

        public void setVersionSpecId(java.lang.Long versionSpecId)
        This method sets the version specification id.
        Specified by:
        setVersionSpecId in interface ReturnItemToInventoryCmd
        versionSpecId - The version specification identifier.
      • getDispositionDate

        public java.sql.Timestamp getDispositionDate()
        This method gets the disposition date on which a part of a return receipt was disposed.
        The disposition date
      • getFulfillmentCenter

        public java.lang.Integer getFulfillmentCenter()
        This method gets the fulfillment center id to which inventory is being returned.
        The fulfillment center identifier
      • getOrderItemsId

        public java.lang.Long getOrderItemsId()
        This method gets the order item id from which the merchandise in question came.
        The order item identifier
      • getQuantity

        public java.lang.Integer getQuantity()
        This method gets the quantity to be returned to inventory.
        The inventory quantity
      • getRtnRcptDspId

        public java.lang.Long getRtnRcptDspId()
        This method gets the return receipt disposition id.
        The return receipt disposition id
      • getVersionSpecId

        public java.lang.Long getVersionSpecId()
        This method gets the version specification id.
        The version specification id
      • setRMAItemComponentAccessBean

        public void setRMAItemComponentAccessBean(RMAItemComponentAccessBean rmaItemCmpAB)
        This method sets the RMA item component access bean.
        rmaItemCmpAB - The RMA item component access bean.
      • getRMAItemComponentAccessBean

        public RMAItemComponentAccessBean getRMAItemComponentAccessBean()
        This method gets the RMA item component access bean.
        The RMA item component access bean.
      • validateParameters

        public void validateParameters()
                                throws ECException
        Check parameters.

        • orderItemsId (required)
        • versionSpecIdId (required if ordefrItemsId not specified)
        • quantity (required)
        • ffmCenterId (required)
        • dateDisposed (required)

        Specified by:
        validateParameters in interface ECCommand
        validateParameters in class AbstractECTargetableCommand
        ECApplicationException - If required parameters not specified or parameters are invalid, throws with ECMessage._ERR_BAD_MISSING_CMD_PARAMETER
      • createItemffmctr

        public void createItemffmctr(java.lang.Long itemspcId)
                              throws ECException
        The createItemffmctr method is called to add a new row in itemffmctr for this item, store and fulfillment center when a receipt is created.
        itemspcId - item specified id