java.lang.Object
com.broadleafcommerce.inventory.provider.jpa.domain.JpaSkuInventory
All Implemented Interfaces:
com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware, com.broadleafcommerce.data.tracking.core.ApplicationTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking>, com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware, com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable, com.broadleafcommerce.data.tracking.core.Trackable, com.broadleafcommerce.data.tracking.core.TypedTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking>, Serializable

@Entity @TrackableExtension(APPLICATION) public class JpaSkuInventory extends Object implements Serializable, com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable, com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware, com.broadleafcommerce.data.tracking.core.ApplicationTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking>
See Also:
  • Constructor Details

    • JpaSkuInventory

      public JpaSkuInventory()
  • Method Details

    • getBusinessDomainType

      public Class<?> getBusinessDomainType()
      Specified by:
      getBusinessDomainType in interface com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware
    • fromMe

      public org.modelmapper.ModelMapper fromMe()
      Specified by:
      fromMe in interface com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
    • toMe

      public org.modelmapper.ModelMapper toMe()
      Specified by:
      toMe in interface com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
    • getContextId

      public String getContextId()
      The jpa primary key.
      Specified by:
      getContextId in interface com.broadleafcommerce.data.tracking.core.Trackable
      Returns:
      The jpa primary key
    • getInventoryLocationContextId

      public String getInventoryLocationContextId()
      This is a soft foreign key reference to JpaInventoryLocation.
    • getSkuCode

      public String getSkuCode()
      Arbitrary code or identifier for a unique SKU. This is mot necessarily a primary key nor a reference to an external system's primary key. Rather, this is an arbitrary SKU code, or additional reference. For example this could be a customer-facing SKU reference code.
    • 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. This is essentially a soft foreign key to a non-Broadleaf system..
    • 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.
    • 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.
    • getGtin

      public String getGtin()
      GTIN (Global Trade Item Number) This holds all GTIN formats. GTIN-14 is 14 digits. This is a GS1 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)

    • getSkuName

      public String getSkuName()
      Optional convenience 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:
    • isSerialized

      public boolean isSerialized()
    • isHasChildren

      public boolean isHasChildren()
    • getParentSkuInventoryId

      public String getParentSkuInventoryId()
    • getSerializationValue

      public String getSerializationValue()
    • getQuantityAvailable

      public Integer getQuantityAvailable()
      This is really a calculated field. It should be (quantityOnHand - quantityReserved - safetyStock). We store it to conveniently query for available items.
    • getQuantityReserved

      public Integer getQuantityReserved()
      Quantity of items that are reserved (i.e. been sold but not fulfilled).
    • getQuantityOnHand

      public Integer getQuantityOnHand()
      Physical count of items available.
    • getQuantityOnOrder

      public Integer getQuantityOnOrder()
      Optional number of items that are expected to arrive in the warehouse in the near term. This does not affect availability, but allows for backorder capabilities.
    • getSafetyStock

      public Integer getSafetyStock()
      An optional field that indicates how many should be reserved in the count or calculation of availability.
    • getVendorRef

      public String getVendorRef()
      See Also:
    • getArchivalReason

      public String getArchivalReason()
      See Also:
    • getTracking

      public com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking getTracking()
      Specified by:
      getTracking in interface com.broadleafcommerce.data.tracking.core.Trackable
      See Also:
      • ApplicationJpaTracking
    • setContextId

      public void setContextId(String contextId)
      The jpa primary key.
      Specified by:
      setContextId in interface com.broadleafcommerce.data.tracking.core.Trackable
      Parameters:
      INVENTORY_ID - (or contextId) - The jpa primary key
    • setInventoryLocationContextId

      public void setInventoryLocationContextId(String inventoryLocationContextId)
      This is a soft foreign key reference to JpaInventoryLocation.
    • setSkuCode

      public void setSkuCode(String skuCode)
      Arbitrary code or identifier for a unique SKU. This is mot necessarily a primary key nor a reference to an external system's primary key. Rather, this is an arbitrary SKU code, or additional reference. For example this could be a customer-facing SKU reference code.
    • 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. This is essentially a soft foreign key to a non-Broadleaf system..
    • 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.
    • 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.
    • setGtin

      public void setGtin(String gtin)
      GTIN (Global Trade Item Number) This holds all GTIN formats. GTIN-14 is 14 digits. This is a GS1 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)

    • setSkuName

      public void setSkuName(String skuName)
      Optional convenience 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 -
    • setSerialized

      public void setSerialized(boolean serialized)
    • setHasChildren

      public void setHasChildren(boolean hasChildren)
    • setParentSkuInventoryId

      public void setParentSkuInventoryId(String parentSkuInventoryId)
    • setSerializationValue

      public void setSerializationValue(String serializationValue)
    • setQuantityAvailable

      public void setQuantityAvailable(Integer quantityAvailable)
      This is really a calculated field. It should be (quantityOnHand - quantityReserved - safetyStock). We store it to conveniently query for available items.
    • setQuantityReserved

      public void setQuantityReserved(Integer quantityReserved)
      Quantity of items that are reserved (i.e. been sold but not fulfilled).
    • setQuantityOnHand

      public void setQuantityOnHand(Integer quantityOnHand)
      Physical count of items available.
    • setQuantityOnOrder

      public void setQuantityOnOrder(Integer quantityOnOrder)
      Optional number of items that are expected to arrive in the warehouse in the near term. This does not affect availability, but allows for backorder capabilities.
    • setSafetyStock

      public void setSafetyStock(Integer safetyStock)
      An optional field that indicates how many should be reserved in the count or calculation of availability.
    • setVendorRef

      public void setVendorRef(String vendorRef)
      See Also:
    • setArchivalReason

      public void setArchivalReason(String archivalReason)
      See Also:
    • setTracking

      public void setTracking(com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking tracking)
      Specified by:
      setTracking in interface com.broadleafcommerce.data.tracking.core.TypedTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking>
      See Also:
      • ApplicationJpaTracking
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object