Class SkuInventory
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware
,Serializable
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
Stores the reason why a particular sku_inventory was deleted/archived.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState
getId()
This is the contextId of the Sku Inventory record.The ID of theInventoryLocation
associated with thisSkuInventory
record.The parent sku inventory id.Summary field to indicate how many are available at this location.Number of physical items that are expected to be available if an inventory count was done.Number of items that have been ordered and are expected to arrive in the warehouse.Number of items that have been reserved but that have not been fulfilled.A value that indicates a desired amount of the item that is not for sale.The value of the serialized sku inventory.A soft reference to the SKU for which this inventory is managed.Soft reference to the vendor associated with this sku inventory.boolean
Additional getter forhasChildren
for readability.int
hashCode()
boolean
Informs the system that this sku inventory is a parent.boolean
Informs the system that this is a serialized (aka detail) record.void
setArchivalReason
(String archivalReason) Stores the reason why a particular sku_inventory was deleted/archived.void
setContextState
(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) void
setHasChildren
(boolean hasChildren) Informs the system that this sku inventory is a parent.void
This is the contextId of the Sku Inventory record.void
setInventoryLocationContextId
(String inventoryLocationContextId) The ID of theInventoryLocation
associated with thisSkuInventory
record.void
setParentSkuInventoryId
(String parentSkuInventoryId) The parent sku inventory id.void
setQuantityAvailable
(Integer quantityAvailable) Summary field to indicate how many are available at this location.void
setQuantityOnHand
(Integer quantityOnHand) Number of physical items that are expected to be available if an inventory count was done.void
setQuantityOnOrder
(Integer quantityOnOrder) Number of items that have been ordered and are expected to arrive in the warehouse.void
setQuantityReserved
(Integer quantityReserved) Number of items that have been reserved but that have not been fulfilled.void
setSafetyStock
(Integer safetyStock) A value that indicates a desired amount of the item that is not for sale.void
setSerializationValue
(String serializationValue) The value of the serialized sku inventory.void
setSerialized
(boolean serialized) Informs the system that this is a serialized (aka detail) record.void
A soft reference to the SKU for which this inventory is managed.void
setVendorRef
(String vendorRef) Soft reference to the vendor associated with this sku inventory.toString()
void
Calculates the quantity available by subtractingquantityOnHand
andquantityReserved
fromsafetyStock
, 0 is returned if the result is negative, which can happen sincesafetyStock
is an indicator of the desired amount of the item that is not for sale and therefore can be greater than the actual quantity on hand.
-
Constructor Details
-
SkuInventory
public SkuInventory()
-
-
Method Details
-
hasChildren
public boolean hasChildren()Additional getter forhasChildren
for readability.Intentionally not using
Accessors.fluent()
to follow JavaBeans Specification. -
updateQuantityAvailable
public void updateQuantityAvailable()Calculates the quantity available by subtractingquantityOnHand
andquantityReserved
fromsafetyStock
, 0 is returned if the result is negative, which can happen sincesafetyStock
is an indicator of the desired amount of the item that is not for sale and therefore can be greater than the actual quantity on hand.The system will only consider an item available if the "quantity on hand - quantity reserved" is greater than the safety stock.
-
getId
This is the contextId of the Sku Inventory record. -
getQuantityAvailable
Summary field to indicate how many are available at this location. This is a calculated field (quantityOnHand - quantityReserved - safetyStock) set upon creation and update, this should not be manually set.- See Also:
-
getQuantityReserved
Number of items that have been reserved but that have not been fulfilled.- See Also:
-
getQuantityOnHand
Number of physical items that are expected to be available if an inventory count was done.- See Also:
-
getQuantityOnOrder
Number of items that have been ordered and are expected to arrive in the warehouse. -
getSafetyStock
A value that indicates a desired amount of the item that is not for sale.- See Also:
-
getInventoryLocationContextId
The ID of theInventoryLocation
associated with thisSkuInventory
record. -
getSkuRef
A soft reference to the SKU for which this inventory is managed. -
isSerialized
public boolean isSerialized()Informs the system that this is a serialized (aka detail) record.Consider stadium suites at a football game, there may be 10 gold suites, represented with SKU
FOOTBALL-GM1-GOLD-SUITE
. Serialized sku inventories are used to represent each individual suite (suite 1-10), in which case thegetSerializationValue()
would be1
,2
, and so on. -
isHasChildren
public boolean isHasChildren()Informs the system that this sku inventory is a parent.Consider stadium suites at a football game, there may be 10 gold suites, represented with SKU
FOOTBALL-GM1-GOLD-SUITE
. A parent sku inventory is used to represent the inventory for all the gold suites, without specifying any suite number. This is useful when selling suites without assigning a specific suite number to a given order, defers the suite assignment till closer to the event date. -
getParentSkuInventoryId
The parent sku inventory id.Serialized records must have a parent representing a non-serialized
SkuInventory
.- See Also:
-
serialized
-
getSerializationValue
The value of the serialized sku inventory.For example, this can be "100" when representing inventory for suite 100 in a stadium.
This value is required for records where
isSerialized()
is true.- See Also:
-
serialized
-
getVendorRef
Soft reference to the vendor associated with this sku inventory. This value can be null, in which case, no vendor is associated.- Returns:
- Soft reference to the vendor associated with this location.
-
getArchivalReason
Stores the reason why a particular sku_inventory was deleted/archived. Used to identify the records that have been deleted/archived as a result of their inventory_location being archived. For such records, the archivalReason would beDefaultSkuInventoryArchivalReasons.LOCATION_ARCHIVED
. In other cases, it would be null by default. -
getContextState
public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()- Specified by:
getContextState
in interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
-
setId
This is the contextId of the Sku Inventory record. -
setQuantityAvailable
Summary field to indicate how many are available at this location. This is a calculated field (quantityOnHand - quantityReserved - safetyStock) set upon creation and update, this should not be manually set.- See Also:
-
setQuantityReserved
Number of items that have been reserved but that have not been fulfilled.- See Also:
-
setQuantityOnHand
Number of physical items that are expected to be available if an inventory count was done.- See Also:
-
setQuantityOnOrder
Number of items that have been ordered and are expected to arrive in the warehouse. -
setSafetyStock
A value that indicates a desired amount of the item that is not for sale.- See Also:
-
setInventoryLocationContextId
The ID of theInventoryLocation
associated with thisSkuInventory
record. -
setSkuRef
A soft reference to the SKU for which this inventory is managed. -
setSerialized
public void setSerialized(boolean serialized) Informs the system that this is a serialized (aka detail) record.Consider stadium suites at a football game, there may be 10 gold suites, represented with SKU
FOOTBALL-GM1-GOLD-SUITE
. Serialized sku inventories are used to represent each individual suite (suite 1-10), in which case thegetSerializationValue()
would be1
,2
, and so on. -
setHasChildren
public void setHasChildren(boolean hasChildren) Informs the system that this sku inventory is a parent.Consider stadium suites at a football game, there may be 10 gold suites, represented with SKU
FOOTBALL-GM1-GOLD-SUITE
. A parent sku inventory is used to represent the inventory for all the gold suites, without specifying any suite number. This is useful when selling suites without assigning a specific suite number to a given order, defers the suite assignment till closer to the event date. -
setParentSkuInventoryId
The parent sku inventory id.Serialized records must have a parent representing a non-serialized
SkuInventory
.- See Also:
-
serialized
-
setSerializationValue
The value of the serialized sku inventory.For example, this can be "100" when representing inventory for suite 100 in a stadium.
This value is required for records where
isSerialized()
is true.- See Also:
-
serialized
-
setVendorRef
Soft reference to the vendor associated with this sku inventory. This value can be null, in which case, no vendor is associated.- Parameters:
vendorRef
- Soft reference to the vendor associated with this location.
-
setArchivalReason
Stores the reason why a particular sku_inventory was deleted/archived. Used to identify the records that have been deleted/archived as a result of their inventory_location being archived. For such records, the archivalReason would beDefaultSkuInventoryArchivalReasons.LOCATION_ARCHIVED
. In other cases, it would be null by default. -
setContextState
public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) - Specified by:
setContextState
in interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
-
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-