Package org.firebirdsql.gds.ng.listeners
Interface StatementListener
- 
- All Known Implementing Classes:
- DefaultStatementListener,- StatementListenerDispatcher
 
 public interface StatementListenerListener interface for receiving rows and related information as retrieved by anFbStatement.fetchRows(int), orFbStatement.execute(RowValue)with a singleton result.All listener methods have a default implementation that does nothing. - Since:
- 3.0
- Author:
- Mark Rotteveel
 
- 
- 
Method SummaryAll Methods Instance Methods Default Methods Modifier and Type Method Description default voidafterLast(FbStatement sender)Method to be notified when the cursor of a statement is positioned after the last row.default voidbeforeFirst(FbStatement sender)Method to be notified when the cursor of a statement is positioned before the first row.default voidreceivedRow(FbStatement sender, RowValue rowValue)Method to be notified of a new row of data.default voidsqlCounts(FbStatement sender, SqlCountHolder sqlCounts)Called when the SQL counts of a statement have been retrieved.default voidstatementExecuted(FbStatement sender, boolean hasResultSet, boolean hasSingletonResult)Method to be notified when a statement has been executed.default voidstatementStateChanged(FbStatement sender, StatementState newState, StatementState previousState)Method to be notified when the state of a statement has changed.default voidwarningReceived(FbStatement sender, java.sql.SQLWarning warning)Called when a warning was received for thesenderstatement.
 
- 
- 
- 
Method Detail- 
receivedRowdefault void receivedRow(FbStatement sender, RowValue rowValue) Method to be notified of a new row of data.Listeners that process beforeFirst(FbStatement)and/orafterLast(FbStatement)should consider calls to this method to clear the before-first or after-last state to an
- in-cursorstate.
- Parameters:
- sender- The- FbStatementthat called this method.
- rowValue- The row values.
 
 - 
beforeFirstdefault void beforeFirst(FbStatement sender) Method to be notified when the cursor of a statement is positioned before the first row.When server-side scrolling is used, this method can be called multiple times during the lifetime of a single open cursor. This method may be called even if the cursor is already before-first. - Parameters:
- sender- The- FbStatementthat called this method.
- See Also:
- statementExecuted(FbStatement, boolean, boolean),- receivedRow(FbStatement, RowValue),- afterLast(FbStatement)
 
 - 
afterLastdefault void afterLast(FbStatement sender) Method to be notified when the cursor of a statement is positioned after the last row.When server-side scrolling is used, this method might be called multiple times during the lifetime of a single open cursor. This method may be called even if the cursor is already after-last. - Parameters:
- sender- The- FbStatementthat called this method.
- See Also:
- statementExecuted(FbStatement, boolean, boolean),- receivedRow(FbStatement, RowValue),- beforeFirst(FbStatement)
 
 - 
statementExecuteddefault void statementExecuted(FbStatement sender, boolean hasResultSet, boolean hasSingletonResult) Method to be notified when a statement has been executed.This event with hasResultSet=truecan be seen as a counterpart ofafterLast(FbStatement).- Parameters:
- sender- The- FbStatementthat called this method.
- hasResultSet-- truethere is a result set,- falsethere is no result set
- hasSingletonResult-- truesingleton result,- falsestatement will produce indeterminate number of rows; can be ignored when- hasResultSetis- false.
 
 - 
statementStateChangeddefault void statementStateChanged(FbStatement sender, StatementState newState, StatementState previousState) Method to be notified when the state of a statement has changed.- Parameters:
- sender- The- FbStatementthat called this method.
- newState- The new state of the statement
- previousState- The old state of the statement
 
 - 
warningReceiveddefault void warningReceived(FbStatement sender, java.sql.SQLWarning warning) Called when a warning was received for thesenderstatement.- Parameters:
- sender- Statement receiving the warning
- warning- Warning
 
 - 
sqlCountsdefault void sqlCounts(FbStatement sender, SqlCountHolder sqlCounts) Called when the SQL counts of a statement have been retrieved.- Parameters:
- sender- Statement that called this method
- sqlCounts- SQL counts
 
 
- 
 
-