Class JpaSkuInventory
- 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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JpaSkuInventory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)booleanequals(Object o)org.modelmapper.ModelMapperfromMe()Class<?>getBusinessDomainType()StringgetContextId()The jpa primary key.StringgetEan()Meant to hold EAN, or European Article Number (a.k.a.StringgetExternalId()External (1st or 3rd party) system reference to a unique SKU.StringgetGtin()GTIN (Global Trade Item Number) This holds all GTIN formats.StringgetInventoryLocationContextId()This is a soft foreign key reference toJpaInventoryLocation.IntegergetQuantityAvailable()This is really a calculated field.IntegergetQuantityOnHand()Physical count of items available.IntegergetQuantityOnOrder()Optional number of items that are expected to arrive in the warehouse in the near term.IntegergetQuantityReserved()Quantity of items that are reserved (i.e.IntegergetSafetyStock()An optional field that indicates how many should be reserved in the count or calculation of availability.StringgetSkuCode()Arbitrary code or identifier for a unique SKU.StringgetSkuName()Optional convenience field to store a human readable name for the SKU.com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTrackinggetTracking()StringgetUpc()Meant to hold UPC, or Universal Product Code.StringgetVendorRef()inthashCode()voidsetContextId(String contextId)The jpa primary key.voidsetEan(String ean)Meant to hold EAN, or European Article Number (a.k.a.voidsetExternalId(String externalId)External (1st or 3rd party) system reference to a unique SKU.voidsetGtin(String gtin)GTIN (Global Trade Item Number) This holds all GTIN formats.voidsetInventoryLocationContextId(String inventoryLocationContextId)This is a soft foreign key reference toJpaInventoryLocation.voidsetQuantityAvailable(Integer quantityAvailable)This is really a calculated field.voidsetQuantityOnHand(Integer quantityOnHand)Physical count of items available.voidsetQuantityOnOrder(Integer quantityOnOrder)Optional number of items that are expected to arrive in the warehouse in the near term.voidsetQuantityReserved(Integer quantityReserved)Quantity of items that are reserved (i.e.voidsetSafetyStock(Integer safetyStock)An optional field that indicates how many should be reserved in the count or calculation of availability.voidsetSkuCode(String skuCode)Arbitrary code or identifier for a unique SKU.voidsetSkuName(String skuName)Optional convenience field to store a human readable name for the SKU.voidsetTracking(com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking tracking)voidsetUpc(String upc)Meant to hold UPC, or Universal Product Code.voidsetVendorRef(String vendorRef)org.modelmapper.ModelMappertoMe()StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
postFromMe, postToMe, preFromMe, preToMe
-
Methods inherited from interface com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware
findNotificationState
-
-
-
-
Method Detail
-
getBusinessDomainType
public Class<?> getBusinessDomainType()
- Specified by:
getBusinessDomainTypein interfacecom.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware
-
fromMe
public org.modelmapper.ModelMapper fromMe()
- Specified by:
fromMein interfacecom.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
-
toMe
public org.modelmapper.ModelMapper toMe()
- Specified by:
toMein interfacecom.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
-
getContextId
public String getContextId()
The jpa primary key.- Specified by:
getContextIdin interfacecom.broadleafcommerce.data.tracking.core.Trackable- Returns:
- The jpa primary key
-
getInventoryLocationContextId
public String getInventoryLocationContextId()
This is a soft foreign key reference toJpaInventoryLocation.
-
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:
-
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:
SkuInventory.getVendorRef()
-
getTracking
public com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking getTracking()
- Specified by:
getTrackingin interfacecom.broadleafcommerce.data.tracking.core.Trackable- See Also:
ApplicationJpaTracking
-
setContextId
public void setContextId(String contextId)
The jpa primary key.- Specified by:
setContextIdin interfacecom.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 toJpaInventoryLocation.
-
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-
-
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:
SkuInventory.getVendorRef()
-
setTracking
public void setTracking(com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking tracking)
- Specified by:
setTrackingin interfacecom.broadleafcommerce.data.tracking.core.TypedTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking>- See Also:
ApplicationJpaTracking
-
canEqual
protected boolean canEqual(Object other)
-
-