Top Description Fields Constructors Methods
org.apache.derby.client.net

public Class ClientJDBCObjectFactoryImpl

extends Object
implements ClientJDBCObjectFactory
Class Inheritance
All Implemented Interfaces
org.apache.derby.client.am.ClientJDBCObjectFactory
Known Direct Subclasses
org.apache.derby.client.net.ClientJDBCObjectFactoryImpl42
Imports
java.sql.BatchUpdateException, .CallableStatement, .PreparedStatement, .SQLException, java.util.Properties, org.apache.derby.client.ClientPooledConnection, .ClientXAConnection, .BasicClientDataSource, org.apache.derby.client.am.CachingLogicalConnection, .ClientCallableStatement, .ClientJDBCObjectFactory, .ClientMessageId, .LogicalConnection, .ClientParameterMetaData, .ClientPreparedStatement, .LogicalCallableStatement, .LogicalPreparedStatement, .LogWriter, .Agent, .Section, .ClientStatement, .SqlException, .Cursor, .ColumnMetaData, .ClientConnection, .ClientDatabaseMetaData, .MaterialStatement, .ClientResultSet, .StatementCacheInteractor, .Utils, org.apache.derby.client.am.stmtcache.JDBCStatementCache, .StatementKey, org.apache.derby.shared.common.i18n.MessageUtil, org.apache.derby.shared.common.error.ExceptionUtil

Implements the the ClientJDBCObjectFactory interface and returns the classes that implement the JDBC3.0/2.0 interfaces For example, newCallableStatement would return ClientCallableStatement

Field Summary

Modifier and TypeField and Description
private static final 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 Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public BatchUpdateException
newBatchUpdateException(LogWriter
Machinery for writing log messages
logWriter
,
ClientMessageId
Client message handle
msgid
,
Object[]
Arguments to be plugged into the message
args
,
long[]
Update counts to include in message
updateCounts
,
SqlException
Original exception
cause
)

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newBatchUpdateException.

Creates a BatchUpdateException depending on the JVM level.
protected BatchUpdateException

Returns:

a batch update exception
newBatchUpdateException
(String
The message to put in the exception
message
,
String
The SQLState to put in the exception
sqlState
,
int
The errorCode to put in the exception
errorCode
,
long[]
The array of update counts
updateCounts
,
SqlException
The original exception
cause
)

This method is overridden on JVM 8

public LogicalConnection

Returns:

A logical connection with statement caching capabilities.
newCachingLogicalConnection
(ClientConnection
the underlying physical connection
physicalConnection
,
ClientPooledConnection
the pooled connection
pooledConnection
,
JDBCStatementCache
statement cache
stmtCache
)

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newCachingLogicalConnection.

Returns an instance of a org.apache.derby.client.am.CachingLogicalConnection, which provides caching of prepared statements.
public ClientCallableStatement
newCallableStatement(Agent
The instance of NetAgent associated with this org.apache.derby.client.am.ClientCallableStatement object.
agent
,
ClientConnection
The connection object associated with this PreparedStatement Object.
connection
,
String
A String object that is the SQL statement to be sent to the database.
sql
,
int
One of the ResultSet type constants
type
,
int
One of the ResultSet concurrency constants
concurrency
,
int
One of the ResultSet holdability constants
holdability
,
ClientPooledConnection
The PooledConnection object that will be used to notify the PooledConnection reference of the Error Occurred and the Close events.
cpc
)

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newCallableStatement.

Returns an instance of ClientCallableStatement.
public ClientPooledConnection
newClientPooledConnection(BasicClientDataSource
The data source
ds
,
LogWriter
The machinery for writing diagnostic messages
logWriter
,
String
The user name
user
,
String
The corresponding password
password
)

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newClientPooledConnection.

This method is used to return an instance of the org.apache.derby.client.ClientPooledConnection class which implements javax.sql.PooledConnection.
public ClientXAConnection
newClientXAConnection(BasicClientDataSource
The data source
ds
,
LogWriter
The machinery for writing diagnostic messages
logWriter
,
String
The user name
user
,
String
The corresponding password
password
)

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newClientXAConnection.

This method is used to return an instance of ClientXAConnection (or ClientXAConnection40) class which implements javax.sql.XAConnection.
public ColumnMetaData

