org.apache.derby.client.net
Class ClientJDBCObjectFactoryImpl40

java.lang.Object
  extended by org.apache.derby.client.net.ClientJDBCObjectFactoryImpl
      extended by org.apache.derby.client.net.ClientJDBCObjectFactoryImpl40
All Implemented Interfaces:
ClientJDBCObjectFactory

public class ClientJDBCObjectFactoryImpl40
extends ClientJDBCObjectFactoryImpl

Implements the ClientJDBCObjectFactory interface and returns the JDBC 4.0 specific classes. If specific classes are not needed for JDBC 4.0, the calls are delegated to ClientJDBCObjectFactoryImpl by inheritance.


Constructor Summary
ClientJDBCObjectFactoryImpl40()
          Sets SQLExceptionFactpry40 om SqlException to make sure jdbc40 exception and sub classes are thrown when running with jdbc4.0 support
 
Method Summary
 LogicalConnection newCachingLogicalConnection(Connection physicalConnection, ClientPooledConnection pooledConnection, JDBCStatementCache stmtCache)
          Returns an instance of a CachingLogicalConnection, which provides caching of prepared statements.
 CallableStatement newCallableStatement(Agent agent, Connection connection, java.lang.String sql, int type, int concurrency, int holdability, ClientPooledConnection cpc)
          Returns an instance of org.apache.derby.client.am.CallableStatement.
 ClientPooledConnection newClientPooledConnection(ClientBaseDataSourceRoot ds, LogWriter logWriter, java.lang.String user, java.lang.String password)
          Returns an instance of org.apache.derby.client.ClientPooledConnection40
 ClientPooledConnection newClientPooledConnection(ClientBaseDataSourceRoot ds, LogWriter logWriter, java.lang.String user, java.lang.String password, int rmId)
          Returns an instance of org.apache.derby.client.ClientPooledConnection40
 ClientXAConnection newClientXAConnection(ClientBaseDataSourceRoot ds, LogWriter logWriter, java.lang.String user, java.lang.String password)
          Returns an instance of org.apache.derby.client.ClientXAConnection40
 LogicalCallableStatement newLogicalCallableStatement(java.sql.CallableStatement cs, StatementKey stmtKey, StatementCacheInteractor cacheInteractor)
          Returns a new logical callable statement object.
 LogicalConnection newLogicalConnection(Connection physicalConnection, ClientPooledConnection pooledConnection)
          Returns an instance of LogicalConnection.
 LogicalPreparedStatement newLogicalPreparedStatement(java.sql.PreparedStatement ps, StatementKey stmtKey, StatementCacheInteractor cacheInteractor)
          Returns a new logcial prepared statement object.
 Connection newNetConnection(LogWriter netLogWriter, ClientBaseDataSourceRoot clientDataSource, java.lang.String user, java.lang.String password)
          returns an instance of org.apache.derby.client.net.NetConnection40
 Connection newNetConnection(LogWriter netLogWriter, int driverManagerLoginTimeout, java.lang.String serverName, int portNumber, java.lang.String databaseName, java.util.Properties properties)
          returns an instance of org.apache.derby.client.net.NetConnection40
 Connection newNetConnection(LogWriter netLogWriter, java.lang.String ipaddr, int portNumber, ClientBaseDataSourceRoot dataSource, boolean isXAConn)
          returns an instance of org.apache.derby.client.net.NetConnection40
 Connection newNetConnection(LogWriter netLogWriter, java.lang.String databaseName, java.util.Properties properties)
          returns an instance of org.apache.derby.client.net.NetConnection40
 Connection newNetConnection(LogWriter netLogWriter, java.lang.String user, java.lang.String password, ClientBaseDataSourceRoot dataSource, int rmId, boolean isXAConn)
          returns an instance of org.apache.derby.client.net.NetConnection40
 Connection newNetConnection(LogWriter netLogWriter, java.lang.String user, java.lang.String password, ClientBaseDataSourceRoot dataSource, int rmId, boolean isXAConn, ClientPooledConnection cpc)
          Returns an instance of org.apache.derby.client.net.NetConnection.
 DatabaseMetaData newNetDatabaseMetaData(Agent netAgent, Connection netConnection)
          returns an instance of org.apache.derby.client.net.NetDatabaseMetaData
 ResultSet newNetResultSet(Agent netAgent, MaterialStatement netStatement, Cursor cursor, int qryprctyp, int sqlcsrhld, int qryattscr, int qryattsns, int qryattset, long qryinsid, int actualResultSetType, int actualResultSetConcurrency, int actualResultSetHoldability)
          returns an instance of org.apache.derby.client.net.NetResultSet
 PreparedStatement newPreparedStatement(Agent agent, Connection connection, java.lang.String sql, int type, int concurrency, int holdability, int autoGeneratedKeys, java.lang.String[] columnNames, int[] columnIndexes, ClientPooledConnection cpc)
          This method returns an instance of PreparedStatement which implements java.sql.PreparedStatement.
 PreparedStatement newPreparedStatement(Agent agent, Connection connection, java.lang.String sql, Section section, ClientPooledConnection cpc)
          Returns an instance of org.apache.derby.client.am.CallableStatement40
 
