Enum DefaultSkuReferenceFieldType
- java.lang.Object
-
- java.lang.Enum<DefaultSkuReferenceFieldType>
-
- com.broadleafcommerce.inventory.domain.DefaultSkuReferenceFieldType
-
- All Implemented Interfaces:
EnumeratedType
,SkuReferenceFieldType
,Serializable
,Comparable<DefaultSkuReferenceFieldType>
public enum DefaultSkuReferenceFieldType extends Enum<DefaultSkuReferenceFieldType> implements SkuReferenceFieldType
Default enumerated instance ofSkuReferenceFieldType
.- Author:
- Kelly Tisdell (ktisdell)
-
-
Enum Constant Summary
Enum Constants Enum Constant Description EAN
EAN (European Article Number, a.k.a.GTIN
GTIN (Global Trade Item Number).SKU_CODE
SKU code that uniquely identifies a SKU.SKU_EXTERNAL_ID
Typically a soft foreign key to a 1st or 3rd party system (not Broadleaf).UPC
UPC (Universal Product Code) value, which will typically be UPC-A.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getValue()
Returns a non-null, enumerated String value, typically in the form of an enum name (e.g.static DefaultSkuReferenceFieldType
valueOf(String name)
Returns the enum constant of this type with the specified name.static DefaultSkuReferenceFieldType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SKU_CODE
public static final DefaultSkuReferenceFieldType SKU_CODE
SKU code that uniquely identifies a SKU. This is not necessarily a foreign key, but represents a code that may be used to identify a SKU. This is the default mechanism for addressing aSkuRef
and/or looking upSkuInventory
, especially for Inventory Reservations.
-
SKU_EXTERNAL_ID
public static final DefaultSkuReferenceFieldType SKU_EXTERNAL_ID
Typically a soft foreign key to a 1st or 3rd party system (not Broadleaf). For example, the ID of SKU in an ERP system.
-
UPC
public static final DefaultSkuReferenceFieldType UPC
UPC (Universal Product Code) value, which will typically be UPC-A. This could be the same as an EAN value. They are separate to allow for different UPC and EAN numbers (e.g. UPC-A and EAN-13). UPC-A is most common, but there could be UPC-B and others, which are less common. It is expected that "flavor" of UPC code that is being used is common across a single tenant since there are not separate fields for storing different variations of UPC for a single SKU.
-
EAN
public static final DefaultSkuReferenceFieldType EAN
EAN (European Article Number, a.k.a. International Article Number) number, which is used more in European countries. Often the same as UPC-A or similar (i.e. different by one digit). This is a separate type because, while EAN is often the same as UPC, they can be different (e.g. EAN-13, which is 13 digits, vs UPC-A, which is 12 digits). It is expected that "flavor" of EAN code that is being used is common across a single tenant since there are not separate fields for storing different variations of EAN for a single SKU.
-
GTIN
public static final DefaultSkuReferenceFieldType GTIN
GTIN (Global Trade Item Number). This is a superset of UPC, EAN and others. This is represented separately from UPC and EAN in case implementors choose, for example, to store UPC-A (12 digits), EAN-13 (13 digits, same as UPC-A, except with a extra digit representing country code), and GTIN-14 (14 digits), which can all represent the same SKU. It is expected that "flavor" of GTIN code that is being used is common across a single tenant since there are not separate fields for storing different variations of GTIN for a single SKU.
-
-
Method Detail
-
values
public static DefaultSkuReferenceFieldType[] 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 (DefaultSkuReferenceFieldType c : DefaultSkuReferenceFieldType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DefaultSkuReferenceFieldType 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
-
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:
-
-