public interface ResultHandler
Modifier and Type | Method and Description |
---|---|
void |
handleIntermediateResults(java.util.List<XMLDBModel> intermediateResults,
ResultHandler resultHandler)
Handle the intermediate results that got from a certain ResultHandler
instance.
|
void |
handleResults(java.util.ArrayList<XMLDBModel> modelResults)
To be implemented by the concrete classes to implement the
function to handle the results of searched models.
|
boolean |
isSearchCancelled()
Check whether the searching process has been canceled by the user.
|
void |
passErrorModels(java.util.List<XMLDBModel> errorModels)
In the case of getting some models that cannot be parsed or contains
some error, use this method to pass these error models to store for
error handling.
|
void |
setConnection(DBConnection connection)
Set the DB connection for this result handler.
|
void |
wholeSearchDone()
Notify the search result buffer that the searching is done.
|
void handleIntermediateResults(java.util.List<XMLDBModel> intermediateResults, ResultHandler resultHandler)
intermediateResults
- The intermediate results set to be handled
in this ResultHandler.resultHandler
- The ResultHandler instance that gets the passed
intermediate results.void handleResults(java.util.ArrayList<XMLDBModel> modelResults) throws DBConnectionException, DBExecutionException
modelResults
- The searched model results to be handled.DBConnectionException
- Database connection problem occurs
during handling the results through searching in the database.DBExecutionException
- Thrown from the database layer when
there is error occurring in the execution.boolean isSearchCancelled()
void passErrorModels(java.util.List<XMLDBModel> errorModels)
errorModels
- The error models.void setConnection(DBConnection connection)
connection
- The DBConnection instance to be set in this result
handler.void wholeSearchDone() throws DBConnectionException
DBConnectionException
- Thrown if the DB connection cannot be
obtained.