Class SkuRef

  • All Implemented Interfaces:
    Serializable

    public class SkuRef
    extends Object
    implements Serializable
    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)
    See Also:
    Serialized Form
    • Constructor Detail

      • SkuRef

        public SkuRef()
    • Method Detail

      • getSkuCode

        public String getSkuCode()
        This is the default way that Broadleaf uses for accessing SkuInventory, especially when doing inventory reservations (soft and hard). In most cases, this field should, at least, be populated.
        Returns:
      • getExternalId

        public String 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

        public String 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

        public String 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

        public String 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

        public String 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

        public void setSkuCode​(String skuCode)
        This is the default way that Broadleaf uses for accessing SkuInventory, especially when doing inventory reservations (soft and hard). In most cases, this field should, at least, be populated.
        Parameters:
        skuCode -
      • setExternalId

        public void setExternalId​(String externalId)
        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

        public void setUpc​(String upc)
        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

        public void setEan​(String ean)
        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

        public void setGtin​(String gtin)
        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

        public void setSkuName​(String skuName)
        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 -
      • canEqual

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object