Class BrokeredPreparedStatement
- java.lang.Object
-
- org.apache.derby.iapi.jdbc.BrokeredStatement
-
- org.apache.derby.iapi.jdbc.BrokeredPreparedStatement
-
- All Implemented Interfaces:
java.lang.AutoCloseable,java.sql.PreparedStatement,java.sql.Statement,java.sql.Wrapper,EnginePreparedStatement,EngineStatement
- Direct Known Subclasses:
BrokeredCallableStatement,BrokeredPreparedStatement42
public class BrokeredPreparedStatement extends BrokeredStatement implements EnginePreparedStatement
A brokeredPreparedStatementthat forwards calls off to a realPreparedStatementobtained through theBrokeredStatementControl.getRealPreparedStatement()method. This class implements the JDBC 4.1 interface.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.ObjectgeneratedKeysAn Integer, an int array or a String array that specifies generated key columns, or null if there are no generated key columns.(package private) java.lang.StringsqlSQL used to create me.-
Fields inherited from class org.apache.derby.iapi.jdbc.BrokeredStatement
control, resultSetConcurrency, resultSetHoldability, resultSetType
-
-
Constructor Summary
Constructors Constructor Description BrokeredPreparedStatement(BrokeredStatementControl control, java.lang.String sql, java.lang.Object generatedKeys)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddBatch()JDBC 2.0 Add a set of parameters to the batch.voidclearParameters()In general, parameter values remain in force for repeated use of a Statement.voidclose()In many cases, it is desirable to immediately release a Statements's database and JDBC resources instead of waiting for this to happen when it is automatically closed; the close method provides this immediate release.java.sql.PreparedStatementcreateDuplicateStatement(java.sql.Connection conn, java.sql.PreparedStatement oldStatement)Create a duplicate PreparedStatement to this, including state, from the passed in Connection.booleanexecute()longexecuteLargeUpdate()java.sql.ResultSetexecuteQuery()A prepared SQL query is executed and its ResultSet is returned.intexecuteUpdate()Execute a SQL INSERT, UPDATE or DELETE statement.java.sql.ResultSetMetaDatagetMetaData()JDBC 2.0 The number, types and properties of a ResultSet's columns are provided by the getMetaData method.java.sql.ParameterMetaDatagetParameterMetaData()(package private) java.sql.PreparedStatementgetPreparedStatement()Access the underlying PreparedStatement.java.sql.StatementgetStatement()Override the BrokeredStatement's getStatement() to always return a PreparedStatement.longgetVersionCounter()Get the version of the prepared statement.voidsetArray(int i, java.sql.Array x)voidsetAsciiStream(int parameterIndex, java.io.InputStream x)Sets the designated parameter to the given input stream.voidsetAsciiStream(int parameterIndex, java.io.InputStream x, int length)We do this inefficiently and read it all in here.voidsetAsciiStream(int parameterIndex, java.io.InputStream x, long length)Sets the designated parameter to the given input stream, which will have the specified number of bytes.voidsetBigDecimal(int parameterIndex, java.math.BigDecimal x)Set a parameter to a java.math.BigDecimal value.voidsetBinaryStream(int parameterIndex, java.io.InputStream x)voidsetBinaryStream(int parameterIndex, java.io.InputStream x, int length)voidsetBinaryStream(int parameterIndex, java.io.InputStream x, long length)Sets the designated parameter to the given input stream, which will have the specified number of bytes.voidsetBlob(int parameterIndex, java.io.InputStream inputStream)Sets the designated parameter to aInputStreamobject.voidsetBlob(int parameterIndex, java.io.InputStream inputStream, long length)voidsetBlob(int i, java.sql.Blob x)voidsetBoolean(int parameterIndex, boolean x)Set a parameter to a Java boolean value.voidsetByte(int parameterIndex, byte x)Set a parameter to a Java byte value.voidsetBytes(int parameterIndex, byte[] x)Set a parameter to a Java array of bytes.voidsetCharacterStream(int parameterIndex, java.io.Reader reader)voidsetCharacterStream(int parameterIndex, java.io.Reader reader, int length)voidsetCharacterStream(int parameterIndex, java.io.Reader x, long length)Sets the designated parameter to the given Reader, which will have the specified number of bytes.voidsetClob(int parameterIndex, java.io.Reader reader)Sets the designated parameter to aReaderobject.voidsetClob(int parameterIndex, java.io.Reader reader, long length)voidsetClob(int i, java.sql.Clob x)voidsetDate(int parameterIndex, java.sql.Date x)Set a parameter to a java.sql.Date value.voidsetDate(int i, java.sql.Date x, java.util.Calendar cal)voidsetDouble(int parameterIndex, double x)Set a parameter to a Java double value.voidsetFloat(int parameterIndex, float x)Set a parameter to a Java float value.voidsetInt(int parameterIndex, int x)Set a parameter to a Java int value.voidsetLong(int parameterIndex, long x)Set a parameter to a Java long value.voidsetNCharacterStream(int parameterIndex, java.io.Reader value)voidsetNCharacterStream(int index, java.io.Reader value, long length)voidsetNClob(int parameterIndex, java.io.Reader reader)voidsetNClob(int parameterIndex, java.io.Reader reader, long length)voidsetNClob(int index, java.sql.NClob value)voidsetNString(int index, java.lang.String value)voidsetNull(int parameterIndex, int sqlType)Set a parameter to SQL NULL.voidsetNull(int parameterIndex, int sqlType, java.lang.String typeName)Set a parameter to SQL NULL.voidsetObject(int parameterIndex, java.lang.Object x)Set the value of a parameter using an object; use the java.lang equivalent objects for integral values.voidsetObject(int parameterIndex, java.lang.Object x, int targetSqlType)This method is like setObject above, but assumes a scale of zero.voidsetObject(int parameterIndex, java.lang.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.voidsetRef(int i, java.sql.Ref x)voidsetRowId(int parameterIndex, java.sql.RowId x)voidsetShort(int parameterIndex, short x)Set a parameter to a Java short value.voidsetSQLXML(int parameterIndex, java.sql.SQLXML xmlObject)voidsetString(int parameterIndex, java.lang.String x)Set a parameter to a Java String value.voidsetTime(int parameterIndex, java.sql.Time x)Set a parameter to a java.sql.Time value.voidsetTime(int i, java.sql.Time x, java.util.Calendar cal)voidsetTimestamp(int parameterIndex, java.sql.Timestamp x)Set a parameter to a java.sql.Timestamp value.voidsetTimestamp(int i, java.sql.Timestamp x, java.util.Calendar cal)voidsetUnicodeStream(int parameterIndex, java.io.InputStream x, int length)Deprecated.voidsetURL(int i, java.net.URL x)-
Methods inherited from class org.apache.derby.iapi.jdbc.BrokeredStatement
addBatch, cancel, checkIfClosed, clearBatch, clearWarnings, closeOnCompletion, controlCheck, createDuplicateStatement, execute, execute, execute, execute, executeBatch, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isWrapperFor, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, setStatementState, unableToUnwrap, unwrap, wrapResultSet
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.derby.iapi.jdbc.EngineStatement
closeOnCompletion, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, getLargeMaxRows, getLargeUpdateCount, isCloseOnCompletion, setLargeMaxRows
-
Methods inherited from interface java.sql.Statement
addBatch, cancel, clearBatch, clearWarnings, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, execute, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isPoolable, isSimpleIdentifier, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout
-
-
-
-
Constructor Detail
-
BrokeredPreparedStatement
public BrokeredPreparedStatement(BrokeredStatementControl control, java.lang.String sql, java.lang.Object generatedKeys) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
-
Method Detail
-
executeQuery
public final java.sql.ResultSet executeQuery() throws java.sql.SQLExceptionA prepared SQL query is executed and its ResultSet is returned.- Specified by:
executeQueryin interfacejava.sql.PreparedStatement- Returns:
- a ResultSet that contains the data produced by the query; never null
- Throws:
java.sql.SQLException- thrown on failure.
-
executeUpdate
public final int executeUpdate() throws java.sql.SQLExceptionExecute a SQL INSERT, UPDATE or DELETE statement. In addition, SQL statements that return nothing such as SQL DDL statements can be executed.- Specified by:
executeUpdatein interfacejava.sql.PreparedStatement- Returns:
- either the row count for INSERT, UPDATE or DELETE; or 0 for SQL statements that return nothing
- Throws:
java.sql.SQLException- thrown on failure.
-
close
public void close() throws java.sql.SQLExceptionDescription copied from class:BrokeredStatementIn many cases, it is desirable to immediately release a Statements's database and JDBC resources instead of waiting for this to happen when it is automatically closed; the close method provides this immediate release.Note: A Statement is automatically closed when it is garbage collected. When a Statement is closed its current ResultSet, if one exists, is also closed.
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.sql.Statement- Overrides:
closein classBrokeredStatement- Throws:
java.sql.SQLException- thrown on failure.
-
setNull
public final void setNull(int parameterIndex, int sqlType) throws java.sql.SQLExceptionSet a parameter to SQL NULL.Note: You must specify the parameter's SQL type.
- Specified by:
setNullin interfacejava.sql.PreparedStatement- Parameters:
parameterIndex- the first parameter is 1, the second is 2, ...sqlType- SQL type code defined by java.sql.Types- Throws:
java.sql.SQLException- thrown on failure.
-
setNull
public final void setNull(int parameterIndex, int sqlType, java.lang.String typeName) throws java.sql.SQLExceptionSet a parameter to SQL NULL.Note: You must specify the parameter's SQL type.
- Specified by:
setNullin interfacejava.sql.PreparedStatement- Parameters:
parameterIndex- the first parameter is 1, the second is 2, ...sqlType- SQL type code defined by java.sql.Types- Throws:
java.sql.SQLException- thrown on failure.
-
setBoolean
public final void setBoolean(int parameterIndex, boolean x) throws java.sql.SQLExceptionSet 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.- Specified by:
setBooleanin interfacejava.sql.PreparedStatement- Parameters:
parameterIndex- the first parameter is 1, the second is 2, ...x- the parameter value- Throws:
java.sql.SQLException- thrown on failure.
-
setByte
public final void setByte(int parameterIndex, byte x) throws java.sql.SQLExceptionSet a parameter to a Java byte value. The driver converts this to a SQL TINYINT value when it sends it to the database.- Specified by:
setBytein interfacejava.sql.PreparedStatement- Parameters:
parameterIndex- the first parameter is 1, the second is 2, ...x- the parameter value- Throws:
java.sql.SQLException- thrown on failure.
-
setShort
public final void setShort(int parameterIndex, short x) throws java.sql.SQLExceptionSet a parameter to a Java short value. The driver converts this to a SQL SMALLINT value when it sends it to the database.- Specified by:
setShortin interfacejava.sql.PreparedStatement- Parameters:
parameterIndex- the first parameter is 1, the second is 2, ...x- the parameter value- Throws:
java.sql.SQLException- thrown on failure.
-
setInt
public final void setInt(int parameterIndex, int x) throws java.sql.SQLExceptionSet a parameter to a Java int value. The driver converts this to a SQL INTEGER value when it sends it to the database.- Specified by:
setIntin interfacejava.sql.PreparedStatement- Parameters:
parameterIndex- the first parameter is 1, the second is 2, ...x- the parameter value- Throws:
java.sql.SQLException- thrown on failure.
-
setLong
public final void setLong(int parameterIndex, long x) throws java.sql.SQLExceptionSet a parameter to a Java long value. The driver converts this to a SQL BIGINT value when it sends it to the database.- Specified by:
setLongin interfacejava.sql.PreparedStatement- Parameters:
parameterIndex- the first parameter is 1, the second is 2, ...x- the parameter value- Throws:
java.sql.SQLException- thrown on failure.
-
setFloat
public final void setFloat(int parameterIndex, float x) throws java.sql.SQLExceptionSet a parameter to a Java float value. The driver converts this to a SQL FLOAT value when it sends it to the database.- Specified by:
setFloatin interfacejava.sql.PreparedStatement- Parameters:
parameterIndex- the first parameter is 1, the second is 2, ...x- the parameter value- Throws:
java.sql.SQLException- thrown on failure.
-
setDouble
public final void setDouble(int parameterIndex, double x) throws java.sql.SQLExceptionSet a parameter to a Java double value. The driver converts this to a SQL DOUBLE value when it sends it to the database.- Specified by:
setDoublein interfacejava.sql.PreparedStatement- Parameters:
parameterIndex- the first parameter is 1, the second is 2, ...x- the parameter value- Throws:
java.sql.SQLException- thrown on failure.
-
setBigDecimal
public final void setBigDecimal(int parameterIndex, java.math.BigDecimal x) throws java.sql.SQLExceptionSet a parameter to a java.math.BigDecimal value. The driver converts this to a SQL NUMERIC value when it sends it to the database.- Specified by:
setBigDecimalin interfacejava.sql.PreparedStatement- Parameters:
parameterIndex- the first parameter is 1, the second is 2, ...x- the parameter value- Throws:
java.sql.SQLException- thrown on failure.
-
setString
public final void setString(int parameterIndex, java.lang.String x) throws java.sql.SQLExceptionSet 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.- Specified by:
setStringin interfacejava.sql.PreparedStatement- Parameters:
parameterIndex- the first parameter is 1, the second is 2, ...x- the parameter value- Throws:
java.sql.SQLException- thrown on failure.
-
setBytes
public final void setBytes(int parameterIndex, byte[] x) throws java.sql.SQLExceptionSet 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.- Specified by:
setBytesin interfacejava.sql.PreparedStatement- Parameters:
parameterIndex- the first parameter is 1, the second is 2, ...x- the parameter value- Throws:
java.sql.SQLException- thrown on failure.
-
setDate
public final void setDate(int parameterIndex, java.sql.Date x) throws java.sql.SQLExceptionSet a parameter to a java.sql.Date value. The driver converts this to a SQL DATE value when it sends it to the database.- Specified by:
setDatein interfacejava.sql.PreparedStatement- Parameters:
parameterIndex- the first parameter is 1, the second is 2, ...x- the parameter value- Throws:
java.sql.SQLException- thrown on failure.
-
setTime
public final void setTime(int parameterIndex, java.sql.Time x) throws java.sql.SQLExceptionSet a parameter to a java.sql.Time value. The driver converts this to a SQL TIME value when it sends it to the database.- Specified by:
setTimein interfacejava.sql.PreparedStatement- Parameters:
parameterIndex- the first parameter is 1, the second is 2, ...x- the parameter value- Throws:
java.sql.SQLException- thrown on failure.
-
setTimestamp
public final void setTimestamp(int parameterIndex, java.sql.Timestamp x) throws java.sql.SQLExceptionSet a parameter to a java.sql.Timestamp value. The driver converts this to a SQL TIMESTAMP value when it sends it to the database.- Specified by:
setTimestampin interfacejava.sql.PreparedStatement- Parameters:
parameterIndex- the first parameter is 1, the second is 2, ...x- the parameter value- Throws:
java.sql.SQLException- thrown on failure.
-
setAsciiStream
public final void setAsciiStream(int parameterIndex, java.io.InputStream x, int length) throws java.sql.SQLExceptionWe do this inefficiently and read it all in here. The target type is assumed to be a String.- Specified by:
setAsciiStreamin interfacejava.sql.PreparedStatement- Parameters:
parameterIndex- the first parameter is 1, the second is 2, ...x- the java input stream which contains the ASCII parameter valuelength- the number of bytes in the stream- Throws:
java.sql.SQLException- thrown on failure.
-
setUnicodeStream
public final void setUnicodeStream(int parameterIndex, java.io.InputStream x, int length) throws java.sql.SQLExceptionDeprecated.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!- Specified by:
setUnicodeStreamin interfacejava.sql.PreparedStatement- Parameters:
parameterIndex- the first parameter is 1, the second is 2, ...x- the java input stream which contains the UNICODE parameter valuelength- the number of bytes in the stream- Throws:
java.sql.SQLException- thrown on failure.
-
setBinaryStream
public final void setBinaryStream(int parameterIndex, java.io.InputStream x, int length) throws java.sql.SQLException- Specified by:
setBinaryStreamin interfacejava.sql.PreparedStatement- Parameters:
parameterIndex- the first parameter is 1, the second is 2, ...x- the java input stream which contains the binary parameter valuelength- the number of bytes in the stream- Throws:
java.sql.SQLException- thrown on failure.
-
addBatch
public final void addBatch() throws java.sql.SQLExceptionJDBC 2.0 Add a set of parameters to the batch.- Specified by:
addBatchin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException- if a database-access error occurs.
-
clearParameters
public final void clearParameters() throws java.sql.SQLExceptionIn 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.
- Specified by:
clearParametersin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException- thrown on failure.
-
getMetaData
public final java.sql.ResultSetMetaData getMetaData() throws java.sql.SQLExceptionJDBC 2.0 The number, types and properties of a ResultSet's columns are provided by the getMetaData method.- Specified by:
getMetaDatain interfacejava.sql.PreparedStatement- Returns:
- the description of a ResultSet's columns
- Throws:
java.sql.SQLException- Feature not implemented for now.
-
setObject
public final void setObject(int parameterIndex, java.lang.Object x, int targetSqlType, int scale) throws java.sql.SQLExceptionThe 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
- Specified by:
setObjectin interfacejava.sql.PreparedStatement- Parameters:
parameterIndex- The first parameter is 1, the second is 2, ...x- The object containing the input parameter valuetargetSqlType- The SQL type (as defined in java.sql.Types) to be sent to the database. The scale argument may further qualify this type.scale- For java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types this is the number of digits after the decimal. For all other types this value will be ignored,- Throws:
java.sql.SQLException- thrown on failure.
-
setObject
public final void setObject(int parameterIndex, java.lang.Object x, int targetSqlType) throws java.sql.SQLExceptionThis method is like setObject above, but assumes a scale of zero.- Specified by:
setObjectin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException- thrown on failure.
-
setObject
public final void setObject(int parameterIndex, java.lang.Object x) throws java.sql.SQLExceptionSet 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.
- Specified by:
setObjectin interfacejava.sql.PreparedStatement- Parameters:
parameterIndex- The first parameter is 1, the second is 2, ...x- The object containing the input parameter value- Throws:
java.sql.SQLException- thrown on failure.
-
execute
public final boolean execute() throws java.sql.SQLException- Specified by:
executein interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException- thrown on failure.- See Also:
Statement.execute(java.lang.String)
-
setCharacterStream
public final void setCharacterStream(int parameterIndex, java.io.Reader reader, int length) throws java.sql.SQLException- Specified by:
setCharacterStreamin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setRef
public final void setRef(int i, java.sql.Ref x) throws java.sql.SQLException- Specified by:
setRefin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setBlob
public final void setBlob(int i, java.sql.Blob x) throws java.sql.SQLException- Specified by:
setBlobin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setClob
public final void setClob(int i, java.sql.Clob x) throws java.sql.SQLException- Specified by:
setClobin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setArray
public final void setArray(int i, java.sql.Array x) throws java.sql.SQLException- Specified by:
setArrayin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setDate
public final void setDate(int i, java.sql.Date x, java.util.Calendar cal) throws java.sql.SQLException- Specified by:
setDatein interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setTime
public final void setTime(int i, java.sql.Time x, java.util.Calendar cal) throws java.sql.SQLException- Specified by:
setTimein interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setTimestamp
public final void setTimestamp(int i, java.sql.Timestamp x, java.util.Calendar cal) throws java.sql.SQLException- Specified by:
setTimestampin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
executeLargeUpdate
public long executeLargeUpdate() throws java.sql.SQLException- Specified by:
executeLargeUpdatein interfaceEnginePreparedStatement- Specified by:
executeLargeUpdatein interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setBinaryStream
public void setBinaryStream(int parameterIndex, java.io.InputStream x) throws java.sql.SQLException- Specified by:
setBinaryStreamin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setCharacterStream
public void setCharacterStream(int parameterIndex, java.io.Reader reader) throws java.sql.SQLException- Specified by:
setCharacterStreamin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setURL
public final void setURL(int i, java.net.URL x) throws java.sql.SQLException- Specified by:
setURLin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
getParameterMetaData
public final java.sql.ParameterMetaData getParameterMetaData() throws java.sql.SQLException- Specified by:
getParameterMetaDatain interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setRowId
public final void setRowId(int parameterIndex, java.sql.RowId x) throws java.sql.SQLException- Specified by:
setRowIdin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setNString
public final void setNString(int index, java.lang.String value) throws java.sql.SQLException- Specified by:
setNStringin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setNCharacterStream
public final void setNCharacterStream(int parameterIndex, java.io.Reader value) throws java.sql.SQLException- Specified by:
setNCharacterStreamin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setNCharacterStream
public final void setNCharacterStream(int index, java.io.Reader value, long length) throws java.sql.SQLException- Specified by:
setNCharacterStreamin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setNClob
public final void setNClob(int index, java.sql.NClob value) throws java.sql.SQLException- Specified by:
setNClobin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setClob
public final void setClob(int parameterIndex, java.io.Reader reader, long length) throws java.sql.SQLException- Specified by:
setClobin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setBlob
public final void setBlob(int parameterIndex, java.io.InputStream inputStream, long length) throws java.sql.SQLException- Specified by:
setBlobin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setNClob
public final void setNClob(int parameterIndex, java.io.Reader reader) throws java.sql.SQLException- Specified by:
setNClobin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setNClob
public final void setNClob(int parameterIndex, java.io.Reader reader, long length) throws java.sql.SQLException- Specified by:
setNClobin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setSQLXML
public final void setSQLXML(int parameterIndex, java.sql.SQLXML xmlObject) throws java.sql.SQLException- Specified by:
setSQLXMLin interfacejava.sql.PreparedStatement- Throws:
java.sql.SQLException
-
setAsciiStream
public final void setAsciiStream(int parameterIndex, java.io.InputStream x) throws java.sql.SQLExceptionSets the designated parameter to the given input stream.- Specified by:
setAsciiStreamin interfacejava.sql.PreparedStatement- Parameters:
parameterIndex- the first parameter is 1, the second is 2, ...x- the Java input stream that contains the ASCII parameter value- Throws:
java.sql.SQLException- if a database access error occurs or this method is called on a closedPreparedStatement
-
setAsciiStream
public final void setAsciiStream(int parameterIndex, java.io.InputStream x, long length) throws java.sql.SQLExceptionSets the designated parameter to the given input stream, which will have the specified number of bytes.- Specified by:
setAsciiStreamin interfacejava.sql.PreparedStatement- Parameters:
parameterIndex- the first parameter is 1, the second is 2, ...x- the java input stream which contains the ASCII parameter valuelength- the number of bytes in the stream- Throws:
java.sql.SQLException- thrown on failure.
-
setBinaryStream
public final void setBinaryStream(int parameterIndex, java.io.InputStream x, long length) throws java.sql.SQLExceptionSets the designated parameter to the given input stream, which will have the specified number of bytes.- Specified by:
setBinaryStreamin interfacejava.sql.PreparedStatement- Parameters:
parameterIndex- the first parameter is 1, the second is 2, ...x- the java input stream which contains the binary parameter valuelength- the number of bytes in the stream- Throws:
java.sql.SQLException- thrown on failure.
-
setBlob
public final void setBlob(int parameterIndex, java.io.InputStream inputStream) throws java.sql.SQLExceptionSets the designated parameter to aInputStreamobject. This method differs from thesetBinaryStream(int, InputStream)method because it informs the driver that the parameter value should be sent to the server as aBLOB.- Specified by:
setBlobin interfacejava.sql.PreparedStatement- Parameters:
inputStream- an object that contains the data to set the parameter value to.- Throws:
java.sql.SQLException- if a database access error occurs, this method is called on a closedPreparedStatement
-
setCharacterStream
public final void setCharacterStream(int parameterIndex, java.io.Reader x, long length) throws java.sql.SQLExceptionSets the designated parameter to the given Reader, which will have the specified number of bytes.- Specified by:
setCharacterStreamin interfacejava.sql.PreparedStatement- Parameters:
parameterIndex- the first parameter is 1, the second is 2, ...x- the java Reader which contains the UNICODE valuelength- the number of bytes in the stream- Throws:
java.sql.SQLException- thrown on failure.
-
setClob
public final void setClob(int parameterIndex, java.io.Reader reader) throws java.sql.SQLExceptionSets the designated parameter to aReaderobject. This method differs from thesetCharacterStream(int,Reader)method because it informs the driver that the parameter value should be sent to the server as aCLOB.- Specified by:
setClobin interfacejava.sql.PreparedStatement- Parameters:
parameterIndex- the first parameter is 1, the second is 2, ...reader- an object that contains the data to set the parameter value to.- Throws:
java.sql.SQLException- if a database access error occurs, this method is called on a closed PreparedStatement
-
getPreparedStatement
java.sql.PreparedStatement getPreparedStatement() throws java.sql.SQLExceptionAccess 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- Throws:
java.sql.SQLException
-
getStatement
public final java.sql.Statement getStatement() throws java.sql.SQLExceptionOverride the BrokeredStatement's getStatement() to always return a PreparedStatement.- Overrides:
getStatementin classBrokeredStatement- Throws:
java.sql.SQLException
-
createDuplicateStatement
public java.sql.PreparedStatement createDuplicateStatement(java.sql.Connection conn, java.sql.PreparedStatement oldStatement) throws java.sql.SQLExceptionCreate a duplicate PreparedStatement to this, including state, from the passed in Connection.- Throws:
java.sql.SQLException
-
getVersionCounter
public final long getVersionCounter() throws java.sql.SQLExceptionDescription copied from interface:EnginePreparedStatementGet the version of the prepared statement. If this has not been changed, the caller may assume that a recompilation has not taken place, i.e. meta-data are (also) unchanged.- Specified by:
getVersionCounterin interfaceEnginePreparedStatement- Returns:
- version counter
- Throws:
java.sql.SQLException
-
-