FileDocCategorySizeDatePackage
PreparedStatementWrapper.javaAPI DocExample6301Tue Nov 13 14:25:08 GMT 2001tuning.jdbc

PreparedStatementWrapper

public class PreparedStatementWrapper extends StatementWrapper implements PreparedStatement

Fields Summary
PreparedStatement
realPreparedStatement
String
sql
Constructors Summary
public PreparedStatementWrapper(PreparedStatement statement, ConnectionWrapper parent, String sql)

    super(statement, parent);
    realPreparedStatement = statement;
    this.sql = sql;
  
Methods Summary
public voidaddBatch()

    realPreparedStatement.addBatch();
  
public voidclearParameters()

    realPreparedStatement.clearParameters();
  
public booleanexecute()

    Thread t = Thread.currentThread();
    JDBCLogger.startLogSqlQuery(t, sql);
    boolean b = realPreparedStatement.execute();
    JDBCLogger.endLogSqlQuery(t, sql);
    return b;
  
public java.sql.ResultSetexecuteQuery()

    Thread t = Thread.currentThread();
    JDBCLogger.startLogSqlQuery(t, sql);
    ResultSet r = realPreparedStatement.executeQuery();
    JDBCLogger.endLogSqlQuery(t, sql);
    return new ResultSetWrapper(r, this, sql);
  
public intexecuteUpdate()

    Thread t = Thread.currentThread();
    JDBCLogger.startLogSqlQuery(t, sql);
    int i = realPreparedStatement.executeUpdate();
    JDBCLogger.endLogSqlQuery(t, sql);
    return i;
  
public java.sql.ResultSetMetaDatagetMetaData()

    return realPreparedStatement.getMetaData();
  
public voidsetArray(int i, java.sql.Array x)

    if (x instanceof SQLArrayWrapper)
      realPreparedStatement.setArray(i, ((SQLArrayWrapper) x).realArray);
    else
      realPreparedStatement.setArray(i, x);
  
public voidsetAsciiStream(int parameterIndex, java.io.InputStream x, int length)

    realPreparedStatement.setAsciiStream(parameterIndex, x, length);
  
public voidsetBigDecimal(int parameterIndex, java.math.BigDecimal x)

    realPreparedStatement.setBigDecimal(parameterIndex, x);
  
public voidsetBinaryStream(int parameterIndex, java.io.InputStream x, int length)

    realPreparedStatement.setBinaryStream(parameterIndex, x, length);
  
public voidsetBlob(int i, java.sql.Blob x)

    realPreparedStatement.setBlob(i, x);
  
public voidsetBoolean(int parameterIndex, boolean x)

    realPreparedStatement.setBoolean(parameterIndex, x);
  
public voidsetByte(int parameterIndex, byte x)

    realPreparedStatement.setByte(parameterIndex, x);
  
public voidsetBytes(int parameterIndex, byte[] x)

    realPreparedStatement.setBytes(parameterIndex, x);
  
public voidsetCharacterStream(int parameterIndex, java.io.Reader reader, int length)

    realPreparedStatement.setCharacterStream(parameterIndex, reader, length);
  
public voidsetClob(int i, java.sql.Clob x)

    realPreparedStatement.setClob(i, x);
  
public voidsetDate(int parameterIndex, java.sql.Date x)

    realPreparedStatement.setDate(parameterIndex, x);
  
public voidsetDate(int parameterIndex, java.sql.Date x, java.util.Calendar cal)

    realPreparedStatement.setDate(parameterIndex, x, cal);
  
public voidsetDouble(int parameterIndex, double x)

    realPreparedStatement.setDouble(parameterIndex, x);
  
public voidsetFloat(int parameterIndex, float x)

    realPreparedStatement.setFloat(parameterIndex, x);
  
public voidsetInt(int parameterIndex, int x)

    realPreparedStatement.setInt(parameterIndex, x);
  
public voidsetLong(int parameterIndex, long x)

    realPreparedStatement.setLong(parameterIndex, x);
  
public voidsetNull(int parameterIndex, int sqlType)

    realPreparedStatement.setNull(parameterIndex, sqlType);
  
public voidsetNull(int paramIndex, int sqlType, java.lang.String typeName)

    realPreparedStatement.setNull(paramIndex, sqlType, typeName);
  
public voidsetObject(int parameterIndex, java.lang.Object x)

    realPreparedStatement.setObject(parameterIndex, x);
  
public voidsetObject(int parameterIndex, java.lang.Object x, int targetSqlType)

    realPreparedStatement.setObject(parameterIndex, x, targetSqlType);
  
public voidsetObject(int parameterIndex, java.lang.Object x, int targetSqlType, int scale)

    realPreparedStatement.setObject(parameterIndex, x, targetSqlType, scale);
  
public voidsetRef(int i, java.sql.Ref x)

    realPreparedStatement.setRef(i, x);
  
public voidsetShort(int parameterIndex, short x)

    realPreparedStatement.setShort(parameterIndex, x);
  
public voidsetString(int parameterIndex, java.lang.String x)

    realPreparedStatement.setString(parameterIndex, x);
  
public voidsetTime(int parameterIndex, java.sql.Time x)

    realPreparedStatement.setTime(parameterIndex, x);
  
public voidsetTime(int parameterIndex, java.sql.Time x, java.util.Calendar cal)

    realPreparedStatement.setTime(parameterIndex, x, cal);
  
public voidsetTimestamp(int parameterIndex, java.sql.Timestamp x)

    realPreparedStatement.setTimestamp(parameterIndex, x);
  
public voidsetTimestamp(int parameterIndex, java.sql.Timestamp x, java.util.Calendar cal)

    realPreparedStatement.setTimestamp(parameterIndex, x, cal);
  
public voidsetUnicodeStream(int parameterIndex, java.io.InputStream x, int length)

    realPreparedStatement.setUnicodeStream(parameterIndex, x, length);