public class StatementWrapper30 extends StatementWrapper
_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 |
---|
StatementWrapper30(Connection con,
Statement statement)
Creates a new instance of StatementWrapper for JDBC 3.0
|
Modifier and Type | Method and Description |
---|---|
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. |
actualCloseOnCompletion, addBatch, cancel, clearBatch, clearWarnings, close, closeOnCompletion, 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, isCloseOnCompletion, isMarkedForReclaim, markForReclaim, reclaimStatement, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, getLargeMaxRows, getLargeUpdateCount, isClosed, isPoolable, setLargeMaxRows, setPoolable
isWrapperFor, unwrap
public StatementWrapper30(Connection con, Statement statement)
con
- ConnectionWrapper statement
- Statement that is to be wrappedpublic 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 occursStatementWrapper.execute(java.lang.String)
Copyright © 2018. All rights reserved.