Returns:

a ColumnMetaData implementation
newColumnMetaData
(LogWriter
LogWriter
logWriter
)

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newColumnMetaData.

Returns an instance of ColumnMetaData
public ColumnMetaData

Returns:

a ColumnMetaData implementation
newColumnMetaData
(LogWriter
LogWriter
logWriter
,
int
int
upperBound
)

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newColumnMetaData.

Returns an instance of ColumnMetaData or ColumnMetaData40 depending on the JDK version under use
public LogicalCallableStatement

Returns:

A logical callable statement.
newLogicalCallableStatement
(CallableStatement
underlying physical callable statement
cs
,
StatementKey
key for the underlying physical callable statement
stmtKey
,
StatementCacheInteractor
the statement cache interactor
cacheInteractor
)

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newLogicalCallableStatement.

Returns a new logical callable statement object.
public LogicalConnection
newLogicalConnection(ClientConnection
The physical connection
physicalConnection
,
ClientPooledConnection
The pooled connection
pooledConnection
)

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newLogicalConnection.

Returns an instance of LogicalConnection.
public LogicalPreparedStatement

Returns:

A logical prepared statement.
newLogicalPreparedStatement
(PreparedStatement
underlying physical prepared statement
ps
,
StatementKey
key for the underlying physical prepared statement
stmtKey
,
StatementCacheInteractor
the statement cache interactor
cacheInteractor
)

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newLogicalPreparedStatement.

Returns a new logical prepared statement object.
public ClientConnection
newNetConnection(LogWriter
Machinery for logging diagnostics
logWriter
,
int
Connection timeout
driverManagerLoginTimeout
,
String
Name of server
serverName
,
int
Server port
portNumber
,
String
Name of database
databaseName
,
Properties
Connection properties
properties
)

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newNetConnection.

This method returns an instance of NetConnection (or NetConnection40) class which extends from ClientConnection this implements the java.sql.Connection interface
public ClientConnection
newNetConnection(LogWriter
Machinery for logging diagnostics
logWriter
,
String
User name
user
,
String
Corresponding password
password
,
BasicClientDataSource
Data source to connect to
dataSource
,
int
id
rmId
,
boolean
True if an XA connection is needed
isXAConn
)

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newNetConnection.

This method returns an instance of NetConnection (or NetConnection40) class which extends from ClientConnection.
public ClientConnection

Returns:

a ClientConnection object
newNetConnection
(LogWriter
LogWriter object associated with this connection.
logWriter
,
String
user id for this connection.
user
,
String
password for this connection.
password
,
BasicClientDataSource
The DataSource object passed from the PooledConnection object from which this constructor was called.
dataSource
,
int
The Resource Manager ID for XA Connections
rmId
,
boolean
true if this is a XA connection
isXAConn
,
ClientPooledConnection
The ClientPooledConnection object from which this NetConnection constructor was called. This is used to pass StatementEvents back to the pooledConnection object.
cpc
)

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newNetConnection.

Returns an instance of NetConnection.
public ClientDatabaseMetaData

Returns:

an instance of NetDatabaseMetaData
newNetDatabaseMetaData
(Agent
Wrapped agent
netAgent
,
ClientConnection
Wrapped connection
netConnection
)

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newNetDatabaseMetaData.

This method provides an instance of NetDatabaseMetaData (or NetDatabaseMetaData40) which extends from ClientDatabaseMetaData which implements java.sql.DatabaseMetaData.
public ClientResultSet

Returns:

an instance of NetResultSet
newNetResultSet
(Agent
The wrapped agent
netAgent
,
MaterialStatement
The wrapped statement
netStatement
,
Cursor
The wrapped cursor
cursor
,
int
DRDA variable
qryprctyp
,
int
DRDA variable
sqlcsrhld
,
int
DRDA variable
qryattscr
,
int
DRDA variable
qryattsns
,
int
DRDA variable
qryattset
,
long
DRDA variable
qryinsid
,
int
Type of result set
actualResultSetType
,
int
Concurrency level
actualResultSetConcurrency
,
int
Whether results are holdable
actualResultSetHoldability
)

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newNetResultSet.

