The idea behind the logical prepared statement is to allow reuse of the
physical prepared statement. In general the logical entity will forward all
calls to the physical entity. A few methods have special implementations, the
most important one being close. Each method will check that the
logical statement is still open before the call is forwarded to the
underlying physical statement.
LogicalStatementEntity
| Access | Constructor and Description |
|---|---|
| public | LogicalPreparedStatement(PreparedStatement
underlying physical statement physicalPs, StatementKey key for the physical statement stmtKey, StatementCacheInteractor creating statement cache interactor cacheInteractor)Creates a new logical prepared statement. |
| Modifier and Type | Method and Description |
|---|---|
| public void | addBatch()
Implements java. PreparedStatement
object's batch of commands.
|
| public void | addBatch(String
typically this is a SQL sql)INSERT or
UPDATE statementImplements java. Statement object.
|
| public void | cancel()
Implements java. Statement object if both the DBMS and
driver support aborting an SQL statement.
|
| public void | clearBatch()
Implements java. Statement object's current list of
SQL commands.
|
| public void | clearParameters()
Implements java. |
| public void | clearWarnings()
Implements java. Statement
object.
|
| public boolean | execute()
Implements java. PreparedStatement object,
which may be any kind of SQL statement.
|
| public boolean | execute(String
any SQL statement sql)Implements java. |
| public boolean | execute(String
any SQL statement sql, int a constant indicating whether auto-generated
keys should be made available for retrieval using the method
autoGeneratedKeys)getGeneratedKeys; one of the following constants:
Statement.RETURN_GENERATED_KEYS or
Statement.NO_GENERATED_KEYSImplements java. |
| public boolean | execute(String
any SQL statement sql, int[] an array of the indexes of the columns in the
inserted row that should be made available for retrieval by a
call to the method columnIndexes)getGeneratedKeysImplements java. |
| public boolean | execute(String
any SQL statement sql, String[] an array of the names of the columns in the inserted
row that should be made available for retrieval by a call to the
method columnNames)getGeneratedKeysImplements java. |
| public int[] | executeBatch()
Implements java. |
| public long | executeLargeUpdate()
Overrides default java. PreparedStatement object,
which must be an SQL Data Manipulation Language (DML) statement,
such as INSERT, UPDATE or
DELETE; or an SQL statement that returns nothing,
such as a DDL statement.
|
| public ResultSet | executeQuery()
Implements java. PreparedStatement object
and returns the ResultSet object generated by the query.
|
| public ResultSet | executeQuery(String
an SQL statement to be sent to the database, typically a
static SQL sql)SELECT statementImplements java. ResultSet object.
|
| public int | executeUpdate()
Implements java. PreparedStatement object,
which must be an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or
DELETE; or an SQL statement that returns nothing,
such as a DDL statement.
|
| public int | executeUpdate(String
an SQL Data Manipulation Language (DML) statement, such as sql)INSERT, UPDATE or
DELETE; or an SQL statement that returns nothing,
such as a DDL statement.Implements java. INSERT,
UPDATE, or DELETE statement or an
SQL statement that returns nothing, such as an SQL DDL statement.
|
| public int | executeUpdate(String
an SQL Data Manipulation Language (DML) statement, such as sql, int INSERT, UPDATE or
DELETE; or an SQL statement that returns nothing,
such as a DDL statement.a flag indicating whether auto-generated keys
should be made available for retrieval;
one of the following constants:
autoGeneratedKeys)Statement.RETURN_GENERATED_KEYS
Statement.NO_GENERATED_KEYSImplements java. Statement object
should be made available for retrieval.
|
| public int | executeUpdate(String
an SQL Data Manipulation Language (DML) statement, such as sql, int[] INSERT, UPDATE or
DELETE; or an SQL statement that returns nothing,
such as a DDL statement.an array of column indexes indicating the columns
that should be returned from the inserted row columnIndexes)Implements java. |
| public int | executeUpdate(String
an SQL Data Manipulation Language (DML) statement, such as sql, String[] INSERT, UPDATE or
DELETE; or an SQL statement that returns nothing,
such as a DDL statement.an array of the names of the columns that should be
returned from the inserted row columnNames)Implements java. |
| public Connection | getConnection()
Implements java. Connection object
that produced this Statement object.
|
| public int | getFetchDirection()
Implements java. Statement object.
|
| public int | getFetchSize()
Implements java. ResultSet objects
generated from this Statement object.
|
| public ResultSet | getGeneratedKeys()
Implements java. Statement object.
|
| public int | getMaxFieldSize()
Implements java. ResultSet
object produced by this Statement object.
|
| public int | getMaxRows()
Implements java. ResultSet object produced by this
Statement object can contain.
|
| public ResultSetMetaData | getMetaData()
Implements java. ResultSetMetaData object that contains
information about the columns of the ResultSet object
that will be returned when this PreparedStatement object
is executed.
|
| public boolean | getMoreResults()
Implements java. Statement object's next result, returns
true if it is a ResultSet object, and
implicitly closes any current ResultSet
object(s) obtained with the method getResultSet.
|
| public boolean | getMoreResults(int
one of the following current)Statement
constants indicating what should happen to current
ResultSet objects obtained using the method
getResultSet:
Statement.CLOSE_CURRENT_RESULT,
Statement.KEEP_CURRENT_RESULT, or
Statement.CLOSE_ALL_RESULTSImplements java. Statement object's next result, deals with
any current ResultSet object(s) according to the instructions
specified by the given flag, and returns
true if the next result is a ResultSet object.
|
| public ParameterMetaData | getParameterMetaData()
Implements java. PreparedStatement object's parameters.
|
| public int | getQueryTimeout()
Implements java. Statement object to execute.
|
| public ResultSet | getResultSet()
Implements java. ResultSet object.
|
| public int | getResultSetConcurrency()
Implements java. ResultSet objects
generated by this Statement object.
|
| public int | getResultSetHoldability()
Implements java. ResultSet objects
generated by this Statement object.
|
| public int | getResultSetType()
Implements java. ResultSet objects
generated by this Statement object.
|
| public int | getUpdateCount()
Implements java. ResultSet object or there are no more results, -1
is returned.
|
| public SQLWarning | getWarnings()
Implements java. Statement object.
|
| public synchronized boolean | isClosed()
Implements java. Statement object has been closed.
|
| public boolean | isPoolable()
Implements java. Statement
is poolable or not.
|
| public void | setArray(int
the first parameter is 1, the second is 2, ... i, Array an x)Array object that maps an SQL ARRAY valueImplements java. java.sql.Array object.
|
| public void | setAsciiStream(int
the first parameter is 1, the second is 2, ... parameterIndex, InputStream the Java input stream that contains the ASCII parameter value x, int the number of bytes in the stream length)Implements java. |
| public void | setAsciiStream(int
the first parameter is 1, the second is 2, ... arg0, InputStream the Java input stream that contains the ASCII parameter value arg1, long the number of bytes in the stream arg2)Implements java. |
| public void | setAsciiStream(int
the first parameter is 1, the second is 2, ... arg0, InputStream the Java input stream that contains the ASCII parameter value arg1)Implements java. |
| public void | setBigDecimal(int
the first parameter is 1, the second is 2, ... parameterIndex, BigDecimal the parameter value x)Implements java. java.math.BigDecimal value.
|
| public void | setBinaryStream(int
the first parameter is 1, the second is 2, ... parameterIndex, InputStream the java input stream which contains the binary parameter value x, int the number of bytes in the stream length)Implements java. |
| public void | setBinaryStream(int
the first parameter is 1, the second is 2, ... arg0, InputStream the java input stream which contains the binary parameter value arg1, long the number of bytes in the stream arg2)Implements java. |
| public void | setBinaryStream(int
the first parameter is 1, the second is 2, ... arg0, InputStream the java input stream which contains the binary parameter value arg1)Implements java. |
| public void | setBlob(int
the first parameter is 1, the second is 2, ... i, Blob a x)Blob object that maps an SQL BLOB valueImplements java. java.sql.Blob object.
|
| public void | setBlob(int
index of the first parameter is 1,
the second is 2, ... arg0, InputStream An object that contains the data to set the parameter
value to. arg1, long the number of bytes in the parameter data. arg2)Implements java. InputStream object.
|
| public void | setBlob(int
index of the first parameter is 1,
the second is 2, ... arg0, InputStream An object that contains the data to set the parameter
value to. arg1)Implements java. InputStream object.
|
| public void | setBoolean(int
the first parameter is 1, the second is 2, ... parameterIndex, boolean the parameter value x)Implements java. boolean value.
|
| public void | setByte(int
the first parameter is 1, the second is 2, ... parameterIndex, byte the parameter value x)Implements java. byte value.
|
| public void | setBytes(int
the first parameter is 1, the second is 2, ... parameterIndex, byte[] the parameter value x)Implements java. |
| public void | setCharacterStream(int
the first parameter is 1, the second is 2, ... parameterIndex, Reader the reader, int java.io.Reader object that contains the
Unicode datathe number of characters in the stream length)Implements java. Reader
object, which is the given number of characters long.
|
| public void | setCharacterStream(int
the first parameter is 1, the second is 2, ... arg0, Reader the arg1, long java.io.Reader object that contains the
Unicode datathe number of characters in the stream arg2)Implements java. Reader
object, which is the given number of characters long.
|
| public void | setCharacterStream(int
the first parameter is 1, the second is 2, ... arg0, Reader the arg1)java.io.Reader object that contains the
Unicode dataImplements java. Reader
object.
|
| public void | setClob(int
the first parameter is 1, the second is 2, ... i, Clob a x)Clob object that maps an SQL CLOB valueImplements java. java.sql.Clob object.
|
| public void | setClob(int
index of the first parameter is 1, the second is 2, ... arg0, Reader An object that contains the data to set the parameter value to. arg1, long the number of characters in the parameter data. arg2)Implements java. Reader object.
|
| public void | setClob(int
index of the first parameter is 1, the second is 2, ... arg0, Reader An object that contains the data to set the parameter value to. arg1)Implements java. Reader object.
|
| public void | setCursorName(String
the new cursor name, which must be unique within
a connection name)Implements java. String, which
will be used by subsequent Statement object
execute methods.
|
| public void | setDate(int
the first parameter is 1, the second is 2, ... parameterIndex, Date the parameter value x)Implements java. java.sql.Date value
using the default time zone of the virtual machine that is running
the application.
|
| public void | setDate(int
the first parameter is 1, the second is 2, ... parameterIndex, Date the parameter value x, Calendar the cal)Calendar object the driver will use
to construct the dateImplements java. java.sql.Date value,
using the given Calendar object.
|
| public void | setDouble(int
the first parameter is 1, the second is 2, ... parameterIndex, double the parameter value x)Implements java. double value.
|
| public void | setEscapeProcessing(boolean
true to enable escape processing;
false to disable itImplements java. |
| public void | setFetchDirection(int
the initial direction for processing rows direction)Implements java. ResultSet
objects created using this Statement object.
|
| public void | setFetchSize(int
the number of rows to fetch rows)Implements java. ResultSet objects generated by this Statement.
|
| public void | setFloat(int
the first parameter is 1, the second is 2, ... parameterIndex, float the parameter value x)Implements java. float value.
|
| public void | setInt(int
the first parameter is 1, the second is 2, ... parameterIndex, int the parameter value x)Implements java. int value.
|
| public void | setLong(int
the first parameter is 1, the second is 2, ... parameterIndex, long the parameter value x)Implements java. long value.
|
| public void | setMaxFieldSize(int
the new column size limit in bytes; zero means there is no limit max)Implements java. ResultSet
object produced by this Statement object.
|
| public void | setMaxRows(int
the new max rows limit; zero means there is no limit max)Implements java. ResultSet object generated by this Statement
object can contain to the given number.
|
| public void | setNCharacterStream(int
of the first parameter is 1, the second is 2, ... arg0, Reader the parameter value arg1, long the number of characters in the parameter data. arg2)Implements java. Reader object.
|
| public void | setNCharacterStream(int
of the first parameter is 1, the second is 2, ... arg0, Reader the parameter value arg1)Implements java. Reader object.
|
| public void | setNClob(int
of the first parameter is 1, the second is 2, ... arg0, NClob the parameter value arg1)Implements java. java.sql.NClob object.
|
| public void | setNClob(int
index of the first parameter is 1, the second is 2, ... arg0, Reader An object that contains the data to set the parameter value to. arg1, long the number of characters in the parameter data. arg2)Implements java. Reader object.
|
| public void | setNClob(int
index of the first parameter is 1, the second is 2, ... arg0, Reader An object that contains the data to set the parameter value to. arg1)Implements java. Reader object.
|
| public void | setNString(int
of the first parameter is 1, the second is 2, ... arg0, String the parameter value arg1)Implements java. String object.
|
| public void | setNull(int
the first parameter is 1, the second is 2, ... parameterIndex, int the SQL type code defined in sqlType)java.sql.TypesImplements java. NULL.
|
| public void | setNull(int
the first parameter is 1, the second is 2, ... paramIndex, int a value from sqlType, String java.sql.Typesthe fully-qualified name of an SQL user-defined type;
ignored if the parameter is not a user-defined type or REF typeName)Implements java. NULL.
|
| public void | setObject(int
the first parameter is 1, the second is 2, ... parameterIndex, Object the object containing the input parameter value x)Implements java. Sets the value of the designated parameter using 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, int the SQL type (as defined in java.sql.Types) to be
sent to the database targetSqlType)Implements java. |
| public void | setObject(int
the first parameter is 1, the second is 2, ... parameterIndex, Object the object containing the input parameter value x, int the SQL type (as defined in java.sql.Types) to be
sent to the database. The scale argument may further qualify this type. targetSqlType, int for scale)java.sql.Types.DECIMAL
or java.sql.Types.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.Implements java. Sets the value of the designated parameter with the given object. |
| public void | setPoolable(boolean
requests that the statement be pooled if true and
that the statement not be pooled if false arg0)Implements java. Statement be pooled or not pooled.
|
| public void | setQueryTimeout(int
the new query timeout limit in seconds; zero means
there is no limit seconds)Implements java. Statement object to execute to the given number of seconds.
|
| public void | setRef(int
the first parameter is 1, the second is 2, ... i, Ref an SQL x)REF valueImplements java. REF(<structured-type>) value.
|
| public void | setRowId(int
the first parameter is 1, the second is 2, ... arg0, RowId the parameter value arg1)Implements java. java.sql.RowId object.
|
| public void | setShort(int
the first parameter is 1, the second is 2, ... parameterIndex, short the parameter value x)Implements java. short value.
|
| public void | setSQLXML(int
index of the first parameter is 1, the second is 2, ... arg0, SQLXML a arg1)SQLXML object that maps an SQL XML valueImplements java. java.sql.SQLXML object.
|
| public void | setString(int
the first parameter is 1, the second is 2, ... parameterIndex, String the parameter value x)Implements java. String value.
|
| public void | setTime(int
the first parameter is 1, the second is 2, ... parameterIndex, Time the parameter value x)Implements java. java.sql.Time value.
|
| public void | setTime(int
the first parameter is 1, the second is 2, ... parameterIndex, Time the parameter value x, Calendar the cal)Calendar object the driver will use
to construct the timeImplements java. java.sql.Time value,
using the given Calendar object.
|
| public void | setTimestamp(int
the first parameter is 1, the second is 2, ... parameterIndex, Timestamp the parameter value x)Implements java. java.sql.Timestamp value.
|
| public void | setTimestamp(int
the first parameter is 1, the second is 2, ... parameterIndex, Timestamp the parameter value x, Calendar the cal)Calendar object the driver will use
to construct the timestampImplements java. java.sql.Timestamp value,
using the given Calendar object.
|
| public void | setUnicodeStream(int
the first parameter is 1, the second is 2, ... parameterIndex, InputStream a x, int java.io.InputStream object that contains the
Unicode parameter valuethe number of bytes in the stream length)Implements java.
Deprecated
Sets the designated parameter to the given input stream, which
will have the specified number of bytes.
|
| public void | setURL(int
the first parameter is 1, the second is 2, ... parameterIndex, URL the x)java.net.URL object to be setImplements java. java.net.URL value.
|