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:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected booleanbooleanorg.modelmapper.ModelMapperfromMe()When creating multiple of these records, it's sometimes necessary to do this outside of transactional boundaries.Class<?>The JPA primary key.The date that the transaction was created.Optional timestamp to indicate when this transaction was processed, or whenThe quanity associated with this transaction.Typically a sales order number or a PO number, depending on the transaction type.Soft foreign key reference to theJpaSkuInventory.getContextId().com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTrackingThis indicates what type of transaction this is.inthashCode()voidsetBatchId(String batchId) When creating multiple of these records, it's sometimes necessary to do this outside of transactional boundaries.voidsetContextId(String contextId) The JPA primary key.voidsetDateCreated(Instant dateCreated) The date that the transaction was created.voidsetDateProcessed(Instant dateProcessed) Optional timestamp to indicate when this transaction was processed, or whenvoidsetQuantity(Integer quantity) The quanity associated with this transaction.voidsetReferenceNumber(String referenceNumber) Typically a sales order number or a PO number, depending on the transaction type.voidsetSkuInventoryId(String skuInventoryId) Soft foreign key reference to theJpaSkuInventory.getContextId().voidsetTracking(com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking tracking) voidsetTransactionType(String transactionType) This indicates what type of transaction this is.org.modelmapper.ModelMappertoMe()toString()Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappablepostFromMe, postToMe, preFromMe, preToMeMethods inherited from interface com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAwarefindNotificationStateMethods inherited from interface com.broadleafcommerce.data.tracking.core.TrackablegetDisplay, getNotificationStates, getNotificationStates, setNotificationStatesMethods inherited from interface com.broadleafcommerce.data.tracking.core.TypedTrackablesetTracking
- 
Constructor Details- 
JpaInventoryTransactionpublic JpaInventoryTransaction()
 
- 
- 
Method Details- 
getBusinessDomainType- Specified by:
- getBusinessDomainTypein interface- com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware
 
- 
fromMepublic org.modelmapper.ModelMapper fromMe()- Specified by:
- fromMein interface- com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
 
- 
toMepublic org.modelmapper.ModelMapper toMe()- Specified by:
- toMein interface- com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
 
- 
getContextIdThe JPA primary key.- Specified by:
- getContextIdin interface- com.broadleafcommerce.data.tracking.core.Trackable
- Returns:
- The JPA primary key
 
- 
getSkuInventoryIdSoft foreign key reference to theJpaSkuInventory.getContextId().
- 
getTransactionTypeThis 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. AllDefaultInventoryTransactionTypevalues are associated with anAccountingTransactionType, which is either a DEBIT or a CREDIT. Various transactions can be looked at in sequence of the dateCreated or
- 
getQuantityThe quanity associated with this transaction.
- 
getDateProcessedOptional timestamp to indicate when this transaction was processed, or when
- 
getReferenceNumberTypically 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.).
- 
getBatchIdWhen 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.
- 
getDateCreatedThe date that the transaction was created.
- 
getTrackingpublic com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking getTracking()- Specified by:
- getTrackingin interface- com.broadleafcommerce.data.tracking.core.Trackable
- See Also:
- 
- ApplicationJpaTracking
 
 
- 
setContextIdThe JPA primary key.- Specified by:
- setContextIdin interface- com.broadleafcommerce.data.tracking.core.Trackable
- Parameters:
- INVENTORY_TX_ID- (or id) - The JPA primary key
 
- 
setSkuInventoryIdSoft foreign key reference to theJpaSkuInventory.getContextId().
- 
setTransactionTypeThis 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. AllDefaultInventoryTransactionTypevalues are associated with anAccountingTransactionType, which is either a DEBIT or a CREDIT. Various transactions can be looked at in sequence of the dateCreated or
- 
setQuantityThe quanity associated with this transaction.
- 
setDateProcessedOptional timestamp to indicate when this transaction was processed, or when
- 
setReferenceNumberTypically 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.).
- 
setBatchIdWhen 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.
- 
setDateCreatedThe date that the transaction was created.
- 
setTrackingpublic void setTracking(com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking tracking) - Specified by:
- setTrackingin interface- com.broadleafcommerce.data.tracking.core.TypedTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking>
- See Also:
- 
- ApplicationJpaTracking
 
 
- 
toString
- 
equals
- 
canEqual
- 
hashCodepublic int hashCode()
 
-