Package org.firebirdsql.gds.ng.listeners

## Class DefaultStatementListener

- java.lang.Object
- - org.firebirdsql.gds.ng.listeners.DefaultStatementListener

All Implemented Interfaces:
  `StatementListener`

    public class DefaultStatementListener
    extends java.lang.Object
    implements StatementListener

Default implementation of `StatementListener` where all implemented methods do nothing.

Since:
  3.0
Author:
  Mark Rotteveel

### Constructor Summary

Constructors
`DefaultStatementListener()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `allRowsFetched​(FbStatement sender)` Method to be notified when all rows have been fetched.
`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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### DefaultStatementListener

    public DefaultStatementListener()

### Method Detail

#### receivedRow

    public void receivedRow​(FbStatement sender,
                            RowValue rowValue)

Description copied from interface: `StatementListener`
Method to be notified of a new row of data.

Specified by:
  `receivedRow` in interface `StatementListener`
Parameters:
  `sender` - The `FbStatement` that called this method.
  `rowValue` - The row values.

#### allRowsFetched

    public void allRowsFetched​(FbStatement sender)

Description copied from interface: `StatementListener`
Method to be notified when all rows have been fetched.

This method may also be called when the statement did not produce any rows (or did not open a result set).

Specified by:
  `allRowsFetched` in interface `StatementListener`
Parameters:
  `sender` - The `FbStatement` that called this method.
See Also:
  `StatementListener.statementExecuted(FbStatement, boolean, boolean)`

#### statementExecuted

    public void statementExecuted​(FbStatement sender,
                                  boolean hasResultSet,
                                  boolean hasSingletonResult)

Description copied from interface: `StatementListener`
Method to be notified when a statement has been executed.

This event with `hasResultSet=true` can be seen as the counter part of `StatementListener.allRowsFetched(FbStatement)`.

Specified by:
  `statementExecuted` in interface `StatementListener`
Parameters:
  `sender` - The `FbStatement` that called this method.
  `hasResultSet` - `true` there is a result set, `false` there is no result set
  `hasSingletonResult` - `true` singleton result, `false` statement will produce indeterminate number of rows; can be ignored when `hasResultSet` is false.

#### statementStateChanged

    public void statementStateChanged​(FbStatement sender,
                                      StatementState newState,
                                      StatementState previousState)

Description copied from interface: `StatementListener`
Method to be notified when the state of a statement has changed.

Specified by:
  `statementStateChanged` in interface `StatementListener`
Parameters:
  `sender` - The `FbStatement` that called this method.
  `newState` - The new state of the statement
  `previousState` - The old state of the statement

#### warningReceived

    public void warningReceived​(FbStatement sender,
                                java.sql.SQLWarning warning)

Description copied from interface: `StatementListener`
Called when a warning was received for the `sender` statement.

Specified by:
  `warningReceived` in interface `StatementListener`
Parameters:
  `sender` - Statement receiving the warning
  `warning` - Warning

#### sqlCounts

    public void sqlCounts​(FbStatement sender,
                          SqlCountHolder sqlCounts)

Description copied from interface: `StatementListener`
Called when the SQL counts of a statement have been retrieved.

Specified by:
  `sqlCounts` in interface `StatementListener`
Parameters:
  `sender` - Statement that called this method
  `sqlCounts` - SQL counts