net.sourceforge.jtds.jdbcx.proxy

Class PreparedStatementProxy

Implemented Interfaces:
PreparedStatement, Statement
Known Direct Subclasses:
CallableStatementProxy

public class PreparedStatementProxy
extends StatementProxy
implements PreparedStatement

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 2004/08/24 17:45:08 bheineman Exp $

Field Summary

private JtdsPreparedStatement
_preparedStatement

Fields inherited from class net.sourceforge.jtds.jdbcx.proxy.StatementProxy

_connection, _statement

Constructor Summary

PreparedStatementProxy(ConnectionProxy connection, JtdsPreparedStatement preparedStatement)

Method Summary

void
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.
void
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.
boolean
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.
ResultSet
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.
int
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.
ResultSetMetaData
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.
ParameterMetaData
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.
void
setArray(int parameterIndex, Array 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.
void
setAsciiStream(int parameterIndex, java.io.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.
void
setBigDecimal(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.
void
setBinaryStream(int parameterIndex, java.io.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.
void
setBlob(int parameterIndex, Blob 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.
void
setBoolean(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.
void
setByte(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.
void
setBytes(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.
void
setCharacterStream(int parameterIndex, java.io.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.
void
setClob(int parameterIndex, Clob 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.
void
setDate(int parameterIndex, java.sql.Date 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.
void
setDate(int parameterIndex, java.sql.Date 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.
void
setDouble(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.
void
setFloat(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.
void
setInt(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.
void
setLong(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.
void
setNull(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.
void
setNull(int parameterIndex, int sqlType, String typeName)
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.
void
setObject(int parameterIndex, Object 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.
void
setObject(int parameterIndex, Object x, int targetSqlType)
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.
void
setObject(int parameterIndex, Object x, int targetSqlType, int scale)
Delgates calls to the prepared statement; SQLExceptions thrown from the prepared statement will cause an event to be fired on the connection pool listeners.
void
setRef(int parameterIndex, Ref 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.
void
setShort(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.
void
setString(int parameterIndex, String 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.
void
setTime(int parameterIndex, java.sql.Time 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.
void
setTime(int parameterIndex, java.sql.Time 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.
void
setTimestamp(int parameterIndex, java.sql.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.
void
setTimestamp(int parameterIndex, java.sql.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.
void
setURL(int parameterIndex, java.net.URL 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.
void
setUnicodeStream(int parameterIndex, java.io.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.

Methods inherited from class net.sourceforge.jtds.jdbcx.proxy.StatementProxy

addBatch, cancel, clearBatch, clearWarnings, close, 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, processSQLException, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout, validateConnection

Field Details

_preparedStatement

private JtdsPreparedStatement _preparedStatement

Constructor Details

PreparedStatementProxy

(package private)  PreparedStatementProxy(ConnectionProxy connection,
                                          JtdsPreparedStatement preparedStatement)

Method Details

addBatch

public void addBatch()
            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.

clearParameters

public void clearParameters()
            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.

execute

public boolean execute()
            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.

executeQuery

public ResultSet executeQuery()
            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.

executeUpdate

public int executeUpdate()
            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.

getMetaData

public ResultSetMetaData getMetaData()
            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.

getParameterMetaData

public ParameterMetaData getParameterMetaData()
            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.

setArray

public void setArray(int parameterIndex,
                     Array x)
            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.

setAsciiStream

public void setAsciiStream(int parameterIndex,
                           java.io.InputStream x,
                           int length)
            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.

setBigDecimal

public void setBigDecimal(int parameterIndex,
                          BigDecimal x)
            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.

setBinaryStream

public void setBinaryStream(int parameterIndex,
                            java.io.InputStream x,
                            int length)
            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.

setBlob

public void setBlob(int parameterIndex,
                    Blob x)
            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.

setBoolean

public void setBoolean(int parameterIndex,
                       boolean x)
            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.

setByte

public void setByte(int parameterIndex,
                    byte x)
            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.

setBytes

public void setBytes(int parameterIndex,
                     byte[] x)
            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.

setCharacterStream

public void setCharacterStream(int parameterIndex,
                               java.io.Reader x,
                               int length)
            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.

setClob

public void setClob(int parameterIndex,
                    Clob x)
            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.

setDate

public void setDate(int parameterIndex,
                    java.sql.Date x)
            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.

setDate

public void setDate(int parameterIndex,
                    java.sql.Date x,
                    Calendar cal)
            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.

setDouble

public void setDouble(int parameterIndex,
                      double x)
            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.

setFloat

public void setFloat(int parameterIndex,
                     float x)
            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.

setInt

public void setInt(int parameterIndex,
                   int x)
            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.

setLong

public void setLong(int parameterIndex,
                    long x)
            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.

setNull

public void setNull(int parameterIndex,
                    int sqlType)
            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.

setNull

public void setNull(int parameterIndex,
                    int sqlType,
                    String typeName)
            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.

setObject

public void setObject(int parameterIndex,
                      Object x)
            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.

setObject

public void setObject(int parameterIndex,
                      Object x,
                      int targetSqlType)
            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.

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.

setRef

public void setRef(int parameterIndex,
                   Ref x)
            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.

setShort

public void setShort(int parameterIndex,
                     short x)
            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.

setString

public void setString(int parameterIndex,
                      String x)
            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.

setTime

public void setTime(int parameterIndex,
                    java.sql.Time x)
            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.

setTime

public void setTime(int parameterIndex,
                    java.sql.Time x,
                    Calendar cal)
            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.

setTimestamp

public void setTimestamp(int parameterIndex,
                         java.sql.Timestamp x)
            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.

setTimestamp

public void setTimestamp(int parameterIndex,
                         java.sql.Timestamp x,
                         Calendar cal)
            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.

setURL

public void setURL(int parameterIndex,
                   java.net.URL x)
            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.

setUnicodeStream

public void setUnicodeStream(int parameterIndex,
                             java.io.InputStream x,
                             int length)
            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.

Generated on June 12 2008