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:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
org.modelmapper.ModelMapper
fromMe()
Class<?>
The jpa primary key.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 a soft foreign key reference toJpaInventoryLocation
.This is really a calculated field.Physical count of items available.Optional number of items that are expected to arrive in the warehouse in the near term.Quantity of items that are reserved (i.e.An optional field that indicates how many should be reserved in the count or calculation of availability.Arbitrary code or identifier for a unique SKU.Optional convenience field to store a human readable name for the SKU.com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking
getUpc()
Meant to hold UPC, or Universal Product Code.int
hashCode()
boolean
boolean
void
setArchivalReason
(String archivalReason) void
setContextId
(String contextId) The jpa primary key.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
setHasChildren
(boolean hasChildren) void
setInventoryLocationContextId
(String inventoryLocationContextId) This is a soft foreign key reference toJpaInventoryLocation
.void
setParentSkuInventoryId
(String parentSkuInventoryId) 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
setSerializationValue
(String serializationValue) void
setSerialized
(boolean serialized) 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
Meant to hold UPC, or Universal Product Code.void
setVendorRef
(String vendorRef) org.modelmapper.ModelMapper
toMe()
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
Methods inherited from interface com.broadleafcommerce.data.tracking.core.Trackable
getDisplay, getNotificationStates, getNotificationStates, setNotificationStates
Methods inherited from interface com.broadleafcommerce.data.tracking.core.TypedTrackable
setTracking
-
Constructor Details
-
JpaSkuInventory
public JpaSkuInventory()
-
-
Method Details
-
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
The jpa primary key.- Specified by:
getContextId
in interfacecom.broadleafcommerce.data.tracking.core.Trackable
- Returns:
- The jpa primary key
-
getInventoryLocationContextId
This is a soft foreign key reference toJpaInventoryLocation
. -
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
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
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
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
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
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
-
getSerializationValue
-
getQuantityAvailable
This is really a calculated field. It should be (quantityOnHand - quantityReserved - safetyStock). We store it to conveniently query for available items. -
getQuantityReserved
Quantity of items that are reserved (i.e. been sold but not fulfilled). -
getQuantityOnHand
Physical count of items available. -
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
An optional field that indicates how many should be reserved in the count or calculation of availability. -
getVendorRef
- See Also:
-
getArchivalReason
- See Also:
-
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
The jpa primary key.- Specified by:
setContextId
in interfacecom.broadleafcommerce.data.tracking.core.Trackable
- Parameters:
INVENTORY_ID
- (or contextId) - The jpa primary key
-
setInventoryLocationContextId
This is a soft foreign key reference toJpaInventoryLocation
. -
setSkuCode
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
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
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
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
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
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
-
setSerializationValue
-
setQuantityAvailable
This is really a calculated field. It should be (quantityOnHand - quantityReserved - safetyStock). We store it to conveniently query for available items. -
setQuantityReserved
Quantity of items that are reserved (i.e. been sold but not fulfilled). -
setQuantityOnHand
Physical count of items available. -
setQuantityOnOrder
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
An optional field that indicates how many should be reserved in the count or calculation of availability. -
setVendorRef
- See Also:
-
setArchivalReason
- See Also:
-
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
-
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-