This method returns an instance of NetResultSet(or NetResultSet40) which extends from ClientResultSet which implements java.sql.ResultSet.
public ClientParameterMetaData

Returns:

a ParameterMetaData implementation
newParameterMetaData
(ColumnMetaData
ColumnMetaData
columnMetaData
)

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newParameterMetaData.

returns an instance of ParameterMetaData
public ClientPreparedStatement

Returns:

a PreparedStatement object
newPreparedStatement
(Agent
The instance of NetAgent associated with this org.apache.derby.client.am.ClientCallableStatement object.
agent
,
ClientConnection
The connection object associated with this PreparedStatement Object.
connection
,
String
A String object that is the SQL statement to be sent to the database.
sql
,
Section
Section
section
,
ClientPooledConnection
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.
cpc
)

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newPreparedStatement.

This method returns an instance of ClientPreparedStatement which implements java.sql.PreparedStatement.
public ClientPreparedStatement

Returns:

a PreparedStatement object
newPreparedStatement
(Agent
The instance of NetAgent associated with this org.apache.derby.client.am.ClientCallableStatement object.
agent
,
ClientConnection
The connection object associated with this PreparedStatement Object.
connection
,
String
A String object that is the SQL statement to be sent to the database.
sql
,
int
One of the ResultSet type constants.
type
,
int
One of the ResultSet concurrency constants.
concurrency
,
int
One of the ResultSet holdability constants.
holdability
,
int
a flag indicating whether auto-generated keys should be returned.
autoGeneratedKeys
,
String[]
an array of column names indicating the columns that should be returned from the inserted row or rows.
columnNames
,
int[]
an array of column indexes indicating the columns that should be returned form the inserted row.
columnIndexes
,
ClientPooledConnection
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.
cpc
)

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newPreparedStatement.

This method returns an instance of ClientPreparedStatement which implements java.sql.PreparedStatement.
public ClientStatement

Returns:

a ClientStatement implementation
newStatement
(Agent
Agent
agent
,
ClientConnection
Connection
connection
,
int
int
type
,
int
int
concurrency
,
int
int
holdability
,
int
int
autoGeneratedKeys
,
String[]
String[]
columnNames
,
int[]
int[]
columnIndexes
)

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newStatement.

This method provides an instance of Statement
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

msgutil_back to summary
private static final 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 Detail

ClientJDBCObjectFactoryImplback to summary
public ClientJDBCObjectFactoryImpl()

Method Detail

newBatchUpdateExceptionback to summary
public BatchUpdateException newBatchUpdateException(LogWriter logWriter, ClientMessageId msgid, Object[] args, long[] updateCounts, SqlException cause)

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newBatchUpdateException.

Creates a BatchUpdateException depending on the JVM level.

Parameters
logWriter:LogWriter

Doc from org.apache.derby.client.am.ClientJDBCObjectFactory.newBatchUpdateException.

Machinery for writing log messages

msgid:ClientMessageId

Doc from org.apache.derby.client.am.ClientJDBCObjectFactory.newBatchUpdateException.

Client message handle

args:Object[]

Doc from org.apache.derby.client.am.ClientJDBCObjectFactory.newBatchUpdateException.

Arguments to be plugged into the message

updateCounts:long[]

Doc from org.apache.derby.client.am.ClientJDBCObjectFactory.newBatchUpdateException.

Update counts to include in message

cause:SqlException

Doc from org.apache.derby.client.am.ClientJDBCObjectFactory.newBatchUpdateException.

Original exception

Returns:BatchUpdateException

Doc from org.apache.derby.client.am.ClientJDBCObjectFactory.newBatchUpdateException.

a batch exception

newBatchUpdateExceptionback to summary
protected BatchUpdateException newBatchUpdateException(String message, String sqlState, int errorCode, long[] updateCounts, SqlException cause)

This method is overridden on JVM 8

Parameters
message:String

The message to put in the exception

sqlState:String

The SQLState to put in the exception

errorCode:int

The errorCode to put in the exception

updateCounts:long[]

The array of update counts

cause:SqlException

The original exception

Returns:BatchUpdateException

a batch update exception

newCachingLogicalConnectionback to summary
public LogicalConnection newCachingLogicalConnection(ClientConnection physicalConnection, ClientPooledConnection pooledConnection, JDBCStatementCache stmtCache) throws SqlException

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newCachingLogicalConnection.

