Enum DefaultInventoryTransactionType
- java.lang.Object
-
- java.lang.Enum<DefaultInventoryTransactionType>
-
- com.broadleafcommerce.inventory.domain.DefaultInventoryTransactionType
-
- All Implemented Interfaces:
EnumeratedType
,InventoryTransactionType
,Serializable
,Comparable<DefaultInventoryTransactionType>
public enum DefaultInventoryTransactionType extends Enum<DefaultInventoryTransactionType> implements InventoryTransactionType
Enumeration for storing different inventory transaction types. This is the default implementation ofInventoryTransactionType
. 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)
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CANCELLED
Happens when an inventory reservation is cancelled before it is fulfilled.FULFILLED
Happens when an order is fulfilled.HARD_RESERVED
Happens when an order is placed and finalized, including payment.ORDERED
Happens when inventory has been ordered and expected to arrive in the future.RECEIVED
Indicates that an ordered item has been received and should increase quantity on hand.RETURNED
Happens when inventory that has been fulfilled is returned.SHRINKAGE
Used to decrement inventory for shrinkage.SOFT_RESERVED
Happens when an order is placed, but where purchase is not finalized (e.g.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description AccountingTransactionType
getAccountingTransactionType()
Deprecated.String
getValue()
Returns a non-null, enumerated String value, typically in the form of an enum name (e.g.static DefaultInventoryTransactionType
valueOf(String name)
Returns the enum constant of this type with the specified name.static DefaultInventoryTransactionType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SOFT_RESERVED
public static final DefaultInventoryTransactionType 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
public static final DefaultInventoryTransactionType 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
public static final DefaultInventoryTransactionType FULFILLED
Happens when an order is fulfilled. Happens after a hard commit. Decreases quantity on hand.
-
CANCELLED
public static final DefaultInventoryTransactionType CANCELLED
Happens when an inventory reservation is cancelled before it is fulfilled.
-
SHRINKAGE
public static final DefaultInventoryTransactionType SHRINKAGE
Used to decrement inventory for shrinkage. Happens when an item is marked as damaged, stolen, etc. Decreases quantity on hand.
-
ORDERED
public static final DefaultInventoryTransactionType 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
public static final DefaultInventoryTransactionType RECEIVED
Indicates that an ordered item has been received and should increase quantity on hand. Increases quantity on hand. Decreases quantity expected.
-
RETURNED
public static final DefaultInventoryTransactionType RETURNED
Happens when inventory that has been fulfilled is returned. Increases quantity on hand.
-
-
Method Detail
-
values
public static DefaultInventoryTransactionType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DefaultInventoryTransactionType c : DefaultInventoryTransactionType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DefaultInventoryTransactionType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
getAccountingTransactionType
@Deprecated public AccountingTransactionType getAccountingTransactionType()
Deprecated.Description copied from interface:InventoryTransactionType
Returns whether this is a debit or a credit.- Specified by:
getAccountingTransactionType
in interfaceInventoryTransactionType
- Returns:
- See Also:
AccountingTransactionType
-
getValue
public String 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:
-
-