Methods inherited from class org.apache.derby.client.net.ClientJDBCObjectFactoryImpl
newBatchUpdateException, newBatchUpdateException, newColumnMetaData, newColumnMetaData, newParameterMetaData, newStatement, newStatement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientJDBCObjectFactoryImpl40

public ClientJDBCObjectFactoryImpl40()
Sets SQLExceptionFactpry40 om SqlException to make sure jdbc40 exception and sub classes are thrown when running with jdbc4.0 support

Method Detail

newClientPooledConnection

public ClientPooledConnection newClientPooledConnection(ClientBaseDataSourceRoot ds,
                                                        LogWriter logWriter,
                                                        java.lang.String user,
                                                        java.lang.String password)
                                                 throws java.sql.SQLException
Returns an instance of org.apache.derby.client.ClientPooledConnection40

Specified by:
newClientPooledConnection in interface ClientJDBCObjectFactory
Overrides:
newClientPooledConnection in class ClientJDBCObjectFactoryImpl
Throws:
java.sql.SQLException

newClientPooledConnection

public ClientPooledConnection newClientPooledConnection(ClientBaseDataSourceRoot ds,
                                                        LogWriter logWriter,
                                                        java.lang.String user,
                                                        java.lang.String password,
                                                        int rmId)
                                                 throws java.sql.SQLException
Returns an instance of org.apache.derby.client.ClientPooledConnection40

Specified by:
newClientPooledConnection in interface ClientJDBCObjectFactory
Overrides:
newClientPooledConnection in class ClientJDBCObjectFactoryImpl
Throws:
java.sql.SQLException

newClientXAConnection

public ClientXAConnection newClientXAConnection(ClientBaseDataSourceRoot ds,
                                                LogWriter logWriter,
                                                java.lang.String user,
                                                java.lang.String password)
                                         throws java.sql.SQLException
Returns an instance of org.apache.derby.client.ClientXAConnection40

Specified by:
newClientXAConnection in interface ClientJDBCObjectFactory
Overrides:
newClientXAConnection in class ClientJDBCObjectFactoryImpl
Throws:
java.sql.SQLException

newCallableStatement

public CallableStatement newCallableStatement(Agent agent,
                                              Connection connection,
                                              java.lang.String sql,
                                              int type,
                                              int concurrency,
                                              int holdability,
                                              ClientPooledConnection cpc)
                                       throws SqlException
Returns an instance of org.apache.derby.client.am.CallableStatement.

Specified by:
newCallableStatement in interface ClientJDBCObjectFactory
Overrides:
newCallableStatement in class ClientJDBCObjectFactoryImpl
Parameters:
agent - The instance of NetAgent associated with this CallableStatement object.
connection - The connection object associated with this PreparedStatement Object.
sql - A String object that is the SQL statement to be sent to the database.
type - One of the ResultSet type constants
concurrency - One of the ResultSet concurrency constants
holdability - One of the ResultSet holdability constants
cpc - The PooledConnection object that will be used to notify the PooledConnection reference of the Error Occurred and the Close events.
Returns:
a CallableStatement object
Throws:
SqlException

newLogicalConnection

public LogicalConnection newLogicalConnection(Connection physicalConnection,
                                              ClientPooledConnection pooledConnection)
                                       throws SqlException
Returns an instance of LogicalConnection. This method returns an instance of LogicalConnection (or LogicalConnection40) which implements java.sql.Connection.

Specified by:
newLogicalConnection in interface ClientJDBCObjectFactory
Overrides:
newLogicalConnection in class ClientJDBCObjectFactoryImpl
Throws:
SqlException

newCachingLogicalConnection

public LogicalConnection newCachingLogicalConnection(Connection physicalConnection,
                                                     ClientPooledConnection pooledConnection,
                                                     JDBCStatementCache stmtCache)
                                              throws SqlException
