FileDocCategorySizeDatePackage
WrappedPreparedStatement.javaAPI DocJBoss 4.2.112525Fri Jul 13 21:01:14 BST 2007org.jboss.resource.adapter.jdbc

WrappedPreparedStatement

public class WrappedPreparedStatement extends WrappedStatement implements PreparedStatement
A wrapper for a prepared statement.
author
David Jencks
author
Adrian Brock
version
$Revision: 57189 $

Fields Summary
private final PreparedStatement
ps
Constructors Summary
public WrappedPreparedStatement(WrappedConnection lc, PreparedStatement ps)

      super(lc, ps);
      this.ps = ps;
   
Methods Summary
public voidaddBatch()

      checkState();
      try 
      {
         ps.addBatch();         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public voidclearParameters()

      checkState();
      try 
      {
         ps.clearParameters();         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public booleanexecute()

      checkTransaction();
      try 
      {
         checkConfiguredQueryTimeout();
         return ps.execute();         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public java.sql.ResultSetexecuteQuery()

      checkTransaction();
      try 
      {
         checkConfiguredQueryTimeout();
         ResultSet resultSet = ps.executeQuery();
         return registerResultSet(resultSet);
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public intexecuteUpdate()

      checkTransaction();
      try 
      {
         checkConfiguredQueryTimeout();
         return ps.executeUpdate();         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public java.sql.ResultSetMetaDatagetMetaData()

      checkState();
      try 
      {
         return ps.getMetaData();         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public java.sql.ParameterMetaDatagetParameterMetaData()

      checkState();
      try 
      {
         return ps.getParameterMetaData();         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public java.sql.StatementgetUnderlyingStatement()

      checkState();
      if (ps instanceof CachedPreparedStatement)
      {
         return ((CachedPreparedStatement)ps).getUnderlyingPreparedStatement();
      }
      else
      {
         return ps;
      }
   
public voidsetArray(int parameterIndex, java.sql.Array value)

      checkState();
      try 
      {
         ps.setArray(parameterIndex, value);         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public voidsetAsciiStream(int parameterIndex, java.io.InputStream stream, int length)

deprecated

      checkState();
      try 
      {
         ps.setAsciiStream(parameterIndex, stream, length);         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public voidsetBigDecimal(int parameterIndex, java.math.BigDecimal value)

      checkState();
      try 
      {
         ps.setBigDecimal(parameterIndex, value);         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public voidsetBinaryStream(int parameterIndex, java.io.InputStream stream, int length)

      checkState();
      try 
      {
         ps.setBinaryStream(parameterIndex, stream, length);         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public voidsetBlob(int parameterIndex, java.sql.Blob value)

      checkState();
      try 
      {
         ps.setBlob(parameterIndex, value);         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public voidsetBoolean(int parameterIndex, boolean value)

      checkState();
      try 
      {
         ps.setBoolean(parameterIndex, value);         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public voidsetByte(int parameterIndex, byte value)

      checkState();
      try 
      {
         ps.setByte(parameterIndex, value);         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public voidsetBytes(int parameterIndex, byte[] value)

      checkState();
      try 
      {
         ps.setBytes(parameterIndex, value);         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public voidsetCharacterStream(int parameterIndex, java.io.Reader reader, int length)

      checkState();
      try 
      {
         ps.setCharacterStream(parameterIndex, reader, length);         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public voidsetClob(int parameterIndex, java.sql.Clob value)

      checkState();
      try 
      {
         ps.setClob(parameterIndex, value);         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public voidsetDate(int parameterIndex, java.sql.Date value)

      checkState();
      try 
      {
         ps.setDate(parameterIndex, value);         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public voidsetDate(int parameterIndex, java.sql.Date value, java.util.Calendar calendar)

      checkState();
      try 
      {
         ps.setDate(parameterIndex, value, calendar);         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public voidsetDouble(int parameterIndex, double value)

      checkState();
      try 
      {
         ps.setDouble(parameterIndex, value);         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public voidsetFloat(int parameterIndex, float value)

      checkState();
      try 
      {
         ps.setFloat(parameterIndex, value);         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public voidsetInt(int parameterIndex, int value)

      checkState();
      try 
      {
         ps.setInt(parameterIndex, value);         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public voidsetLong(int parameterIndex, long value)

      checkState();
      try 
      {
         ps.setLong(parameterIndex, value);         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public voidsetNull(int parameterIndex, int sqlType)

      checkState();
      try 
      {
         ps.setNull(parameterIndex, sqlType);         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public voidsetNull(int parameterIndex, int sqlType, java.lang.String typeName)

      checkState();
      try 
      {
         ps.setNull(parameterIndex, sqlType, typeName);         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public voidsetObject(int parameterIndex, java.lang.Object value, int sqlType, int scale)

      checkState();
      try 
      {
         ps.setObject(parameterIndex, value, sqlType, scale);         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public voidsetObject(int parameterIndex, java.lang.Object value, int sqlType)

      checkState();
      try 
      {
         ps.setObject(parameterIndex, value, sqlType);         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public voidsetObject(int parameterIndex, java.lang.Object value)

      checkState();
      try 
      {
         ps.setObject(parameterIndex, value);         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public voidsetRef(int parameterIndex, java.sql.Ref value)

      checkState();
      try 
      {
         ps.setRef(parameterIndex, value);         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public voidsetShort(int parameterIndex, short value)

      checkState();
      try 
      {
         ps.setShort(parameterIndex, value);         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public voidsetString(int parameterIndex, java.lang.String value)

      checkState();
      try 
      {
         ps.setString(parameterIndex, value);         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public voidsetTime(int parameterIndex, java.sql.Time value)

      checkState();
      try 
      {
         ps.setTime(parameterIndex, value);         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public voidsetTime(int parameterIndex, java.sql.Time value, java.util.Calendar calendar)

      checkState();
      try 
      {
         ps.setTime(parameterIndex, value, calendar);         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public voidsetTimestamp(int parameterIndex, java.sql.Timestamp value)

      checkState();
      try 
      {
         ps.setTimestamp(parameterIndex, value);         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public voidsetTimestamp(int parameterIndex, java.sql.Timestamp value, java.util.Calendar calendar)

      checkState();
      try 
      {
         ps.setTimestamp(parameterIndex, value, calendar);         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public voidsetURL(int parameterIndex, java.net.URL value)

      checkState();
      try 
      {
         ps.setURL(parameterIndex, value);         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }
   
public voidsetUnicodeStream(int parameterIndex, java.io.InputStream stream, int length)

deprecated

      checkState();
      try 
      {
         ps.setUnicodeStream(parameterIndex, stream, length);         
      }
      catch (Throwable t)
      {
         throw checkException(t);
      }