Class PersistenceRequest<T>
java.lang.Object
com.broadleafcommerce.common.dataimport.util.PersistenceRequest<T>
Intended for use by
ImportBatchHandler
implementations to capture all relevant
information about a parsed/converted record such that it can be submitted for persistence and
completion information can be produced for it.- Author:
- Phillip Verheyden (phillipuniverse)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Provides traceability in order to report success/failure of embedded items tied to a particular entity. -
Constructor Summary
ConstructorsConstructorDescriptionPersistenceRequest
(T toSave, com.broadleafcommerce.data.tracking.core.type.OperationType operation, String correlationId) PersistenceRequest
(T toSave, com.broadleafcommerce.data.tracking.core.type.OperationType operation, String correlationId, List<PersistenceRequest.EmbeddedItemRequest> embeddedItemRequests) -
Method Summary
Modifier and TypeMethodDescriptionboolean
The correlation ID from the original record, will ultimately be set on theBatchCompletionRecord.correlationId
.com.broadleafcommerce.data.tracking.core.type.OperationType
The type of operation to perform for this object.The actual entity to persist.int
hashCode()
toString()
-
Constructor Details
-
PersistenceRequest
-
PersistenceRequest
public PersistenceRequest(T toSave, com.broadleafcommerce.data.tracking.core.type.OperationType operation, String correlationId, List<PersistenceRequest.EmbeddedItemRequest> embeddedItemRequests)
-
-
Method Details
-
getToSave
The actual entity to persist. -
getOperation
public com.broadleafcommerce.data.tracking.core.type.OperationType getOperation()The type of operation to perform for this object.Since we typically assign the id regardless of whether it was a create or update, this allows us to differentiate the cases reliably.
-
getCorrelationId
The correlation ID from the original record, will ultimately be set on theBatchCompletionRecord.correlationId
. -
getEmbeddedItemRequests
-
equals
-
hashCode
public int hashCode() -
toString
-