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 boolean
canEqual(Object other)
boolean
equals(Object o)
org.modelmapper.ModelMapper
fromMe()
Class<?>
getBusinessDomainType()
String
getContextId()
The jpa primary key.String
getEan()
Meant to hold EAN, or European Article Number (a.k.a.String
getExternalId()
External (1st or 3rd party) system reference to a unique SKU.String
getGtin()
GTIN (Global Trade Item Number) This holds all GTIN formats.String
getInventoryLocationContextId()
This is a soft foreign key reference toJpaInventoryLocation
.Integer
getQuantityAvailable()
This is really a calculated field.Integer
getQuantityOnHand()
Physical count of items available.Integer
getQuantityOnOrder()
Optional number of items that are expected to arrive in the warehouse in the near term.Integer
getQuantityReserved()
Quantity of items that are reserved (i.e.Integer
getSafetyStock()
An optional field that indicates how many should be reserved in the count or calculation of availability.String
getSkuCode()
Arbitrary code or identifier for a unique SKU.String
getSkuName()
Optional convenience field to store a human readable name for the SKU.com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking
getTracking()
String
getUpc()
Meant to hold UPC, or Universal Product Code.String
getVendorRef()
int
hashCode()
void
setContextId(String contextId)
The jpa primary key.void
setEan(String ean)
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
setGtin(String gtin)
GTIN (Global Trade Item Number) This holds all GTIN formats.void
setInventoryLocationContextId(String inventoryLocationContextId)
This is a soft foreign key reference toJpaInventoryLocation
.void
setQuantityAvailable(Integer quantityAvailable)
This is really a calculated field.void
setQuantityOnHand(Integer quantityOnHand)
Physical count of items available.void
setQuantityOnOrder(Integer quantityOnOrder)
Optional number of items that are expected to arrive in the warehouse in the near term.void
setQuantityReserved(Integer quantityReserved)
Quantity of items that are reserved (i.e.void
setSafetyStock(Integer safetyStock)
An optional field that indicates how many should be reserved in the count or calculation of availability.void
setSkuCode(String skuCode)
Arbitrary code or identifier for a unique SKU.void
setSkuName(String skuName)
Optional convenience field to store a human readable name for the SKU.void
setTracking(com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking tracking)
void
setUpc(String upc)
Meant to hold UPC, or Universal Product Code.void
setVendorRef(String vendorRef)
org.modelmapper.ModelMapper
toMe()
String
toString()
-
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:
getBusinessDomainType
in interfacecom.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware
-
fromMe
public org.modelmapper.ModelMapper fromMe()
- Specified by:
fromMe
in interfacecom.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
-
toMe
public org.modelmapper.ModelMapper toMe()
- Specified by:
toMe
in interfacecom.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
-
getContextId
public String getContextId()
The jpa primary key.- Specified by:
getContextId
in 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:
getTracking
in interfacecom.broadleafcommerce.data.tracking.core.Trackable
- See Also:
ApplicationJpaTracking
-
setContextId
public void setContextId(String contextId)
The jpa primary key.- Specified by:
setContextId
in 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:
setTracking
in interfacecom.broadleafcommerce.data.tracking.core.TypedTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking>
- See Also:
ApplicationJpaTracking
-
canEqual
protected boolean canEqual(Object other)
-
-