Class BulkImportResult

java.lang.Object
com.helger.photon.exchange.bulkimport.BulkImportResult
All Implemented Interfaces:
com.helger.commons.state.ISuccessIndicator

@ThreadSafe public class BulkImportResult extends Object implements com.helger.commons.state.ISuccessIndicator
This class represents the results of a bulk import.
Author:
boris, philip
  • Field Details

    • DEFAULT_SUCCESS

      public static final boolean DEFAULT_SUCCESS
      Default success value
      See Also:
    • DEFAULT_MAX_WARNINGS

      public static final int DEFAULT_MAX_WARNINGS
      Default value for maximum number of warnings to maintain in a list.
      See Also:
    • m_aRWLock

      protected final com.helger.commons.concurrent.SimpleReadWriteLock m_aRWLock
  • Constructor Details

    • BulkImportResult

      public BulkImportResult()
    • BulkImportResult

      public BulkImportResult(@Nonnegative int nMaxWarnings)
  • Method Details

    • registerAdded

      public final void registerAdded(@Nonnull com.helger.commons.type.ITypedObject<String> aObj)
    • getAllAdded

      @Nonnull @ReturnsMutableCopy public final com.helger.commons.collection.impl.ICommonsList<com.helger.commons.type.ITypedObject<String>> getAllAdded()
    • getAddedCount

      @Nonnegative public final int getAddedCount()
    • containsAdded

      public final boolean containsAdded(@Nonnull com.helger.commons.type.ITypedObject<String> aObj)
    • registerChanged

      public final void registerChanged(@Nonnull com.helger.commons.type.ITypedObject<String> aObj)
    • getAllChanged

      @Nonnull @ReturnsMutableCopy public final com.helger.commons.collection.impl.ICommonsList<com.helger.commons.type.ITypedObject<String>> getAllChanged()
    • getChangedCount

      @Nonnegative public final int getChangedCount()
    • containsChanged

      public final boolean containsChanged(@Nonnull com.helger.commons.type.ITypedObject<String> aObj)
    • registerFailed

      public final void registerFailed(String sID)
    • getAllFailed

      @Nonnull @ReturnsMutableCopy public final com.helger.commons.collection.impl.ICommonsList<String> getAllFailed()
      Returns:
      All failed IDs.
    • getFailedCount

      @Nonnegative public final int getFailedCount()
    • containsFailed

      public final boolean containsFailed(@Nullable String sID)
    • addWarning

      public final void addWarning(String sWarningMsg)
    • getAllWarnings

      @Nonnull @ReturnsMutableCopy public final com.helger.commons.collection.impl.ICommonsList<String> getAllWarnings()
    • getWarningsCount

      @Nonnegative public final int getWarningsCount()
      Returns:
      The number of all warnings. Always ≥ 0.
    • setSuccess

      public final void setSuccess(boolean bSuccess)
    • isSuccess

      public final boolean isSuccess()
      Indicates, that the overall import succeeded. Default is true.
      Specified by:
      isSuccess in interface com.helger.commons.state.ISuccessIndicator
      Returns:
      true for import success, false for import failure.