Class JpaInventoryTransaction
- java.lang.Object
-
- com.broadleafcommerce.inventory.provider.jpa.domain.JpaInventoryTransaction
-
- 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 JpaInventoryTransaction 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>
Transaction records for common inventory transactions that need to be tracked, at least for a period of time, to inform the inventory availability. These entities represent transactions. These transactions can be referenced or groomed, as needed, over time.- Author:
- Kelly Tisdell (ktisdell)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JpaInventoryTransaction()
-
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()
String
getBatchId()
When creating multiple of these records, it's sometimes necessary to do this outside of transactional boundaries.Class<?>
getBusinessDomainType()
String
getContextId()
The JPA primary key.Instant
getDateCreated()
The date that the transaction was created.Instant
getDateProcessed()
Optional timestamp to indicate when this transaction was processed, or whenInteger
getQuantity()
The quanity associated with this transaction.String
getReferenceNumber()
Typically a sales order number or a PO number, depending on the transaction type.String
getSkuInventoryId()
Soft foreign key reference to theJpaSkuInventory.getContextId()
.com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking
getTracking()
String
getTransactionType()
This indicates what type of transaction this is.int
hashCode()
void
setBatchId(String batchId)
When creating multiple of these records, it's sometimes necessary to do this outside of transactional boundaries.void
setContextId(String contextId)
The JPA primary key.void
setDateCreated(Instant dateCreated)
The date that the transaction was created.void
setDateProcessed(Instant dateProcessed)
Optional timestamp to indicate when this transaction was processed, or whenvoid
setQuantity(Integer quantity)
The quanity associated with this transaction.void
setReferenceNumber(String referenceNumber)
Typically a sales order number or a PO number, depending on the transaction type.void
setSkuInventoryId(String skuInventoryId)
Soft foreign key reference to theJpaSkuInventory.getContextId()
.void
setTracking(com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking tracking)
void
setTransactionType(String transactionType)
This indicates what type of transaction this is.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
-
getSkuInventoryId
public String getSkuInventoryId()
Soft foreign key reference to theJpaSkuInventory.getContextId()
.
-
getTransactionType
public String getTransactionType()
This indicates what type of transaction this is. Depending on the type of transaction, fields like quantity, expectedDateProcessed, dateProcessed, referenceNumber, and completed will have slightly different meanings. For example, for a type likeDefaultInventoryTransactionType.SOFT_RESERVED
, the referenceNumber will be a sales order ID or number. However, for aDefaultInventoryTransactionType.ORDERED
, the referenceNumber will likely be a purchase order number or ID. ForDefaultInventoryTransactionType.SHRINKAGE
, the referenceNumber could be null or could reference a different number or system. AllDefaultInventoryTransactionType
values are associated with anAccountingTransactionType
, which is either a DEBIT or a CREDIT. Various transactions can be looked at in sequence of the dateCreated or
-
getQuantity
public Integer getQuantity()
The quanity associated with this transaction.
-
getDateProcessed
public Instant getDateProcessed()
Optional timestamp to indicate when this transaction was processed, or when
-
getReferenceNumber
public String getReferenceNumber()
Typically a sales order number or a PO number, depending on the transaction type. Reference number can be anything, but should be consistent (e.g. {orderNumber}-{lineItemNumber}, {orderId}, etc.).
-
getBatchId
public String getBatchId()
When creating multiple of these records, it's sometimes necessary to do this outside of transactional boundaries. This property is a property that should be the same for all records being created as part of the same logical transaction.
-
getDateCreated
public Instant getDateCreated()
The date that the transaction was created.
-
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_TX_ID
- (or id) - The JPA primary key
-
setSkuInventoryId
public void setSkuInventoryId(String skuInventoryId)
Soft foreign key reference to theJpaSkuInventory.getContextId()
.
-
setTransactionType
public void setTransactionType(String transactionType)
This indicates what type of transaction this is. Depending on the type of transaction, fields like quantity, expectedDateProcessed, dateProcessed, referenceNumber, and completed will have slightly different meanings. For example, for a type likeDefaultInventoryTransactionType.SOFT_RESERVED
, the referenceNumber will be a sales order ID or number. However, for aDefaultInventoryTransactionType.ORDERED
, the referenceNumber will likely be a purchase order number or ID. ForDefaultInventoryTransactionType.SHRINKAGE
, the referenceNumber could be null or could reference a different number or system. AllDefaultInventoryTransactionType
values are associated with anAccountingTransactionType
, which is either a DEBIT or a CREDIT. Various transactions can be looked at in sequence of the dateCreated or
-
setQuantity
public void setQuantity(Integer quantity)
The quanity associated with this transaction.
-
setDateProcessed
public void setDateProcessed(Instant dateProcessed)
Optional timestamp to indicate when this transaction was processed, or when
-
setReferenceNumber
public void setReferenceNumber(String referenceNumber)
Typically a sales order number or a PO number, depending on the transaction type. Reference number can be anything, but should be consistent (e.g. {orderNumber}-{lineItemNumber}, {orderId}, etc.).
-
setBatchId
public void setBatchId(String batchId)
When creating multiple of these records, it's sometimes necessary to do this outside of transactional boundaries. This property is a property that should be the same for all records being created as part of the same logical transaction.
-
setDateCreated
public void setDateCreated(Instant dateCreated)
The date that the transaction was created.
-
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)
-
-