Returns an instance of a CachingLogicalConnection, which provides caching of prepared statements.

Specified by:
newCachingLogicalConnection in interface ClientJDBCObjectFactory
Overrides:
newCachingLogicalConnection in class ClientJDBCObjectFactoryImpl
Parameters:
physicalConnection - the underlying physical connection
pooledConnection - the pooled connection
stmtCache - statement cache
Returns:
A logical connection with statement caching capabilities.
Throws:
SqlException - if creation of the logical connection fails

newPreparedStatement

public PreparedStatement newPreparedStatement(Agent agent,
                                              Connection connection,
                                              java.lang.String sql,
                                              Section section,
                                              ClientPooledConnection cpc)
                                       throws SqlException
Returns an instance of org.apache.derby.client.am.CallableStatement40

Specified by:
newPreparedStatement in interface ClientJDBCObjectFactory
Overrides:
newPreparedStatement in class ClientJDBCObjectFactoryImpl
Parameters:
agent - The instance of NetAgent associated with this CallableStatement object.
connection - The connection object associated with this PreparedStatement Object.
sql - A String object that is the SQL statement to be sent to the database.
section - Section
cpc - The ClientPooledConnection wraps the underlying physical connection associated with this prepared statement. It is used to pass the Statement closed and the Statement error occurred events that occur back to the ClientPooledConnection.
Returns:
a PreparedStatement object
Throws:
SqlException

newPreparedStatement

public PreparedStatement newPreparedStatement(Agent agent,
                                              Connection connection,
                                              java.lang.String sql,
                                              int type,
                                              int concurrency,
                                              int holdability,
                                              int autoGeneratedKeys,
                                              java.lang.String[] columnNames,
                                              int[] columnIndexes,
                                              ClientPooledConnection cpc)
                                       throws SqlException
This method returns an instance of PreparedStatement which implements java.sql.PreparedStatement. It has the ClientPooledConnection as one of its parameters this is used to raise the Statement Events when the prepared statement is closed.

Specified by:
newPreparedStatement in interface ClientJDBCObjectFactory
Overrides:
newPreparedStatement in class ClientJDBCObjectFactoryImpl
Parameters:
agent - The instance of NetAgent associated with this CallableStatement object.
connection - The connection object associated with this PreparedStatement Object.
sql - A String object that is the SQL statement to be sent to the database.
type - One of the ResultSet type constants.
concurrency - One of the ResultSet concurrency constants.
holdability - One of the ResultSet holdability constants.
autoGeneratedKeys - a flag indicating whether auto-generated keys should be returned.
columnNames - an array of column names indicating the columns that should be returned from the inserted row or rows.
columnIndexes - an array of column indexes indicating the columns that should be returned from the inserted row.
cpc - The ClientPooledConnection wraps the underlying physical connection associated with this prepared statement it is used to pass the Statement closed and the Statement error occurred events that occur back to the ClientPooledConnection.
Returns:
a PreparedStatement object
Throws:
SqlException

newLogicalPreparedStatement

public LogicalPreparedStatement newLogicalPreparedStatement(java.sql.PreparedStatement ps,
                                                            StatementKey stmtKey,
                                                            StatementCacheInteractor cacheInteractor)
Returns a new logcial prepared statement object.

Specified by:
newLogicalPreparedStatement in interface ClientJDBCObjectFactory
Overrides:
newLogicalPreparedStatement in class ClientJDBCObjectFactoryImpl
Parameters:
ps - underlying physical prepared statement
stmtKey - key for the underlying physical prepared statement
cacheInteractor - the statement cache interactor
Returns:
A logical prepared statement.

newLogicalCallableStatement

public LogicalCallableStatement newLogicalCallableStatement(java.sql.CallableStatement cs,
                                                            StatementKey stmtKey,
                                                            StatementCacheInteractor cacheInteractor)
Returns a new logical callable statement object.

Specified by:
newLogicalCallableStatement in interface ClientJDBCObjectFactory
Overrides:
newLogicalCallableStatement in class ClientJDBCObjectFactoryImpl
Parameters:
cs - underlying physical callable statement
stmtKey - key for the underlying physical callable statement
cacheInteractor - the statement cache interactor
Returns:
A logical callable statement.

newNetConnection

public Connection newNetConnection(LogWriter netLogWriter,
                                   java.lang.String databaseName,
                                   java.util.Properties properties)
                            throws SqlException
returns an instance of org.apache.derby.client.net.NetConnection40

