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 TypeMethodDescriptionvoid
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.void
cancel()
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.void
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.void
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.void
close()
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.void
boolean
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.boolean
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.boolean
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.boolean
Delgates 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.int
executeUpdate
(String sql) Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.int
executeUpdate
(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.int
executeUpdate
(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.int
executeUpdate
(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.int
Delgates 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.Delgates 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.int
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.boolean
Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.boolean
getMoreResults
(int current) Delgates 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.Delgates 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.int
Delgates 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.int
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.boolean
isClosed()
boolean
boolean
boolean
isWrapperFor
(Class arg0) protected void
processSQLException
(SQLException sqlException) Processes SQLExceptions.void
setCursorName
(String name) Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.void
setEscapeProcessing
(boolean enable) Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.void
setFetchDirection
(int direction) Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.void
setFetchSize
(int rows) Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.void
setMaxFieldSize
(int max) Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.void
setMaxRows
(int max) Delgates calls to the statement; SQLExceptions thrown from the statement will cause an event to be fired on the connection pool listeners.void
setPoolable
(boolean poolable) void
setQueryTimeout
(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 void
Validates the connection state.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
executeQuery
in 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:
executeUpdate
in 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:
close
in interfaceAutoCloseable
- Specified by:
close
in 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:
getMaxFieldSize
in 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:
setMaxFieldSize
in 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:
getMaxRows
in 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:
setMaxRows
in 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:
setEscapeProcessing
in 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:
getQueryTimeout
in 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:
setQueryTimeout
in 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:
cancel
in 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:
getWarnings
in 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:
clearWarnings
in 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:
setCursorName
in 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:
execute
in 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:
getResultSet
in 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:
getUpdateCount
in 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:
getMoreResults
in 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:
setFetchDirection
in 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:
getFetchDirection
in 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:
setFetchSize
in 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:
getFetchSize
in 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:
getResultSetConcurrency
in 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:
getResultSetType
in 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:
addBatch
in 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:
clearBatch
in 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:
executeBatch
in 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:
getConnection
in 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:
getMoreResults
in 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:
getGeneratedKeys
in 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:
executeUpdate
in 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:
executeUpdate
in 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:
executeUpdate
in 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:
execute
in 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:
execute
in 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:
execute
in 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:
getResultSetHoldability
in interfaceStatement
- Throws:
SQLException
- if an error occurs
-
validateConnection
Validates the connection state.- Throws:
SQLException
-
processSQLException
Processes SQLExceptions.- Throws:
SQLException
-
isClosed
- Specified by:
isClosed
in interfaceStatement
- Throws:
SQLException
-
isPoolable
- Specified by:
isPoolable
in interfaceStatement
- Throws:
SQLException
-
setPoolable
- Specified by:
setPoolable
in interfaceStatement
- Throws:
SQLException
-
isWrapperFor
- Specified by:
isWrapperFor
in interfaceWrapper
- Throws:
SQLException
-
unwrap
- Specified by:
unwrap
in interfaceWrapper
- Throws:
SQLException
-
closeOnCompletion
- Specified by:
closeOnCompletion
in interfaceStatement
- Throws:
SQLException
-
isCloseOnCompletion
- Specified by:
isCloseOnCompletion
in interfaceStatement
- Throws:
SQLException
-