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
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
Identifier that allows the resource tier to map back responses to a record within the batchIfsetStatus(BatchItemStatus)
isBatchItemStatus.ERROR
then this contains a message detailing what the problem wasgetId()
A unique identifier for this completion.The id of theImport
that this item is under.long
The line number in the original data file that this item appears in.com.broadleafcommerce.common.dataimport.messaging.OperationType
The 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 theBatchItem
completed with.If this item was a dependent of an item, this field will hold thecorrelationId
of the top level, root ancestor of this item (the "main record").int
hashCode()
void
setCorrelationId
(String correlationId) Identifier that allows the resource tier to map back responses to a record within the batchvoid
setErrorMessage
(String errorMessage) IfsetStatus(BatchItemStatus)
isBatchItemStatus.ERROR
then this contains a message detailing what the problem wasvoid
A unique identifier for this completion.void
setImportId
(String importId) The id of theImport
that this item is under.void
setLineNumber
(long lineNumber) The line number in the original data file that this item appears in.void
setOperation
(com.broadleafcommerce.common.dataimport.messaging.OperationType operation) The operation type performed (or intended to be performed) for this record.void
setRecordType
(String recordType) In a multi-typed record file this holds the specific information of what was parsed out from the line in the file.void
setResourceTierIdentifier
(String resourceTierIdentifier) Identifier for the record at the resource tier which is associated after the record is persistedvoid
The row of data from the original file.void
setStatus
(BatchItemStatus status) The status that theBatchItem
completed with.void
setTopLevelParentCorrelationId
(String topLevelParentCorrelationId) If this item was a dependent of an item, this field will hold thecorrelationId
of 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 theImport
that this item is under. -
getStatus
The status that theBatchItem
completed with. Should be one ofBatchItemStatus.SUCCESS
orBatchItemStatus.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 thecorrelationId
of 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.ERROR
then 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 theImport
that this item is under. -
setStatus
The status that theBatchItem
completed with. Should be one ofBatchItemStatus.SUCCESS
orBatchItemStatus.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 thecorrelationId
of 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.ERROR
then 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
-