Package org.apache.derby.client.net
Class ClientJDBCObjectFactoryImpl42
- java.lang.Object
-
- org.apache.derby.client.net.ClientJDBCObjectFactoryImpl
-
- org.apache.derby.client.net.ClientJDBCObjectFactoryImpl42
-
- All Implemented Interfaces:
ClientJDBCObjectFactory
public class ClientJDBCObjectFactoryImpl42 extends ClientJDBCObjectFactoryImpl
Implements the ClientJDBCObjectFactory interface and returns the JDBC 4.2 specific classes.
-
-
Constructor Summary
Constructors Constructor Description ClientJDBCObjectFactoryImpl42()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.sql.BatchUpdateException
newBatchUpdateException(java.lang.String message, java.lang.String sqlState, int errorCode, long[] updateCounts, SqlException cause)
This method is overridden on JVM 8 to take advantage of long update counts.ClientCallableStatement
newCallableStatement(Agent agent, ClientConnection connection, java.lang.String sql, int type, int concurrency, int holdability, ClientPooledConnection cpc)
return a ClientCallableStatement42 objectLogicalCallableStatement
newLogicalCallableStatement(java.sql.CallableStatement cs, StatementKey stmtKey, StatementCacheInteractor cacheInteractor)
Returns a new logical callable statement object.LogicalPreparedStatement
newLogicalPreparedStatement(java.sql.PreparedStatement ps, StatementKey stmtKey, StatementCacheInteractor cacheInteractor)
Returns a new logical prepared statement object.ClientResultSet
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.NetResultSetClientPreparedStatement
newPreparedStatement(Agent agent, ClientConnection 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.ClientPreparedStatement
newPreparedStatement(Agent agent, ClientConnection connection, java.lang.String sql, Section section, ClientPooledConnection cpc)
Returns a PreparedStatement.-
Methods inherited from class org.apache.derby.client.net.ClientJDBCObjectFactoryImpl
newBatchUpdateException, newCachingLogicalConnection, newClientPooledConnection, newClientXAConnection, newColumnMetaData, newColumnMetaData, newLogicalConnection, newNetConnection, newNetConnection, newNetConnection, newNetDatabaseMetaData, newParameterMetaData, newStatement
-
-
-
-
Method Detail
-
newBatchUpdateException
protected java.sql.BatchUpdateException newBatchUpdateException(java.lang.String message, java.lang.String sqlState, int errorCode, long[] updateCounts, SqlException cause)
This method is overridden on JVM 8 to take advantage of long update counts.- Overrides:
newBatchUpdateException
in classClientJDBCObjectFactoryImpl
-
newPreparedStatement
public ClientPreparedStatement newPreparedStatement(Agent agent, ClientConnection connection, java.lang.String sql, Section section, ClientPooledConnection cpc) throws SqlException
Returns a PreparedStatement.- Specified by:
newPreparedStatement
in interfaceClientJDBCObjectFactory
- Overrides:
newPreparedStatement
in classClientJDBCObjectFactoryImpl
- Parameters:
agent
- The instance of NetAgent associated with thisClientCallableStatement
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
- Sectioncpc
- 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 ClientPreparedStatement newPreparedStatement(Agent agent, ClientConnection 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 interfaceClientJDBCObjectFactory
- Overrides:
newPreparedStatement
in classClientJDBCObjectFactoryImpl
- Parameters:
agent
- The instance of NetAgent associated with thisClientCallableStatement
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 form 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 logical prepared statement object.- Specified by:
newLogicalPreparedStatement
in interfaceClientJDBCObjectFactory
- Overrides:
newLogicalPreparedStatement
in classClientJDBCObjectFactoryImpl
- Parameters:
ps
- underlying physical prepared statementstmtKey
- key for the underlying physical prepared statementcacheInteractor
- the statement cache interactor- Returns:
- A logical prepared statement.
-
newNetResultSet
public ClientResultSet 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 interfaceClientJDBCObjectFactory
- Overrides:
newNetResultSet
in classClientJDBCObjectFactoryImpl
- Returns:
- an instance of
NetResultSet
- Throws:
SqlException
-
newCallableStatement
public ClientCallableStatement newCallableStatement(Agent agent, ClientConnection connection, java.lang.String sql, int type, int concurrency, int holdability, ClientPooledConnection cpc) throws SqlException
return a ClientCallableStatement42 object- Specified by:
newCallableStatement
in interfaceClientJDBCObjectFactory
- Overrides:
newCallableStatement
in classClientJDBCObjectFactoryImpl
- Parameters:
agent
- The instance of NetAgent associated with thisClientCallableStatement
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 constantsconcurrency
- One of the ResultSet concurrency constantsholdability
- One of the ResultSet holdability constantscpc
- The PooledConnection object that will be used to notify the PooledConnection reference of the Error Occurred and the Close events.- Returns:
- a
ClientCallableStatement
object - Throws:
SqlException
-
newLogicalCallableStatement
public LogicalCallableStatement newLogicalCallableStatement(java.sql.CallableStatement cs, StatementKey stmtKey, StatementCacheInteractor cacheInteractor)
Returns a new logical callable statement object.- Specified by:
newLogicalCallableStatement
in interfaceClientJDBCObjectFactory
- Overrides:
newLogicalCallableStatement
in classClientJDBCObjectFactoryImpl
- Parameters:
cs
- underlying physical callable statementstmtKey
- key for the underlying physical callable statementcacheInteractor
- the statement cache interactor- Returns:
- A logical callable statement.
-
-