| java.lang.Object org.apache.derby.iapi.jdbc.BrokeredStatement org.apache.derby.iapi.jdbc.BrokeredPreparedStatement
All known Subclasses: org.apache.derby.iapi.jdbc.BrokeredCallableStatement, org.apache.derby.iapi.jdbc.BrokeredPreparedStatement30,
BrokeredPreparedStatement | public class BrokeredPreparedStatement extends BrokeredStatement implements EnginePreparedStatement(Code) | | JDBC 2 brokered PreparedStatement. Forwards calls off to a real prepared statement
obtained through the BrokeredStatementControl getRealPreparedStatement method.
|
Field Summary | |
final String | sql SQL used to create me. |
Method Summary | |
final public void | addBatch() JDBC 2.0
Add a set of parameters to the batch. | final public void | clearParameters() In general, parameter values remain in force for repeated use of a
Statement. | public PreparedStatement | createDuplicateStatement(Connection conn, PreparedStatement oldStatement) Create a duplicate PreparedStatement to this, including state, from the passed in Connection. | final public boolean | execute() | final public ResultSet | executeQuery() A prepared SQL query is executed and its ResultSet is returned. | final public int | executeUpdate() Execute a SQL INSERT, UPDATE or DELETE statement. | public EngineParameterMetaData | getEmbedParameterSetMetaData() Imitate the getParameterMetaData() function in JDBC 3.0
Retrieves the number, types and properties of this PreparedStatement
object's parameters. | final public java.sql.ResultSetMetaData | getMetaData() JDBC 2.0
The number, types and properties of a ResultSet's columns
are provided by the getMetaData method. | PreparedStatement | getPreparedStatement() Access the underlying PreparedStatement. | final public Statement | getStatement() Override the BrokeredStatement's getStatement() to always return a PreparedStatement. | final public void | setArray(int i, Array x) | final public void | setAsciiStream(int parameterIndex, InputStream x, int length) We do this inefficiently and read it all in here. | final public void | setBigDecimal(int parameterIndex, java.math.BigDecimal x) Set a parameter to a java.math.BigDecimal value. | final public void | setBinaryStream(int parameterIndex, InputStream x, int length) | final public void | setBlob(int i, Blob x) | final public void | setBoolean(int parameterIndex, boolean x) Set a parameter to a Java boolean value. | final public void | setByte(int parameterIndex, byte x) Set a parameter to a Java byte value. | final public void | setBytes(int parameterIndex, byte[] x) Set a parameter to a Java array of bytes. | final public void | setCharacterStream(int parameterIndex, Reader reader, int length) | final public void | setClob(int i, Clob x) | final public void | setDate(int parameterIndex, Date x) Set a parameter to a java.sql.Date value. | final public void | setDate(int i, Date x, Calendar cal) | final public void | setDouble(int parameterIndex, double x) Set a parameter to a Java double value. | final public void | setFloat(int parameterIndex, float x) Set a parameter to a Java float value. | final public void | setInt(int parameterIndex, int x) Set a parameter to a Java int value. | final public void | setLong(int parameterIndex, long x) Set a parameter to a Java long value. | final public void | setNull(int parameterIndex, int sqlType) Set a parameter to SQL NULL. | final public void | setNull(int parameterIndex, int sqlType, String typeName) Set a parameter to SQL NULL. | final public void | setObject(int parameterIndex, Object x, int targetSqlType, int scale) The interface says that the type of the Object parameter must
be compatible with the type of the targetSqlType. | final public void | setObject(int parameterIndex, Object x, int targetSqlType) This method is like setObject above, but assumes a scale of zero. | final public void | setObject(int parameterIndex, Object x) Set the value of a parameter using an object; use the
java.lang equivalent objects for integral values.
The JDBC specification specifies a standard mapping from
Java Object types to SQL types. | final public void | setRef(int i, Ref x) | final public void | setShort(int parameterIndex, short x) Set a parameter to a Java short value. | final public void | setString(int parameterIndex, String x) Set a parameter to a Java String value. | final public void | setTime(int parameterIndex, Time x) Set a parameter to a java.sql.Time value. | final public void | setTime(int i, Time x, Calendar cal) | final public void | setTimestamp(int parameterIndex, Timestamp x) Set a parameter to a java.sql.Timestamp value. | final public void | setTimestamp(int i, Timestamp x, Calendar cal) | final public void | setUnicodeStream(int parameterIndex, InputStream x, int length) We do this inefficiently and read it all in here. |
addBatch | final public void addBatch() throws SQLException(Code) | | JDBC 2.0
Add a set of parameters to the batch.
exception: SQLException - if a database-access error occurs. |
clearParameters | final public void clearParameters() throws SQLException(Code) | | In general, parameter values remain in force for repeated use of a
Statement. Setting a parameter value automatically clears its
previous value. However, in some cases it is useful to immediately
release the resources used by the current parameter values; this can
be done by calling clearParameters.
exception: SQLException - thrown on failure. |
executeQuery | final public ResultSet executeQuery() throws SQLException(Code) | | A prepared SQL query is executed and its ResultSet is returned.
a ResultSet that contains the data produced by thequery; never null exception: SQLException - thrown on failure. |
executeUpdate | final public int executeUpdate() throws SQLException(Code) | | Execute a SQL INSERT, UPDATE or DELETE statement. In addition,
SQL statements that return nothing such as SQL DDL statements
can be executed.
either the row count for INSERT, UPDATE or DELETE; or 0for SQL statements that return nothing exception: SQLException - thrown on failure. |
getEmbedParameterSetMetaData | public EngineParameterMetaData getEmbedParameterSetMetaData() throws SQLException(Code) | | Imitate the getParameterMetaData() function in JDBC 3.0
Retrieves the number, types and properties of this PreparedStatement
object's parameters.
a EngineParameterMetaData object that contains information about thenumber, types and properties of this PreparedStatement object's parameters. exception: SQLException - if a database access error occurs |
getMetaData | final public java.sql.ResultSetMetaData getMetaData() throws SQLException(Code) | | JDBC 2.0
The number, types and properties of a ResultSet's columns
are provided by the getMetaData method.
the description of a ResultSet's columns exception: SQLException - Feature not implemented for now. |
getPreparedStatement | PreparedStatement getPreparedStatement() throws SQLException(Code) | | Access the underlying PreparedStatement. This method
is package protected to restrict access to the underlying
object to the brokered objects. Allowing the application to
access the underlying object thtough a public method would
|
getStatement | final public Statement getStatement() throws SQLException(Code) | | Override the BrokeredStatement's getStatement() to always return a PreparedStatement.
|
setAsciiStream | final public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException(Code) | | We do this inefficiently and read it all in here. The target type
is assumed to be a String.
Parameters: parameterIndex - the first parameter is 1, the second is 2, ... Parameters: x - the java input stream which contains the ASCII parameter value Parameters: length - the number of bytes in the stream exception: SQLException - thrown on failure. |
setBigDecimal | final public void setBigDecimal(int parameterIndex, java.math.BigDecimal x) throws SQLException(Code) | | Set a parameter to a java.math.BigDecimal value.
The driver converts this to a SQL NUMERIC value when
it sends it to the database.
Parameters: parameterIndex - the first parameter is 1, the second is 2, ... Parameters: x - the parameter value exception: SQLException - thrown on failure. |
setBinaryStream | final public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException(Code) | | Parameters: parameterIndex - the first parameter is 1, the second is 2, ... Parameters: x - the java input stream which contains the binary parameter value Parameters: length - the number of bytes in the stream exception: SQLException - thrown on failure. |
setBoolean | final public void setBoolean(int parameterIndex, boolean x) throws SQLException(Code) | | Set a parameter to a Java boolean value. According to the JDBC API spec,
the driver converts this to a SQL BIT value when it sends it to the
database. But we don't have to do this, since the database engine
supports a boolean type.
Parameters: parameterIndex - the first parameter is 1, the second is 2, ... Parameters: x - the parameter value exception: SQLException - thrown on failure. |
setByte | final public void setByte(int parameterIndex, byte x) throws SQLException(Code) | | Set a parameter to a Java byte value. The driver converts this
to a SQL TINYINT value when it sends it to the database.
Parameters: parameterIndex - the first parameter is 1, the second is 2, ... Parameters: x - the parameter value exception: SQLException - thrown on failure. |
setBytes | final public void setBytes(int parameterIndex, byte[] x) throws SQLException(Code) | | Set a parameter to a Java array of bytes. The driver converts
this to a SQL VARBINARY or LONGVARBINARY (depending on the
argument's size relative to the driver's limits on VARBINARYs)
when it sends it to the database.
Parameters: parameterIndex - the first parameter is 1, the second is 2, ... Parameters: x - the parameter value exception: SQLException - thrown on failure. |
setCharacterStream | final public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException(Code) | | |
setDate | final public void setDate(int parameterIndex, Date x) throws SQLException(Code) | | Set a parameter to a java.sql.Date value. The driver converts this
to a SQL DATE value when it sends it to the database.
Parameters: parameterIndex - the first parameter is 1, the second is 2, ... Parameters: x - the parameter value exception: SQLException - thrown on failure. |
setDouble | final public void setDouble(int parameterIndex, double x) throws SQLException(Code) | | Set a parameter to a Java double value. The driver converts this
to a SQL DOUBLE value when it sends it to the database.
Parameters: parameterIndex - the first parameter is 1, the second is 2, ... Parameters: x - the parameter value exception: SQLException - thrown on failure. |
setFloat | final public void setFloat(int parameterIndex, float x) throws SQLException(Code) | | Set a parameter to a Java float value. The driver converts this
to a SQL FLOAT value when it sends it to the database.
Parameters: parameterIndex - the first parameter is 1, the second is 2, ... Parameters: x - the parameter value exception: SQLException - thrown on failure. |
setInt | final public void setInt(int parameterIndex, int x) throws SQLException(Code) | | Set a parameter to a Java int value. The driver converts this
to a SQL INTEGER value when it sends it to the database.
Parameters: parameterIndex - the first parameter is 1, the second is 2, ... Parameters: x - the parameter value exception: SQLException - thrown on failure. |
setLong | final public void setLong(int parameterIndex, long x) throws SQLException(Code) | | Set a parameter to a Java long value. The driver converts this
to a SQL BIGINT value when it sends it to the database.
Parameters: parameterIndex - the first parameter is 1, the second is 2, ... Parameters: x - the parameter value exception: SQLException - thrown on failure. |
setNull | final public void setNull(int parameterIndex, int sqlType) throws SQLException(Code) | | Set a parameter to SQL NULL.
Note: You must specify the parameter's SQL type.
Parameters: parameterIndex - the first parameter is 1, the second is 2, ... Parameters: sqlType - SQL type code defined by java.sql.Types exception: SQLException - thrown on failure. |
setNull | final public void setNull(int parameterIndex, int sqlType, String typeName) throws SQLException(Code) | | Set a parameter to SQL NULL.
Note: You must specify the parameter's SQL type.
Parameters: parameterIndex - the first parameter is 1, the second is 2, ... Parameters: sqlType - SQL type code defined by java.sql.Types exception: SQLException - thrown on failure. |
setObject | final public void setObject(int parameterIndex, Object x, int targetSqlType, int scale) throws SQLException(Code) | | The interface says that the type of the Object parameter must
be compatible with the type of the targetSqlType. We check that,
and if it flies, we expect the underlying engine to do the
required conversion once we pass in the value using its type.
So, an Integer converting to a CHAR is done via setInteger()
support on the underlying CHAR type.
If x is null, it won't tell us its type, so we pass it on to setNull
Parameters: parameterIndex - The first parameter is 1, the second is 2, ... Parameters: x - The object containing the input parameter value Parameters: targetSqlType - The SQL type (as defined in java.sql.Types) to be sent to the database. The scale argument may further qualify this type. Parameters: scale - For java.sql.Types.DECIMAL or java.sql.Types.NUMERIC typesthis is the number of digits after the decimal. For all othertypes this value will be ignored, exception: SQLException - thrown on failure. |
setObject | final public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException(Code) | | This method is like setObject above, but assumes a scale of zero.
exception: SQLException - thrown on failure. |
setObject | final public void setObject(int parameterIndex, Object x) throws SQLException(Code) | | Set the value of a parameter using an object; use the
java.lang equivalent objects for integral values.
The JDBC specification specifies a standard mapping from
Java Object types to SQL types. The given argument java object
will be converted to the corresponding SQL type before being
sent to the database.
Note that this method may be used to pass datatabase
specific abstract data types, by using a Driver specific Java
type.
Parameters: parameterIndex - The first parameter is 1, the second is 2, ... Parameters: x - The object containing the input parameter value exception: SQLException - thrown on failure. |
setShort | final public void setShort(int parameterIndex, short x) throws SQLException(Code) | | Set a parameter to a Java short value. The driver converts this
to a SQL SMALLINT value when it sends it to the database.
Parameters: parameterIndex - the first parameter is 1, the second is 2, ... Parameters: x - the parameter value exception: SQLException - thrown on failure. |
setString | final public void setString(int parameterIndex, String x) throws SQLException(Code) | | Set a parameter to a Java String value. The driver converts this
to a SQL VARCHAR or LONGVARCHAR value (depending on the arguments
size relative to the driver's limits on VARCHARs) when it sends
it to the database.
Parameters: parameterIndex - the first parameter is 1, the second is 2, ... Parameters: x - the parameter value exception: SQLException - thrown on failure. |
setTime | final public void setTime(int parameterIndex, Time x) throws SQLException(Code) | | Set a parameter to a java.sql.Time value. The driver converts this
to a SQL TIME value when it sends it to the database.
Parameters: parameterIndex - the first parameter is 1, the second is 2, ... Parameters: x - the parameter value exception: SQLException - thrown on failure. |
setTimestamp | final public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException(Code) | | Set a parameter to a java.sql.Timestamp value. The driver
converts this to a SQL TIMESTAMP value when it sends it to the
database.
Parameters: parameterIndex - the first parameter is 1, the second is 2, ... Parameters: x - the parameter value exception: SQLException - thrown on failure. |
setUnicodeStream | final public void setUnicodeStream(int parameterIndex, InputStream x, int length) throws SQLException(Code) | | We do this inefficiently and read it all in here. The target type
is assumed to be a String. The unicode source is assumed to be
in char[]. RESOLVE: might it be in UTF, instead? that'd be faster!
Parameters: parameterIndex - the first parameter is 1, the second is 2, ... Parameters: x - the java input stream which contains theUNICODE parameter value Parameters: length - the number of bytes in the stream exception: SQLException - thrown on failure. |
|
|