Package net.sourceforge.jtds.jdbcx.proxy
Class PreparedStatementProxy
java.lang.Object
net.sourceforge.jtds.jdbcx.proxy.StatementProxy
net.sourceforge.jtds.jdbcx.proxy.PreparedStatementProxy
- All Implemented Interfaces:
AutoCloseable,PreparedStatement,Statement,Wrapper
- Direct Known Subclasses:
CallableStatementProxy
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 prepared statement with minimal overhead.
- Version:
- $Id: PreparedStatementProxy.java,v 1.3.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
ConstructorsConstructorDescriptionPreparedStatementProxy(ConnectionProxy connection, JtdsPreparedStatement preparedStatement) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBatch()Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.voidDelgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.booleanexecute()Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.intDelgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.booleanisClosed()booleanbooleanisWrapperFor(Class arg0) voidDelgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.voidsetAsciiStream(int parameterIndex, InputStream x) voidsetAsciiStream(int parameterIndex, InputStream x, int length) Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.voidsetAsciiStream(int parameterIndex, InputStream x, long length) voidsetBigDecimal(int parameterIndex, BigDecimal x) Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.voidsetBinaryStream(int parameterIndex, InputStream x) voidsetBinaryStream(int parameterIndex, InputStream x, int length) Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.voidsetBinaryStream(int parameterIndex, InputStream x, long length) voidsetBlob(int parameterIndex, InputStream inputStream) voidsetBlob(int parameterIndex, InputStream inputStream, long length) voidDelgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.voidsetBoolean(int parameterIndex, boolean x) Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.voidsetByte(int parameterIndex, byte x) Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.voidsetBytes(int parameterIndex, byte[] x) Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.voidsetCharacterStream(int parameterIndex, Reader reader) voidsetCharacterStream(int parameterIndex, Reader x, int length) Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.voidsetCharacterStream(int parameterIndex, Reader reader, long length) voidvoidvoidDelgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.voidDelgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.voidDelgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.voidsetDouble(int parameterIndex, double x) Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.voidsetFloat(int parameterIndex, float x) Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.voidsetInt(int parameterIndex, int x) Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.voidsetLong(int parameterIndex, long x) Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.voidsetNCharacterStream(int parameterIndex, Reader value) voidsetNCharacterStream(int parameterIndex, Reader value, long length) voidvoidvoidvoidsetNString(int parameterIndex, String value) voidsetNull(int parameterIndex, int sqlType) Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.voidDelgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.voidDelgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.voidDelgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.voidDelgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.voidsetPoolable(boolean poolable) voidDelgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.voidvoidsetShort(int parameterIndex, short x) Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.voidvoidDelgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.voidDelgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.voidDelgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.voidsetTimestamp(int parameterIndex, Timestamp x) Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.voidsetTimestamp(int parameterIndex, Timestamp x, Calendar cal) Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.voidsetUnicodeStream(int parameterIndex, InputStream x, int length) Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.voidDelgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.Methods inherited from class net.sourceforge.jtds.jdbcx.proxy.StatementProxy
addBatch, cancel, clearBatch, clearWarnings, close, closeOnCompletion, execute, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isCloseOnCompletion, processSQLException, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout, validateConnectionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.sql.PreparedStatement
executeLargeUpdate, setObject, setObjectMethods inherited from interface java.sql.Statement
addBatch, cancel, clearBatch, clearWarnings, close, closeOnCompletion, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, execute, execute, execute, execute, executeBatch, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isCloseOnCompletion, isSimpleIdentifier, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setQueryTimeout
-
Field Details
-
_preparedStatement
-
-
Constructor Details
-
PreparedStatementProxy
PreparedStatementProxy(ConnectionProxy connection, JtdsPreparedStatement preparedStatement)
-
-
Method Details
-
executeQuery
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
executeQueryin interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
executeUpdate
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
executeUpdatein interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
setNull
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
setNullin interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
setBoolean
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
setBooleanin interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
setByte
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
setBytein interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
setShort
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
setShortin interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
setInt
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
setIntin interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
setLong
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
setLongin interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
setFloat
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
setFloatin interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
setDouble
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
setDoublein interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
setBigDecimal
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
setBigDecimalin interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
setString
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
setStringin interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
setBytes
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
setBytesin interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
setDate
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
setDatein interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
setTime
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
setTimein interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
setTimestamp
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
setTimestampin interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
setAsciiStream
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
setAsciiStreamin interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
setUnicodeStream
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
setUnicodeStreamin interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
setBinaryStream
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
setBinaryStreamin interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
clearParameters
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
clearParametersin interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
setObject
public void setObject(int parameterIndex, Object x, int targetSqlType, int scale) throws SQLException Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
setObjectin interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
setObject
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
setObjectin interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
setObject
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
setObjectin interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
execute
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
executein interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
addBatch
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
addBatchin interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
setCharacterStream
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
setCharacterStreamin interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
setRef
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
setRefin interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
setBlob
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
setBlobin interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
setClob
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
setClobin interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
setArray
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
setArrayin interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
getMetaData
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
getMetaDatain interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
setDate
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
setDatein interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
setTime
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
setTimein interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
setTimestamp
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
setTimestampin interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
setNull
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
setNullin interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
setURL
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
setURLin interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
getParameterMetaData
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.- Specified by:
getParameterMetaDatain interfacePreparedStatement- Throws:
SQLException- if an error occurs
-
setAsciiStream
- Specified by:
setAsciiStreamin interfacePreparedStatement- Throws:
SQLException
-
setAsciiStream
- Specified by:
setAsciiStreamin interfacePreparedStatement- Throws:
SQLException
-
setBinaryStream
- Specified by:
setBinaryStreamin interfacePreparedStatement- Throws:
SQLException
-
setBinaryStream
- Specified by:
setBinaryStreamin interfacePreparedStatement- Throws:
SQLException
-
setBlob
- Specified by:
setBlobin interfacePreparedStatement- Throws:
SQLException
-
setBlob
- Specified by:
setBlobin interfacePreparedStatement- Throws:
SQLException
-
setCharacterStream
- Specified by:
setCharacterStreamin interfacePreparedStatement- Throws:
SQLException
-
setCharacterStream
- Specified by:
setCharacterStreamin interfacePreparedStatement- Throws:
SQLException
-
setClob
- Specified by:
setClobin interfacePreparedStatement- Throws:
SQLException
-
setClob
- Specified by:
setClobin interfacePreparedStatement- Throws:
SQLException
-
setNCharacterStream
- Specified by:
setNCharacterStreamin interfacePreparedStatement- Throws:
SQLException
-
setNCharacterStream
- Specified by:
setNCharacterStreamin interfacePreparedStatement- Throws:
SQLException
-
setNClob
- Specified by:
setNClobin interfacePreparedStatement- Throws:
SQLException
-
setNClob
- Specified by:
setNClobin interfacePreparedStatement- Throws:
SQLException
-
setNClob
- Specified by:
setNClobin interfacePreparedStatement- Throws:
SQLException
-
setNString
- Specified by:
setNStringin interfacePreparedStatement- Throws:
SQLException
-
setRowId
- Specified by:
setRowIdin interfacePreparedStatement- Throws:
SQLException
-
setSQLXML
- Specified by:
setSQLXMLin interfacePreparedStatement- Throws:
SQLException
-
isClosed
- Specified by:
isClosedin interfaceStatement- Overrides:
isClosedin classStatementProxy- Throws:
SQLException
-
isPoolable
- Specified by:
isPoolablein interfaceStatement- Overrides:
isPoolablein classStatementProxy- Throws:
SQLException
-
setPoolable
- Specified by:
setPoolablein interfaceStatement- Overrides:
setPoolablein classStatementProxy- Throws:
SQLException
-
isWrapperFor
- Specified by:
isWrapperForin interfaceWrapper- Overrides:
isWrapperForin classStatementProxy- Throws:
SQLException
-
unwrap
- Specified by:
unwrapin interfaceWrapper- Overrides:
unwrapin classStatementProxy- Throws:
SQLException
-