Enum Class DefaultInventoryTransactionType
java.lang.Object
java.lang.Enum<DefaultInventoryTransactionType>
com.broadleafcommerce.inventory.domain.DefaultInventoryTransactionType
- All Implemented Interfaces:
EnumeratedType
,InventoryTransactionType
,Serializable
,Comparable<DefaultInventoryTransactionType>
,Constable
public enum DefaultInventoryTransactionType
extends Enum<DefaultInventoryTransactionType>
implements InventoryTransactionType
Enumeration for storing different inventory transaction types. This is the default implementation
of
SOFT_RESERVED -> HARD_RESERVED -> FULFILLED 2.
SOFT_RESERVED -> CANCELLED 3.
SOFT_RESERVED -> HARD_RESERVED -> CANCELLED Typical DEBIT transaction flows go as follows: 1.
ORDERED -> RECEIVED 2.
RETURNED 3.
SHRINKAGE
InventoryTransactionType
.
Typical CREDIT transaction flows go as follows:
1. SOFT_RESERVED -> HARD_RESERVED -> FULFILLED 2.
SOFT_RESERVED -> CANCELLED 3.
SOFT_RESERVED -> HARD_RESERVED -> CANCELLED Typical DEBIT transaction flows go as follows: 1.
ORDERED -> RECEIVED 2.
RETURNED 3.
SHRINKAGE
- Author:
- Kelly Tisdell (ktisdell)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionHappens when an inventory reservation is cancelled before it is fulfilled.Happens when an order is fulfilled.Happens when an order is placed and finalized, including payment.Happens when inventory has been ordered and expected to arrive in the future.Indicates that an ordered item has been received and should increase quantity on hand.Happens when inventory that has been fulfilled is returned.Used to decrement inventory for shrinkage.Happens when an order is placed, but where purchase is not finalized (e.g. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.getValue()
Returns a non-null, enumerated String value, typically in the form of an enum name (e.g.static boolean
isCancelled
(String transactionType) static boolean
isFulfilled
(String transactionType) static boolean
isHardReserved
(String transactionType) static boolean
static boolean
isReceived
(String transactionType) static boolean
isReturned
(String transactionType) static boolean
isShrinkage
(String transactionType) static boolean
isSoftReserved
(String transactionType) Returns the enum constant of this class with the specified name.static DefaultInventoryTransactionType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SOFT_RESERVED
Happens when an order is placed, but where purchase is not finalized (e.g. concert tickets or where a purchase is captured but payment has not been received). This is effectively a temporary reservation and requires a corresponding HARD_RESERVED transaction to make it non-temporary. SOFT_RESERVED transactions may be reversed after a period of time, (i.e. to free inventory that has been soft reserved for a duration, but not hard reserved, indicating that the reservation may have been abandoned). This type of transaction decreases quantity available and increases quantity reserved. -
HARD_RESERVED
Happens when an order is placed and finalized, including payment. Happens after a soft reservation. If a corresponding SOFT_RESERVED transaction exists, this does not decrease a quantity because the soft reservation already did this, but provides a marker indicating that the reservation is finalized. If a corresponding soft reservation does not yet exist, then this decrements inventory available and increments inventory reserved. -
FULFILLED
Happens when an order is fulfilled. Happens after a hard commit. Decreases quantity on hand. -
CANCELLED
Happens when an inventory reservation is cancelled before it is fulfilled. -
SHRINKAGE
Used to decrement inventory for shrinkage. Happens when an item is marked as damaged, stolen, etc. Decreases quantity on hand. -
ORDERED
Happens when inventory has been ordered and expected to arrive in the future. Increases quantity expected. Allows for back-ordered inventory tracking and expected inventory tracking. -
RECEIVED
Indicates that an ordered item has been received and should increase quantity on hand. Increases quantity on hand. Decreases quantity expected. -
RETURNED
Happens when inventory that has been fulfilled is returned. Increases quantity on hand.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getAccountingTransactionType
Deprecated.Description copied from interface:InventoryTransactionType
Returns whether this is a debit or a credit.- Specified by:
getAccountingTransactionType
in interfaceInventoryTransactionType
- Returns:
- See Also:
-
getValue
Description copied from interface:EnumeratedType
Returns a non-null, enumerated String value, typically in the form of an enum name (e.g. 'SOME_VALUE'). Often this is an alias forEnum.name()
.- Specified by:
getValue
in interfaceEnumeratedType
- Returns:
-
isSoftReserved
-
isHardReserved
-
isFulfilled
-
isCancelled
-
isShrinkage
-
isOrdered
-
isReceived
-
isReturned
-