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 Summary
Fields Modifier and Type Field Description static intDEFAULT_MAX_WARNINGSDefault value for maximum number of warnings to maintain in a list.static booleanDEFAULT_SUCCESSDefault success valueprotected com.helger.commons.concurrent.SimpleReadWriteLockm_aRWLock
-
Constructor Summary
Constructors Constructor Description BulkImportResult()BulkImportResult(int nMaxWarnings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddWarning(String sWarningMsg)booleancontainsAdded(com.helger.commons.type.ITypedObject<String> aObj)booleancontainsChanged(com.helger.commons.type.ITypedObject<String> aObj)booleancontainsFailed(String sID)intgetAddedCount()com.helger.commons.collection.impl.ICommonsList<com.helger.commons.type.ITypedObject<String>>getAllAdded()com.helger.commons.collection.impl.ICommonsList<com.helger.commons.type.ITypedObject<String>>getAllChanged()com.helger.commons.collection.impl.ICommonsList<String>getAllFailed()com.helger.commons.collection.impl.ICommonsList<String>getAllWarnings()intgetChangedCount()intgetFailedCount()intgetWarningsCount()booleanisSuccess()Indicates, that the overall import succeeded.voidregisterAdded(com.helger.commons.type.ITypedObject<String> aObj)voidregisterChanged(com.helger.commons.type.ITypedObject<String> aObj)voidregisterFailed(String sID)voidsetSuccess(boolean bSuccess)
-
-
-
Field Detail
-
DEFAULT_SUCCESS
public static final boolean DEFAULT_SUCCESS
Default success value- See Also:
- Constant Field Values
-
DEFAULT_MAX_WARNINGS
public static final int DEFAULT_MAX_WARNINGS
Default value for maximum number of warnings to maintain in a list.- See Also:
- Constant Field Values
-
m_aRWLock
protected final com.helger.commons.concurrent.SimpleReadWriteLock m_aRWLock
-
-
Constructor Detail
-
BulkImportResult
public BulkImportResult()
-
BulkImportResult
public BulkImportResult(@Nonnegative int nMaxWarnings)
-
-
Method Detail
-
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()
-
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 istrue.- Specified by:
isSuccessin interfacecom.helger.commons.state.ISuccessIndicator- Returns:
truefor import success,falsefor import failure.
-
-