You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ba...@apache.org on 2002/11/11 04:15:02 UTC

cvs commit: jakarta-commons-sandbox/dbutils/src/java/org/apache/commons/dbutils/driver ConnectionWrapper.java DriverWrapper.java ResultSetWrapper.java StatementWrapper.java

bayard      2002/11/10 19:15:02

  Modified:    dbutils/src/java/org/apache/commons/dbutils/driver
                        ConnectionWrapper.java DriverWrapper.java
                        ResultSetWrapper.java StatementWrapper.java
  Log:
  ResultSetWrapper finished and others changed to allow for successful
  subclass overriding.
  
  Revision  Changes    Path
  1.2       +18 -6     jakarta-commons-sandbox/dbutils/src/java/org/apache/commons/dbutils/driver/ConnectionWrapper.java
  
  Index: ConnectionWrapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/dbutils/src/java/org/apache/commons/dbutils/driver/ConnectionWrapper.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ConnectionWrapper.java	10 Nov 2002 20:52:32 -0000	1.1
  +++ ConnectionWrapper.java	11 Nov 2002 03:15:02 -0000	1.2
  @@ -18,16 +18,28 @@
           this.conn = conn;
       }
   
  +    protected Statement wrap(Statement stat) {
  +        return new StatementWrapper(stat, this);
  +    }
  +
  +    protected PreparedStatement wrapPrepared(PreparedStatement stat) {
  +        return new PreparedStatementWrapper(stat, this);
  +    }
  +
  +    protected CallableStatement wrapCallable(CallableStatement stat) {
  +        return new CallableStatementWrapper(stat, this);
  +    }
  +
       public Statement createStatement() throws SQLException {
  -        return new StatementWrapper(this.conn.createStatement(), this);
  +        return wrap(this.conn.createStatement());
       }
   
       public PreparedStatement prepareStatement(String string) throws SQLException {
  -        return new PreparedStatementWrapper(this.conn.prepareStatement(string), this);
  +        return wrapPrepared(this.conn.prepareStatement(string));
       }
   
       public CallableStatement prepareCall(String string) throws SQLException {
  -        return new CallableStatementWrapper(this.conn.prepareCall(string), this);
  +        return wrapCallable(this.conn.prepareCall(string));
       }
   
       public String nativeSQL(String sql) throws SQLException {
  @@ -95,15 +107,15 @@
       }
   
       public Statement createStatement(int n1, int n2) throws SQLException {
  -        return new StatementWrapper(this.conn.createStatement(n1, n2), this);
  +        return wrap(this.conn.createStatement(n1, n2));
       }
   
       public PreparedStatement prepareStatement(String string, int n1, int n2) throws SQLException {
  -        return new PreparedStatementWrapper(this.conn.prepareStatement(string, n1, n2), this);
  +        return wrapPrepared(this.conn.prepareStatement(string, n1, n2));
       }
   
       public CallableStatement prepareCall(String string, int n1, int n2) throws SQLException {
  -        return new CallableStatementWrapper(this.conn.prepareCall(string, n1, n2), this);
  +        return wrapCallable(this.conn.prepareCall(string, n1, n2));
       }
   
       public Map getTypeMap() throws SQLException {
  
  
  
  1.2       +23 -4     jakarta-commons-sandbox/dbutils/src/java/org/apache/commons/dbutils/driver/DriverWrapper.java
  
  Index: DriverWrapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/dbutils/src/java/org/apache/commons/dbutils/driver/DriverWrapper.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DriverWrapper.java	10 Nov 2002 20:52:32 -0000	1.1
  +++ DriverWrapper.java	11 Nov 2002 03:15:02 -0000	1.2
  @@ -11,6 +11,18 @@
   
   import org.apache.commons.dbutils.DbUtils;
   
  +/**
  + * A driver which wraps another driver. It is pointless utterly 
  + * in itself, but it is accessed with 
  + *    db://[real_driver]/[real_url]
  + * It will ensure that the real_driver class is loaded.
  + *
  + * The real reason for it to exist is to be extended. 
  + * Methods are provided to plugin classes, but the user is 
  + * expected to handle the static method. 
  + * The wrap(..) methods are used to provide the class as a plugin.
  + * TODO:// An example extension will be available before release.
  + */
   public class DriverWrapper implements Driver 
   {
   
  @@ -25,6 +37,14 @@
           }
       }
   
  +    protected String getProtocol() {
  +        return "db";
  +    }
  +
  +    protected Connection wrap(Connection conn) {
  +        return new ConnectionWrapper(conn);
  +    }
  +
       public Connection connect(String url, Properties properties) throws SQLException {
   
           // db://<fully.qualified.classname>/<url of database>
  @@ -33,7 +53,7 @@
           }
   
           // remove db://
  -        url = url.substring(5);
  +        url = url.substring(getProtocol().length()+3);
   
           int idx = url.indexOf("/");
           if(idx == -1) {
  @@ -47,12 +67,11 @@
   
           Driver subDriver = DriverManager.getDriver(url);
           Connection conn = subDriver.connect(url, properties);
  -        ConnectionWrapper wrapper = new ConnectionWrapper(conn);
  -        return wrapper;
  +        return wrap(conn);
       }
   
       public boolean acceptsURL(String url) throws SQLException {
  -        return url.startsWith("db://");
  +        return url.startsWith(getProtocol()+"://");
       }
   
       public DriverPropertyInfo[] getPropertyInfo(String url, Properties properties) throws SQLException {
  
  
  
  1.2       +244 -117  jakarta-commons-sandbox/dbutils/src/java/org/apache/commons/dbutils/driver/ResultSetWrapper.java
  
  Index: ResultSetWrapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/dbutils/src/java/org/apache/commons/dbutils/driver/ResultSetWrapper.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ResultSetWrapper.java	10 Nov 2002 20:52:32 -0000	1.1
  +++ ResultSetWrapper.java	11 Nov 2002 03:15:02 -0000	1.2
  @@ -1,424 +1,551 @@
  +package org.apache.commons.dbutils.driver;
  +
  +import java.io.InputStream;
  +import java.io.Reader;
  +
  +import java.math.BigDecimal;
  +
  +import java.sql.Array;
   import java.sql.ResultSet;
   import java.sql.SQLException;
  -import java.math.BigDecimal;
  +import java.sql.SQLWarning;
  +import java.sql.ResultSetMetaData;
   import java.sql.Date;
   import java.sql.Time;
   import java.sql.Timestamp;
  -import java.io.InputStream;
  -import getString(java.lang.String;
  -import java.sql.SQLWarning;
  -import java.sql.ResultSetMetaData;
  -import getObject(java.lang.String;
  -import java.io.Reader;
  -import updateBigDecimal(java.math.BigDecimal;
  -import updateDate(java.sql.Date;
  -import updateTime(java.sql.Time;
  -import updateTimestamp(java.sql.Timestamp;
  -import updateAsciiStream(java.io.InputStream;
  -import updateBinaryStream(java.io.InputStream;
  -import updateCharacterStream(java.io.Reader;
  -import java.lang.String;
  -import java.lang.Object;
   import java.sql.Statement;
  -import getObject(java.util.Map;
   import java.sql.Ref;
   import java.sql.Blob;
   import java.sql.Clob;
  -import java.sql.Array;
  +
   import java.util.Map;
  -import getDate(java.util.Calendar;
   import java.util.Calendar;
  -import getTime(java.util.Calendar;
  -import getTimestamp(java.util.Calendar;
   
   public class ResultSetWrapper implements ResultSet 
   {
   
  +    private ResultSet rs;
  +    private Statement stat;
  +
  +    public ResultSetWrapper(ResultSet rs, Statement stat) {
  +        this.rs = rs;
  +        this.stat = stat;
  +    }
  +
       public boolean next() throws SQLException {
  +        return this.rs.next();
       }
   
       public void close() throws SQLException {
  +        this.rs.close();
       }
   
       public boolean wasNull() throws SQLException {
  +        return this.rs.wasNull();
       }
   
  -    public String getString() throws SQLException {
  +    public String getString(int idx) throws SQLException {
  +        return this.rs.getString(idx);
       }
   
  -    public boolean getBoolean() throws SQLException {
  +    public boolean getBoolean(int idx) throws SQLException {
  +        return this.rs.getBoolean(idx);
       }
   
  -    public byte getByte() throws SQLException {
  +    public byte getByte(int idx) throws SQLException {
  +        return this.rs.getByte(idx);
       }
   
  -    public short getShort() throws SQLException {
  +    public short getShort(int idx) throws SQLException {
  +        return this.rs.getShort(idx);
       }
   
  -    public int getInt() throws SQLException {
  +    public int getInt(int idx) throws SQLException {
  +        return this.rs.getInt(idx);
       }
   
  -    public long getLong() throws SQLException {
  +    public long getLong(int idx) throws SQLException {
  +        return this.rs.getLong(idx);
       }
   
  -    public float getFloat() throws SQLException {
  +    public float getFloat(int idx) throws SQLException {
  +        return this.rs.getFloat(idx);
       }
   
  -    public double getDouble() throws SQLException {
  +    public double getDouble(int idx) throws SQLException {
  +        return this.rs.getDouble(idx);
       }
   
  -    public BigDecimal getBigDecimal() throws SQLException {
  +    public BigDecimal getBigDecimal(int idx, int n) throws SQLException {
  +        return this.rs.getBigDecimal(idx, n);
       }
   
  -    public byte[] getBytes() throws SQLException {
  +    public byte[] getBytes(int idx) throws SQLException {
  +        return this.rs.getBytes(idx);
       }
   
  -    public Date getDate() throws SQLException {
  +    public Date getDate(int idx) throws SQLException {
  +        return this.rs.getDate(idx);
       }
   
  -    public Time getTime() throws SQLException {
  +    public Time getTime(int idx) throws SQLException {
  +        return this.rs.getTime(idx);
       }
   
  -    public Timestamp getTimestamp() throws SQLException {
  +    public Timestamp getTimestamp(int idx) throws SQLException {
  +        return this.rs.getTimestamp(idx);
       }
   
  -    public InputStream getAsciiStream() throws SQLException {
  +    public InputStream getAsciiStream(int idx) throws SQLException {
  +        return this.rs.getAsciiStream(idx);
       }
   
  -    public InputStream getUnicodeStream() throws SQLException {
  +    public InputStream getUnicodeStream(int idx) throws SQLException {
  +        return this.rs.getUnicodeStream(idx);
       }
   
  -    public InputStream getBinaryStream() throws SQLException {
  +    public InputStream getBinaryStream(int idx) throws SQLException {
  +        return this.rs.getBinaryStream(idx);
       }
   
  -    public String String string) throws SQLException {
  +    public String getString(String column) throws SQLException {
  +        return this.rs.getString(column);
       }
   
  -    public boolean getBoolean(String string) throws SQLException {
  +    public boolean getBoolean(String column) throws SQLException {
  +        return this.rs.getBoolean(column);
       }
   
  -    public byte getByte(String string) throws SQLException {
  +    public byte getByte(String column) throws SQLException {
  +        return this.rs.getByte(column);
       }
   
  -    public short getShort(String string) throws SQLException {
  +    public short getShort(String column) throws SQLException {
  +        return this.rs.getShort(column);
       }
   
  -    public int getInt(String string) throws SQLException {
  +    public int getInt(String column) throws SQLException {
  +        return this.rs.getInt(column);
       }
   
  -    public long getLong(String string) throws SQLException {
  +    public long getLong(String column) throws SQLException {
  +        return this.rs.getLong(column);
       }
   
  -    public float getFloat(String string) throws SQLException {
  +    public float getFloat(String column) throws SQLException {
  +        return this.rs.getFloat(column);
       }
   
  -    public double getDouble(String string) throws SQLException {
  +    public double getDouble(String column) throws SQLException {
  +        return this.rs.getDouble(column);
       }
   
  -    public BigDecimal getBigDecimal(String string) throws SQLException {
  +    public BigDecimal getBigDecimal(String column, int n) throws SQLException {
  +        return this.rs.getBigDecimal(column, n);
       }
   
  -    public byte[] getBytes(String string) throws SQLException {
  +    public byte[] getBytes(String column) throws SQLException {
  +        return this.rs.getBytes(column);
       }
   
  -    public Date getDate(String string) throws SQLException {
  +    public Date getDate(String column) throws SQLException {
  +        return this.rs.getDate(column);
       }
   
  -    public Time getTime(String string) throws SQLException {
  +    public Time getTime(String column) throws SQLException {
  +        return this.rs.getTime(column);
       }
   
  -    public Timestamp getTimestamp(String string) throws SQLException {
  +    public Timestamp getTimestamp(String column) throws SQLException {
  +        return this.rs.getTimestamp(column);
       }
   
  -    public InputStream getAsciiStream(String string) throws SQLException {
  +    public InputStream getAsciiStream(String column) throws SQLException {
  +        return this.rs.getAsciiStream(column);
       }
   
  -    public InputStream getUnicodeStream(String string) throws SQLException {
  +    public InputStream getUnicodeStream(String column) throws SQLException {
  +        return this.rs.getUnicodeStream(column);
       }
   
  -    public InputStream getBinaryStream(String string) throws SQLException {
  +    public InputStream getBinaryStream(String column) throws SQLException {
  +        return this.rs.getBinaryStream(column);
       }
   
       public SQLWarning getWarnings() throws SQLException {
  +        return this.rs.getWarnings();
       }
   
       public void clearWarnings() throws SQLException {
  +        this.rs.clearWarnings();
       }
   
       public String getCursorName() throws SQLException {
  +        return this.rs.getCursorName();
       }
   
       public ResultSetMetaData getMetaData() throws SQLException {
  +        return this.rs.getMetaData();
       }
   
  -    public Object getObject() throws SQLException {
  +    public Object getObject(int idx) throws SQLException {
  +        return this.rs.getObject(idx);
       }
   
  -    public Object String string) throws SQLException {
  +    public Object getObject(String column) throws SQLException {
  +        return this.rs.getObject(column);
       }
   
  -    public int findColumn(String string) throws SQLException {
  +    public int findColumn(String column) throws SQLException {
  +        return this.rs.findColumn(column);
       }
   
  -    public Reader getCharacterStream() throws SQLException {
  +    public Reader getCharacterStream(int idx) throws SQLException {
  +        return this.rs.getCharacterStream(idx);
       }
   
  -    public Reader getCharacterStream(String string) throws SQLException {
  +    public Reader getCharacterStream(String column) throws SQLException {
  +        return this.rs.getCharacterStream(column);
       }
   
  -    public BigDecimal getBigDecimal() throws SQLException {
  +    public BigDecimal getBigDecimal(int idx) throws SQLException {
  +        return this.rs.getBigDecimal(idx);
       }
   
  -    public BigDecimal getBigDecimal(String string) throws SQLException {
  +    public BigDecimal getBigDecimal(String column) throws SQLException {
  +        return this.rs.getBigDecimal(column);
       }
   
       public boolean isBeforeFirst() throws SQLException {
  +        return this.rs.isBeforeFirst();
       }
   
       public boolean isAfterLast() throws SQLException {
  +        return this.rs.isAfterLast();
       }
   
       public boolean isFirst() throws SQLException {
  +        return this.rs.isFirst();
       }
   
       public boolean isLast() throws SQLException {
  +        return this.rs.isLast();
       }
   
       public void beforeFirst() throws SQLException {
  +        this.rs.beforeFirst();
       }
   
       public void afterLast() throws SQLException {
  +        this.rs.afterLast();
       }
   
       public boolean first() throws SQLException {
  +        return this.rs.first();
       }
   
       public boolean last() throws SQLException {
  +        return this.rs.last();
       }
   
       public int getRow() throws SQLException {
  +        return this.rs.getRow();
       }
   
  -    public boolean absolute() throws SQLException {
  +    public boolean absolute(int n) throws SQLException {
  +        return this.rs.absolute(n);
       }
   
  -    public boolean relative() throws SQLException {
  +    public boolean relative(int n) throws SQLException {
  +        return this.rs.relative(n);
       }
   
       public boolean previous() throws SQLException {
  +        return this.rs.previous();
       }
   
  -    public void setFetchDirection() throws SQLException {
  +    public void setFetchDirection(int n) throws SQLException {
  +        this.rs.setFetchDirection(n);
       }
   
       public int getFetchDirection() throws SQLException {
  +        return this.rs.getFetchDirection();
       }
   
  -    public void setFetchSize() throws SQLException {
  +    public void setFetchSize(int n) throws SQLException {
  +        this.rs.setFetchSize(n);
       }
   
       public int getFetchSize() throws SQLException {
  +        return this.rs.getFetchSize();
       }
   
       public int getType() throws SQLException {
  +        return this.rs.getType();
       }
   
       public int getConcurrency() throws SQLException {
  +        return this.rs.getConcurrency();
       }
   
       public boolean rowUpdated() throws SQLException {
  +        return this.rs.rowUpdated();
       }
   
       public boolean rowInserted() throws SQLException {
  +        return this.rs.rowInserted();
       }
   
       public boolean rowDeleted() throws SQLException {
  +        return this.rs.rowDeleted();
       }
   
  -    public void updateNull() throws SQLException {
  +    public void updateNull(int n) throws SQLException {
  +        this.rs.updateNull(n);
       }
   
  -    public void updateBoolean() throws SQLException {
  +    public void updateBoolean(int n, boolean b) throws SQLException {
  +        this.rs.updateBoolean(n, b);
       }
   
  -    public void updateByte() throws SQLException {
  +    public void updateByte(int n, byte b) throws SQLException {
  +        this.rs.updateByte(n, b);
       }
   
  -    public void updateShort() throws SQLException {
  +    public void updateShort(int n, short s) throws SQLException {
  +        this.rs.updateShort(n, s);
       }
   
  -    public void updateInt() throws SQLException {
  +    public void updateInt(int n, int i) throws SQLException {
  +        this.rs.updateInt(n, i);
       }
   
  -    public void updateLong() throws SQLException {
  +    public void updateLong(int n, long l) throws SQLException {
  +        this.rs.updateLong(n, l);
       }
   
  -    public void updateFloat() throws SQLException {
  +    public void updateFloat(int n, float f) throws SQLException {
  +        this.rs.updateFloat(n, f);
       }
   
  -    public void updateDouble() throws SQLException {
  +    public void updateDouble(int n, double d) throws SQLException {
  +        this.rs.updateDouble(n, d);
       }
   
  -    public void BigDecimal bigDecimal) throws SQLException {
  +    public void updateBigDecimal(int n, BigDecimal bigDecimal) throws SQLException {
  +        this.rs.updateBigDecimal(n, bigDecimal);
       }
   
  -    public void updateString(String string) throws SQLException {
  +    public void updateString(int idx, String string) throws SQLException {
  +        this.rs.updateString(idx, string);
       }
   
  -    public void updateBytes(byte[] byte[]) throws SQLException {
  +    public void updateBytes(int idx, byte[] bytes) throws SQLException {
  +        this.rs.updateBytes(idx, bytes);
       }
   
  -    public void Date date) throws SQLException {
  +    public void updateDate(int idx, Date date) throws SQLException {
  +        this.rs.updateDate(idx, date);
       }
   
  -    public void Time time) throws SQLException {
  +    public void updateTime(int idx, Time time) throws SQLException {
  +        this.rs.updateTime(idx, time);
       }
   
  -    public void Timestamp timestamp) throws SQLException {
  +    public void updateTimestamp(int idx, Timestamp timestamp) throws SQLException {
  +        this.rs.updateTimestamp(idx, timestamp);
       }
   
  -    public void InputStream inputStream) throws SQLException {
  +    public void updateAsciiStream(int idx, InputStream inputStream, int n) throws SQLException {
  +        this.rs.updateAsciiStream(idx, inputStream, n);
       }
   
  -    public void InputStream inputStream) throws SQLException {
  +    public void updateBinaryStream(int idx, InputStream inputStream, int n) throws SQLException {
  +        this.rs.updateBinaryStream(idx, inputStream, n);
       }
   
  -    public void Reader reader) throws SQLException {
  +    public void updateCharacterStream(int idx, Reader reader, int n) throws SQLException {
  +        this.rs.updateCharacterStream(idx, reader, n);
       }
   
  -    public void updateObject(Object object) throws SQLException {
  +    public void updateObject(int idx, Object object, int n) throws SQLException {
  +        this.rs.updateObject(idx, object, n);
       }
   
  -    public void updateObject(Object object) throws SQLException {
  +    public void updateObject(int idx, Object object) throws SQLException {
  +        this.rs.updateObject(idx, object);
       }
   
       public void updateNull(String string) throws SQLException {
  +        this.rs.updateNull(string);
       }
   
  -    public void updateBoolean(String string) throws SQLException {
  +    public void updateBoolean(String column, boolean b) throws SQLException {
  +        this.rs.updateBoolean(column, b);
       }
   
  -    public void updateByte(String string) throws SQLException {
  +    public void updateByte(String column, byte b) throws SQLException {
  +        this.rs.updateByte(column, b);
       }
   
  -    public void updateShort(String string) throws SQLException {
  +    public void updateShort(String column, short s) throws SQLException {
  +        this.rs.updateShort(column, s);
       }
   
  -    public void updateInt(String string) throws SQLException {
  +    public void updateInt(String column, int i) throws SQLException {
  +        this.rs.updateInt(column, i);
       }
   
  -    public void updateLong(String string) throws SQLException {
  +    public void updateLong(String column, long l) throws SQLException {
  +        this.rs.updateLong(column, l);
       }
   
  -    public void updateFloat(String string) throws SQLException {
  +    public void updateFloat(String column, float f) throws SQLException {
  +        this.rs.updateFloat(column, f);
       }
   
  -    public void updateDouble(String string) throws SQLException {
  +    public void updateDouble(String column, double d) throws SQLException {
  +        this.rs.updateDouble(column, d);
       }
   
  -    public void updateBigDecimal(String string, BigDecimal bigDecimal) throws SQLException {
  +    public void updateBigDecimal(String column, BigDecimal bigDecimal) throws SQLException {
  +        this.rs.updateBigDecimal(column, bigDecimal);
       }
   
  -    public void updateString(String string, String string) throws SQLException {
  +    public void updateString(String column, String string) throws SQLException {
  +        this.rs.updateString(column, string);
       }
   
  -    public void updateBytes(String string, byte[] byte[]) throws SQLException {
  +    public void updateBytes(String column, byte[] bytes) throws SQLException {
  +        this.rs.updateBytes(column, bytes);
       }
   
  -    public void updateDate(String string, Date date) throws SQLException {
  +    public void updateDate(String column, Date date) throws SQLException {
  +        this.rs.updateDate(column, date);
       }
   
  -    public void updateTime(String string, Time time) throws SQLException {
  +    public void updateTime(String column, Time time) throws SQLException {
  +        this.rs.updateTime(column, time);
       }
   
  -    public void updateTimestamp(String string, Timestamp timestamp) throws SQLException {
  +    public void updateTimestamp(String column, Timestamp timestamp) throws SQLException {
  +        this.rs.updateTimestamp(column, timestamp);
       }
   
  -    public void updateAsciiStream(String string, InputStream inputStream) throws SQLException {
  +    public void updateAsciiStream(String column, InputStream inputStream, int n) throws SQLException {
  +        this.rs.updateAsciiStream(column, inputStream, n);
       }
   
  -    public void updateBinaryStream(String string, InputStream inputStream) throws SQLException {
  +    public void updateBinaryStream(String column, InputStream inputStream, int n) throws SQLException {
  +        this.rs.updateBinaryStream(column, inputStream, n);
       }
   
  -    public void updateCharacterStream(String string, Reader reader) throws SQLException {
  +    public void updateCharacterStream(String column, Reader reader, int n) throws SQLException {
  +        this.rs.updateCharacterStream(column, reader, n);
       }
   
  -    public void updateObject(String string, Object object) throws SQLException {
  +    public void updateObject(String column, Object object, int n) throws SQLException {
  +        this.rs.updateObject(column, object, n);
       }
   
  -    public void updateObject(String string, Object object) throws SQLException {
  +    public void updateObject(String column, Object object) throws SQLException {
  +        this.rs.updateObject(column, object);
       }
   
       public void insertRow() throws SQLException {
  +        this.rs.insertRow();
       }
   
       public void updateRow() throws SQLException {
  +        this.rs.updateRow();
       }
   
       public void deleteRow() throws SQLException {
  +        this.rs.deleteRow();
       }
   
       public void refreshRow() throws SQLException {
  +        this.rs.refreshRow();
       }
   
       public void cancelRowUpdates() throws SQLException {
  +        this.rs.cancelRowUpdates();
       }
   
       public void moveToInsertRow() throws SQLException {
  +        this.rs.moveToInsertRow();
       }
   
       public void moveToCurrentRow() throws SQLException {
  +        this.rs.moveToCurrentRow();
       }
   
       public Statement getStatement() throws SQLException {
  +        return stat;
       }
   
  -    public Object Map map) throws SQLException {
  +    public Object getObject(int idx, Map map) throws SQLException {
  +        return this.rs.getObject(idx, map);
       }
   
  -    public Ref getRef() throws SQLException {
  +    public Ref getRef(int idx) throws SQLException {
  +        return this.rs.getRef(idx);
       }
   
  -    public Blob getBlob() throws SQLException {
  +    public Blob getBlob(int idx) throws SQLException {
  +        return this.rs.getBlob(idx);
       }
   
  -    public Clob getClob() throws SQLException {
  +    public Clob getClob(int idx) throws SQLException {
  +        return this.rs.getClob(idx);
       }
   
  -    public Array getArray() throws SQLException {
  +    public Array getArray(int idx) throws SQLException {
  +        return this.rs.getArray(idx);
       }
   
  -    public Object String string, Map map) throws SQLException {
  +    public Object getObject(String column, Map map) throws SQLException {
  +        return this.rs.getObject(column, map);
       }
   
  -    public Ref getRef(String string) throws SQLException {
  +    public Ref getRef(String column) throws SQLException {
  +        return this.rs.getRef(column);
       }
   
  -    public Blob getBlob(String string) throws SQLException {
  +    public Blob getBlob(String column) throws SQLException {
  +        return this.rs.getBlob(column);
       }
   
  -    public Clob getClob(String string) throws SQLException {
  +    public Clob getClob(String column) throws SQLException {
  +        return this.rs.getClob(column);
       }
   
  -    public Array getArray(String string) throws SQLException {
  +    public Array getArray(String column) throws SQLException {
  +        return this.rs.getArray(column);
       }
   
  -    public Date Calendar calendar) throws SQLException {
  +    public Date getDate(int idx, Calendar calendar) throws SQLException {
  +        return this.rs.getDate(idx, calendar);
       }
   
  -    public Date getDate(String string, Calendar calendar) throws SQLException {
  +    public Date getDate(String column, Calendar calendar) throws SQLException {
  +        return this.rs.getDate(column, calendar);
       }
   
  -    public Time Calendar calendar) throws SQLException {
  +    public Time getTime(int idx, Calendar calendar) throws SQLException {
  +        return this.rs.getTime(idx, calendar);
       }
   
  -    public Time getTime(String string, Calendar calendar) throws SQLException {
  +    public Time getTime(String column, Calendar calendar) throws SQLException {
  +        return this.rs.getTime(column, calendar);
       }
   
  -    public Timestamp Calendar calendar) throws SQLException {
  +    public Timestamp getTimestamp(int idx, Calendar calendar) throws SQLException {
  +        return this.rs.getTimestamp(idx, calendar);
       }
   
  -    public Timestamp getTimestamp(String string, Calendar calendar) throws SQLException {
  +    public Timestamp getTimestamp(String column, Calendar calendar) throws SQLException {
  +        return this.rs.getTimestamp(column, calendar);
       }
   
   }
  
  
  
  1.2       +1 -2      jakarta-commons-sandbox/dbutils/src/java/org/apache/commons/dbutils/driver/StatementWrapper.java
  
  Index: StatementWrapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/dbutils/src/java/org/apache/commons/dbutils/driver/StatementWrapper.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StatementWrapper.java	10 Nov 2002 20:52:32 -0000	1.1
  +++ StatementWrapper.java	11 Nov 2002 03:15:02 -0000	1.2
  @@ -129,8 +129,7 @@
       }
   
       protected ResultSet wrap(ResultSet rs) {
  -//        return new ResultSetWrapper(rs);
  -        return rs;
  +        return new ResultSetWrapper(rs, this);
       }
   
   }
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>