Class BatchItem

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

public class BatchItem extends Object
Author:
Phillip Verheyden (phillipuniverse)
  • Constructor Details

    • BatchItem

      public BatchItem(long lineNumber, String recordType, Map<String,String> row)
    • BatchItem

      public BatchItem()
  • Method Details

    • setCorrelationId

      public BatchItem setCorrelationId(String correlationId)
    • addDependentItem

      public void addDependentItem(BatchItem dependentItem)
      Adds a BatchItem to the list of dependents.
      Parameters:
      dependentItem -
    • 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
    • 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
    • getOperation

      public com.broadleafcommerce.common.dataimport.messaging.OperationType getOperation()
    • getResourceTierIdentifier

      @Nullable public String getResourceTierIdentifier()
    • getRow

      public Map<String,String> getRow()
      A row of data being examined
    • getDependents

      public List<BatchItem> getDependents()
      Items that should be conceptually linked to the parent record that represents this item
    • getStatus

      public BatchItemStatus getStatus()
      Overall status for this item
    • getErrorMessage

      @Nullable public String getErrorMessage()
      If setStatus(BatchItemStatus) is BatchItemStatus.ERROR then this contains a message detailing what the problem was
    • 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.
    • 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
    • setOperation

      public void setOperation(com.broadleafcommerce.common.dataimport.messaging.OperationType operation)
    • setResourceTierIdentifier

      public void setResourceTierIdentifier(@Nullable String resourceTierIdentifier)
    • setRow

      public void setRow(Map<String,String> row)
      A row of data being examined
    • setDependents

      public void setDependents(List<BatchItem> dependents)
      Items that should be conceptually linked to the parent record that represents this item
    • setStatus

      public void setStatus(BatchItemStatus status)
      Overall status for this item
    • setErrorMessage

      public void setErrorMessage(@Nullable String errorMessage)
      If setStatus(BatchItemStatus) is BatchItemStatus.ERROR then this contains a message detailing what the problem was
    • 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