Specified by:
newNetConnection in interface ClientJDBCObjectFactory
Overrides:
newNetConnection in class ClientJDBCObjectFactoryImpl
Throws:
SqlException

newNetConnection

public Connection newNetConnection(LogWriter netLogWriter,
                                   ClientBaseDataSourceRoot clientDataSource,
                                   java.lang.String user,
                                   java.lang.String password)
                            throws SqlException
returns an instance of org.apache.derby.client.net.NetConnection40

Specified by:
newNetConnection in interface ClientJDBCObjectFactory
Overrides:
newNetConnection in class ClientJDBCObjectFactoryImpl
Throws:
SqlException

newNetConnection

public Connection newNetConnection(LogWriter netLogWriter,
                                   int driverManagerLoginTimeout,
                                   java.lang.String serverName,
                                   int portNumber,
                                   java.lang.String databaseName,
                                   java.util.Properties properties)
                            throws SqlException
returns an instance of org.apache.derby.client.net.NetConnection40

Specified by:
newNetConnection in interface ClientJDBCObjectFactory
Overrides:
newNetConnection in class ClientJDBCObjectFactoryImpl
Throws:
SqlException

newNetConnection

public Connection newNetConnection(LogWriter netLogWriter,
                                   java.lang.String user,
                                   java.lang.String password,
                                   ClientBaseDataSourceRoot dataSource,
                                   int rmId,
                                   boolean isXAConn)
                            throws SqlException
returns an instance of org.apache.derby.client.net.NetConnection40

Specified by:
newNetConnection in interface ClientJDBCObjectFactory
Overrides:
newNetConnection in class ClientJDBCObjectFactoryImpl
Throws:
SqlException

newNetConnection

public Connection newNetConnection(LogWriter netLogWriter,
                                   java.lang.String ipaddr,
                                   int portNumber,
                                   ClientBaseDataSourceRoot dataSource,
                                   boolean isXAConn)
                            throws SqlException
returns an instance of org.apache.derby.client.net.NetConnection40

Specified by:
newNetConnection in interface ClientJDBCObjectFactory
Overrides:
newNetConnection in class ClientJDBCObjectFactoryImpl
Throws:
SqlException

newNetConnection

public Connection newNetConnection(LogWriter netLogWriter,
                                   java.lang.String user,
                                   java.lang.String password,
                                   ClientBaseDataSourceRoot dataSource,
                                   int rmId,
                                   boolean isXAConn,
                                   ClientPooledConnection cpc)
                            throws SqlException
Returns an instance of org.apache.derby.client.net.NetConnection.

Specified by:
newNetConnection in interface ClientJDBCObjectFactory
Overrides:
newNetConnection in class ClientJDBCObjectFactoryImpl
Parameters:
netLogWriter - placeholder for NetLogWriter object associated with this connection
user - user id for this connection
password - password for this connection
dataSource - The DataSource object passed from the PooledConnection object from which this constructor was called
rmId - The Resource Manager ID for XA Connections
isXAConn - true if this is a XA connection
cpc - The ClientPooledConnection object from which this NetConnection constructor was called. This is used to pass StatementEvents back to the pooledConnection object
Returns:
a org.apache.derby.client.am.Connection object
Throws:
SqlException

newNetResultSet

public ResultSet newNetResultSet(Agent netAgent,
                                 MaterialStatement netStatement,
                                 Cursor cursor,
                                 int qryprctyp,
                                 int sqlcsrhld,
                                 int qryattscr,
                                 int qryattsns,
                                 int qryattset,
                                 long qryinsid,
                                 int actualResultSetType,
                                 int actualResultSetConcurrency,
                                 int actualResultSetHoldability)
                          throws SqlException
returns an instance of org.apache.derby.client.net.NetResultSet

Specified by:
newNetResultSet in interface ClientJDBCObjectFactory
Overrides:
newNetResultSet in class ClientJDBCObjectFactoryImpl
Throws:
SqlException

newNetDatabaseMetaData

public DatabaseMetaData newNetDatabaseMetaData(Agent netAgent,
                                               Connection netConnection)
returns an instance of org.apache.derby.client.net.NetDatabaseMetaData

Specified by:
newNetDatabaseMetaData in interface ClientJDBCObjectFactory
Overrides:
newNetDatabaseMetaData in class ClientJDBCObjectFactoryImpl

Built on Wed 2013-06-12 15:21:56+0000, from revision ???

Apache Derby V10.10 Internals - Copyright © 2004,2013 The Apache Software Foundation. All Rights Reserved.