Package net.sourceforge.jtds.jdbcx.proxy
Class StatementProxy
java.lang.Object
net.sourceforge.jtds.jdbcx.proxy.StatementProxy
- All Implemented Interfaces:
AutoCloseable,Statement,Wrapper
- Direct Known Subclasses:
PreparedStatementProxy
This class would be better implemented as a java.lang.reflect.Proxy. However, this
feature was not added until 1.3 and reflection performance was not improved until 1.4.
Since the driver still needs to be compatible with 1.2 and 1.3 this class is used
to delegate the calls to a statement with minimal overhead.
- Version:
- $Id: StatementProxy.java,v 1.4.4.3 2009-12-30 08:45:34 ickzon Exp $
-
Field Summary
FieldsFields inherited from interface java.sql.Statement
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDelgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.voidcancel()Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.voidDelgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.voidDelgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.voidclose()Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.voidbooleanDelgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.booleanDelgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.booleanDelgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.booleanDelgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.int[]Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.executeQuery(String sql) Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.intexecuteUpdate(String sql) Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.intexecuteUpdate(String sql, int autoGeneratedKeys) Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.intexecuteUpdate(String sql, int[] columnIndexes) Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.intexecuteUpdate(String sql, String[] columnNames) Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.intDelgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.intDelgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.intDelgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.intDelgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.booleanDelgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.booleangetMoreResults(int current) Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.intDelgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.intDelgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.intDelgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.intDelgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.intDelgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.booleanisClosed()booleanbooleanbooleanisWrapperFor(Class arg0) protected voidprocessSQLException(SQLException sqlException) Processes SQLExceptions.voidsetCursorName(String name) Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.voidsetEscapeProcessing(boolean enable) Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.voidsetFetchDirection(int direction) Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.voidsetFetchSize(int rows) Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.voidsetMaxFieldSize(int max) Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.voidsetMaxRows(int max) Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.voidsetPoolable(boolean poolable) voidsetQueryTimeout(int seconds) Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.protected voidValidates the connection state.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.sql.Statement
enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, getLargeMaxRows, getLargeUpdateCount, isSimpleIdentifier, setLargeMaxRows
-
Field Details
-
_connection
-
_statement
-
-
Constructor Details
-
StatementProxy
StatementProxy(ConnectionProxy connection, JtdsStatement statement)
-
-
Method Details
-
executeQuery
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
executeQueryin interfaceStatement- Throws:
SQLException- if an error occurs
-
executeUpdate
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
executeUpdatein interfaceStatement- Throws:
SQLException- if an error occurs
-
close
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceStatement- Throws:
SQLException- if an error occurs
-
getMaxFieldSize
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
getMaxFieldSizein interfaceStatement- Throws:
SQLException- if an error occurs
-
setMaxFieldSize
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
setMaxFieldSizein interfaceStatement- Throws:
SQLException- if an error occurs
-
getMaxRows
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
getMaxRowsin interfaceStatement- Throws:
SQLException- if an error occurs
-
setMaxRows
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
setMaxRowsin interfaceStatement- Throws:
SQLException- if an error occurs
-
setEscapeProcessing
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
setEscapeProcessingin interfaceStatement- Throws:
SQLException- if an error occurs
-
getQueryTimeout
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
getQueryTimeoutin interfaceStatement- Throws:
SQLException- if an error occurs
-
setQueryTimeout
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
setQueryTimeoutin interfaceStatement- Throws:
SQLException- if an error occurs
-
cancel
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
cancelin interfaceStatement- Throws:
SQLException- if an error occurs
-
getWarnings
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
getWarningsin interfaceStatement- Throws:
SQLException- if an error occurs
-
clearWarnings
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
clearWarningsin interfaceStatement- Throws:
SQLException- if an error occurs
-
setCursorName
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
setCursorNamein interfaceStatement- Throws:
SQLException- if an error occurs
-
execute
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
executein interfaceStatement- Throws:
SQLException- if an error occurs
-
getResultSet
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
getResultSetin interfaceStatement- Throws:
SQLException- if an error occurs
-
getUpdateCount
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
getUpdateCountin interfaceStatement- Throws:
SQLException- if an error occurs
-
getMoreResults
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
getMoreResultsin interfaceStatement- Throws:
SQLException- if an error occurs
-
setFetchDirection
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
setFetchDirectionin interfaceStatement- Throws:
SQLException- if an error occurs
-
getFetchDirection
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
getFetchDirectionin interfaceStatement- Throws:
SQLException- if an error occurs
-
setFetchSize
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
setFetchSizein interfaceStatement- Throws:
SQLException- if an error occurs
-
getFetchSize
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
getFetchSizein interfaceStatement- Throws:
SQLException- if an error occurs
-
getResultSetConcurrency
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
getResultSetConcurrencyin interfaceStatement- Throws:
SQLException- if an error occurs
-
getResultSetType
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
getResultSetTypein interfaceStatement- Throws:
SQLException- if an error occurs
-
addBatch
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
addBatchin interfaceStatement- Throws:
SQLException- if an error occurs
-
clearBatch
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
clearBatchin interfaceStatement- Throws:
SQLException- if an error occurs
-
executeBatch
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
executeBatchin interfaceStatement- Throws:
SQLException- if an error occurs
-
getConnection
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
getConnectionin interfaceStatement- Throws:
SQLException- if an error occurs
-
getMoreResults
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
getMoreResultsin interfaceStatement- Throws:
SQLException- if an error occurs
-
getGeneratedKeys
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
getGeneratedKeysin interfaceStatement- Throws:
SQLException- if an error occurs
-
executeUpdate
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
executeUpdatein interfaceStatement- Throws:
SQLException- if an error occurs
-
executeUpdate
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
executeUpdatein interfaceStatement- Throws:
SQLException- if an error occurs
-
executeUpdate
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
executeUpdatein interfaceStatement- Throws:
SQLException- if an error occurs
-
execute
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
executein interfaceStatement- Throws:
SQLException- if an error occurs
-
execute
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
executein interfaceStatement- Throws:
SQLException- if an error occurs
-
execute
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
executein interfaceStatement- Throws:
SQLException- if an error occurs
-
getResultSetHoldability
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.- Specified by:
getResultSetHoldabilityin interfaceStatement- Throws:
SQLException- if an error occurs
-
validateConnection
Validates the connection state.- Throws:
SQLException
-
processSQLException
Processes SQLExceptions.- Throws:
SQLException
-
isClosed
- Specified by:
isClosedin interfaceStatement- Throws:
SQLException
-
isPoolable
- Specified by:
isPoolablein interfaceStatement- Throws:
SQLException
-
setPoolable
- Specified by:
setPoolablein interfaceStatement- Throws:
SQLException
-
isWrapperFor
- Specified by:
isWrapperForin interfaceWrapper- Throws:
SQLException
-
unwrap
- Specified by:
unwrapin interfaceWrapper- Throws:
SQLException
-
closeOnCompletion
- Specified by:
closeOnCompletionin interfaceStatement- Throws:
SQLException
-
isCloseOnCompletion
- Specified by:
isCloseOnCompletionin interfaceStatement- Throws:
SQLException
-