public final class StatementListenerDispatcher extends AbstractListenerDispatcher<StatementListener> implements StatementListener
StatementListener
.Constructor and Description |
---|
StatementListenerDispatcher() |
Modifier and Type | Method and Description |
---|---|
void |
afterLast(FbStatement sender)
Method to be notified when the cursor of a statement is positioned after the last row.
|
void |
beforeFirst(FbStatement sender)
Method to be notified when the cursor of a statement is positioned before the first row.
|
protected void |
logError(java.lang.String message,
java.lang.Throwable throwable) |
void |
receivedRow(FbStatement sender,
RowValue rowValue)
Method to be notified of a new row of data.
|
void |
sqlCounts(FbStatement sender,
SqlCountHolder sqlCounts)
Called when the SQL counts of a statement have been retrieved.
|
void |
statementExecuted(FbStatement sender,
boolean hasResultSet,
boolean hasSingletonResult)
Method to be notified when a statement has been executed.
|
void |
statementStateChanged(FbStatement sender,
StatementState newState,
StatementState previousState)
Method to be notified when the state of a statement has changed.
|
void |
warningReceived(FbStatement sender,
java.sql.SQLWarning warning)
Called when a warning was received for the
sender statement. |
addListener, addWeakListener, isShutdown, iterator, notify, removeAllListeners, removeListener, shutdown
public void receivedRow(FbStatement sender, RowValue rowValue)
StatementListener
Listeners that process StatementListener.beforeFirst(FbStatement)
and/or StatementListener.afterLast(FbStatement)
should consider
calls to this method to clear the before-first or after-last state to an
receivedRow
in interface StatementListener
sender
- The FbStatement
that called this method.rowValue
- The row values.public void beforeFirst(FbStatement sender)
StatementListener
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.
beforeFirst
in interface StatementListener
sender
- The FbStatement
that called this method.StatementListener.statementExecuted(FbStatement, boolean, boolean)
,
StatementListener.receivedRow(FbStatement, RowValue)
,
StatementListener.afterLast(FbStatement)
public void afterLast(FbStatement sender)
StatementListener
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.
afterLast
in interface StatementListener
sender
- The FbStatement
that called this method.StatementListener.statementExecuted(FbStatement, boolean, boolean)
,
StatementListener.receivedRow(FbStatement, RowValue)
,
StatementListener.beforeFirst(FbStatement)
public void statementExecuted(FbStatement sender, boolean hasResultSet, boolean hasSingletonResult)
StatementListener
This event with hasResultSet=true
can be seen as a counterpart of StatementListener.afterLast(FbStatement)
.
statementExecuted
in interface StatementListener
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
.public void statementStateChanged(FbStatement sender, StatementState newState, StatementState previousState)
StatementListener
statementStateChanged
in interface StatementListener
sender
- The FbStatement
that called this method.newState
- The new state of the statementpreviousState
- The old state of the statementpublic void warningReceived(FbStatement sender, java.sql.SQLWarning warning)
StatementListener
sender
statement.warningReceived
in interface StatementListener
sender
- Statement receiving the warningwarning
- Warningpublic void sqlCounts(FbStatement sender, SqlCountHolder sqlCounts)
StatementListener
sqlCounts
in interface StatementListener
sender
- Statement that called this methodsqlCounts
- SQL countsprotected void logError(java.lang.String message, java.lang.Throwable throwable)
logError
in class AbstractListenerDispatcher<StatementListener>
Copyright © 2001-2024 Jaybird (Firebird JDBC) team. All rights reserved.