Interface IResultSetRowProcessor
IResultSetProcessor
and enables controlling the end of row processing as well as to be a part of the processing of each row, perhaps with a VirtualSpace table.- Author:
- Christopher Mindus
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
doContinueRowProcessing
(ResultSetProps rsProps, int rowIndex, ResultSet rs) Verifies if the row should be processed or if the processing operation should end.default void
processRow
(RowInfo info) Method called for every row when the database transaction's result set is connected to a VirtualSpace table.default boolean
processRow
(ResultSetProps rsProps, int rowIndex, ResultSet rs) Method called for every row when the database transaction's result set is not connected to a VirtualSpace table.
Method Details
doContinueRowProcessing
default boolean doContinueRowProcessing(ResultSetProps rsProps, int rowIndex, ResultSet rs) throws SQLException Verifies if the row should be processed or if the processing operation should end.Override this method to handle possible ending of operation. The default is to return
true
and thus all rows up to the maximum row count are processed. The maximum row count could be set to zero, i.e. unlimited, therefore all rows handled, unless this method returnsfalse
.This method is called once the cursor has been moved to the next row using
and that method returnedResultSet.next()
true
indicating row presence.- Parameters:
rsProps
- The result set properties.rowIndex
- The row index being processed, zero for first row.rs
- The SQL ResultSet instance.- Returns:
false
to end row processing, ortrue
to keep on processing (default value).- Throws:
SQLException
- In case of SQL exceptions.
processRow
Method called for every row when the database transaction's result set is not connected to a VirtualSpace table.This method is called right after calling
in order to have similar processing as when a VirtualSpace table is present.doContinueRowProcessing(ResultSetProps, int, ResultSet)
Override to process, the default implementation returns
false
to stop processing.- Parameters:
rsProps
- The result set properties.rowIndex
- The row index being processed, zero for first row.rs
- The SQL ResultSet instance.- Returns:
true
to keep on processing rows, orfalse
to stop (as the default implementation does unless overridden).- Throws:
SQLException
- In case of SQL exceptions.
processRow
Method called for every row when the database transaction's result set is connected to a VirtualSpace table.This method is called right after calling
, but after the SQL values for the columns are retrieved and converted to the appropriate VirtualSpacedoContinueRowProcessing(ResultSetProps, int, ResultSet)
Value
's.Upon return of this method, the
Value
's from the
will populate the row to overwrite or insert into the VirtualSpace table.RowInfo.vsValues
- Parameters:
info
- The row information holder.- Throws:
SQLException
- For SQL processing errors.