Returns an instance of a org.apache.derby.client.am.CachingLogicalConnection, which provides caching of prepared statements.

Parameters
physicalConnection:ClientConnection

the underlying physical connection

pooledConnection:ClientPooledConnection

the pooled connection

stmtCache:JDBCStatementCache

statement cache

Returns:LogicalConnection

A logical connection with statement caching capabilities.

Exceptions
SqlException:
if creation of the logical connection fails
newCallableStatementback to summary
public ClientCallableStatement newCallableStatement(Agent agent, ClientConnection connection, String sql, int type, int concurrency, int holdability, ClientPooledConnection cpc) throws SqlException

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newCallableStatement.

Returns an instance of ClientCallableStatement.

Parameters
agent:Agent

The instance of NetAgent associated with this org.apache.derby.client.am.ClientCallableStatement object.

connection:ClientConnection

The connection object associated with this PreparedStatement Object.

sql:String

A String object that is the SQL statement to be sent to the database.

type:int

One of the ResultSet type constants

concurrency:int

One of the ResultSet concurrency constants

holdability:int

One of the ResultSet holdability constants

cpc:ClientPooledConnection

The PooledConnection object that will be used to notify the PooledConnection reference of the Error Occurred and the Close events.

Returns:ClientCallableStatement

a org.apache.derby.client.am.ClientCallableStatement object

Exceptions
SqlException:
on error
newClientPooledConnectionback to summary
public ClientPooledConnection newClientPooledConnection(BasicClientDataSource ds, LogWriter logWriter, String user, String password) throws SQLException

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newClientPooledConnection.

Doc from org.apache.derby.client.am.ClientJDBCObjectFactory.newClientPooledConnection.

This method is used to return an instance of the org.apache.derby.client.ClientPooledConnection class which implements javax.sql.PooledConnection.

Parameters
ds:BasicClientDataSource

The data source

logWriter:LogWriter

The machinery for writing diagnostic messages

user:String

The user name

password:String

The corresponding password

Returns:ClientPooledConnection

an instance of org.apache.derby.client.ClientPooledConnection

Exceptions
SQLException:
on error
newClientXAConnectionback to summary
public ClientXAConnection newClientXAConnection(BasicClientDataSource ds, LogWriter logWriter, String user, String password) throws SQLException

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newClientXAConnection.

Doc from org.apache.derby.client.am.ClientJDBCObjectFactory.newClientXAConnection.

This method is used to return an instance of ClientXAConnection (or ClientXAConnection40) class which implements javax.sql.XAConnection.

Parameters
ds:BasicClientDataSource

The data source

logWriter:LogWriter

The machinery for writing diagnostic messages

user:String

The user name

password:String

The corresponding password

Returns:ClientXAConnection

an instance of org.apache.derby.client.ClientXAConnection

Exceptions
SQLException:
on error
newColumnMetaDataback to summary
public ColumnMetaData newColumnMetaData(LogWriter logWriter)

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newColumnMetaData.

Returns an instance of ColumnMetaData

Parameters
logWriter:LogWriter

LogWriter

Returns:ColumnMetaData

a ColumnMetaData implementation

newColumnMetaDataback to summary
public ColumnMetaData newColumnMetaData(LogWriter logWriter, int upperBound)

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newColumnMetaData.

Returns an instance of ColumnMetaData or ColumnMetaData40 depending on the JDK version under use

Parameters
logWriter:LogWriter

LogWriter

upperBound:int

int

Returns:ColumnMetaData

a ColumnMetaData implementation

newLogicalCallableStatementback to summary
public LogicalCallableStatement newLogicalCallableStatement(CallableStatement cs, StatementKey stmtKey, StatementCacheInteractor cacheInteractor)

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newLogicalCallableStatement.

Returns a new logical callable statement object.

Parameters
cs:CallableStatement

underlying physical callable statement

stmtKey:StatementKey

key for the underlying physical callable statement

cacheInteractor:StatementCacheInteractor

the statement cache interactor

Returns:LogicalCallableStatement

A logical callable statement.

