Top Fields Constructors Methods
org.apache.derby.client.am

public Class ClientPreparedStatement42

extends ClientPreparedStatement
Class Inheritance
Imports
java.sql.SQLException, .SQLType, org.apache.derby.client.ClientPooledConnection

Field Summary

Inherited from org.apache.derby.client.am.ClientPreparedStatement:
materialPreparedStatement_outputRegistered_parameterMetaData_parameterRegistered_parameters_sql_

Constructor Summary

AccessConstructor and Description
public
ClientPreparedStatement42(Agent
The wrapped agent
agent
,
ClientConnection
The wrapped client connection
connection
,
String
The sql being executed
sql
,
Section
The section
section
,
ClientPooledConnection
The wrapped pooled connection
cpc
)

The PreparedStatement used for JDBC 4.2 positioned update statements.

public
ClientPreparedStatement42(Agent
The wrapped agent
agent
,
ClientConnection
The wrapped client connection
connection
,
String
The sql being executed
sql
,
int
The type
type
,
int
The type of concurrency
concurrency
,
int
The holdability
holdability
,
int
The auto generated keys
autoGeneratedKeys
,
String[]
The column names
columnNames
,
int[]
the column indexes
columnIndexes
,
ClientPooledConnection
The wrapped pooled connection
cpc
)

The PreparedStatementConstructor used for jdbc 4.2 prepared statements with scroll attributes.

Method Summary

Modifier and TypeMethod and Description
public void
setObject(int
the first parameter is 1, the second is 2, ...
parameterIndex
,
Object
the object containing the input parameter value
x
,
SQLType
the SQL type to be sent to the database
targetSqlType
)

Overrides default java.sql.PreparedStatement.setObject.

Sets the value of the designated parameter with the given object.
public void
setObject(int
the first parameter is 1, the second is 2, ...
parameterIndex
,
Object
the object containing the input parameter value
x
,
SQLType
the SQL type to be sent to the database. The scale argument may further qualify this type.
targetSqlType
,
int
for java.sql.JDBCType.DECIMAL or java.sql.JDBCType.NUMERIC types, this is the number of digits after the decimal point. For Java Object types InputStream and Reader, this is the length of the data in the stream or reader. For all other types, this value will be ignored.
scaleOrLength
)

Overrides default java.sql.PreparedStatement.setObject.

Sets the value of the designated parameter with the given object.

Inherited from org.apache.derby.client.am.ClientPreparedStatement:
addBatchaddBatchcheckForValidParameterIndexcheckForValidScalecheckStatusclearParameterscompleteDescribeInputcompleteDescribeOutputcompleteLocalCommitcompleteLocalRollbackexecuteexecuteexecuteexecuteexecuteexecuteBatchexecuteLargeUpdateexecuteQueryexecuteQueryexecuteQueryXexecuteUpdateexecuteUpdateexecuteUpdateexecuteUpdateexecuteUpdateexecuteXflowPrepareDescribeInputOutputgetJdbcStatementInterfaceNamegetMetaDatagetParameterMetaDatainitResetPreparedStatementlistenToUnitOfWorkmarkClosedprepareresetresetForReuseresetPreparedStatementsetArraysetAsciiStreamsetAsciiStreamsetAsciiStreamsetBigDecimalsetBinaryStreamsetBinaryStreamsetBinaryStreamsetBlobsetBlobsetBlobsetBooleansetBytesetBytessetBytesXsetCharacterStreamsetCharacterStreamsetCharacterStreamsetClobsetClobsetClobsetDatesetDatesetDoublesetFloatsetInputsetIntsetIntXsetLongsetLongXsetNCharacterStreamsetNCharacterStreamsetNClobsetNClobsetNClobsetNStringsetNullsetNullsetNullXsetObjectsetObjectsetObjectsetRefsetRowIdsetShortsetShortXsetSQLXMLsetStringsetStringXsetTimesetTimesetTimestampsetTimestampsetUnicodeStreamsetURL

Constructor Detail

ClientPreparedStatement42back to summary
public ClientPreparedStatement42(Agent agent, ClientConnection connection, String sql, Section section, ClientPooledConnection cpc) throws SqlException

The PreparedStatement used for JDBC 4.2 positioned update statements. Called by material statement constructors. 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 wrapped agent

connection:ClientConnection

The wrapped client connection

sql:String

The sql being executed

section:Section

The section

cpc:ClientPooledConnection

The wrapped pooled connection

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

The PreparedStatementConstructor used for jdbc 4.2 prepared statements with scroll attributes. Called by material statement constructors. 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 wrapped agent

connection:ClientConnection

The wrapped client connection

sql:String

The sql being executed

type:int

The type

concurrency:int

The type of concurrency

holdability:int

The holdability

autoGeneratedKeys:int

The auto generated keys

columnNames:String[]

The column names

columnIndexes:int[]

the column indexes

cpc:ClientPooledConnection

The wrapped pooled connection

Exceptions
SqlException:
on error

Method Detail

setObjectback to summary
public void setObject(int parameterIndex, Object x, SQLType targetSqlType) throws SQLException

Overrides default java.sql.PreparedStatement.setObject.

Doc from java.sql.PreparedStatement.setObject.

Sets the value of the designated parameter with the given object. This method is similar to setObject(int parameterIndex, Object x, SQLType targetSqlType, int scaleOrLength), except that it assumes a scale of zero.

The default implementation will throw SQLFeatureNotSupportedException

Parameters
parameterIndex:int

the first parameter is 1, the second is 2, ...

x:Object

the object containing the input parameter value

targetSqlType:SQLType

the SQL type to be sent to the database

Exceptions
SQLException:
if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs or this method is called on a closed PreparedStatement
setObjectback to summary
public void setObject(int parameterIndex, Object x, SQLType targetSqlType, int scaleOrLength) throws SQLException

Overrides default java.sql.PreparedStatement.setObject.

Doc from java.sql.PreparedStatement.setObject.

Sets the value of the designated parameter with the given object. If the second argument is an InputStream then the stream must contain the number of bytes specified by scaleOrLength. If the second argument is a Reader then the reader must contain the number of characters specified by scaleOrLength. If these conditions are not true the driver will generate a SQLException when the prepared statement is executed.

The given Java object will be converted to the given targetSqlType before being sent to the database. If the object has a custom mapping (is of a class implementing the interface SQLData), the JDBC driver should call the method SQLData.writeSQL to write it to the SQL data stream. If, on the other hand, the object is of a class implementing Ref, Blob, Clob, NClob, Struct, java.net.URL, or Array, the driver should pass it to the database as a value of the corresponding SQL type.

Note that this method may be used to pass database-specific abstract data types.

The default implementation will throw SQLFeatureNotSupportedException

Parameters
parameterIndex:int

the first parameter is 1, the second is 2, ...

x:Object

the object containing the input parameter value

targetSqlType:SQLType

the SQL type to be sent to the database. The scale argument may further qualify this type.

scaleOrLength:int

for java.sql.JDBCType.DECIMAL or java.sql.JDBCType.NUMERIC types, this is the number of digits after the decimal point. For Java Object types InputStream and Reader, this is the length of the data in the stream or reader. For all other types, this value will be ignored.

Exceptions
SQLException:
if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs or this method is called on a closed PreparedStatement or if the Java Object specified by x is an InputStream or Reader object and the value of the scale parameter is less than zero