- Type Parameters:
TARGET- the mapping target typeRESULT- the result type
- All Known Implementing Classes:
OptionalSingleResultCallback,ResultListCallback,SingleResultCallback
public interface IterationCallback<TARGET,RESULT>
A callback that is invoked from a
ResultSet iteration process.
The implementation class is not required to be thread safe.
-
Method Summary
Modifier and TypeMethodDescriptiondefault RESULTReturns the default value.iterate(TARGET target, IterationContext context) Invoked from aResultSetiteration process.default RESULTpostIterate(RESULT result, IterationContext context) Executes post process ofiterate(Object, IterationContext).
-
Method Details
-
defaultResult
Returns the default value.- Returns:
- the default value
-
iterate
Invoked from aResultSetiteration process.- Parameters:
target- the object that is mapped to a row ofResultSetcontext- the execution context- Returns:
- the result type
-
postIterate
Executes post process ofiterate(Object, IterationContext).- Parameters:
result- the result ofiterate(Object, IterationContext)or the result ofdefaultResult()ifResultSethas no rowscontext- the execution context- Returns:
- the result
-