newLogicalConnectionback to summary
public LogicalConnection newLogicalConnection(ClientConnection physicalConnection, ClientPooledConnection pooledConnection) throws SqlException

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newLogicalConnection.

Doc from org.apache.derby.client.am.ClientJDBCObjectFactory.newLogicalConnection.

Returns an instance of LogicalConnection. This method returns an instance of LogicalConnection (or LogicalConnection40) which implements java.sql.Connection.

Parameters
physicalConnection:ClientConnection

The physical connection

pooledConnection:ClientPooledConnection

The pooled connection

Returns:LogicalConnection

an instance of org.apache.derby.client.am.LogicalConnection

Exceptions
SqlException:
on error
newLogicalPreparedStatementback to summary
public LogicalPreparedStatement newLogicalPreparedStatement(PreparedStatement ps, StatementKey stmtKey, StatementCacheInteractor cacheInteractor)

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newLogicalPreparedStatement.

Returns a new logical prepared statement object.

Parameters
ps:PreparedStatement

underlying physical prepared statement

stmtKey:StatementKey

key for the underlying physical prepared statement

cacheInteractor:StatementCacheInteractor

the statement cache interactor

Returns:LogicalPreparedStatement

A logical prepared statement.

newNetConnectionback to summary
public ClientConnection newNetConnection(LogWriter logWriter, int driverManagerLoginTimeout, String serverName, int portNumber, String databaseName, Properties properties) throws SqlException

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newNetConnection.

Doc from org.apache.derby.client.am.ClientJDBCObjectFactory.newNetConnection.

This method returns an instance of NetConnection (or NetConnection40) class which extends from ClientConnection this implements the java.sql.Connection interface

Parameters
logWriter:LogWriter

Machinery for logging diagnostics

driverManagerLoginTimeout:int

Connection timeout

serverName:String

Name of server

portNumber:int

Server port

databaseName:String

Name of database

properties:Properties

Connection properties

Returns:ClientConnection

an instance of org.apache.derby.client.net.NetConnection

Exceptions
SqlException:
on error
newNetConnectionback to summary
public ClientConnection newNetConnection(LogWriter logWriter, String user, String password, BasicClientDataSource dataSource, int rmId, boolean isXAConn) throws SqlException

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newNetConnection.

Doc from org.apache.derby.client.am.ClientJDBCObjectFactory.newNetConnection.

This method returns an instance of NetConnection (or NetConnection40) class which extends from ClientConnection. This implements the java.sql.Connection interface.

Parameters
logWriter:LogWriter

Machinery for logging diagnostics

user:String

User name

password:String

Corresponding password

dataSource:BasicClientDataSource

Data source to connect to

rmId:int

id

isXAConn:boolean

True if an XA connection is needed

Returns:ClientConnection

an instance of org.apache.derby.client.net.NetConnection

Exceptions
SqlException:
on error
newNetConnectionback to summary
public ClientConnection newNetConnection(LogWriter logWriter, String user, String password, BasicClientDataSource dataSource, int rmId, boolean isXAConn, ClientPooledConnection cpc) throws SqlException

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newNetConnection.

Returns an instance of NetConnection.

Parameters
logWriter:LogWriter

LogWriter object associated with this connection.

user:String

user id for this connection.

password:String

password for this connection.

dataSource:BasicClientDataSource

The DataSource object passed from the PooledConnection object from which this constructor was called.

rmId:int

The Resource Manager ID for XA Connections

isXAConn:boolean

true if this is a XA connection

cpc:ClientPooledConnection

The ClientPooledConnection object from which this NetConnection constructor was called. This is used to pass StatementEvents back to the pooledConnection object.

Returns:ClientConnection

a ClientConnection object

Exceptions
SqlException:
on error
newNetDatabaseMetaDataback to summary
public ClientDatabaseMetaData newNetDatabaseMetaData(Agent netAgent, ClientConnection netConnection)

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newNetDatabaseMetaData.

Doc from org.apache.derby.client.am.ClientJDBCObjectFactory.newNetDatabaseMetaData.

This method provides an instance of NetDatabaseMetaData (or NetDatabaseMetaData40) which extends from ClientDatabaseMetaData which implements java.sql.DatabaseMetaData.

Parameters
netAgent:Agent

