public class ClientJDBCObjectFactoryImpl extends java.lang.Object implements ClientJDBCObjectFactory
| Modifier and Type | Field and Description |
|---|---|
private static MessageUtil |
msgutil_
The message utility instance we use to find messages
It's primed with the name of the client message bundle so that
it knows to look there if the message isn't found in the
shared message bundle.
|
| Constructor and Description |
|---|
ClientJDBCObjectFactoryImpl() |
| Modifier and Type | Method and Description |
|---|---|
java.sql.BatchUpdateException |
newBatchUpdateException(LogWriter logWriter,
ClientMessageId msgid,
java.lang.Object[] args,
long[] updateCounts,
SqlException cause)
Creates a BatchUpdateException depending on the JVM level.
|
protected java.sql.BatchUpdateException |
newBatchUpdateException(java.lang.String message,
java.lang.String sqlState,
int errorCode,
long[] updateCounts,
SqlException cause)
This method is overriden on JVM 8
|
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.ClientPooledConnection
|
ClientPooledConnection |
newClientPooledConnection(ClientBaseDataSourceRoot ds,
LogWriter logWriter,
java.lang.String user,
java.lang.String password,
int rmId)
Returns an instance of org.apache.derby.client.ClientPooledConnection
|
ClientXAConnection |
newClientXAConnection(ClientBaseDataSourceRoot ds,
LogWriter logWriter,
java.lang.String user,
java.lang.String password)
Returns an instance of org.apache.derby.client.ClientXAConnection
|
ColumnMetaData |
newColumnMetaData(LogWriter logWriter)
Returns an instanceof ColumnMetaData
|
ColumnMetaData |
newColumnMetaData(LogWriter logWriter,
int upperBound)
Returns an instanceof ColumnMetaData or ColumnMetaData40 depending
on the jdk version under use
|
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 org.apache.derby.client.am.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.NetConnection
|
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.NetConnection
|
Connection |
newNetConnection(LogWriter netLogWriter,
java.lang.String ipaddr,
int portNumber,
ClientBaseDataSourceRoot dataSource,
boolean isXAConn)
returns an instance of org.apache.derby.client.net.NetConnection
|
Connection |
newNetConnection(LogWriter netLogWriter,
java.lang.String databaseName,
java.util.Properties properties)
returns an instance of org.apache.derby.client.net.NetConnection
|
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.NetConnection
|
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
|
ParameterMetaData |
newParameterMetaData(ColumnMetaData columnMetaData)
returns an instance of ParameterMetaData
|
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)
This method returns an instance of PreparedStatement
which implements java.sql.PreparedStatement.
|
Statement |
newStatement(Agent agent,
Connection connection)
This method provides an instance of Statement
|
Statement |
newStatement(Agent agent,
Connection connection,
int type,
int concurrency,
int holdability,
int autoGeneratedKeys,
java.lang.String[] columnNames,
int[] columnIndexes)
This method provides an instance of Statement
|
private static final MessageUtil msgutil_
public ClientPooledConnection newClientPooledConnection(ClientBaseDataSourceRoot ds, LogWriter logWriter, java.lang.String user, java.lang.String password) throws java.sql.SQLException
newClientPooledConnection in interface ClientJDBCObjectFactoryjava.sql.SQLExceptionpublic ClientPooledConnection newClientPooledConnection(ClientBaseDataSourceRoot ds, LogWriter logWriter, java.lang.String user, java.lang.String password, int rmId) throws java.sql.SQLException
newClientPooledConnection in interface ClientJDBCObjectFactoryjava.sql.SQLExceptionpublic ClientXAConnection newClientXAConnection(ClientBaseDataSourceRoot ds, LogWriter logWriter, java.lang.String user, java.lang.String password) throws java.sql.SQLException
newClientXAConnection in interface ClientJDBCObjectFactoryjava.sql.SQLExceptionpublic CallableStatement newCallableStatement(Agent agent, Connection connection, java.lang.String sql, int type, int concurrency, int holdability, ClientPooledConnection cpc) throws SqlException
newCallableStatement in interface ClientJDBCObjectFactoryagent - 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 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.SqlExceptionpublic LogicalConnection newLogicalConnection(Connection physicalConnection, ClientPooledConnection pooledConnection) throws SqlException
newLogicalConnection in interface ClientJDBCObjectFactorySqlExceptionpublic LogicalConnection newCachingLogicalConnection(Connection physicalConnection, ClientPooledConnection pooledConnection, JDBCStatementCache stmtCache) throws SqlException
CachingLogicalConnection, which
provides caching of prepared statements.newCachingLogicalConnection in interface ClientJDBCObjectFactoryphysicalConnection - the underlying physical connectionpooledConnection - the pooled connectionstmtCache - statement cacheSqlException - if creation of the logical connection failspublic PreparedStatement newPreparedStatement(Agent agent, Connection connection, java.lang.String sql, Section section, ClientPooledConnection cpc) throws SqlException
newPreparedStatement in interface ClientJDBCObjectFactoryagent - 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 - 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.SqlExceptionpublic 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
newPreparedStatement in interface ClientJDBCObjectFactoryagent - 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.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.columnIndexes - an array of column indexes indicating the columns
that should be returned form the inserted row.SqlExceptionpublic LogicalPreparedStatement newLogicalPreparedStatement(java.sql.PreparedStatement ps, StatementKey stmtKey, StatementCacheInteractor cacheInteractor)
newLogicalPreparedStatement in interface ClientJDBCObjectFactoryps - underlying physical prepared statementstmtKey - key for the underlying physical prepared statementcacheInteractor - the statement cache interactorpublic LogicalCallableStatement newLogicalCallableStatement(java.sql.CallableStatement cs, StatementKey stmtKey, StatementCacheInteractor cacheInteractor)
newLogicalCallableStatement in interface ClientJDBCObjectFactorycs - underlying physical callable statementstmtKey - key for the underlying physical callable statementcacheInteractor - the statement cache interactorpublic Connection newNetConnection(LogWriter netLogWriter, java.lang.String databaseName, java.util.Properties properties) throws SqlException
newNetConnection in interface ClientJDBCObjectFactorySqlExceptionpublic Connection newNetConnection(LogWriter netLogWriter, ClientBaseDataSourceRoot clientDataSource, java.lang.String user, java.lang.String password) throws SqlException
newNetConnection in interface ClientJDBCObjectFactorySqlExceptionpublic Connection newNetConnection(LogWriter netLogWriter, int driverManagerLoginTimeout, java.lang.String serverName, int portNumber, java.lang.String databaseName, java.util.Properties properties) throws SqlException
newNetConnection in interface ClientJDBCObjectFactorySqlExceptionpublic Connection newNetConnection(LogWriter netLogWriter, java.lang.String user, java.lang.String password, ClientBaseDataSourceRoot dataSource, int rmId, boolean isXAConn) throws SqlException
newNetConnection in interface ClientJDBCObjectFactorySqlExceptionpublic Connection newNetConnection(LogWriter netLogWriter, java.lang.String ipaddr, int portNumber, ClientBaseDataSourceRoot dataSource, boolean isXAConn) throws SqlException
newNetConnection in interface ClientJDBCObjectFactorySqlExceptionpublic Connection newNetConnection(LogWriter netLogWriter, java.lang.String user, java.lang.String password, ClientBaseDataSourceRoot dataSource, int rmId, boolean isXAConn, ClientPooledConnection cpc) throws SqlException
newNetConnection in interface ClientJDBCObjectFactorynetLogWriter - 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 ConnectionsisXAConn - true if this is a XA connectioncpc - The ClientPooledConnection object from which this
NetConnection constructor was called. This is used to
pass StatementEvents back to the pooledConnection
object.SqlExceptionpublic 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
newNetResultSet in interface ClientJDBCObjectFactorySqlExceptionpublic DatabaseMetaData newNetDatabaseMetaData(Agent netAgent, Connection netConnection)
newNetDatabaseMetaData in interface ClientJDBCObjectFactorypublic Statement newStatement(Agent agent, Connection connection) throws SqlException
newStatement in interface ClientJDBCObjectFactoryagent - Agentconnection - ConnectionSqlExceptionpublic Statement newStatement(Agent agent, Connection connection, int type, int concurrency, int holdability, int autoGeneratedKeys, java.lang.String[] columnNames, int[] columnIndexes) throws SqlException
newStatement in interface ClientJDBCObjectFactoryagent - Agentconnection - Connectiontype - intconcurrency - intholdability - intautoGeneratedKeys - intcolumnNames - String[]columnIndexes - int[]SqlExceptionpublic ColumnMetaData newColumnMetaData(LogWriter logWriter)
newColumnMetaData in interface ClientJDBCObjectFactorylogWriter - LogWriterpublic ColumnMetaData newColumnMetaData(LogWriter logWriter, int upperBound)
newColumnMetaData in interface ClientJDBCObjectFactorylogWriter - LogWriterupperBound - intpublic ParameterMetaData newParameterMetaData(ColumnMetaData columnMetaData)
newParameterMetaData in interface ClientJDBCObjectFactorycolumnMetaData - ColumnMetaDatapublic java.sql.BatchUpdateException newBatchUpdateException(LogWriter logWriter, ClientMessageId msgid, java.lang.Object[] args, long[] updateCounts, SqlException cause)
newBatchUpdateException in interface ClientJDBCObjectFactoryprotected java.sql.BatchUpdateException newBatchUpdateException(java.lang.String message,
java.lang.String sqlState,
int errorCode,
long[] updateCounts,
SqlException cause)
Apache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.