public class DataSourceResults
extends java.lang.Object
Constructor and Description |
---|
DataSourceResults()
Default bean constructor; does nothing
|
DataSourceResults(DataSource dataSource,
java.lang.Object definingObject)
Create a DataSourceResults for the given parameters
|
DataSourceResults(java.lang.Object failedDefiningObject,
java.lang.Throwable exc)
Create a DataSourceResults from the failed parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
addFailed(java.lang.Object definingObject,
java.lang.Throwable exception)
Add a failed defining object and the failure exception to the lists.
|
void |
addSuccess(DataSource dataSource,
java.lang.Object definingObject)
Add a successful result to the lists
|
boolean |
allFailed()
See if all the results were failures.
|
boolean |
allOk()
See if all the results were okay.
|
boolean |
anyFailed()
See if there were any failures.
|
boolean |
anyOk()
See if there were any successes.
|
java.util.List |
getDataSources()
Get the list of successfully created DataSources
|
java.util.List |
getExceptions()
Get the list of failure exceptions.
|
java.util.List |
getFailedData()
Get the list of failed data.
|
java.util.List |
getSuccessData()
Get the list of successful defining objects.
|
void |
merge(DataSourceResults results)
Merge the results of another DataSourceResults to this one
|
java.lang.String |
toString()
Get a String representation of this DataSourceResults.
|
public DataSourceResults()
public DataSourceResults(DataSource dataSource, java.lang.Object definingObject)
dataSource
- the DataSourcedefiningObject
- the defining object for that sourcepublic DataSourceResults(java.lang.Object failedDefiningObject, java.lang.Throwable exc)
failedDefiningObject
- defining object for failureexc
- failed exceptionpublic void merge(DataSourceResults results)
results
- other results.public java.util.List getDataSources()
public java.util.List getSuccessData()
public java.util.List getExceptions()
public java.util.List getFailedData()
public boolean anyFailed()
public boolean anyOk()
public boolean allFailed()
public boolean allOk()
public void addSuccess(DataSource dataSource, java.lang.Object definingObject)
dataSource
- successfully created DataSourcedefiningObject
- the defining object for dataSource
.public void addFailed(java.lang.Object definingObject, java.lang.Throwable exception)
definingObject
- defining object for the DataSourceexception
- failure exceptionpublic java.lang.String toString()
toString
in class java.lang.Object