public class PreparedStatementWrapper30 extends PreparedStatementWrapper
preparedStatement
_logger, connection, executor, jdbcStatement, leakDetector, resultSetCount
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
Constructor and Description |
---|
PreparedStatementWrapper30(Connection con,
PreparedStatement statement,
boolean enableCaching)
Creates a new instance of PreparedStatement Wrapper for JDBC 3.0
|
Modifier and Type | Method and Description |
---|---|
ResultSet |
executeQuery()
Executes the SQL query in this
PreparedStatement object
and returns the ResultSet object generated by the query. |
ResultSet |
executeQuery(String sql)
Executes the given SQL statement, which returns a single
ResultSet object. |
ResultSet |
getGeneratedKeys()
Retrieves any auto-generated keys created as a result of executing this
Statement object. |
ResultSet |
getResultSet()
Retrieves the current result as a
ResultSet object. |
addBatch, clearParameters, close, closeOnCompletion, execute, executeUpdate, getCached, getMetaData, getParameterMetaData, incrementResultSetReferenceCount, isBusy, isCloseOnCompletion, isValid, resultSetClosed, setArray, setAsciiStream, setBigDecimal, setBinaryStream, setBlob, setBoolean, setBusy, setByte, setBytes, setCached, setCharacterStream, setClob, setDate, setDate, setDouble, setFetchDirection, setFetchSize, setFloat, setInt, setLong, setMaxFieldSize, setMaxRows, setNull, setNull, setObject, setObject, setObject, setQueryTimeout, setRef, setShort, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURL, setValid
actualCloseOnCompletion, addBatch, cancel, clearBatch, clearWarnings, decrementResultSetCount, execute, execute, execute, execute, executeBatch, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getActualConnection, getCloseOnCompletion, getConnection, getFetchDirection, getFetchSize, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSetConcurrency, getResultSetCount, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, incrementResultSetCount, isMarkedForReclaim, markForReclaim, reclaimStatement, setCursorName, setEscapeProcessing
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
executeLargeUpdate, setAsciiStream, setAsciiStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setCharacterStream, setCharacterStream, setClob, setClob, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setObject, setObject, setRowId, setSQLXML
addBatch, cancel, clearBatch, clearWarnings, execute, execute, execute, execute, executeBatch, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isPoolable, setCursorName, setEscapeProcessing, setLargeMaxRows, setPoolable
isWrapperFor, unwrap
public PreparedStatementWrapper30(Connection con, PreparedStatement statement, boolean enableCaching) throws SQLException
con
- ConnectionWrapperstatement
- PreparedStatement that is wrappedSQLException
public ResultSet executeQuery() throws SQLException
PreparedStatement
object
and returns the ResultSet
object generated by the query.ResultSet
object that contains the data produced by the
query; never null
SQLException
- if a database access error occurs or the SQL
statement does not return a ResultSet
objectpublic ResultSet executeQuery(String sql) throws SQLException
ResultSet
object.sql
- an SQL statement to be sent to the database, typically a
static SQL SELECT
statementResultSet
object that contains the data produced
by the given query; never null
SQLException
- if a database access error occurs or the given
SQL statement produces anything other than a single
ResultSet
objectpublic ResultSet getGeneratedKeys() throws SQLException
Statement
object. If this Statement
object did
not generate any keys, an empty ResultSet
object is returned.ResultSet
object containing the auto-generated key(s)
generated by the execution of this Statement
objectSQLException
- if a database access error occurspublic ResultSet getResultSet() throws SQLException
ResultSet
object.
This method should be called only once per result.ResultSet
object or
null
if the result is an update count or there are no more resultsSQLException
- if a database access error occursPreparedStatementWrapper.execute()
Copyright © 2018. All rights reserved.