Wrapped agent

netConnection:ClientConnection

Wrapped connection

Returns:ClientDatabaseMetaData

an instance of NetDatabaseMetaData

newNetResultSetback to summary
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

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newNetResultSet.

Doc from org.apache.derby.client.am.ClientJDBCObjectFactory.newNetResultSet.

This method returns an instance of NetResultSet(or NetResultSet40) which extends from ClientResultSet which implements java.sql.ResultSet.

Parameters
netAgent:Agent

The wrapped agent

netStatement:MaterialStatement

The wrapped statement

cursor:Cursor

The wrapped cursor

qryprctyp:int

DRDA variable

sqlcsrhld:int

DRDA variable

qryattscr:int

DRDA variable

qryattsns:int

DRDA variable

qryattset:int

DRDA variable

qryinsid:long

DRDA variable

actualResultSetType:int

Type of result set

actualResultSetConcurrency:int

Concurrency level

actualResultSetHoldability:int

Whether results are holdable

Returns:ClientResultSet

an instance of NetResultSet

Exceptions
SqlException:
on error
newParameterMetaDataback to summary
public ClientParameterMetaData newParameterMetaData(ColumnMetaData columnMetaData)

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newParameterMetaData.

returns an instance of ParameterMetaData

Parameters
columnMetaData:ColumnMetaData

ColumnMetaData

Returns:ClientParameterMetaData

a ParameterMetaData implementation

newPreparedStatementback to summary
public ClientPreparedStatement newPreparedStatement(Agent agent, ClientConnection connection, String sql, Section section, ClientPooledConnection cpc) throws SqlException

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newPreparedStatement.

This method returns an instance of ClientPreparedStatement 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.

Parameters
agent:Agent

The instance of NetAgent associated with this org.apache.derby.client.am.ClientCallableStatement object.

connection:ClientConnection

The connection object associated with this PreparedStatement Object.

sql:String

A String object that is the SQL statement to be sent to the database.

section:Section

Section

cpc:ClientPooledConnection

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:ClientPreparedStatement

a PreparedStatement object

Exceptions
SqlException:
on error
newPreparedStatementback to summary
public ClientPreparedStatement newPreparedStatement(Agent agent, ClientConnection connection, String sql, int type, int concurrency, int holdability, int autoGeneratedKeys, String[] columnNames, int[] columnIndexes, ClientPooledConnection cpc) throws SqlException

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newPreparedStatement.

This method returns an instance of ClientPreparedStatement which implements java.sql.PreparedStatement. It has the org.apache.derby.client.ClientPooledConnection as one of its parameters this is used to raise the Statement Events when the prepared statement is closed.

Parameters
agent:Agent

The instance of NetAgent associated with this org.apache.derby.client.am.ClientCallableStatement object.

connection:ClientConnection

The connection object associated with this PreparedStatement Object.

sql:String

A String object that is the SQL statement to be sent to the database.

type:int

One of the ResultSet type constants.

concurrency:int

One of the ResultSet concurrency constants.

holdability:int

One of the ResultSet holdability constants.

autoGeneratedKeys:int

a flag indicating whether auto-generated keys should be returned.

columnNames:String[]

an array of column names indicating the columns that should be returned from the inserted row or rows.

columnIndexes:int[]

Doc from org.apache.derby.client.am.ClientJDBCObjectFactory.newPreparedStatement.

an array of column indexes indicating the columns that should be returned form the inserted row.

cpc:ClientPooledConnection

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:ClientPreparedStatement

a PreparedStatement object

Exceptions
SqlException:
on error
newStatementback to summary
public ClientStatement newStatement(Agent agent, ClientConnection connection, int type, int concurrency, int holdability, int autoGeneratedKeys, String[] columnNames, int[] columnIndexes) throws SqlException

Implements org.apache.derby.client.am.ClientJDBCObjectFactory.newStatement.

This method provides an instance of Statement

Parameters
agent:Agent

Agent

connection:ClientConnection

Connection

type:int

int

concurrency:int

int

holdability:int

int

autoGeneratedKeys:int

int

columnNames:String[]

String[]

columnIndexes:int[]

int[]

Returns:ClientStatement

a ClientStatement implementation

Exceptions
SqlException:
on error