Package com.onenetwork.platform.data.sql
Interface SqlResultHandler
- All Known Implementing Classes:
AbstractSqlResultHandler
public interface SqlResultHandler
Event handler which receives notifications during the executing of a query.
It is most useful for cases where one wants to process a very large result
which should not be pulled into memory all at once.
Clients are encouraged to implement this by extending
AbstractSqlResultHandler
.-
Method Summary
Modifier and Type Method Description void
beginSqlResult(SqlResultMeta sqlResultMeta)
This event is fired just after the metadata has been fetched for the query result, but before any rows are processedvoid
endSqlResult()
This event is fired after all SqlRows have been processed to to allow implementers to perform cleanup operationsvoid
processSqlRow(SqlRow sqlRow)
This event is fired as each SqlRow is fetched; interested parties can listen to this method to process each row
-
Method Details
-
beginSqlResult
This event is fired just after the metadata has been fetched for the query result, but before any rows are processed- Parameters:
sqlResultMeta
- describes the query result metadata- Throws:
SqlResultHandlerException
- - processing will abort when this exception is thrown.
-
processSqlRow
This event is fired as each SqlRow is fetched; interested parties can listen to this method to process each row- Parameters:
sqlRow
- next SqlRow fetched- Throws:
SqlResultHandlerException
- - processing will abort when this exception is thrown.
-
endSqlResult
This event is fired after all SqlRows have been processed to to allow implementers to perform cleanup operations- Throws:
SqlResultHandlerException
- - processing will abort when this exception is thrown.
-