org.firebirdsql.pool
Interface XStatementManager

All Known Implementing Classes:
AbstractPingablePooledConnection

public interface XStatementManager

Manager of prepared statement. This interface defines an entity that is able to prepare SQL statements. Also this instance is notified when statement is closed.

Currently only PingablePooledConnection is implementing this interface.

Author:
Roman Rokytskyy

Method Summary
 org.firebirdsql.pool.XCachablePreparedStatement prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency, boolean cached)
          Prepare specified SQL statement.
 void statementClosed(java.lang.String statement, java.lang.Object proxy)
          Notify about statement close.
 

Method Detail

prepareStatement

public org.firebirdsql.pool.XCachablePreparedStatement prepareStatement(java.lang.String sql,
                                                                        int resultSetType,
                                                                        int resultSetConcurrency,
                                                                        boolean cached)
                                                                 throws java.sql.SQLException
Prepare specified SQL statement. This method should call Connection.prepareStatement(String) method on physical JDBC connection.

Parameters:
sql - SQL statement to prepare.
resultSetType - type of result set
resultSetConcurrency - result set concurrency
cached - true if prepared statement will be cached.
Returns:
instance of PreparedStatement corresponding to the specified SQL statement.
Throws:
java.sql.SQLException - if something went wrong.
See Also:
Connection.prepareStatement(java.lang.String, int, int)

statementClosed

public void statementClosed(java.lang.String statement,
                            java.lang.Object proxy)
                     throws java.sql.SQLException
Notify about statement close.

Parameters:
statement - SQL statement of an object that is being closed.
proxy - proxy on which Statement.close() method was called.
Throws:
java.sql.SQLException - if something went wrong.


Copyright © 2001 David Jencks and other authors. All rights reserved.