Class BatchItemCompletion
java.lang.Object
com.broadleafcommerce.dataimport.domain.BatchItemCompletion
A
BatchItem after completion. This is mostly a duplication of the information in
BatchItem, but it is a separate domain to provide a flattened representation that
facilitates paginated queries for status reporting.- Author:
- Samarth Dhruva (samarthd)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanIdentifier that allows the resource tier to map back responses to a record within the batchIfsetStatus(BatchItemStatus)isBatchItemStatus.ERRORthen this contains a message detailing what the problem wasgetId()A unique identifier for this completion.The id of theImportthat this item is under.longThe line number in the original data file that this item appears in.com.broadleafcommerce.common.dataimport.messaging.OperationTypeThe operation type performed (or intended to be performed) for this record.In a multi-typed record file this holds the specific information of what was parsed out from the line in the file.Identifier for the record at the resource tier which is associated after the record is persistedgetRow()The row of data from the original file.The status that theBatchItemcompleted with.If this item was a dependent of an item, this field will hold thecorrelationIdof the top level, root ancestor of this item (the "main record").inthashCode()voidsetCorrelationId(String correlationId) Identifier that allows the resource tier to map back responses to a record within the batchvoidsetErrorMessage(String errorMessage) IfsetStatus(BatchItemStatus)isBatchItemStatus.ERRORthen this contains a message detailing what the problem wasvoidA unique identifier for this completion.voidsetImportId(String importId) The id of theImportthat this item is under.voidsetLineNumber(long lineNumber) The line number in the original data file that this item appears in.voidsetOperation(com.broadleafcommerce.common.dataimport.messaging.OperationType operation) The operation type performed (or intended to be performed) for this record.voidsetRecordType(String recordType) In a multi-typed record file this holds the specific information of what was parsed out from the line in the file.voidsetResourceTierIdentifier(String resourceTierIdentifier) Identifier for the record at the resource tier which is associated after the record is persistedvoidThe row of data from the original file.voidsetStatus(BatchItemStatus status) The status that theBatchItemcompleted with.voidsetTopLevelParentCorrelationId(String topLevelParentCorrelationId) If this item was a dependent of an item, this field will hold thecorrelationIdof the top level, root ancestor of this item (the "main record").toString()
-
Constructor Details
-
BatchItemCompletion
public BatchItemCompletion()
-
-
Method Details
-
getId
A unique identifier for this completion. -
getImportId
The id of theImportthat this item is under. -
getStatus
The status that theBatchItemcompleted with. Should be one ofBatchItemStatus.SUCCESSorBatchItemStatus.ERROR. -
getLineNumber
public long getLineNumber()The line number in the original data file that this item appears in. The numbering does not exclude any header lines at the start of the file. For instance, this generally means that all items in a CSV import will have a line number greater than or equal to 2, since line number 1 is the header line. -
getCorrelationId
Identifier that allows the resource tier to map back responses to a record within the batch -
getOperation
@Nullable public com.broadleafcommerce.common.dataimport.messaging.OperationType getOperation()The operation type performed (or intended to be performed) for this record. It's optional, as not all import implementations will necessarily use or set this field. -
getRecordType
In a multi-typed record file this holds the specific information of what was parsed out from the line in the file. For example in a product import there arePRODUCT,VARIANT,INCLUDED_PRODUCT- See Also:
-
BatchItem.recordType
-
getTopLevelParentCorrelationId
If this item was a dependent of an item, this field will hold thecorrelationIdof the top level, root ancestor of this item (the "main record"). This is mainly used for performance reasons to reduce the number of queries that are made to fetch all children of a particular top-level item. -
getResourceTierIdentifier
Identifier for the record at the resource tier which is associated after the record is persisted -
getErrorMessage
IfsetStatus(BatchItemStatus)isBatchItemStatus.ERRORthen this contains a message detailing what the problem was -
getRow
The row of data from the original file. -
setId
A unique identifier for this completion. -
setImportId
The id of theImportthat this item is under. -
setStatus
The status that theBatchItemcompleted with. Should be one ofBatchItemStatus.SUCCESSorBatchItemStatus.ERROR. -
setLineNumber
public void setLineNumber(long lineNumber) The line number in the original data file that this item appears in. The numbering does not exclude any header lines at the start of the file. For instance, this generally means that all items in a CSV import will have a line number greater than or equal to 2, since line number 1 is the header line. -
setCorrelationId
Identifier that allows the resource tier to map back responses to a record within the batch -
setOperation
public void setOperation(@Nullable com.broadleafcommerce.common.dataimport.messaging.OperationType operation) The operation type performed (or intended to be performed) for this record. It's optional, as not all import implementations will necessarily use or set this field. -
setRecordType
In a multi-typed record file this holds the specific information of what was parsed out from the line in the file. For example in a product import there arePRODUCT,VARIANT,INCLUDED_PRODUCT- See Also:
-
BatchItem.recordType
-
setTopLevelParentCorrelationId
If this item was a dependent of an item, this field will hold thecorrelationIdof the top level, root ancestor of this item (the "main record"). This is mainly used for performance reasons to reduce the number of queries that are made to fetch all children of a particular top-level item. -
setResourceTierIdentifier
Identifier for the record at the resource tier which is associated after the record is persisted -
setErrorMessage
IfsetStatus(BatchItemStatus)isBatchItemStatus.ERRORthen this contains a message detailing what the problem was -
setRow
The row of data from the original file. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-