Class WarehouseOperation

java.lang.Object
overit.geocall.model.DynO
overit.geocallapp.wfm.inventory.bl.warehouse.operation.WarehouseOperation
All Implemented Interfaces:
ConstraintValidator<DynO.Valid,DynO>, Serializable, overit.geocall.timezone.model.TimeZoned

public class WarehouseOperation extends DynO
DynO object used to represent a warehouse operation, i.e. the set of all the movements of goods that took place between warehouses.
A warehouse operation consists of:
Since:
14.0
See Also:
GCApi:
bo
  • Constructor Details

    • WarehouseOperation

      public WarehouseOperation()
      Instantiates a new warehouse operation.
  • Method Details

    • getHeader

      public BOWarehouseOperationHeader getHeader()
      Returns the warehouse operation header.
      Returns:
      the warehouse operation header
    • setHeader

      public void setHeader(BOWarehouseOperationHeader header)
      Sets the warehouse operation header.
      Parameters:
      header - the warehouse operation header
    • getSource

      Returns the warehouse operation source.
      Returns:
      the warehouse operation source
    • setSource

      public void setSource(BOWarehouseOperationHeaderSource source)
      Sets the warehouse operation source.
      Parameters:
      source - the warehouse operation source
    • getItems

      public List<WarehouseOperationItem> getItems()
      Returns the warehouse operation items.
      Returns:
      a list of warehouse operation items
      See Also:
    • addItem

      public boolean addItem(WarehouseOperationItem item)
      Adds the given WarehouseOperationItem.
      Parameters:
      item - the item to add
      Returns:
      true if the item was successfully added
    • addItem

      public boolean addItem(BOWarehouseOperationItem item, List<BOWarehouseOperationItemSerializedMaterial> serializedMaterials)
      Created and adds a new WarehouseOperationItem, starting from the given BOWarehouseOperationItem and list of BOWarehouseOperationItemSerializedMaterial.
      Parameters:
      item - the BOWarehouseOperationItem
      serializedMaterials - list of BOWarehouseOperationItemSerializedMaterial
      Returns:
      true if the item was successfully added
    • getType

      public BOWarehouseOperationType getType()
      Returns the warehouse operation type.
      Returns:
      the warehouse operation type
    • setType

      public void setType(BOWarehouseOperationType type)
      Sets the warehouse operation type.
      Parameters:
      type - the warehouse operation type
    • getId

      public Long getId()
      Returns the warehouse operation id.
      Returns:
      the the warehouse operation id
    • getOperationItems

      public List<BOWarehouseOperationItem> getOperationItems()
      Returns the list of the warehouse operation items.
      Returns:
      a list of the warehouse operation items
      See Also:
    • hasAllItemsInserted

      public boolean hasAllItemsInserted()
      Checks is all the item of the current warehouse operation were all inserted.
      Returns:
      true if all the warehouse operation items were successfully added
    • hasOneItemSent

      public boolean hasOneItemSent()
      Checks if at least one of the warehouse operation item was sent.
      Returns:
      true if at least one of the warehouse operation items was successfully sent
    • hasAllItemsSent

      public boolean hasAllItemsSent()
      Checks if all the item of the current warehouse operation were sent.
      Returns:
      true if all the warehouse operation items were successfully sent
    • hasOneItemReceived

      public boolean hasOneItemReceived()
      Checks if at least one of the warehouse operation item was received.
      Returns:
      true if at least one of the warehouse operation items was successfully received
    • hasAllItemsReceived

      public boolean hasAllItemsReceived()
      Checks if all the item of the current warehouse operation were received.
      Returns:
      true if all the warehouse operation items were successfully received
    • hasAllItemsWithFinalState

      public boolean hasAllItemsWithFinalState()
      Checks if all the item of the current warehouse operation were on their final state.
      Returns:
      true if all the warehouse operation items were on their final state