Index: src/main/groovy/sql/GroovyResultSet.java =================================================================== RCS file: /home/projects/groovy/scm/groovy/groovy-core/src/main/groovy/sql/GroovyResultSet.java,v retrieving revision 1.5 diff -u -r1.5 GroovyResultSet.java --- src/main/groovy/sql/GroovyResultSet.java 26 Mar 2004 18:54:09 -0000 1.5 +++ src/main/groovy/sql/GroovyResultSet.java 7 Apr 2006 13:53:38 -0000 @@ -1,5 +1,5 @@ /* - $Id: GroovyResultSet.java,v 1.5 2004/03/26 18:54:09 jstrachan Exp $ + $Id: GroovygetResultSet().java,v 1.5 2004/03/26 18:54:09 jstrachan Exp $ Copyright 2003 (C) James Strachan and Bob Mcwhirter. All Rights Reserved. @@ -45,6 +45,7 @@ */ package groovy.sql; +import groovy.lang.Closure; import groovy.lang.GroovyObjectSupport; import groovy.lang.MissingPropertyException; @@ -72,16 +73,25 @@ */ public class GroovyResultSet extends GroovyObjectSupport implements ResultSet { - private ResultSet resultSet; + private ResultSet _resultSet; private boolean updated; + public GroovyResultSet(ResultSet resultSet) { - this.resultSet = resultSet; + this._resultSet = resultSet; + } + + protected GroovyResultSet(){ + + } + + protected ResultSet getResultSet() throws SQLException{ + return _resultSet; } public Object getProperty(String property) { try { - return resultSet.getObject(property); + return getResultSet().getObject(property); } catch (SQLException e) { throw new MissingPropertyException(property, GroovyResultSet.class, e); @@ -90,7 +100,7 @@ public void setProperty(String property, Object newValue) { try { - resultSet.updateObject(property, newValue); + getResultSet().updateObject(property, newValue); updated = true; } catch (SQLException e) { @@ -107,7 +117,7 @@ */ public Object getAt(int index) throws SQLException { index = normalizeIndex(index); - return resultSet.getObject(index); + return getResultSet().getObject(index); } /** @@ -119,7 +129,7 @@ */ public void putAt(int index, Object newValue) throws SQLException { index = normalizeIndex(index); - resultSet.updateObject(index, newValue); + getResultSet().updateObject(index, newValue); } /** @@ -127,12 +137,13 @@ * @param values */ public void add(Map values) throws SQLException { - resultSet.moveToInsertRow(); + ResultSet resultSet = getResultSet(); + getResultSet().moveToInsertRow(); for (Iterator iter = values.entrySet().iterator(); iter.hasNext();) { Map.Entry entry = (Map.Entry) iter.next(); - resultSet.updateObject(entry.getKey().toString(), entry.getValue()); + getResultSet().updateObject(entry.getKey().toString(), entry.getValue()); } - resultSet.insertRow(); + getResultSet().insertRow(); } /** @@ -145,7 +156,7 @@ */ protected int normalizeIndex(int index) throws SQLException { if (index < 0) { - int columnCount = resultSet.getMetaData().getColumnCount(); + int columnCount = getResultSet().getMetaData().getColumnCount(); do { index += columnCount; } @@ -154,19 +165,30 @@ return index + 1; } - // Implementation of java.sql.ResultSet + + /** + * Call the closure once for each row in the result set. + * @param closure + * @throws SQLException + */ + public void eachRow(Closure closure)throws SQLException { + while(next()){ + closure.call(this); + } + } + // Implementation of java.sql.getResultSet() // ------------------------------------------------------------ /** * Moves the cursor down one row from its current position. - * A ResultSet cursor is initially positioned + * A getResultSet() cursor is initially positioned * before the first row; the first call to the method * next makes the first row the current row; the * second call makes the second row the current row, and so on. * *

If an input stream is open for the current row, a call * to the method next will - * implicitly close it. A ResultSet object's + * implicitly close it. A getResultSet() object's * warning chain is cleared when a new row is read. * * @return true if the new current row is valid; @@ -175,30 +197,30 @@ */ public boolean next() throws SQLException { if (updated) { - resultSet.updateRow(); + getResultSet().updateRow(); updated = false; } - return resultSet.next(); + return getResultSet().next(); } /** - * Releases this ResultSet object's database and + * Releases this getResultSet() object's database and * JDBC resources immediately instead of waiting for * this to happen when it is automatically closed. * - *

Note: A ResultSet object + *

Note: A getResultSet() object * is automatically closed by the * Statement object that generated it when * that Statement object is closed, * re-executed, or is used to retrieve the next result from a - * sequence of multiple results. A ResultSet object + * sequence of multiple results. A getResultSet() object * is also automatically closed when it is garbage collected. * * @exception SQLException if a database access error occurs */ public void close() throws SQLException { - resultSet.close(); + getResultSet().close(); } /** @@ -214,7 +236,7 @@ * @exception SQLException if a database access error occurs */ public boolean wasNull() throws SQLException { - return resultSet.wasNull(); + return getResultSet().wasNull(); } //====================================================================== @@ -223,7 +245,7 @@ /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as + * of this getResultSet() object as * a String in the Java programming language. * * @param columnIndex the first column is 1, the second is 2, ... @@ -232,12 +254,12 @@ * @exception SQLException if a database access error occurs */ public String getString(int columnIndex) throws SQLException { - return resultSet.getString(columnIndex); + return getResultSet().getString(columnIndex); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as + * of this getResultSet() object as * a boolean in the Java programming language. * * @param columnIndex the first column is 1, the second is 2, ... @@ -246,12 +268,12 @@ * @exception SQLException if a database access error occurs */ public boolean getBoolean(int columnIndex) throws SQLException { - return resultSet.getBoolean(columnIndex); + return getResultSet().getBoolean(columnIndex); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as + * of this getResultSet() object as * a byte in the Java programming language. * * @param columnIndex the first column is 1, the second is 2, ... @@ -260,12 +282,12 @@ * @exception SQLException if a database access error occurs */ public byte getByte(int columnIndex) throws SQLException { - return resultSet.getByte(columnIndex); + return getResultSet().getByte(columnIndex); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as + * of this getResultSet() object as * a short in the Java programming language. * * @param columnIndex the first column is 1, the second is 2, ... @@ -274,12 +296,12 @@ * @exception SQLException if a database access error occurs */ public short getShort(int columnIndex) throws SQLException { - return resultSet.getShort(columnIndex); + return getResultSet().getShort(columnIndex); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as + * of this getResultSet() object as * an int in the Java programming language. * * @param columnIndex the first column is 1, the second is 2, ... @@ -288,12 +310,12 @@ * @exception SQLException if a database access error occurs */ public int getInt(int columnIndex) throws SQLException { - return resultSet.getInt(columnIndex); + return getResultSet().getInt(columnIndex); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as + * of this getResultSet() object as * a long in the Java programming language. * * @param columnIndex the first column is 1, the second is 2, ... @@ -302,12 +324,12 @@ * @exception SQLException if a database access error occurs */ public long getLong(int columnIndex) throws SQLException { - return resultSet.getLong(columnIndex); + return getResultSet().getLong(columnIndex); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as + * of this getResultSet() object as * a float in the Java programming language. * * @param columnIndex the first column is 1, the second is 2, ... @@ -316,12 +338,12 @@ * @exception SQLException if a database access error occurs */ public float getFloat(int columnIndex) throws SQLException { - return resultSet.getFloat(columnIndex); + return getResultSet().getFloat(columnIndex); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as + * of this getResultSet() object as * a double in the Java programming language. * * @param columnIndex the first column is 1, the second is 2, ... @@ -330,12 +352,12 @@ * @exception SQLException if a database access error occurs */ public double getDouble(int columnIndex) throws SQLException { - return resultSet.getDouble(columnIndex); + return getResultSet().getDouble(columnIndex); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as + * of this getResultSet() object as * a java.sql.BigDecimal in the Java programming language. * * @param columnIndex the first column is 1, the second is 2, ... @@ -346,12 +368,12 @@ * @deprecated */ public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException { - return resultSet.getBigDecimal(columnIndex, scale); + return getResultSet().getBigDecimal(columnIndex, scale); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as + * of this getResultSet() object as * a byte array in the Java programming language. * The bytes represent the raw values returned by the driver. * @@ -361,12 +383,12 @@ * @exception SQLException if a database access error occurs */ public byte[] getBytes(int columnIndex) throws SQLException { - return resultSet.getBytes(columnIndex); + return getResultSet().getBytes(columnIndex); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as + * of this getResultSet() object as * a java.sql.Date object in the Java programming language. * * @param columnIndex the first column is 1, the second is 2, ... @@ -375,12 +397,12 @@ * @exception SQLException if a database access error occurs */ public java.sql.Date getDate(int columnIndex) throws SQLException { - return resultSet.getDate(columnIndex); + return getResultSet().getDate(columnIndex); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as + * of this getResultSet() object as * a java.sql.Time object in the Java programming language. * * @param columnIndex the first column is 1, the second is 2, ... @@ -389,12 +411,12 @@ * @exception SQLException if a database access error occurs */ public java.sql.Time getTime(int columnIndex) throws SQLException { - return resultSet.getTime(columnIndex); + return getResultSet().getTime(columnIndex); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as + * of this getResultSet() object as * a java.sql.Timestamp object in the Java programming language. * * @param columnIndex the first column is 1, the second is 2, ... @@ -403,12 +425,12 @@ * @exception SQLException if a database access error occurs */ public java.sql.Timestamp getTimestamp(int columnIndex) throws SQLException { - return resultSet.getTimestamp(columnIndex); + return getResultSet().getTimestamp(columnIndex); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as + * of this getResultSet() object as * a stream of ASCII characters. The value can then be read in chunks from the * stream. This method is particularly * suitable for retrieving large LONGVARCHAR values. @@ -430,12 +452,12 @@ * @exception SQLException if a database access error occurs */ public java.io.InputStream getAsciiStream(int columnIndex) throws SQLException { - return resultSet.getAsciiStream(columnIndex); + return getResultSet().getAsciiStream(columnIndex); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as + * of this getResultSet() object as * as a stream of two-byte Unicode characters. The first byte is * the high byte; the second byte is the low byte. * @@ -463,12 +485,12 @@ * getUnicodeStream */ public java.io.InputStream getUnicodeStream(int columnIndex) throws SQLException { - return resultSet.getUnicodeStream(columnIndex); + return getResultSet().getUnicodeStream(columnIndex); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as a binary stream of + * of this getResultSet() object as a binary stream of * uninterpreted bytes. The value can then be read in chunks from the * stream. This method is particularly * suitable for retrieving large LONGVARBINARY values. @@ -490,7 +512,7 @@ public java.io.InputStream getBinaryStream(int columnIndex) throws SQLException { - return resultSet.getBinaryStream(columnIndex); + return getResultSet().getBinaryStream(columnIndex); } @@ -500,7 +522,7 @@ /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as + * of this getResultSet() object as * a String in the Java programming language. * * @param columnName the SQL name of the column @@ -509,12 +531,12 @@ * @exception SQLException if a database access error occurs */ public String getString(String columnName) throws SQLException { - return resultSet.getString(columnName); + return getResultSet().getString(columnName); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as + * of this getResultSet() object as * a boolean in the Java programming language. * * @param columnName the SQL name of the column @@ -523,12 +545,12 @@ * @exception SQLException if a database access error occurs */ public boolean getBoolean(String columnName) throws SQLException { - return resultSet.getBoolean(columnName); + return getResultSet().getBoolean(columnName); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as + * of this getResultSet() object as * a byte in the Java programming language. * * @param columnName the SQL name of the column @@ -537,12 +559,12 @@ * @exception SQLException if a database access error occurs */ public byte getByte(String columnName) throws SQLException { - return resultSet.getByte(columnName); + return getResultSet().getByte(columnName); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as + * of this getResultSet() object as * a short in the Java programming language. * * @param columnName the SQL name of the column @@ -551,12 +573,12 @@ * @exception SQLException if a database access error occurs */ public short getShort(String columnName) throws SQLException { - return resultSet.getShort(columnName); + return getResultSet().getShort(columnName); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as + * of this getResultSet() object as * an int in the Java programming language. * * @param columnName the SQL name of the column @@ -565,12 +587,12 @@ * @exception SQLException if a database access error occurs */ public int getInt(String columnName) throws SQLException { - return resultSet.getInt(columnName); + return getResultSet().getInt(columnName); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as + * of this getResultSet() object as * a long in the Java programming language. * * @param columnName the SQL name of the column @@ -579,12 +601,12 @@ * @exception SQLException if a database access error occurs */ public long getLong(String columnName) throws SQLException { - return resultSet.getLong(columnName); + return getResultSet().getLong(columnName); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as + * of this getResultSet() object as * a float in the Java programming language. * * @param columnName the SQL name of the column @@ -593,12 +615,12 @@ * @exception SQLException if a database access error occurs */ public float getFloat(String columnName) throws SQLException { - return resultSet.getFloat(columnName); + return getResultSet().getFloat(columnName); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as + * of this getResultSet() object as * a double in the Java programming language. * * @param columnName the SQL name of the column @@ -607,12 +629,12 @@ * @exception SQLException if a database access error occurs */ public double getDouble(String columnName) throws SQLException { - return resultSet.getDouble(columnName); + return getResultSet().getDouble(columnName); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as + * of this getResultSet() object as * a java.math.BigDecimal in the Java programming language. * * @param columnName the SQL name of the column @@ -623,12 +645,12 @@ * @deprecated */ public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException { - return resultSet.getBigDecimal(columnName, scale); + return getResultSet().getBigDecimal(columnName, scale); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as + * of this getResultSet() object as * a byte array in the Java programming language. * The bytes represent the raw values returned by the driver. * @@ -638,12 +660,12 @@ * @exception SQLException if a database access error occurs */ public byte[] getBytes(String columnName) throws SQLException { - return resultSet.getBytes(columnName); + return getResultSet().getBytes(columnName); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as + * of this getResultSet() object as * a java.sql.Date object in the Java programming language. * * @param columnName the SQL name of the column @@ -652,12 +674,12 @@ * @exception SQLException if a database access error occurs */ public java.sql.Date getDate(String columnName) throws SQLException { - return resultSet.getDate(columnName); + return getResultSet().getDate(columnName); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as + * of this getResultSet() object as * a java.sql.Time object in the Java programming language. * * @param columnName the SQL name of the column @@ -667,12 +689,12 @@ * @exception SQLException if a database access error occurs */ public java.sql.Time getTime(String columnName) throws SQLException { - return resultSet.getTime(columnName); + return getResultSet().getTime(columnName); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as + * of this getResultSet() object as * a java.sql.Timestamp object. * * @param columnName the SQL name of the column @@ -681,12 +703,12 @@ * @exception SQLException if a database access error occurs */ public java.sql.Timestamp getTimestamp(String columnName) throws SQLException { - return resultSet.getTimestamp(columnName); + return getResultSet().getTimestamp(columnName); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as a stream of + * of this getResultSet() object as a stream of * ASCII characters. The value can then be read in chunks from the * stream. This method is particularly * suitable for retrieving large LONGVARCHAR values. @@ -707,12 +729,12 @@ * @exception SQLException if a database access error occurs */ public java.io.InputStream getAsciiStream(String columnName) throws SQLException { - return resultSet.getAsciiStream(columnName); + return getResultSet().getAsciiStream(columnName); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as a stream of two-byte + * of this getResultSet() object as a stream of two-byte * Unicode characters. The first byte is the high byte; the second * byte is the low byte. * @@ -738,12 +760,12 @@ * @deprecated use getCharacterStream instead */ public java.io.InputStream getUnicodeStream(String columnName) throws SQLException { - return resultSet.getUnicodeStream(columnName); + return getResultSet().getUnicodeStream(columnName); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as a stream of uninterpreted + * of this getResultSet() object as a stream of uninterpreted * bytes. * The value can then be read in chunks from the * stream. This method is particularly @@ -765,7 +787,7 @@ public java.io.InputStream getBinaryStream(String columnName) throws SQLException { - return resultSet.getBinaryStream(columnName); + return getResultSet().getBinaryStream(columnName); } @@ -775,18 +797,18 @@ /** * Retrieves the first warning reported by calls on this - * ResultSet object. - * Subsequent warnings on this ResultSet object + * getResultSet() object. + * Subsequent warnings on this getResultSet() object * will be chained to the SQLWarning object that * this method returns. * *

The warning chain is automatically cleared each time a new - * row is read. This method may not be called on a ResultSet + * row is read. This method may not be called on a getResultSet() * object that has been closed; doing so will cause an * SQLException to be thrown. *

* Note: This warning chain only covers warnings caused - * by ResultSet methods. Any warning caused by + * by getResultSet() methods. Any warning caused by * Statement methods * (such as reading OUT parameters) will be chained on the * Statement object. @@ -797,23 +819,23 @@ * called on a closed result set */ public SQLWarning getWarnings() throws SQLException { - return resultSet.getWarnings(); + return getResultSet().getWarnings(); } /** - * Clears all warnings reported on this ResultSet object. + * Clears all warnings reported on this getResultSet() object. * After this method is called, the method getWarnings * returns null until a new warning is - * reported for this ResultSet object. + * reported for this getResultSet() object. * * @exception SQLException if a database access error occurs */ public void clearWarnings() throws SQLException { - resultSet.clearWarnings(); + getResultSet().clearWarnings(); } /** - * Retrieves the name of the SQL cursor used by this ResultSet + * Retrieves the name of the SQL cursor used by this getResultSet() * object. * *

In SQL, a result table is retrieved through a cursor that is @@ -825,34 +847,34 @@ * FOR UPDATE is omitted, the positioned updates may fail. * *

The JDBC API supports this SQL feature by providing the name of the - * SQL cursor used by a ResultSet object. - * The current row of a ResultSet object + * SQL cursor used by a getResultSet() object. + * The current row of a getResultSet() object * is also the current row of this SQL cursor. * *

Note: If positioned update is not supported, a * SQLException is thrown. * - * @return the SQL name for this ResultSet object's cursor + * @return the SQL name for this getResultSet() object's cursor * @exception SQLException if a database access error occurs */ public String getCursorName() throws SQLException { - return resultSet.getCursorName(); + return getResultSet().getCursorName(); } /** * Retrieves the number, types and properties of - * this ResultSet object's columns. + * this getResultSet() object's columns. * - * @return the description of this ResultSet object's columns + * @return the description of this getResultSet() object's columns * @exception SQLException if a database access error occurs */ public ResultSetMetaData getMetaData() throws SQLException { - return resultSet.getMetaData(); + return getResultSet().getMetaData(); } /** *

Gets the value of the designated column in the current row - * of this ResultSet object as + * of this getResultSet() object as * an Object in the Java programming language. * *

This method will return the value of the given column as a @@ -877,12 +899,12 @@ * @exception SQLException if a database access error occurs */ public Object getObject(int columnIndex) throws SQLException { - return resultSet.getObject(columnIndex); + return getResultSet().getObject(columnIndex); } /** *

Gets the value of the designated column in the current row - * of this ResultSet object as + * of this getResultSet() object as * an Object in the Java programming language. * *

This method will return the value of the given column as a @@ -907,22 +929,22 @@ * @exception SQLException if a database access error occurs */ public Object getObject(String columnName) throws SQLException { - return resultSet.getObject(columnName); + return getResultSet().getObject(columnName); } //---------------------------------------------------------------- /** - * Maps the given ResultSet column name to its - * ResultSet column index. + * Maps the given getResultSet() column name to its + * getResultSet() column index. * * @param columnName the name of the column * @return the column index of the given column name - * @exception SQLException if the ResultSet object + * @exception SQLException if the getResultSet() object * does not contain columnName or a database access error occurs */ public int findColumn(String columnName) throws SQLException { - return resultSet.findColumn(columnName); + return getResultSet().findColumn(columnName); } @@ -934,7 +956,7 @@ /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as a + * of this getResultSet() object as a * java.io.Reader object. * @return a java.io.Reader object that contains the column * value; if the value is SQL NULL, the value returned is @@ -944,12 +966,12 @@ * @since 1.2 */ public java.io.Reader getCharacterStream(int columnIndex) throws SQLException { - return resultSet.getCharacterStream(columnIndex); + return getResultSet().getCharacterStream(columnIndex); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as a + * of this getResultSet() object as a * java.io.Reader object. * * @param columnName the name of the column @@ -960,12 +982,12 @@ * @since 1.2 */ public java.io.Reader getCharacterStream(String columnName) throws SQLException { - return resultSet.getCharacterStream(columnName); + return getResultSet().getCharacterStream(columnName); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as a + * of this getResultSet() object as a * java.math.BigDecimal with full precision. * * @param columnIndex the first column is 1, the second is 2, ... @@ -976,12 +998,12 @@ * @since 1.2 */ public BigDecimal getBigDecimal(int columnIndex) throws SQLException { - return resultSet.getBigDecimal(columnIndex); + return getResultSet().getBigDecimal(columnIndex); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as a + * of this getResultSet() object as a * java.math.BigDecimal with full precision. * * @param columnName the column name @@ -993,7 +1015,7 @@ * */ public BigDecimal getBigDecimal(String columnName) throws SQLException { - return resultSet.getBigDecimal(columnName); + return getResultSet().getBigDecimal(columnName); } //--------------------------------------------------------------------- @@ -1002,7 +1024,7 @@ /** * Retrieves whether the cursor is before the first row in - * this ResultSet object. + * this getResultSet() object. * * @return true if the cursor is before the first row; * false if the cursor is at any other position or the @@ -1011,12 +1033,12 @@ * @since 1.2 */ public boolean isBeforeFirst() throws SQLException { - return resultSet.isBeforeFirst(); + return getResultSet().isBeforeFirst(); } /** * Retrieves whether the cursor is after the last row in - * this ResultSet object. + * this getResultSet() object. * * @return true if the cursor is after the last row; * false if the cursor is at any other position or the @@ -1025,12 +1047,12 @@ * @since 1.2 */ public boolean isAfterLast() throws SQLException { - return resultSet.isAfterLast(); + return getResultSet().isAfterLast(); } /** * Retrieves whether the cursor is on the first row of - * this ResultSet object. + * this getResultSet() object. * * @return true if the cursor is on the first row; * false otherwise @@ -1038,12 +1060,12 @@ * @since 1.2 */ public boolean isFirst() throws SQLException { - return resultSet.isFirst(); + return getResultSet().isFirst(); } /** * Retrieves whether the cursor is on the last row of - * this ResultSet object. + * this getResultSet() object. * Note: Calling the method isLast may be expensive * because the JDBC driver * might need to fetch ahead one row in order to determine @@ -1055,12 +1077,12 @@ * @since 1.2 */ public boolean isLast() throws SQLException { - return resultSet.isLast(); + return getResultSet().isLast(); } /** * Moves the cursor to the front of - * this ResultSet object, just before the + * this getResultSet() object, just before the * first row. This method has no effect if the result set contains no rows. * * @exception SQLException if a database access error @@ -1068,24 +1090,24 @@ * @since 1.2 */ public void beforeFirst() throws SQLException { - resultSet.beforeFirst(); + getResultSet().beforeFirst(); } /** * Moves the cursor to the end of - * this ResultSet object, just after the + * this getResultSet() object, just after the * last row. This method has no effect if the result set contains no rows. * @exception SQLException if a database access error * occurs or the result set type is TYPE_FORWARD_ONLY * @since 1.2 */ public void afterLast() throws SQLException { - resultSet.afterLast(); + getResultSet().afterLast(); } /** * Moves the cursor to the first row in - * this ResultSet object. + * this getResultSet() object. * * @return true if the cursor is on a valid row; * false if there are no rows in the result set @@ -1094,12 +1116,12 @@ * @since 1.2 */ public boolean first() throws SQLException { - return resultSet.first(); + return getResultSet().first(); } /** * Moves the cursor to the last row in - * this ResultSet object. + * this getResultSet() object. * * @return true if the cursor is on a valid row; * false if there are no rows in the result set @@ -1108,7 +1130,7 @@ * @since 1.2 */ public boolean last() throws SQLException { - return resultSet.last(); + return getResultSet().last(); } /** @@ -1120,12 +1142,12 @@ * @since 1.2 */ public int getRow() throws SQLException { - return resultSet.getRow(); + return getResultSet().getRow(); } /** * Moves the cursor to the given row number in - * this ResultSet object. + * this getResultSet() object. * *

If the row number is positive, the cursor moves to * the given row number with respect to the @@ -1158,7 +1180,7 @@ * @since 1.2 */ public boolean absolute( int row ) throws SQLException { - return resultSet.absolute(row); + return getResultSet().absolute(row); } /** @@ -1184,12 +1206,12 @@ * @since 1.2 */ public boolean relative( int rows ) throws SQLException { - return resultSet.relative(rows); + return getResultSet().relative(rows); } /** * Moves the cursor to the previous row in this - * ResultSet object. + * getResultSet() object. * * @return true if the cursor is on a valid row; * false if it is off the result set @@ -1199,24 +1221,24 @@ */ public boolean previous() throws SQLException { if (updated) { - resultSet.updateRow(); + getResultSet().updateRow(); updated = false; } - return resultSet.previous(); + return getResultSet().previous(); } /** * Gives a hint as to the direction in which the rows in this - * ResultSet object will be processed. + * getResultSet() object will be processed. * The initial value is determined by the * Statement object - * that produced this ResultSet object. + * that produced this getResultSet() object. * The fetch direction may be changed at any time. * * @param direction an int specifying the suggested - * fetch direction; one of ResultSet.FETCH_FORWARD, - * ResultSet.FETCH_REVERSE, or - * ResultSet.FETCH_UNKNOWN + * fetch direction; one of getResultSet().FETCH_FORWARD, + * getResultSet().FETCH_REVERSE, or + * getResultSet().FETCH_UNKNOWN * @exception SQLException if a database access error occurs or * the result set type is TYPE_FORWARD_ONLY and the fetch * direction is not FETCH_FORWARD @@ -1225,26 +1247,26 @@ * @see #getFetchDirection */ public void setFetchDirection(int direction) throws SQLException { - resultSet.setFetchDirection(direction); + getResultSet().setFetchDirection(direction); } /** * Retrieves the fetch direction for this - * ResultSet object. + * getResultSet() object. * - * @return the current fetch direction for this ResultSet object + * @return the current fetch direction for this getResultSet() object * @exception SQLException if a database access error occurs * @since 1.2 * @see #setFetchDirection */ public int getFetchDirection() throws SQLException { - return resultSet.getFetchDirection(); + return getResultSet().getFetchDirection(); } /** * Gives the JDBC driver a hint as to the number of rows that should * be fetched from the database when more rows are needed for this - * ResultSet object. + * getResultSet() object. * If the fetch size specified is zero, the JDBC driver * ignores the value and is free to make its own best guess as to what * the fetch size should be. The default value is set by the @@ -1258,50 +1280,50 @@ * @see #getFetchSize */ public void setFetchSize(int rows) throws SQLException { - resultSet.setFetchSize(rows); + getResultSet().setFetchSize(rows); } /** * Retrieves the fetch size for this - * ResultSet object. + * getResultSet() object. * - * @return the current fetch size for this ResultSet object + * @return the current fetch size for this getResultSet() object * @exception SQLException if a database access error occurs * @since 1.2 * @see #setFetchSize */ public int getFetchSize() throws SQLException { - return resultSet.getFetchSize(); + return getResultSet().getFetchSize(); } /** - * Retrieves the type of this ResultSet object. + * Retrieves the type of this getResultSet() object. * The type is determined by the Statement object * that created the result set. * - * @return ResultSet.TYPE_FORWARD_ONLY, - * ResultSet.TYPE_SCROLL_INSENSITIVE, - * or ResultSet.TYPE_SCROLL_SENSITIVE + * @return getResultSet().TYPE_FORWARD_ONLY, + * getResultSet().TYPE_SCROLL_INSENSITIVE, + * or getResultSet().TYPE_SCROLL_SENSITIVE * @exception SQLException if a database access error occurs * @since 1.2 */ public int getType() throws SQLException { - return resultSet.getType(); + return getResultSet().getType(); } /** - * Retrieves the concurrency mode of this ResultSet object. + * Retrieves the concurrency mode of this getResultSet() object. * The concurrency used is determined by the * Statement object that created the result set. * * @return the concurrency type, either - * ResultSet.CONCUR_READ_ONLY - * or ResultSet.CONCUR_UPDATABLE + * getResultSet().CONCUR_READ_ONLY + * or getResultSet().CONCUR_UPDATABLE * @exception SQLException if a database access error occurs * @since 1.2 */ public int getConcurrency() throws SQLException { - return resultSet.getConcurrency(); + return getResultSet().getConcurrency(); } //--------------------------------------------------------------------- @@ -1319,13 +1341,13 @@ * @since 1.2 */ public boolean rowUpdated() throws SQLException { - return resultSet.rowUpdated(); + return getResultSet().rowUpdated(); } /** * Retrieves whether the current row has had an insertion. * The value returned depends on whether or not this - * ResultSet object can detect visible inserts. + * getResultSet() object can detect visible inserts. * * @return true if a row has had an insertion * and insertions are detected; false otherwise @@ -1335,14 +1357,14 @@ * @since 1.2 */ public boolean rowInserted() throws SQLException { - return resultSet.rowInserted(); + return getResultSet().rowInserted(); } /** * Retrieves whether a row has been deleted. A deleted row may leave * a visible "hole" in a result set. This method can be used to * detect holes in a result set. The value returned depends on whether - * or not this ResultSet object can detect deletions. + * or not this getResultSet() object can detect deletions. * * @return true if a row was deleted and deletions are detected; * false otherwise @@ -1352,7 +1374,7 @@ * @since 1.2 */ public boolean rowDeleted() throws SQLException { - return resultSet.rowDeleted(); + return getResultSet().rowDeleted(); } /** @@ -1368,7 +1390,7 @@ * @since 1.2 */ public void updateNull(int columnIndex) throws SQLException { - resultSet.updateNull(columnIndex); + getResultSet().updateNull(columnIndex); } /** @@ -1384,7 +1406,7 @@ * @since 1.2 */ public void updateBoolean(int columnIndex, boolean x) throws SQLException { - resultSet.updateBoolean(columnIndex, x); + getResultSet().updateBoolean(columnIndex, x); } /** @@ -1401,7 +1423,7 @@ * @since 1.2 */ public void updateByte(int columnIndex, byte x) throws SQLException { - resultSet.updateByte(columnIndex, x); + getResultSet().updateByte(columnIndex, x); } /** @@ -1417,7 +1439,7 @@ * @since 1.2 */ public void updateShort(int columnIndex, short x) throws SQLException { - resultSet.updateShort(columnIndex, x); + getResultSet().updateShort(columnIndex, x); } /** @@ -1433,7 +1455,7 @@ * @since 1.2 */ public void updateInt(int columnIndex, int x) throws SQLException { - resultSet.updateInt(columnIndex, x); + getResultSet().updateInt(columnIndex, x); } /** @@ -1449,7 +1471,7 @@ * @since 1.2 */ public void updateLong(int columnIndex, long x) throws SQLException { - resultSet.updateLong(columnIndex, x); + getResultSet().updateLong(columnIndex, x); } /** @@ -1465,7 +1487,7 @@ * @since 1.2 */ public void updateFloat(int columnIndex, float x) throws SQLException { - resultSet.updateFloat(columnIndex, x); + getResultSet().updateFloat(columnIndex, x); } /** @@ -1481,7 +1503,7 @@ * @since 1.2 */ public void updateDouble(int columnIndex, double x) throws SQLException { - resultSet.updateDouble(columnIndex, x); + getResultSet().updateDouble(columnIndex, x); } /** @@ -1498,7 +1520,7 @@ * @since 1.2 */ public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException { - resultSet.updateBigDecimal(columnIndex, x); + getResultSet().updateBigDecimal(columnIndex, x); } /** @@ -1514,7 +1536,7 @@ * @since 1.2 */ public void updateString(int columnIndex, String x) throws SQLException { - resultSet.updateString(columnIndex, x); + getResultSet().updateString(columnIndex, x); } /** @@ -1530,7 +1552,7 @@ * @since 1.2 */ public void updateBytes(int columnIndex, byte x[]) throws SQLException { - resultSet.updateBytes(columnIndex, x); + getResultSet().updateBytes(columnIndex, x); } /** @@ -1546,7 +1568,7 @@ * @since 1.2 */ public void updateDate(int columnIndex, java.sql.Date x) throws SQLException { - resultSet.updateDate(columnIndex, x); + getResultSet().updateDate(columnIndex, x); } /** @@ -1562,7 +1584,7 @@ * @since 1.2 */ public void updateTime(int columnIndex, java.sql.Time x) throws SQLException { - resultSet.updateTime(columnIndex, x); + getResultSet().updateTime(columnIndex, x); } /** @@ -1580,7 +1602,7 @@ */ public void updateTimestamp(int columnIndex, java.sql.Timestamp x) throws SQLException { - resultSet.updateTimestamp(columnIndex, x); + getResultSet().updateTimestamp(columnIndex, x); } /** @@ -1599,7 +1621,7 @@ public void updateAsciiStream(int columnIndex, java.io.InputStream x, int length) throws SQLException { - resultSet.updateAsciiStream(columnIndex, x, length); + getResultSet().updateAsciiStream(columnIndex, x, length); } /** @@ -1616,9 +1638,9 @@ * @since 1.2 */ public void updateBinaryStream(int columnIndex, - java.io.InputStream x, + java.io.InputStream x, int length) throws SQLException { - resultSet.updateBinaryStream(columnIndex, x, length); + getResultSet().updateBinaryStream(columnIndex, x, length); } /** @@ -1637,7 +1659,7 @@ public void updateCharacterStream(int columnIndex, java.io.Reader x, int length) throws SQLException { - resultSet.updateCharacterStream(columnIndex, x, length); + getResultSet().updateCharacterStream(columnIndex, x, length); } /** @@ -1658,7 +1680,7 @@ */ public void updateObject(int columnIndex, Object x, int scale) throws SQLException { - resultSet.updateObject(columnIndex, x, scale); + getResultSet().updateObject(columnIndex, x, scale); } /** @@ -1674,7 +1696,7 @@ * @since 1.2 */ public void updateObject(int columnIndex, Object x) throws SQLException { - resultSet.updateObject(columnIndex, x); + getResultSet().updateObject(columnIndex, x); } /** @@ -1689,7 +1711,7 @@ * @since 1.2 */ public void updateNull(String columnName) throws SQLException { - resultSet.updateNull(columnName); + getResultSet().updateNull(columnName); } /** @@ -1705,7 +1727,7 @@ * @since 1.2 */ public void updateBoolean(String columnName, boolean x) throws SQLException { - resultSet.updateBoolean(columnName, x); + getResultSet().updateBoolean(columnName, x); } /** @@ -1721,7 +1743,7 @@ * @since 1.2 */ public void updateByte(String columnName, byte x) throws SQLException { - resultSet.updateByte(columnName, x); + getResultSet().updateByte(columnName, x); } /** @@ -1737,7 +1759,7 @@ * @since 1.2 */ public void updateShort(String columnName, short x) throws SQLException { - resultSet.updateShort(columnName, x); + getResultSet().updateShort(columnName, x); } /** @@ -1753,7 +1775,7 @@ * @since 1.2 */ public void updateInt(String columnName, int x) throws SQLException { - resultSet.updateInt(columnName, x); + getResultSet().updateInt(columnName, x); } /** @@ -1769,11 +1791,11 @@ * @since 1.2 */ public void updateLong(String columnName, long x) throws SQLException { - resultSet.updateLong(columnName, x); + getResultSet().updateLong(columnName, x); } /** - * Updates the designated column with a float value. + * Updates the designated column with a float value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or @@ -1785,7 +1807,7 @@ * @since 1.2 */ public void updateFloat(String columnName, float x) throws SQLException { - resultSet.updateFloat(columnName, x); + getResultSet().updateFloat(columnName, x); } /** @@ -1801,7 +1823,7 @@ * @since 1.2 */ public void updateDouble(String columnName, double x) throws SQLException { - resultSet.updateDouble(columnName, x); + getResultSet().updateDouble(columnName, x); } /** @@ -1818,7 +1840,7 @@ * @since 1.2 */ public void updateBigDecimal(String columnName, BigDecimal x) throws SQLException { - resultSet.updateBigDecimal(columnName, x); + getResultSet().updateBigDecimal(columnName, x); } /** @@ -1834,7 +1856,7 @@ * @since 1.2 */ public void updateString(String columnName, String x) throws SQLException { - resultSet.updateString(columnName, x); + getResultSet().updateString(columnName, x); } /** @@ -1851,7 +1873,7 @@ * @since 1.2 */ public void updateBytes(String columnName, byte x[]) throws SQLException { - resultSet.updateBytes(columnName, x); + getResultSet().updateBytes(columnName, x); } /** @@ -1867,7 +1889,7 @@ * @since 1.2 */ public void updateDate(String columnName, java.sql.Date x) throws SQLException { - resultSet.updateDate(columnName, x); + getResultSet().updateDate(columnName, x); } /** @@ -1883,7 +1905,7 @@ * @since 1.2 */ public void updateTime(String columnName, java.sql.Time x) throws SQLException { - resultSet.updateTime(columnName, x); + getResultSet().updateTime(columnName, x); } /** @@ -1901,7 +1923,7 @@ */ public void updateTimestamp(String columnName, java.sql.Timestamp x) throws SQLException { - resultSet.updateTimestamp(columnName, x); + getResultSet().updateTimestamp(columnName, x); } /** @@ -1918,9 +1940,9 @@ * @since 1.2 */ public void updateAsciiStream(String columnName, - java.io.InputStream x, + java.io.InputStream x, int length) throws SQLException { - resultSet.updateAsciiStream(columnName, x, length); + getResultSet().updateAsciiStream(columnName, x, length); } /** @@ -1937,9 +1959,9 @@ * @since 1.2 */ public void updateBinaryStream(String columnName, - java.io.InputStream x, - int length) throws SQLException { - resultSet.updateBinaryStream(columnName, x, length); + java.io.InputStream x, + int length) throws SQLException { + getResultSet().updateBinaryStream(columnName, x, length); } /** @@ -1959,7 +1981,7 @@ public void updateCharacterStream(String columnName, java.io.Reader reader, int length) throws SQLException { - resultSet.updateCharacterStream(columnName, reader, length); + getResultSet().updateCharacterStream(columnName, reader, length); } /** @@ -1980,7 +2002,7 @@ */ public void updateObject(String columnName, Object x, int scale) throws SQLException { - resultSet.updateObject(columnName, x, scale); + getResultSet().updateObject(columnName, x, scale); } /** @@ -1996,12 +2018,12 @@ * @since 1.2 */ public void updateObject(String columnName, Object x) throws SQLException { - resultSet.updateObject(columnName, x); + getResultSet().updateObject(columnName, x); } /** * Inserts the contents of the insert row into this - * ResultSet object and into the database. + * getResultSet() object and into the database. * The cursor must be on the insert row when this method is called. * * @exception SQLException if a database access error occurs, @@ -2011,12 +2033,12 @@ * @since 1.2 */ public void insertRow() throws SQLException { - resultSet.insertRow(); + getResultSet().insertRow(); } /** * Updates the underlying database with the new contents of the - * current row of this ResultSet object. + * current row of this getResultSet() object. * This method cannot be called when the cursor is on the insert row. * * @exception SQLException if a database access error occurs or @@ -2024,11 +2046,11 @@ * @since 1.2 */ public void updateRow() throws SQLException { - resultSet.updateRow(); + getResultSet().updateRow(); } /** - * Deletes the current row from this ResultSet object + * Deletes the current row from this getResultSet() object * and from the underlying database. This method cannot be called when * the cursor is on the insert row. * @@ -2037,7 +2059,7 @@ * @since 1.2 */ public void deleteRow() throws SQLException { - resultSet.deleteRow(); + getResultSet().deleteRow(); } /** @@ -2066,12 +2088,12 @@ * @since 1.2 */ public void refreshRow() throws SQLException { - resultSet.refreshRow(); + getResultSet().refreshRow(); } /** * Cancels the updates made to the current row in this - * ResultSet object. + * getResultSet() object. * This method may be called after calling an * updater method(s) and before calling * the method updateRow to roll back @@ -2085,7 +2107,7 @@ * @since 1.2 */ public void cancelRowUpdates() throws SQLException { - resultSet.cancelRowUpdates(); + getResultSet().cancelRowUpdates(); } /** @@ -2110,7 +2132,7 @@ * @since 1.2 */ public void moveToInsertRow() throws SQLException { - resultSet.moveToInsertRow(); + getResultSet().moveToInsertRow(); } /** @@ -2123,29 +2145,29 @@ * @since 1.2 */ public void moveToCurrentRow() throws SQLException { - resultSet.moveToCurrentRow(); + getResultSet().moveToCurrentRow(); } /** * Retrieves the Statement object that produced this - * ResultSet object. + * getResultSet() object. * If the result set was generated some other way, such as by a * DatabaseMetaData method, this method returns * null. * * @return the Statment object that produced - * this ResultSet object or null + * this getResultSet() object or null * if the result set was produced some other way * @exception SQLException if a database access error occurs * @since 1.2 */ public Statement getStatement() throws SQLException { - return resultSet.getStatement(); + return getResultSet().getStatement(); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as an Object + * of this getResultSet() object as an Object * in the Java programming language. * If the value is an SQL NULL, * the driver returns a Java null. @@ -2162,12 +2184,12 @@ * @since 1.2 */ public Object getObject(int i, java.util.Map map) throws SQLException { - return resultSet.getObject(i, map); + return getResultSet().getObject(i, map); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as a Ref object + * of this getResultSet() object as a Ref object * in the Java programming language. * * @param i the first column is 1, the second is 2, ... @@ -2177,12 +2199,12 @@ * @since 1.2 */ public Ref getRef(int i) throws SQLException { - return resultSet.getRef(i); + return getResultSet().getRef(i); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as a Blob object + * of this getResultSet() object as a Blob object * in the Java programming language. * * @param i the first column is 1, the second is 2, ... @@ -2192,12 +2214,12 @@ * @since 1.2 */ public Blob getBlob(int i) throws SQLException { - return resultSet.getBlob(i); + return getResultSet().getBlob(i); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as a Clob object + * of this getResultSet() object as a Clob object * in the Java programming language. * * @param i the first column is 1, the second is 2, ... @@ -2207,12 +2229,12 @@ * @since 1.2 */ public Clob getClob(int i) throws SQLException { - return resultSet.getClob(i); + return getResultSet().getClob(i); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as an Array object + * of this getResultSet() object as an Array object * in the Java programming language. * * @param i the first column is 1, the second is 2, ... @@ -2222,12 +2244,12 @@ * @since 1.2 */ public Array getArray(int i) throws SQLException { - return resultSet.getArray(i); + return getResultSet().getArray(i); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as an Object + * of this getResultSet() object as an Object * in the Java programming language. * If the value is an SQL NULL, * the driver returns a Java null. @@ -2243,12 +2265,12 @@ * @since 1.2 */ public Object getObject(String colName, java.util.Map map) throws SQLException { - return resultSet.getObject(colName, map); + return getResultSet().getObject(colName, map); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as a Ref object + * of this getResultSet() object as a Ref object * in the Java programming language. * * @param colName the column name @@ -2258,12 +2280,12 @@ * @since 1.2 */ public Ref getRef(String colName) throws SQLException { - return resultSet.getRef(colName); + return getResultSet().getRef(colName); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as a Blob object + * of this getResultSet() object as a Blob object * in the Java programming language. * * @param colName the name of the column from which to retrieve the value @@ -2273,12 +2295,12 @@ * @since 1.2 */ public Blob getBlob(String colName) throws SQLException { - return resultSet.getBlob(colName); + return getResultSet().getBlob(colName); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as a Clob object + * of this getResultSet() object as a Clob object * in the Java programming language. * * @param colName the name of the column from which to retrieve the value @@ -2288,12 +2310,12 @@ * @since 1.2 */ public Clob getClob(String colName) throws SQLException { - return resultSet.getClob(colName); + return getResultSet().getClob(colName); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as an Array object + * of this getResultSet() object as an Array object * in the Java programming language. * * @param colName the name of the column from which to retrieve the value @@ -2303,12 +2325,12 @@ * @since 1.2 */ public Array getArray(String colName) throws SQLException { - return resultSet.getArray(colName); + return getResultSet().getArray(colName); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as a java.sql.Date object + * of this getResultSet() object as a java.sql.Date object * in the Java programming language. * This method uses the given calendar to construct an appropriate millisecond * value for the date if the underlying database does not store @@ -2324,12 +2346,12 @@ * @since 1.2 */ public java.sql.Date getDate(int columnIndex, Calendar cal) throws SQLException { - return resultSet.getDate(columnIndex, cal); + return getResultSet().getDate(columnIndex, cal); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as a java.sql.Date object + * of this getResultSet() object as a java.sql.Date object * in the Java programming language. * This method uses the given calendar to construct an appropriate millisecond * value for the date if the underlying database does not store @@ -2345,12 +2367,12 @@ * @since 1.2 */ public java.sql.Date getDate(String columnName, Calendar cal) throws SQLException { - return resultSet.getDate(columnName, cal); + return getResultSet().getDate(columnName, cal); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as a java.sql.Time object + * of this getResultSet() object as a java.sql.Time object * in the Java programming language. * This method uses the given calendar to construct an appropriate millisecond * value for the time if the underlying database does not store @@ -2366,12 +2388,12 @@ * @since 1.2 */ public java.sql.Time getTime(int columnIndex, Calendar cal) throws SQLException { - return resultSet.getTime(columnIndex, cal); + return getResultSet().getTime(columnIndex, cal); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as a java.sql.Time object + * of this getResultSet() object as a java.sql.Time object * in the Java programming language. * This method uses the given calendar to construct an appropriate millisecond * value for the time if the underlying database does not store @@ -2387,12 +2409,12 @@ * @since 1.2 */ public java.sql.Time getTime(String columnName, Calendar cal) throws SQLException { - return resultSet.getTime(columnName, cal); + return getResultSet().getTime(columnName, cal); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as a java.sql.Timestamp object + * of this getResultSet() object as a java.sql.Timestamp object * in the Java programming language. * This method uses the given calendar to construct an appropriate millisecond * value for the timestamp if the underlying database does not store @@ -2409,12 +2431,12 @@ */ public java.sql.Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException { - return resultSet.getTimestamp(columnIndex, cal); + return getResultSet().getTimestamp(columnIndex, cal); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as a java.sql.Timestamp object + * of this getResultSet() object as a java.sql.Timestamp object * in the Java programming language. * This method uses the given calendar to construct an appropriate millisecond * value for the timestamp if the underlying database does not store @@ -2429,16 +2451,16 @@ * @exception SQLException if a database access error occurs * @since 1.2 */ - public java.sql.Timestamp getTimestamp(String columnName, Calendar cal) + public java.sql.Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException { - return resultSet.getTimestamp(columnName, cal); + return getResultSet().getTimestamp(columnName, cal); } //-------------------------- JDBC 3.0 ---------------------------------------- /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as a java.net.URL + * of this getResultSet() object as a java.net.URL * object in the Java programming language. * * @param columnIndex the index of the column 1 is the first, 2 is the second,... @@ -2450,12 +2472,12 @@ * @since 1.4 */ public java.net.URL getURL(int columnIndex) throws SQLException { - return resultSet.getURL(columnIndex); + return getResultSet().getURL(columnIndex); } /** * Retrieves the value of the designated column in the current row - * of this ResultSet object as a java.net.URL + * of this getResultSet() object as a java.net.URL * object in the Java programming language. * * @param columnName the SQL name of the column @@ -2467,7 +2489,7 @@ * @since 1.4 */ public java.net.URL getURL(String columnName) throws SQLException { - return resultSet.getURL(columnName); + return getResultSet().getURL(columnName); } /** @@ -2483,7 +2505,7 @@ * @since 1.4 */ public void updateRef(int columnIndex, java.sql.Ref x) throws SQLException { - resultSet.updateRef(columnIndex, x); + getResultSet().updateRef(columnIndex, x); } /** @@ -2499,7 +2521,7 @@ * @since 1.4 */ public void updateRef(String columnName, java.sql.Ref x) throws SQLException { - resultSet.updateRef(columnName, x); + getResultSet().updateRef(columnName, x); } /** @@ -2515,7 +2537,7 @@ * @since 1.4 */ public void updateBlob(int columnIndex, java.sql.Blob x) throws SQLException { - resultSet.updateBlob(columnIndex, x); + getResultSet().updateBlob(columnIndex, x); } /** @@ -2531,7 +2553,7 @@ * @since 1.4 */ public void updateBlob(String columnName, java.sql.Blob x) throws SQLException { - resultSet.updateBlob(columnName, x); + getResultSet().updateBlob(columnName, x); } /** @@ -2547,7 +2569,7 @@ * @since 1.4 */ public void updateClob(int columnIndex, java.sql.Clob x) throws SQLException { - resultSet.updateClob(columnIndex, x); + getResultSet().updateClob(columnIndex, x); } /** @@ -2563,7 +2585,7 @@ * @since 1.4 */ public void updateClob(String columnName, java.sql.Clob x) throws SQLException { - resultSet.updateClob(columnName, x); + getResultSet().updateClob(columnName, x); } /** @@ -2579,7 +2601,7 @@ * @since 1.4 */ public void updateArray(int columnIndex, java.sql.Array x) throws SQLException { - resultSet.updateArray(columnIndex, x); + getResultSet().updateArray(columnIndex, x); } /** @@ -2595,6 +2617,6 @@ * @since 1.4 */ public void updateArray(String columnName, java.sql.Array x) throws SQLException { - resultSet.updateArray(columnName, x); + getResultSet().updateArray(columnName, x); } }