Class SkuInventory
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware
,Serializable
- See Also:
-
Constructor Summary
Constructors -
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
The expected date for the configured future stock to be available.Number of items that have been reserved in the future but do not yet have the quantity on hand to fulfill.The type of future stock that is configured for this SKU inventory.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.Don't return any quantity on order if future stock is disabled.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
Whether or not this inventory entry should allow configuration of future stock.boolean
Whether or not the future stock is limited.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
setExpectedFutureRestockDate
(Instant expectedFutureRestockDate) The expected date for the configured future stock to be available.void
setFutureQuantityReserved
(Integer futureQuantityReserved) Number of items that have been reserved in the future but do not yet have the quantity on hand to fulfill.void
setFutureStockEnabled
(boolean futureStockEnabled) Whether or not this inventory entry should allow configuration of future stock.void
setFutureStockLimited
(boolean futureStockLimited) Whether or not the future stock is limited.void
setFutureStockType
(String futureStockType) The type of future stock that is configured for this SKU inventory.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 subtractingsafetyStock
andquantityReserved
from the summation ofquantityOnHand
andquantityOnOrder
.
-
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. -
getQuantityOnOrder
Don't return any quantity on order if future stock is disabled. -
updateQuantityAvailable
public void updateQuantityAvailable()Calculates the quantity available by subtractingsafetyStock
andquantityReserved
from the summation ofquantityOnHand
andquantityOnOrder
. 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 on order) - 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:
-
getFutureQuantityReserved
Number of items that have been reserved in the future but do not yet have the quantity on hand to fulfill.- See Also:
-
getQuantityOnHand
Number of physical items that are expected to be available if an inventory count was done.- See Also:
-
getSafetyStock
A value that indicates a desired amount of the item that is not for sale.- See Also:
-
isFutureStockEnabled
public boolean isFutureStockEnabled()Whether or not this inventory entry should allow configuration of future stock. For example, if configuration of preorder or backorder quantities is desired, set this to true. -
isFutureStockLimited
public boolean isFutureStockLimited()Whether or not the future stock is limited. If set to false, no availability checks will be made when reserving future stock. -
getFutureStockType
The type of future stock that is configured for this SKU inventory. -
getExpectedFutureRestockDate
The expected date for the configured future stock to be available. -
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:
-
setFutureQuantityReserved
Number of items that have been reserved in the future but do not yet have the quantity on hand to fulfill.- 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.- See Also:
-
setSafetyStock
A value that indicates a desired amount of the item that is not for sale.- See Also:
-
setFutureStockEnabled
public void setFutureStockEnabled(boolean futureStockEnabled) Whether or not this inventory entry should allow configuration of future stock. For example, if configuration of preorder or backorder quantities is desired, set this to true. -
setFutureStockLimited
public void setFutureStockLimited(boolean futureStockLimited) Whether or not the future stock is limited. If set to false, no availability checks will be made when reserving future stock. -
setFutureStockType
The type of future stock that is configured for this SKU inventory. -
setExpectedFutureRestockDate
The expected date for the configured future stock to be available. -
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()
-