public abstract class ExtendedStatement extends PreparedStatementDelegator
PreparedStatements should always be used and the intention is that there should be no use of Statement at all. The implementation here is generally for the case where someone uses the Statement api on an ExtendedPreparedStatement.
| Modifier and Type | Field and Description |
|---|---|
protected PooledConnection |
pooledConnection
The pooled connection this Statement belongs to.
|
protected PreparedStatement |
pstmt
The underlying Statement that this object wraps.
|
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO| Constructor and Description |
|---|
ExtendedStatement(PooledConnection pooledConnection,
PreparedStatement pstmt)
Create the ExtendedStatement for a given pooledConnection.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBatch(String sql)
Add the sql for batch execution.
|
void |
cancel()
Standard Statement method call.
|
void |
clearBatch()
Standard Statement method call.
|
void |
clearWarnings()
Standard Statement method call.
|
abstract void |
close()
Put the statement back into the statement cache.
|
boolean |
execute(String sql)
Execute the sql.
|
boolean |
execute(String s,
int i)
Standard Statement method call.
|
boolean |
execute(String s,
int[] i)
Standard Statement method call.
|
boolean |
execute(String s,
String[] i)
Standard Statement method call.
|
int[] |
executeBatch()
Standard Statement method call.
|
ResultSet |
executeQuery(String sql)
Execute the query.
|
int |
executeUpdate(String sql)
Execute the dml sql.
|
int |
executeUpdate(String s,
int i)
Standard Statement method call.
|
int |
executeUpdate(String s,
int[] i)
Standard Statement method call.
|
int |
executeUpdate(String s,
String[] i)
Standard Statement method call.
|
Connection |
getConnection()
Return the underlying connection.
|
int |
getFetchDirection()
Standard Statement method call.
|
int |
getFetchSize()
Standard Statement method call.
|
ResultSet |
getGeneratedKeys()
Standard Statement method call.
|
int |
getMaxFieldSize()
Standard Statement method call.
|
int |
getMaxRows()
Standard Statement method call.
|
boolean |
getMoreResults()
Standard Statement method call.
|
boolean |
getMoreResults(int i)
Standard Statement method call.
|
int |
getQueryTimeout()
Standard Statement method call.
|
ResultSet |
getResultSet()
Standard Statement method call.
|
int |
getResultSetConcurrency()
Standard Statement method call.
|
int |
getResultSetHoldability()
Standard Statement method call.
|
int |
getResultSetType()
Standard Statement method call.
|
int |
getUpdateCount()
Standard Statement method call.
|
SQLWarning |
getWarnings()
Standard Statement method call.
|
void |
setCursorName(String name)
Standard Statement method call.
|
void |
setEscapeProcessing(boolean enable)
Standard Statement method call.
|
void |
setFetchDirection(int direction)
Standard Statement method call.
|
void |
setFetchSize(int rows)
Standard Statement method call.
|
void |
setMaxFieldSize(int max)
Standard Statement method call.
|
void |
setMaxRows(int max)
Standard Statement method call.
|
void |
setQueryTimeout(int seconds)
Standard Statement method call.
|
addBatch, clearParameters, closeOnCompletion, execute, executeQuery, executeUpdate, getMetaData, getParameterMetaData, isClosed, isCloseOnCompletion, isPoolable, isWrapperFor, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setNull, setNull, setObject, setObject, setObject, setPoolable, setRef, setRowId, setShort, setSQLXML, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURL, unwrapprotected final PooledConnection pooledConnection
protected final PreparedStatement pstmt
public ExtendedStatement(PooledConnection pooledConnection, PreparedStatement pstmt)
public abstract void close()
throws SQLException
close in interface AutoCloseableclose in interface Statementclose in class PreparedStatementDelegatorSQLExceptionpublic Connection getConnection() throws SQLException
getConnection in interface StatementgetConnection in class PreparedStatementDelegatorSQLExceptionpublic void addBatch(String sql) throws SQLException
addBatch in interface StatementaddBatch in class PreparedStatementDelegatorSQLExceptionpublic boolean execute(String sql) throws SQLException
execute in interface Statementexecute in class PreparedStatementDelegatorSQLExceptionpublic ResultSet executeQuery(String sql) throws SQLException
executeQuery in interface StatementexecuteQuery in class PreparedStatementDelegatorSQLExceptionpublic int executeUpdate(String sql) throws SQLException
executeUpdate in interface StatementexecuteUpdate in class PreparedStatementDelegatorSQLExceptionpublic int[] executeBatch()
throws SQLException
executeBatch in interface StatementexecuteBatch in class PreparedStatementDelegatorSQLExceptionpublic void cancel()
throws SQLException
cancel in interface Statementcancel in class PreparedStatementDelegatorSQLExceptionpublic void clearBatch()
throws SQLException
clearBatch in interface StatementclearBatch in class PreparedStatementDelegatorSQLExceptionpublic void clearWarnings()
throws SQLException
clearWarnings in interface StatementclearWarnings in class PreparedStatementDelegatorSQLExceptionpublic int getFetchDirection()
throws SQLException
getFetchDirection in interface StatementgetFetchDirection in class PreparedStatementDelegatorSQLExceptionpublic int getFetchSize()
throws SQLException
getFetchSize in interface StatementgetFetchSize in class PreparedStatementDelegatorSQLExceptionpublic int getMaxFieldSize()
throws SQLException
getMaxFieldSize in interface StatementgetMaxFieldSize in class PreparedStatementDelegatorSQLExceptionpublic int getMaxRows()
throws SQLException
getMaxRows in interface StatementgetMaxRows in class PreparedStatementDelegatorSQLExceptionpublic boolean getMoreResults()
throws SQLException
getMoreResults in interface StatementgetMoreResults in class PreparedStatementDelegatorSQLExceptionpublic int getQueryTimeout()
throws SQLException
getQueryTimeout in interface StatementgetQueryTimeout in class PreparedStatementDelegatorSQLExceptionpublic ResultSet getResultSet() throws SQLException
getResultSet in interface StatementgetResultSet in class PreparedStatementDelegatorSQLExceptionpublic int getResultSetConcurrency()
throws SQLException
getResultSetConcurrency in interface StatementgetResultSetConcurrency in class PreparedStatementDelegatorSQLExceptionpublic int getResultSetType()
throws SQLException
getResultSetType in interface StatementgetResultSetType in class PreparedStatementDelegatorSQLExceptionpublic int getUpdateCount()
throws SQLException
getUpdateCount in interface StatementgetUpdateCount in class PreparedStatementDelegatorSQLExceptionpublic SQLWarning getWarnings() throws SQLException
getWarnings in interface StatementgetWarnings in class PreparedStatementDelegatorSQLExceptionpublic void setCursorName(String name) throws SQLException
setCursorName in interface StatementsetCursorName in class PreparedStatementDelegatorSQLExceptionpublic void setEscapeProcessing(boolean enable)
throws SQLException
setEscapeProcessing in interface StatementsetEscapeProcessing in class PreparedStatementDelegatorSQLExceptionpublic void setFetchDirection(int direction)
throws SQLException
setFetchDirection in interface StatementsetFetchDirection in class PreparedStatementDelegatorSQLExceptionpublic void setFetchSize(int rows)
throws SQLException
setFetchSize in interface StatementsetFetchSize in class PreparedStatementDelegatorSQLExceptionpublic void setMaxFieldSize(int max)
throws SQLException
setMaxFieldSize in interface StatementsetMaxFieldSize in class PreparedStatementDelegatorSQLExceptionpublic void setMaxRows(int max)
throws SQLException
setMaxRows in interface StatementsetMaxRows in class PreparedStatementDelegatorSQLExceptionpublic void setQueryTimeout(int seconds)
throws SQLException
setQueryTimeout in interface StatementsetQueryTimeout in class PreparedStatementDelegatorSQLExceptionpublic boolean getMoreResults(int i)
throws SQLException
getMoreResults in interface StatementgetMoreResults in class PreparedStatementDelegatorSQLExceptionpublic ResultSet getGeneratedKeys() throws SQLException
getGeneratedKeys in interface StatementgetGeneratedKeys in class PreparedStatementDelegatorSQLExceptionpublic int executeUpdate(String s, int i) throws SQLException
executeUpdate in interface StatementexecuteUpdate in class PreparedStatementDelegatorSQLExceptionpublic int executeUpdate(String s, int[] i) throws SQLException
executeUpdate in interface StatementexecuteUpdate in class PreparedStatementDelegatorSQLExceptionpublic int executeUpdate(String s, String[] i) throws SQLException
executeUpdate in interface StatementexecuteUpdate in class PreparedStatementDelegatorSQLExceptionpublic boolean execute(String s, int i) throws SQLException
execute in interface Statementexecute in class PreparedStatementDelegatorSQLExceptionpublic boolean execute(String s, int[] i) throws SQLException
execute in interface Statementexecute in class PreparedStatementDelegatorSQLExceptionpublic boolean execute(String s, String[] i) throws SQLException
execute in interface Statementexecute in class PreparedStatementDelegatorSQLExceptionpublic int getResultSetHoldability()
throws SQLException
getResultSetHoldability in interface StatementgetResultSetHoldability in class PreparedStatementDelegatorSQLExceptionCopyright © 2014. All Rights Reserved.