Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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:
  java.sql.PreparedStatement, java.sql.Statement

Direct Known Subclasses:
  CallableStatementProxy

public class PreparedStatementProxy
extends StatementProxy
implements java.sql.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
`(package private)` | `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.
`java.sql.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.
`java.sql.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.
`java.sql.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, java.sql.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, java.math.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, java.sql.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, java.sql.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, java.util.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, java.lang.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, java.lang.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, java.lang.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, java.lang.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, java.sql.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, java.lang.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, java.util.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, java.util.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` | `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.
`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.

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`

Methods inherited from class java.lang.Object
`, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait`

Methods inherited from interface java.sql.Statement
`addBatch, cancel, clearBatch, clearWarnings, close, execute, executeBatch, executeQuery, executeUpdate, getConnection, getFetchDirection, getFetchSize, getMaxFieldSize, getMaxRows, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetType, getUpdateCount, getWarnings, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout`

Field Detail

### _preparedStatement

    private JtdsPreparedStatement _preparedStatement

Constructor Detail

### PreparedStatementProxy

    PreparedStatementProxy(ConnectionProxy connection,
                           JtdsPreparedStatement preparedStatement)

Method Detail

### executeQuery

    public java.sql.ResultSet executeQuery()
                                    throws java.sql.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:
    `executeQuery` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### executeUpdate

    public int executeUpdate()
                      throws java.sql.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:
    `executeUpdate` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### setNull

    public void setNull(int parameterIndex,
                        int sqlType)
                 throws java.sql.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:
    `setNull` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### setBoolean

    public void setBoolean(int parameterIndex,
                           boolean x)
                    throws java.sql.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:
    `setBoolean` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### setByte

    public void setByte(int parameterIndex,
                        byte x)
                 throws java.sql.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:
    `setByte` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### setShort

    public void setShort(int parameterIndex,
                         short x)
                  throws java.sql.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:
    `setShort` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### setInt

    public void setInt(int parameterIndex,
                       int x)
                throws java.sql.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:
    `setInt` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### setLong

    public void setLong(int parameterIndex,
                        long x)
                 throws java.sql.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:
    `setLong` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### setFloat

    public void setFloat(int parameterIndex,
                         float x)
                  throws java.sql.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:
    `setFloat` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### setDouble

    public void setDouble(int parameterIndex,
                          double x)
                   throws java.sql.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:
    `setDouble` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### setBigDecimal

    public void setBigDecimal(int parameterIndex,
                              java.math.BigDecimal x)
                       throws java.sql.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:
    `setBigDecimal` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### setString

    public void setString(int parameterIndex,
                          java.lang.String x)
                   throws java.sql.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:
    `setString` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### setBytes

    public void setBytes(int parameterIndex,
                         byte[] x)
                  throws java.sql.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:
    `setBytes` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### setDate

    public void setDate(int parameterIndex,
                        java.sql.Date x)
                 throws java.sql.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:
    `setDate` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### setTime

    public void setTime(int parameterIndex,
                        java.sql.Time x)
                 throws java.sql.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:
    `setTime` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### setTimestamp

    public void setTimestamp(int parameterIndex,
                             java.sql.Timestamp x)
                      throws java.sql.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:
    `setTimestamp` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### setAsciiStream

    public void setAsciiStream(int parameterIndex,
                               java.io.InputStream x,
                               int length)
                        throws java.sql.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:
    `setAsciiStream` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### setUnicodeStream

    public void setUnicodeStream(int parameterIndex,
                                 java.io.InputStream x,
                                 int length)
                          throws java.sql.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:
    `setUnicodeStream` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### setBinaryStream

    public void setBinaryStream(int parameterIndex,
                                java.io.InputStream x,
                                int length)
                         throws java.sql.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:
    `setBinaryStream` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### clearParameters

    public void clearParameters()
                         throws java.sql.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:
    `clearParameters` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### setObject

    public void setObject(int parameterIndex,
                          java.lang.Object x,
                          int targetSqlType,
                          int scale)
                   throws java.sql.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:
    `setObject` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### setObject

    public void setObject(int parameterIndex,
                          java.lang.Object x,
                          int targetSqlType)
                   throws java.sql.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:
    `setObject` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### setObject

    public void setObject(int parameterIndex,
                          java.lang.Object x)
                   throws java.sql.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:
    `setObject` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### execute

    public boolean execute()
                    throws java.sql.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:
    `execute` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### addBatch

    public void addBatch()
                  throws java.sql.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:
    `addBatch` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### setCharacterStream

    public void setCharacterStream(int parameterIndex,
                                   java.io.Reader x,
                                   int length)
                            throws java.sql.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:
    `setCharacterStream` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### setRef

    public void setRef(int parameterIndex,
                       java.sql.Ref x)
                throws java.sql.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:
    `setRef` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### setBlob

    public void setBlob(int parameterIndex,
                        java.sql.Blob x)
                 throws java.sql.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:
    `setBlob` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### setClob

    public void setClob(int parameterIndex,
                        java.sql.Clob x)
                 throws java.sql.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:
    `setClob` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### setArray

    public void setArray(int parameterIndex,
                         java.sql.Array x)
                  throws java.sql.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:
    `setArray` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### getMetaData

    public java.sql.ResultSetMetaData getMetaData()
                                           throws java.sql.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:
    `getMetaData` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### setDate

    public void setDate(int parameterIndex,
                        java.sql.Date x,
                        java.util.Calendar cal)
                 throws java.sql.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:
    `setDate` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### setTime

    public void setTime(int parameterIndex,
                        java.sql.Time x,
                        java.util.Calendar cal)
                 throws java.sql.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:
    `setTime` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### setTimestamp

    public void setTimestamp(int parameterIndex,
                             java.sql.Timestamp x,
                             java.util.Calendar cal)
                      throws java.sql.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:
    `setTimestamp` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### setNull

    public void setNull(int parameterIndex,
                        int sqlType,
                        java.lang.String typeName)
                 throws java.sql.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:
    `setNull` in interface `java.sql.PreparedStatement`
  Throws:
    `java.sql.SQLException` - if an error occurs

### setURL

    public void setURL(int parameterIndex,
                       java.net.URL x)
                throws java.sql.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.
  Throws:
    `java.sql.SQLException` - if an error occurs

### getParameterMetaData

    public java.sql.ParameterMetaData getParameterMetaData()
                                                    throws java.sql.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.
  Throws:
    `java.sql.SQLException` - if an error occurs

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Generated on November 8 2005