Class BatchItemCompletion

java.lang.Object
com.broadleafcommerce.dataimport.domain.BatchItemCompletion

public class BatchItemCompletion extends Object
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 Details

    • BatchItemCompletion

      public BatchItemCompletion()
  • Method Details

    • getId

      public String getId()
      A unique identifier for this completion.
    • getImportId

      public String getImportId()
      The id of the Import that this item is under.
    • getStatus

      public BatchItemStatus getStatus()
      The status that the BatchItem completed with. Should be one of BatchItemStatus.SUCCESS or BatchItemStatus.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

      public String 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

      public String 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 are PRODUCT, VARIANT, INCLUDED_PRODUCT
      See Also:
      • BatchItem.recordType
    • getTopLevelParentCorrelationId

      @Nullable public String getTopLevelParentCorrelationId()
      If this item was a dependent of an item, this field will hold the correlationId 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

      @Nullable public String getResourceTierIdentifier()
      Identifier for the record at the resource tier which is associated after the record is persisted
    • getErrorMessage

      @Nullable public String getErrorMessage()
      If setStatus(BatchItemStatus) is BatchItemStatus.ERROR then this contains a message detailing what the problem was
    • getRow

      public Map<String,String> getRow()
      The row of data from the original file.
    • setId

      public void setId(String id)
      A unique identifier for this completion.
    • setImportId

      public void setImportId(String importId)
      The id of the Import that this item is under.
    • setStatus

      public void setStatus(BatchItemStatus status)
      The status that the BatchItem completed with. Should be one of BatchItemStatus.SUCCESS or BatchItemStatus.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

      public void setCorrelationId(String correlationId)
      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

      public 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. For example in a product import there are PRODUCT, VARIANT, INCLUDED_PRODUCT
      See Also:
      • BatchItem.recordType
    • setTopLevelParentCorrelationId

      public void setTopLevelParentCorrelationId(@Nullable String topLevelParentCorrelationId)
      If this item was a dependent of an item, this field will hold the correlationId 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

      public void setResourceTierIdentifier(@Nullable String resourceTierIdentifier)
      Identifier for the record at the resource tier which is associated after the record is persisted
    • setErrorMessage

      public void setErrorMessage(@Nullable String errorMessage)
      If setStatus(BatchItemStatus) is BatchItemStatus.ERROR then this contains a message detailing what the problem was
    • setRow

      public void setRow(Map<String,String> row)
      The row of data from the original file.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object