Class InventorySkuRef
java.lang.Object
com.broadleafcommerce.cartoperation.domain.InventorySkuRef
Provides a representation of a SKU reference. All attributes are optional, except at least one
attribute must be populated, providing a unique reference to a SKU (e.g. by skuContextId, UPC,
EAN, etc.).
- Author:
- Kelly Tisdell (ktisdell)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
getEan()
Meant to hold EAN, or European Article Number (a.k.a.External (1st or 3rd party) system reference to a unique SKU.getGtin()
GTIN (Global Trade Item Number) This holds all GTIN formats.This is the default way that Broadleaf uses for accessingInventorySkuRef
, especially when doing inventory reservations (soft and hard).Optional field to store a human readable name for the SKU.getUpc()
Meant to hold UPC, or Universal Product Code.int
hashCode()
void
Meant to hold EAN, or European Article Number (a.k.a.void
setExternalId
(String externalId) External (1st or 3rd party) system reference to a unique SKU.void
GTIN (Global Trade Item Number) This holds all GTIN formats.void
setSkuCode
(String skuCode) This is the default way that Broadleaf uses for accessingInventorySkuRef
, especially when doing inventory reservations (soft and hard).void
setSkuName
(String skuName) Optional field to store a human readable name for the SKU.void
Meant to hold UPC, or Universal Product Code.toString()
-
Constructor Details
-
InventorySkuRef
public InventorySkuRef()
-
-
Method Details
-
getSkuCode
This is the default way that Broadleaf uses for accessingInventorySkuRef
, especially when doing inventory reservations (soft and hard). In most cases, this field should, at least, be populated.- Returns:
-
getExternalId
External (1st or 3rd party) system reference to a unique SKU. For example, ERP or 3rd party inventory system primary key for a SKU reference.- Returns:
-
getUpc
Meant to hold UPC, or Universal Product Code. UPC is a subset of GTIN-12, GTIN-13, and GTIN-14. UPC-A is most common and contains 12 digits. UPC-A and EAN-13 are essentially the same, except for a country code. Less common UPC formats include UPC-B, UPC-C, UPC-D, UPC-E, UPC-2, and UPC-5. We hold it here to allow us to store a particular UPC in addition to a different EAN and a GTIN-14, for example, assuming that a single SKU can have multiple such references.- Returns:
-
getEan
Meant to hold EAN, or European Article Number (a.k.a. International Article Number). EAN is a subset of GTIN-8 and GTIN-13. EAN-13 is essentially the same as UPC-A, except that it contains an additional digit representing the country code.- Returns:
-
getGtin
GTIN (Global Trade Item Number) This holds all GTIN formats. GTIN-14 is 14 digits. This is a superset that generally includes: GTIN-12 (UPC-A) GTIN-8 (EAN/UCC-8) GTIN-13 (EAN/UCC-13) GTIN-14 (EAN/UCC-14 or ITF-14)- Returns:
-
getSkuName
Optional field to store a human readable name for the SKU. Especially useful when administering inventory via the Broadleaf Admin, or when looking at inventory data in the database.- Returns:
-
setSkuCode
This is the default way that Broadleaf uses for accessingInventorySkuRef
, especially when doing inventory reservations (soft and hard). In most cases, this field should, at least, be populated.- Parameters:
skuCode
-
-
setExternalId
External (1st or 3rd party) system reference to a unique SKU. For example, ERP or 3rd party inventory system primary key for a SKU reference.- Parameters:
externalId
-
-
setUpc
Meant to hold UPC, or Universal Product Code. UPC is a subset of GTIN-12, GTIN-13, and GTIN-14. UPC-A is most common and contains 12 digits. UPC-A and EAN-13 are essentially the same, except for a country code. Less common UPC formats include UPC-B, UPC-C, UPC-D, UPC-E, UPC-2, and UPC-5. We hold it here to allow us to store a particular UPC in addition to a different EAN and a GTIN-14, for example, assuming that a single SKU can have multiple such references.- Parameters:
upc
-
-
setEan
Meant to hold EAN, or European Article Number (a.k.a. International Article Number). EAN is a subset of GTIN-8 and GTIN-13. EAN-13 is essentially the same as UPC-A, except that it contains an additional digit representing the country code.- Parameters:
ean
-
-
setGtin
GTIN (Global Trade Item Number) This holds all GTIN formats. GTIN-14 is 14 digits. This is a superset that generally includes: GTIN-12 (UPC-A) GTIN-8 (EAN/UCC-8) GTIN-13 (EAN/UCC-13) GTIN-14 (EAN/UCC-14 or ITF-14)- Parameters:
gtin
-
-
setSkuName
Optional field to store a human readable name for the SKU. Especially useful when administering inventory via the Broadleaf Admin, or when looking at inventory data in the database.- Parameters:
skuName
-
-
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-