public interface StatementListener
FbStatement.fetchRows(int)
, or
FbStatement.execute(RowValue)
with a singleton result.
All listener methods have a default implementation that does nothing.
Modifier and Type | Method and Description |
---|---|
default void |
afterLast(FbStatement sender)
Method to be notified when the cursor of a statement is positioned after the last row.
|
default void |
beforeFirst(FbStatement sender)
Method to be notified when the cursor of a statement is positioned before the first row.
|
default void |
receivedRow(FbStatement sender,
RowValue rowValue)
Method to be notified of a new row of data.
|
default void |
sqlCounts(FbStatement sender,
SqlCountHolder sqlCounts)
Called when the SQL counts of a statement have been retrieved.
|
default void |
statementExecuted(FbStatement sender,
boolean hasResultSet,
boolean hasSingletonResult)
Method to be notified when a statement has been executed.
|
default void |
statementStateChanged(FbStatement sender,
StatementState newState,
StatementState previousState)
Method to be notified when the state of a statement has changed.
|
default void |
warningReceived(FbStatement sender,
java.sql.SQLWarning warning)
Called when a warning was received for the
sender statement. |
default void receivedRow(FbStatement sender, RowValue rowValue)
Listeners that process beforeFirst(FbStatement)
and/or afterLast(FbStatement)
should consider
calls to this method to clear the before-first or after-last state to an
sender
- The FbStatement
that called this method.rowValue
- The row values.default void beforeFirst(FbStatement sender)
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.
sender
- The FbStatement
that called this method.statementExecuted(FbStatement, boolean, boolean)
,
receivedRow(FbStatement, RowValue)
,
afterLast(FbStatement)
default void afterLast(FbStatement sender)
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.
sender
- The FbStatement
that called this method.statementExecuted(FbStatement, boolean, boolean)
,
receivedRow(FbStatement, RowValue)
,
beforeFirst(FbStatement)
default void statementExecuted(FbStatement sender, boolean hasResultSet, boolean hasSingletonResult)
This event with hasResultSet=true
can be seen as a counterpart of afterLast(FbStatement)
.
sender
- The FbStatement
that called this method.hasResultSet
- true
there is a result set, false
there is no result sethasSingletonResult
- true
singleton result, false
statement will produce indeterminate number of rows;
can be ignored when hasResultSet
is false
.default void statementStateChanged(FbStatement sender, StatementState newState, StatementState previousState)
sender
- The FbStatement
that called this method.newState
- The new state of the statementpreviousState
- The old state of the statementdefault void warningReceived(FbStatement sender, java.sql.SQLWarning warning)
sender
statement.sender
- Statement receiving the warningwarning
- Warningdefault void sqlCounts(FbStatement sender, SqlCountHolder sqlCounts)
sender
- Statement that called this methodsqlCounts
- SQL countsCopyright © 2001-2023 Jaybird (Firebird JDBC) team. All rights reserved.