@ThreadSafe public class BulkImportResult extends Object implements com.helger.commons.state.ISuccessIndicator
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAX_WARNINGS
Default value for maximum number of warnings to maintain in a list.
|
static boolean |
DEFAULT_SUCCESS
Default success value
|
protected com.helger.commons.concurrent.SimpleReadWriteLock |
m_aRWLock |
| Constructor and Description |
|---|
BulkImportResult() |
BulkImportResult(int nMaxWarnings) |
| Modifier and Type | Method and Description |
|---|---|
void |
addWarning(String sWarningMsg) |
boolean |
containsAdded(com.helger.commons.type.ITypedObject<String> aObj) |
boolean |
containsChanged(com.helger.commons.type.ITypedObject<String> aObj) |
boolean |
containsFailed(String sID) |
int |
getAddedCount() |
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() |
int |
getChangedCount() |
int |
getFailedCount() |
int |
getWarningsCount() |
boolean |
isSuccess()
Indicates, that the overall import succeeded.
|
void |
registerAdded(com.helger.commons.type.ITypedObject<String> aObj) |
void |
registerChanged(com.helger.commons.type.ITypedObject<String> aObj) |
void |
registerFailed(String sID) |
void |
setSuccess(boolean bSuccess) |
public static final boolean DEFAULT_SUCCESS
public static final int DEFAULT_MAX_WARNINGS
protected final com.helger.commons.concurrent.SimpleReadWriteLock m_aRWLock
public BulkImportResult()
public BulkImportResult(@Nonnegative int nMaxWarnings)
public final void registerAdded(@Nonnull com.helger.commons.type.ITypedObject<String> aObj)
@Nonnull @ReturnsMutableCopy public final com.helger.commons.collection.impl.ICommonsList<com.helger.commons.type.ITypedObject<String>> getAllAdded()
@Nonnegative public final int getAddedCount()
public final boolean containsAdded(@Nonnull com.helger.commons.type.ITypedObject<String> aObj)
public final void registerChanged(@Nonnull com.helger.commons.type.ITypedObject<String> aObj)
@Nonnull @ReturnsMutableCopy public final com.helger.commons.collection.impl.ICommonsList<com.helger.commons.type.ITypedObject<String>> getAllChanged()
@Nonnegative public final int getChangedCount()
public final boolean containsChanged(@Nonnull com.helger.commons.type.ITypedObject<String> aObj)
public final void registerFailed(String sID)
@Nonnull @ReturnsMutableCopy public final com.helger.commons.collection.impl.ICommonsList<String> getAllFailed()
@Nonnegative public final int getFailedCount()
public final void addWarning(String sWarningMsg)
@Nonnull @ReturnsMutableCopy public final com.helger.commons.collection.impl.ICommonsList<String> getAllWarnings()
@Nonnegative public final int getWarningsCount()
public final void setSuccess(boolean bSuccess)
public final boolean isSuccess()
true.isSuccess in interface com.helger.commons.state.ISuccessIndicatortrue for import success, false for import
failure.Copyright © 2014–2023 Philip Helger. All rights reserved.