Source Code Cross Referenced for GroovyResultSet.java in  » Scripting » groovy-1.0 » groovy » sql » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Scripting » groovy 1.0 » groovy.sql 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        /*
0002:         $Id: GroovyResultSet.java 4032 2006-08-30 07:18:49Z mguillem $
0003:
0004:         Copyright 2003 (C) James Strachan and Bob Mcwhirter. All Rights Reserved.
0005:
0006:         Redistribution and use of this software and associated documentation
0007:         ("Software"), with or without modification, are permitted provided
0008:         that the following conditions are met:
0009:
0010:         1. Redistributions of source code must retain copyright
0011:            statements and notices.  Redistributions must also contain a
0012:            copy of this document.
0013:
0014:         2. Redistributions in binary form must reproduce the
0015:            above copyright notice, this list of conditions and the
0016:            following disclaimer in the documentation and/or other
0017:            materials provided with the distribution.
0018:
0019:         3. The name "groovy" must not be used to endorse or promote
0020:            products derived from this Software without prior written
0021:            permission of The Codehaus.  For written permission,
0022:            please contact info@codehaus.org.
0023:
0024:         4. Products derived from this Software may not be called "groovy"
0025:            nor may "groovy" appear in their names without prior written
0026:            permission of The Codehaus. "groovy" is a registered
0027:            trademark of The Codehaus.
0028:
0029:         5. Due credit should be given to The Codehaus -
0030:            http://groovy.codehaus.org/
0031:
0032:         THIS SOFTWARE IS PROVIDED BY THE CODEHAUS AND CONTRIBUTORS
0033:         ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
0034:         NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
0035:         FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
0036:         THE CODEHAUS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
0037:         INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
0038:         (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
0039:         SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
0040:         HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
0041:         STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
0042:         ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
0043:         OF THE POSSIBILITY OF SUCH DAMAGE.
0044:
0045:         */
0046:        package groovy.sql;
0047:
0048:        import groovy.lang.Closure;
0049:        import groovy.lang.GroovyObjectSupport;
0050:        import groovy.lang.MissingPropertyException;
0051:
0052:        import java.math.BigDecimal;
0053:        import java.sql.Array;
0054:        import java.sql.Blob;
0055:        import java.sql.Clob;
0056:        import java.sql.Ref;
0057:        import java.sql.ResultSet;
0058:        import java.sql.ResultSetMetaData;
0059:        import java.sql.SQLException;
0060:        import java.sql.SQLWarning;
0061:        import java.sql.Statement;
0062:        import java.util.Calendar;
0063:        import java.util.Iterator;
0064:        import java.util.Map;
0065:
0066:        /**
0067:         * Represents an extent of objects
0068:         *
0069:         * @author <a href="mailto:james@coredevelopers.net">James Strachan</a>
0070:         * @author <a href="mailto:ivan_ganza@yahoo.com">Ivan Ganza</a>
0071:         * @version $Revision: 4032 $
0072:         * @Author Chris Stevenson
0073:         */
0074:        public class GroovyResultSet extends GroovyObjectSupport implements 
0075:                ResultSet {
0076:
0077:            private ResultSet _resultSet;
0078:            private boolean updated;
0079:
0080:            public GroovyResultSet(ResultSet resultSet) {
0081:                this ._resultSet = resultSet;
0082:            }
0083:
0084:            protected GroovyResultSet() {
0085:            }
0086:
0087:            protected ResultSet getResultSet() throws SQLException {
0088:                return _resultSet;
0089:            }
0090:
0091:            public Object getProperty(String property) {
0092:                try {
0093:                    return getResultSet().getObject(property);
0094:                } catch (SQLException e) {
0095:                    throw new MissingPropertyException(property,
0096:                            GroovyResultSet.class, e);
0097:                }
0098:            }
0099:
0100:            public void setProperty(String property, Object newValue) {
0101:                try {
0102:                    getResultSet().updateObject(property, newValue);
0103:                    updated = true;
0104:                } catch (SQLException e) {
0105:                    throw new MissingPropertyException(property,
0106:                            GroovyResultSet.class, e);
0107:                }
0108:            }
0109:
0110:            /**
0111:             * Supports integer based subscript operators for accessing at numbered columns
0112:             * starting at zero. Negative indices are supported, they will count from the last column backwards.
0113:             *
0114:             * @param index is the number of the column to look at starting at 1
0115:             */
0116:            public Object getAt(int index) throws SQLException {
0117:                index = normalizeIndex(index);
0118:                return getResultSet().getObject(index);
0119:            }
0120:
0121:            /**
0122:             * Supports integer based subscript operators for updating the values of numbered columns
0123:             * starting at zero. Negative indices are supported, they will count from the last column backwards.
0124:             *
0125:             * @param index is the number of the column to look at starting at 1
0126:             */
0127:            public void putAt(int index, Object newValue) throws SQLException {
0128:                index = normalizeIndex(index);
0129:                getResultSet().updateObject(index, newValue);
0130:            }
0131:
0132:            /**
0133:             * Adds a new row to this result set
0134:             *
0135:             * @param values
0136:             */
0137:            public void add(Map values) throws SQLException {
0138:                getResultSet().moveToInsertRow();
0139:                for (Iterator iter = values.entrySet().iterator(); iter
0140:                        .hasNext();) {
0141:                    Map.Entry entry = (Map.Entry) iter.next();
0142:                    getResultSet().updateObject(entry.getKey().toString(),
0143:                            entry.getValue());
0144:                }
0145:                getResultSet().insertRow();
0146:            }
0147:
0148:            /**
0149:             * Takes a zero based index and convert it into an SQL based 1 based index.
0150:             * A negative index will count backwards from the last column.
0151:             *
0152:             * @param index
0153:             * @return a JDBC index
0154:             * @throws SQLException if some exception occurs finding out the column count
0155:             */
0156:            protected int normalizeIndex(int index) throws SQLException {
0157:                if (index < 0) {
0158:                    int columnCount = getResultSet().getMetaData()
0159:                            .getColumnCount();
0160:                    do {
0161:                        index += columnCount;
0162:                    } while (index < 0);
0163:                }
0164:                return index + 1;
0165:            }
0166:
0167:            /**
0168:             * Call the closure once for each row in the result set.
0169:             *
0170:             * @param closure
0171:             * @throws SQLException
0172:             */
0173:            public void eachRow(Closure closure) throws SQLException {
0174:                while (next()) {
0175:                    closure.call(this );
0176:                }
0177:            }
0178:
0179:            // Implementation of java.sql.getResultSet()
0180:            // ------------------------------------------------------------
0181:
0182:            /**
0183:             * Moves the cursor down one row from its current position.
0184:             * A <code>getResultSet()</code> cursor is initially positioned
0185:             * before the first row; the first call to the method
0186:             * <code>next</code> makes the first row the current row; the
0187:             * second call makes the second row the current row, and so on.
0188:             * <p/>
0189:             * <P>If an input stream is open for the current row, a call
0190:             * to the method <code>next</code> will
0191:             * implicitly close it. A <code>getResultSet()</code> object's
0192:             * warning chain is cleared when a new row is read.
0193:             *
0194:             * @return <code>true</code> if the new current row is valid;
0195:             *         <code>false</code> if there are no more rows
0196:             * @throws SQLException if a database access error occurs
0197:             */
0198:            public boolean next() throws SQLException {
0199:                if (updated) {
0200:                    getResultSet().updateRow();
0201:                    updated = false;
0202:                }
0203:                return getResultSet().next();
0204:            }
0205:
0206:            /**
0207:             * Releases this <code>getResultSet()</code> object's database and
0208:             * JDBC resources immediately instead of waiting for
0209:             * this to happen when it is automatically closed.
0210:             * <p/>
0211:             * <P><B>Note:</B> A <code>getResultSet()</code> object
0212:             * is automatically closed by the
0213:             * <code>Statement</code> object that generated it when
0214:             * that <code>Statement</code> object is closed,
0215:             * re-executed, or is used to retrieve the next result from a
0216:             * sequence of multiple results. A <code>getResultSet()</code> object
0217:             * is also automatically closed when it is garbage collected.
0218:             *
0219:             * @throws SQLException if a database access error occurs
0220:             */
0221:            public void close() throws SQLException {
0222:                getResultSet().close();
0223:            }
0224:
0225:            /**
0226:             * Reports whether
0227:             * the last column read had a value of SQL <code>NULL</code>.
0228:             * Note that you must first call one of the getter methods
0229:             * on a column to try to read its value and then call
0230:             * the method <code>wasNull</code> to see if the value read was
0231:             * SQL <code>NULL</code>.
0232:             *
0233:             * @return <code>true</code> if the last column value read was SQL
0234:             *         <code>NULL</code> and <code>false</code> otherwise
0235:             * @throws SQLException if a database access error occurs
0236:             */
0237:            public boolean wasNull() throws SQLException {
0238:                return getResultSet().wasNull();
0239:            }
0240:
0241:            //======================================================================
0242:            // Methods for accessing results by column index
0243:            //======================================================================
0244:
0245:            /**
0246:             * Retrieves the value of the designated column in the current row
0247:             * of this <code>getResultSet()</code> object as
0248:             * a <code>String</code> in the Java programming language.
0249:             *
0250:             * @param columnIndex the first column is 1, the second is 2, ...
0251:             * @return the column value; if the value is SQL <code>NULL</code>, the
0252:             *         value returned is <code>null</code>
0253:             * @throws SQLException if a database access error occurs
0254:             */
0255:            public String getString(int columnIndex) throws SQLException {
0256:                return getResultSet().getString(columnIndex);
0257:            }
0258:
0259:            /**
0260:             * Retrieves the value of the designated column in the current row
0261:             * of this <code>getResultSet()</code> object as
0262:             * a <code>boolean</code> in the Java programming language.
0263:             *
0264:             * @param columnIndex the first column is 1, the second is 2, ...
0265:             * @return the column value; if the value is SQL <code>NULL</code>, the
0266:             *         value returned is <code>false</code>
0267:             * @throws SQLException if a database access error occurs
0268:             */
0269:            public boolean getBoolean(int columnIndex) throws SQLException {
0270:                return getResultSet().getBoolean(columnIndex);
0271:            }
0272:
0273:            /**
0274:             * Retrieves the value of the designated column in the current row
0275:             * of this <code>getResultSet()</code> object as
0276:             * a <code>byte</code> in the Java programming language.
0277:             *
0278:             * @param columnIndex the first column is 1, the second is 2, ...
0279:             * @return the column value; if the value is SQL <code>NULL</code>, the
0280:             *         value returned is <code>0</code>
0281:             * @throws SQLException if a database access error occurs
0282:             */
0283:            public byte getByte(int columnIndex) throws SQLException {
0284:                return getResultSet().getByte(columnIndex);
0285:            }
0286:
0287:            /**
0288:             * Retrieves the value of the designated column in the current row
0289:             * of this <code>getResultSet()</code> object as
0290:             * a <code>short</code> in the Java programming language.
0291:             *
0292:             * @param columnIndex the first column is 1, the second is 2, ...
0293:             * @return the column value; if the value is SQL <code>NULL</code>, the
0294:             *         value returned is <code>0</code>
0295:             * @throws SQLException if a database access error occurs
0296:             */
0297:            public short getShort(int columnIndex) throws SQLException {
0298:                return getResultSet().getShort(columnIndex);
0299:            }
0300:
0301:            /**
0302:             * Retrieves the value of the designated column in the current row
0303:             * of this <code>getResultSet()</code> object as
0304:             * an <code>int</code> in the Java programming language.
0305:             *
0306:             * @param columnIndex the first column is 1, the second is 2, ...
0307:             * @return the column value; if the value is SQL <code>NULL</code>, the
0308:             *         value returned is <code>0</code>
0309:             * @throws SQLException if a database access error occurs
0310:             */
0311:            public int getInt(int columnIndex) throws SQLException {
0312:                return getResultSet().getInt(columnIndex);
0313:            }
0314:
0315:            /**
0316:             * Retrieves the value of the designated column in the current row
0317:             * of this <code>getResultSet()</code> object as
0318:             * a <code>long</code> in the Java programming language.
0319:             *
0320:             * @param columnIndex the first column is 1, the second is 2, ...
0321:             * @return the column value; if the value is SQL <code>NULL</code>, the
0322:             *         value returned is <code>0</code>
0323:             * @throws SQLException if a database access error occurs
0324:             */
0325:            public long getLong(int columnIndex) throws SQLException {
0326:                return getResultSet().getLong(columnIndex);
0327:            }
0328:
0329:            /**
0330:             * Retrieves the value of the designated column in the current row
0331:             * of this <code>getResultSet()</code> object as
0332:             * a <code>float</code> in the Java programming language.
0333:             *
0334:             * @param columnIndex the first column is 1, the second is 2, ...
0335:             * @return the column value; if the value is SQL <code>NULL</code>, the
0336:             *         value returned is <code>0</code>
0337:             * @throws SQLException if a database access error occurs
0338:             */
0339:            public float getFloat(int columnIndex) throws SQLException {
0340:                return getResultSet().getFloat(columnIndex);
0341:            }
0342:
0343:            /**
0344:             * Retrieves the value of the designated column in the current row
0345:             * of this <code>getResultSet()</code> object as
0346:             * a <code>double</code> in the Java programming language.
0347:             *
0348:             * @param columnIndex the first column is 1, the second is 2, ...
0349:             * @return the column value; if the value is SQL <code>NULL</code>, the
0350:             *         value returned is <code>0</code>
0351:             * @throws SQLException if a database access error occurs
0352:             */
0353:            public double getDouble(int columnIndex) throws SQLException {
0354:                return getResultSet().getDouble(columnIndex);
0355:            }
0356:
0357:            /**
0358:             * Retrieves the value of the designated column in the current row
0359:             * of this <code>getResultSet()</code> object as
0360:             * a <code>java.sql.BigDecimal</code> in the Java programming language.
0361:             *
0362:             * @param columnIndex the first column is 1, the second is 2, ...
0363:             * @param scale       the number of digits to the right of the decimal point
0364:             * @return the column value; if the value is SQL <code>NULL</code>, the
0365:             *         value returned is <code>null</code>
0366:             * @throws SQLException if a database access error occurs
0367:             * @deprecated
0368:             */
0369:            public BigDecimal getBigDecimal(int columnIndex, int scale)
0370:                    throws SQLException {
0371:                return getResultSet().getBigDecimal(columnIndex, scale);
0372:            }
0373:
0374:            /**
0375:             * Retrieves the value of the designated column in the current row
0376:             * of this <code>getResultSet()</code> object as
0377:             * a <code>byte</code> array in the Java programming language.
0378:             * The bytes represent the raw values returned by the driver.
0379:             *
0380:             * @param columnIndex the first column is 1, the second is 2, ...
0381:             * @return the column value; if the value is SQL <code>NULL</code>, the
0382:             *         value returned is <code>null</code>
0383:             * @throws SQLException if a database access error occurs
0384:             */
0385:            public byte[] getBytes(int columnIndex) throws SQLException {
0386:                return getResultSet().getBytes(columnIndex);
0387:            }
0388:
0389:            /**
0390:             * Retrieves the value of the designated column in the current row
0391:             * of this <code>getResultSet()</code> object as
0392:             * a <code>java.sql.Date</code> object in the Java programming language.
0393:             *
0394:             * @param columnIndex the first column is 1, the second is 2, ...
0395:             * @return the column value; if the value is SQL <code>NULL</code>, the
0396:             *         value returned is <code>null</code>
0397:             * @throws SQLException if a database access error occurs
0398:             */
0399:            public java.sql.Date getDate(int columnIndex) throws SQLException {
0400:                return getResultSet().getDate(columnIndex);
0401:            }
0402:
0403:            /**
0404:             * Retrieves the value of the designated column in the current row
0405:             * of this <code>getResultSet()</code> object as
0406:             * a <code>java.sql.Time</code> object in the Java programming language.
0407:             *
0408:             * @param columnIndex the first column is 1, the second is 2, ...
0409:             * @return the column value; if the value is SQL <code>NULL</code>, the
0410:             *         value returned is <code>null</code>
0411:             * @throws SQLException if a database access error occurs
0412:             */
0413:            public java.sql.Time getTime(int columnIndex) throws SQLException {
0414:                return getResultSet().getTime(columnIndex);
0415:            }
0416:
0417:            /**
0418:             * Retrieves the value of the designated column in the current row
0419:             * of this <code>getResultSet()</code> object as
0420:             * a <code>java.sql.Timestamp</code> object in the Java programming language.
0421:             *
0422:             * @param columnIndex the first column is 1, the second is 2, ...
0423:             * @return the column value; if the value is SQL <code>NULL</code>, the
0424:             *         value returned is <code>null</code>
0425:             * @throws SQLException if a database access error occurs
0426:             */
0427:            public java.sql.Timestamp getTimestamp(int columnIndex)
0428:                    throws SQLException {
0429:                return getResultSet().getTimestamp(columnIndex);
0430:            }
0431:
0432:            /**
0433:             * Retrieves the value of the designated column in the current row
0434:             * of this <code>getResultSet()</code> object as
0435:             * a stream of ASCII characters. The value can then be read in chunks from the
0436:             * stream. This method is particularly
0437:             * suitable for retrieving large <char>LONGVARCHAR</char> values.
0438:             * The JDBC driver will
0439:             * do any necessary conversion from the database format into ASCII.
0440:             * <p/>
0441:             * <P><B>Note:</B> All the data in the returned stream must be
0442:             * read prior to getting the value of any other column. The next
0443:             * call to a getter method implicitly closes the stream.  Also, a
0444:             * stream may return <code>0</code> when the method
0445:             * <code>InputStream.available</code>
0446:             * is called whether there is data available or not.
0447:             *
0448:             * @param columnIndex the first column is 1, the second is 2, ...
0449:             * @return a Java input stream that delivers the database column value
0450:             *         as a stream of one-byte ASCII characters;
0451:             *         if the value is SQL <code>NULL</code>, the
0452:             *         value returned is <code>null</code>
0453:             * @throws SQLException if a database access error occurs
0454:             */
0455:            public java.io.InputStream getAsciiStream(int columnIndex)
0456:                    throws SQLException {
0457:                return getResultSet().getAsciiStream(columnIndex);
0458:            }
0459:
0460:            /**
0461:             * Retrieves the value of the designated column in the current row
0462:             * of this <code>getResultSet()</code> object as
0463:             * as a stream of two-byte Unicode characters. The first byte is
0464:             * the high byte; the second byte is the low byte.
0465:             * <p/>
0466:             * The value can then be read in chunks from the
0467:             * stream. This method is particularly
0468:             * suitable for retrieving large <code>LONGVARCHAR</code>values.  The
0469:             * JDBC driver will do any necessary conversion from the database
0470:             * format into Unicode.
0471:             * <p/>
0472:             * <P><B>Note:</B> All the data in the returned stream must be
0473:             * read prior to getting the value of any other column. The next
0474:             * call to a getter method implicitly closes the stream.
0475:             * Also, a stream may return <code>0</code> when the method
0476:             * <code>InputStream.available</code>
0477:             * is called, whether there is data available or not.
0478:             *
0479:             * @param columnIndex the first column is 1, the second is 2, ...
0480:             * @return a Java input stream that delivers the database column value
0481:             *         as a stream of two-byte Unicode characters;
0482:             *         if the value is SQL <code>NULL</code>, the value returned is
0483:             *         <code>null</code>
0484:             * @throws SQLException if a database access error occurs
0485:             * @deprecated use <code>getCharacterStream</code> in place of
0486:             *             <code>getUnicodeStream</code>
0487:             */
0488:            public java.io.InputStream getUnicodeStream(int columnIndex)
0489:                    throws SQLException {
0490:                return getResultSet().getUnicodeStream(columnIndex);
0491:            }
0492:
0493:            /**
0494:             * Retrieves the value of the designated column in the current row
0495:             * of this <code>getResultSet()</code> object as a binary stream of
0496:             * uninterpreted bytes. The value can then be read in chunks from the
0497:             * stream. This method is particularly
0498:             * suitable for retrieving large <code>LONGVARBINARY</code> values.
0499:             * <p/>
0500:             * <P><B>Note:</B> All the data in the returned stream must be
0501:             * read prior to getting the value of any other column. The next
0502:             * call to a getter method implicitly closes the stream.  Also, a
0503:             * stream may return <code>0</code> when the method
0504:             * <code>InputStream.available</code>
0505:             * is called whether there is data available or not.
0506:             *
0507:             * @param columnIndex the first column is 1, the second is 2, ...
0508:             * @return a Java input stream that delivers the database column value
0509:             *         as a stream of uninterpreted bytes;
0510:             *         if the value is SQL <code>NULL</code>, the value returned is
0511:             *         <code>null</code>
0512:             * @throws SQLException if a database access error occurs
0513:             */
0514:            public java.io.InputStream getBinaryStream(int columnIndex)
0515:                    throws SQLException {
0516:
0517:                return getResultSet().getBinaryStream(columnIndex);
0518:            }
0519:
0520:            //======================================================================
0521:            // Methods for accessing results by column name
0522:            //======================================================================
0523:
0524:            /**
0525:             * Retrieves the value of the designated column in the current row
0526:             * of this <code>getResultSet()</code> object as
0527:             * a <code>String</code> in the Java programming language.
0528:             *
0529:             * @param columnName the SQL name of the column
0530:             * @return the column value; if the value is SQL <code>NULL</code>, the
0531:             *         value returned is <code>null</code>
0532:             * @throws SQLException if a database access error occurs
0533:             */
0534:            public String getString(String columnName) throws SQLException {
0535:                return getResultSet().getString(columnName);
0536:            }
0537:
0538:            /**
0539:             * Retrieves the value of the designated column in the current row
0540:             * of this <code>getResultSet()</code> object as
0541:             * a <code>boolean</code> in the Java programming language.
0542:             *
0543:             * @param columnName the SQL name of the column
0544:             * @return the column value; if the value is SQL <code>NULL</code>, the
0545:             *         value returned is <code>false</code>
0546:             * @throws SQLException if a database access error occurs
0547:             */
0548:            public boolean getBoolean(String columnName) throws SQLException {
0549:                return getResultSet().getBoolean(columnName);
0550:            }
0551:
0552:            /**
0553:             * Retrieves the value of the designated column in the current row
0554:             * of this <code>getResultSet()</code> object as
0555:             * a <code>byte</code> in the Java programming language.
0556:             *
0557:             * @param columnName the SQL name of the column
0558:             * @return the column value; if the value is SQL <code>NULL</code>, the
0559:             *         value returned is <code>0</code>
0560:             * @throws SQLException if a database access error occurs
0561:             */
0562:            public byte getByte(String columnName) throws SQLException {
0563:                return getResultSet().getByte(columnName);
0564:            }
0565:
0566:            /**
0567:             * Retrieves the value of the designated column in the current row
0568:             * of this <code>getResultSet()</code> object as
0569:             * a <code>short</code> in the Java programming language.
0570:             *
0571:             * @param columnName the SQL name of the column
0572:             * @return the column value; if the value is SQL <code>NULL</code>, the
0573:             *         value returned is <code>0</code>
0574:             * @throws SQLException if a database access error occurs
0575:             */
0576:            public short getShort(String columnName) throws SQLException {
0577:                return getResultSet().getShort(columnName);
0578:            }
0579:
0580:            /**
0581:             * Retrieves the value of the designated column in the current row
0582:             * of this <code>getResultSet()</code> object as
0583:             * an <code>int</code> in the Java programming language.
0584:             *
0585:             * @param columnName the SQL name of the column
0586:             * @return the column value; if the value is SQL <code>NULL</code>, the
0587:             *         value returned is <code>0</code>
0588:             * @throws SQLException if a database access error occurs
0589:             */
0590:            public int getInt(String columnName) throws SQLException {
0591:                return getResultSet().getInt(columnName);
0592:            }
0593:
0594:            /**
0595:             * Retrieves the value of the designated column in the current row
0596:             * of this <code>getResultSet()</code> object as
0597:             * a <code>long</code> in the Java programming language.
0598:             *
0599:             * @param columnName the SQL name of the column
0600:             * @return the column value; if the value is SQL <code>NULL</code>, the
0601:             *         value returned is <code>0</code>
0602:             * @throws SQLException if a database access error occurs
0603:             */
0604:            public long getLong(String columnName) throws SQLException {
0605:                return getResultSet().getLong(columnName);
0606:            }
0607:
0608:            /**
0609:             * Retrieves the value of the designated column in the current row
0610:             * of this <code>getResultSet()</code> object as
0611:             * a <code>float</code> in the Java programming language.
0612:             *
0613:             * @param columnName the SQL name of the column
0614:             * @return the column value; if the value is SQL <code>NULL</code>, the
0615:             *         value returned is <code>0</code>
0616:             * @throws SQLException if a database access error occurs
0617:             */
0618:            public float getFloat(String columnName) throws SQLException {
0619:                return getResultSet().getFloat(columnName);
0620:            }
0621:
0622:            /**
0623:             * Retrieves the value of the designated column in the current row
0624:             * of this <code>getResultSet()</code> object as
0625:             * a <code>double</code> in the Java programming language.
0626:             *
0627:             * @param columnName the SQL name of the column
0628:             * @return the column value; if the value is SQL <code>NULL</code>, the
0629:             *         value returned is <code>0</code>
0630:             * @throws SQLException if a database access error occurs
0631:             */
0632:            public double getDouble(String columnName) throws SQLException {
0633:                return getResultSet().getDouble(columnName);
0634:            }
0635:
0636:            /**
0637:             * Retrieves the value of the designated column in the current row
0638:             * of this <code>getResultSet()</code> object as
0639:             * a <code>java.math.BigDecimal</code> in the Java programming language.
0640:             *
0641:             * @param columnName the SQL name of the column
0642:             * @param scale      the number of digits to the right of the decimal point
0643:             * @return the column value; if the value is SQL <code>NULL</code>, the
0644:             *         value returned is <code>null</code>
0645:             * @throws SQLException if a database access error occurs
0646:             * @deprecated
0647:             */
0648:            public BigDecimal getBigDecimal(String columnName, int scale)
0649:                    throws SQLException {
0650:                return getResultSet().getBigDecimal(columnName, scale);
0651:            }
0652:
0653:            /**
0654:             * Retrieves the value of the designated column in the current row
0655:             * of this <code>getResultSet()</code> object as
0656:             * a <code>byte</code> array in the Java programming language.
0657:             * The bytes represent the raw values returned by the driver.
0658:             *
0659:             * @param columnName the SQL name of the column
0660:             * @return the column value; if the value is SQL <code>NULL</code>, the
0661:             *         value returned is <code>null</code>
0662:             * @throws SQLException if a database access error occurs
0663:             */
0664:            public byte[] getBytes(String columnName) throws SQLException {
0665:                return getResultSet().getBytes(columnName);
0666:            }
0667:
0668:            /**
0669:             * Retrieves the value of the designated column in the current row
0670:             * of this <code>getResultSet()</code> object as
0671:             * a <code>java.sql.Date</code> object in the Java programming language.
0672:             *
0673:             * @param columnName the SQL name of the column
0674:             * @return the column value; if the value is SQL <code>NULL</code>, the
0675:             *         value returned is <code>null</code>
0676:             * @throws SQLException if a database access error occurs
0677:             */
0678:            public java.sql.Date getDate(String columnName) throws SQLException {
0679:                return getResultSet().getDate(columnName);
0680:            }
0681:
0682:            /**
0683:             * Retrieves the value of the designated column in the current row
0684:             * of this <code>getResultSet()</code> object as
0685:             * a <code>java.sql.Time</code> object in the Java programming language.
0686:             *
0687:             * @param columnName the SQL name of the column
0688:             * @return the column value;
0689:             *         if the value is SQL <code>NULL</code>,
0690:             *         the value returned is <code>null</code>
0691:             * @throws SQLException if a database access error occurs
0692:             */
0693:            public java.sql.Time getTime(String columnName) throws SQLException {
0694:                return getResultSet().getTime(columnName);
0695:            }
0696:
0697:            /**
0698:             * Retrieves the value of the designated column in the current row
0699:             * of this <code>getResultSet()</code> object as
0700:             * a <code>java.sql.Timestamp</code> object.
0701:             *
0702:             * @param columnName the SQL name of the column
0703:             * @return the column value; if the value is SQL <code>NULL</code>, the
0704:             *         value returned is <code>null</code>
0705:             * @throws SQLException if a database access error occurs
0706:             */
0707:            public java.sql.Timestamp getTimestamp(String columnName)
0708:                    throws SQLException {
0709:                return getResultSet().getTimestamp(columnName);
0710:            }
0711:
0712:            /**
0713:             * Retrieves the value of the designated column in the current row
0714:             * of this <code>getResultSet()</code> object as a stream of
0715:             * ASCII characters. The value can then be read in chunks from the
0716:             * stream. This method is particularly
0717:             * suitable for retrieving large <code>LONGVARCHAR</code> values.
0718:             * The JDBC driver will
0719:             * do any necessary conversion from the database format into ASCII.
0720:             * <p/>
0721:             * <P><B>Note:</B> All the data in the returned stream must be
0722:             * read prior to getting the value of any other column. The next
0723:             * call to a getter method implicitly closes the stream. Also, a
0724:             * stream may return <code>0</code> when the method <code>available</code>
0725:             * is called whether there is data available or not.
0726:             *
0727:             * @param columnName the SQL name of the column
0728:             * @return a Java input stream that delivers the database column value
0729:             *         as a stream of one-byte ASCII characters.
0730:             *         If the value is SQL <code>NULL</code>,
0731:             *         the value returned is <code>null</code>.
0732:             * @throws SQLException if a database access error occurs
0733:             */
0734:            public java.io.InputStream getAsciiStream(String columnName)
0735:                    throws SQLException {
0736:                return getResultSet().getAsciiStream(columnName);
0737:            }
0738:
0739:            /**
0740:             * Retrieves the value of the designated column in the current row
0741:             * of this <code>getResultSet()</code> object as a stream of two-byte
0742:             * Unicode characters. The first byte is the high byte; the second
0743:             * byte is the low byte.
0744:             * <p/>
0745:             * The value can then be read in chunks from the
0746:             * stream. This method is particularly
0747:             * suitable for retrieving large <code>LONGVARCHAR</code> values.
0748:             * The JDBC technology-enabled driver will
0749:             * do any necessary conversion from the database format into Unicode.
0750:             * <p/>
0751:             * <P><B>Note:</B> All the data in the returned stream must be
0752:             * read prior to getting the value of any other column. The next
0753:             * call to a getter method implicitly closes the stream.
0754:             * Also, a stream may return <code>0</code> when the method
0755:             * <code>InputStream.available</code> is called, whether there
0756:             * is data available or not.
0757:             *
0758:             * @param columnName the SQL name of the column
0759:             * @return a Java input stream that delivers the database column value
0760:             *         as a stream of two-byte Unicode characters.
0761:             *         If the value is SQL <code>NULL</code>, the value returned
0762:             *         is <code>null</code>.
0763:             * @throws SQLException if a database access error occurs
0764:             * @deprecated use <code>getCharacterStream</code> instead
0765:             */
0766:            public java.io.InputStream getUnicodeStream(String columnName)
0767:                    throws SQLException {
0768:                return getResultSet().getUnicodeStream(columnName);
0769:            }
0770:
0771:            /**
0772:             * Retrieves the value of the designated column in the current row
0773:             * of this <code>getResultSet()</code> object as a stream of uninterpreted
0774:             * <code>byte</code>s.
0775:             * The value can then be read in chunks from the
0776:             * stream. This method is particularly
0777:             * suitable for retrieving large <code>LONGVARBINARY</code>
0778:             * values.
0779:             * <p/>
0780:             * <P><B>Note:</B> All the data in the returned stream must be
0781:             * read prior to getting the value of any other column. The next
0782:             * call to a getter method implicitly closes the stream. Also, a
0783:             * stream may return <code>0</code> when the method <code>available</code>
0784:             * is called whether there is data available or not.
0785:             *
0786:             * @param columnName the SQL name of the column
0787:             * @return a Java input stream that delivers the database column value
0788:             *         as a stream of uninterpreted bytes;
0789:             *         if the value is SQL <code>NULL</code>, the result is <code>null</code>
0790:             * @throws SQLException if a database access error occurs
0791:             */
0792:            public java.io.InputStream getBinaryStream(String columnName)
0793:                    throws SQLException {
0794:
0795:                return getResultSet().getBinaryStream(columnName);
0796:            }
0797:
0798:            //=====================================================================
0799:            // Advanced features:
0800:            //=====================================================================
0801:
0802:            /**
0803:             * Retrieves the first warning reported by calls on this
0804:             * <code>getResultSet()</code> object.
0805:             * Subsequent warnings on this <code>getResultSet()</code> object
0806:             * will be chained to the <code>SQLWarning</code> object that
0807:             * this method returns.
0808:             * <p/>
0809:             * <P>The warning chain is automatically cleared each time a new
0810:             * row is read.  This method may not be called on a <code>getResultSet()</code>
0811:             * object that has been closed; doing so will cause an
0812:             * <code>SQLException</code> to be thrown.
0813:             * <p/>
0814:             * <B>Note:</B> This warning chain only covers warnings caused
0815:             * by <code>getResultSet()</code> methods.  Any warning caused by
0816:             * <code>Statement</code> methods
0817:             * (such as reading OUT parameters) will be chained on the
0818:             * <code>Statement</code> object.
0819:             *
0820:             * @return the first <code>SQLWarning</code> object reported or
0821:             *         <code>null</code> if there are none
0822:             * @throws SQLException if a database access error occurs or this method is
0823:             *                      called on a closed result set
0824:             */
0825:            public SQLWarning getWarnings() throws SQLException {
0826:                return getResultSet().getWarnings();
0827:            }
0828:
0829:            /**
0830:             * Clears all warnings reported on this <code>getResultSet()</code> object.
0831:             * After this method is called, the method <code>getWarnings</code>
0832:             * returns <code>null</code> until a new warning is
0833:             * reported for this <code>getResultSet()</code> object.
0834:             *
0835:             * @throws SQLException if a database access error occurs
0836:             */
0837:            public void clearWarnings() throws SQLException {
0838:                getResultSet().clearWarnings();
0839:            }
0840:
0841:            /**
0842:             * Retrieves the name of the SQL cursor used by this <code>getResultSet()</code>
0843:             * object.
0844:             * <p/>
0845:             * <P>In SQL, a result table is retrieved through a cursor that is
0846:             * named. The current row of a result set can be updated or deleted
0847:             * using a positioned update/delete statement that references the
0848:             * cursor name. To insure that the cursor has the proper isolation
0849:             * level to support update, the cursor's <code>SELECT</code> statement
0850:             * should be of the form <code>SELECT FOR UPDATE</code>. If
0851:             * <code>FOR UPDATE</code> is omitted, the positioned updates may fail.
0852:             * <p/>
0853:             * <P>The JDBC API supports this SQL feature by providing the name of the
0854:             * SQL cursor used by a <code>getResultSet()</code> object.
0855:             * The current row of a <code>getResultSet()</code> object
0856:             * is also the current row of this SQL cursor.
0857:             * <p/>
0858:             * <P><B>Note:</B> If positioned update is not supported, a
0859:             * <code>SQLException</code> is thrown.
0860:             *
0861:             * @return the SQL name for this <code>getResultSet()</code> object's cursor
0862:             * @throws SQLException if a database access error occurs
0863:             */
0864:            public String getCursorName() throws SQLException {
0865:                return getResultSet().getCursorName();
0866:            }
0867:
0868:            /**
0869:             * Retrieves the  number, types and properties of
0870:             * this <code>getResultSet()</code> object's columns.
0871:             *
0872:             * @return the description of this <code>getResultSet()</code> object's columns
0873:             * @throws SQLException if a database access error occurs
0874:             */
0875:            public ResultSetMetaData getMetaData() throws SQLException {
0876:                return getResultSet().getMetaData();
0877:            }
0878:
0879:            /**
0880:             * <p>Gets the value of the designated column in the current row
0881:             * of this <code>getResultSet()</code> object as
0882:             * an <code>Object</code> in the Java programming language.
0883:             * <p/>
0884:             * <p>This method will return the value of the given column as a
0885:             * Java object.  The type of the Java object will be the default
0886:             * Java object type corresponding to the column's SQL type,
0887:             * following the mapping for built-in types specified in the JDBC
0888:             * specification. If the value is an SQL <code>NULL</code>,
0889:             * the driver returns a Java <code>null</code>.
0890:             * <p/>
0891:             * <p>This method may also be used to read database-specific
0892:             * abstract data types.
0893:             * <p/>
0894:             * In the JDBC 2.0 API, the behavior of method
0895:             * <code>getObject</code> is extended to materialize
0896:             * data of SQL user-defined types.  When a column contains
0897:             * a structured or distinct value, the behavior of this method is as
0898:             * if it were a call to: <code>getObject(columnIndex,
0899:             * this.getStatement().getConnection().getTypeMap())</code>.
0900:             *
0901:             * @param columnIndex the first column is 1, the second is 2, ...
0902:             * @return a <code>java.lang.Object</code> holding the column value
0903:             * @throws SQLException if a database access error occurs
0904:             */
0905:            public Object getObject(int columnIndex) throws SQLException {
0906:                return getResultSet().getObject(columnIndex);
0907:            }
0908:
0909:            /**
0910:             * <p>Gets the value of the designated column in the current row
0911:             * of this <code>getResultSet()</code> object as
0912:             * an <code>Object</code> in the Java programming language.
0913:             * <p/>
0914:             * <p>This method will return the value of the given column as a
0915:             * Java object.  The type of the Java object will be the default
0916:             * Java object type corresponding to the column's SQL type,
0917:             * following the mapping for built-in types specified in the JDBC
0918:             * specification. If the value is an SQL <code>NULL</code>,
0919:             * the driver returns a Java <code>null</code>.
0920:             * <p/>
0921:             * This method may also be used to read database-specific
0922:             * abstract data types.
0923:             * <p/>
0924:             * In the JDBC 2.0 API, the behavior of the method
0925:             * <code>getObject</code> is extended to materialize
0926:             * data of SQL user-defined types.  When a column contains
0927:             * a structured or distinct value, the behavior of this method is as
0928:             * if it were a call to: <code>getObject(columnIndex,
0929:             * this.getStatement().getConnection().getTypeMap())</code>.
0930:             *
0931:             * @param columnName the SQL name of the column
0932:             * @return a <code>java.lang.Object</code> holding the column value
0933:             * @throws SQLException if a database access error occurs
0934:             */
0935:            public Object getObject(String columnName) throws SQLException {
0936:                return getResultSet().getObject(columnName);
0937:            }
0938:
0939:            //----------------------------------------------------------------
0940:
0941:            /**
0942:             * Maps the given <code>getResultSet()</code> column name to its
0943:             * <code>getResultSet()</code> column index.
0944:             *
0945:             * @param columnName the name of the column
0946:             * @return the column index of the given column name
0947:             * @throws SQLException if the <code>getResultSet()</code> object
0948:             *                      does not contain <code>columnName</code> or a database access error occurs
0949:             */
0950:            public int findColumn(String columnName) throws SQLException {
0951:                return getResultSet().findColumn(columnName);
0952:            }
0953:
0954:            //--------------------------JDBC 2.0-----------------------------------
0955:
0956:            //---------------------------------------------------------------------
0957:            // Getters and Setters
0958:            //---------------------------------------------------------------------
0959:
0960:            /**
0961:             * Retrieves the value of the designated column in the current row
0962:             * of this <code>getResultSet()</code> object as a
0963:             * <code>java.io.Reader</code> object.
0964:             *
0965:             * @param columnIndex the first column is 1, the second is 2, ...
0966:             * @return a <code>java.io.Reader</code> object that contains the column
0967:             *         value; if the value is SQL <code>NULL</code>, the value returned is
0968:             *         <code>null</code> in the Java programming language.
0969:             * @throws SQLException if a database access error occurs
0970:             * @since 1.2
0971:             */
0972:            public java.io.Reader getCharacterStream(int columnIndex)
0973:                    throws SQLException {
0974:                return getResultSet().getCharacterStream(columnIndex);
0975:            }
0976:
0977:            /**
0978:             * Retrieves the value of the designated column in the current row
0979:             * of this <code>getResultSet()</code> object as a
0980:             * <code>java.io.Reader</code> object.
0981:             *
0982:             * @param columnName the name of the column
0983:             * @return a <code>java.io.Reader</code> object that contains the column
0984:             *         value; if the value is SQL <code>NULL</code>, the value returned is
0985:             *         <code>null</code> in the Java programming language
0986:             * @throws SQLException if a database access error occurs
0987:             * @since 1.2
0988:             */
0989:            public java.io.Reader getCharacterStream(String columnName)
0990:                    throws SQLException {
0991:                return getResultSet().getCharacterStream(columnName);
0992:            }
0993:
0994:            /**
0995:             * Retrieves the value of the designated column in the current row
0996:             * of this <code>getResultSet()</code> object as a
0997:             * <code>java.math.BigDecimal</code> with full precision.
0998:             *
0999:             * @param columnIndex the first column is 1, the second is 2, ...
1000:             * @return the column value (full precision);
1001:             *         if the value is SQL <code>NULL</code>, the value returned is
1002:             *         <code>null</code> in the Java programming language.
1003:             * @throws SQLException if a database access error occurs
1004:             * @since 1.2
1005:             */
1006:            public BigDecimal getBigDecimal(int columnIndex)
1007:                    throws SQLException {
1008:                return getResultSet().getBigDecimal(columnIndex);
1009:            }
1010:
1011:            /**
1012:             * Retrieves the value of the designated column in the current row
1013:             * of this <code>getResultSet()</code> object as a
1014:             * <code>java.math.BigDecimal</code> with full precision.
1015:             *
1016:             * @param columnName the column name
1017:             * @return the column value (full precision);
1018:             *         if the value is SQL <code>NULL</code>, the value returned is
1019:             *         <code>null</code> in the Java programming language.
1020:             * @throws SQLException if a database access error occurs
1021:             * @since 1.2
1022:             */
1023:            public BigDecimal getBigDecimal(String columnName)
1024:                    throws SQLException {
1025:                return getResultSet().getBigDecimal(columnName);
1026:            }
1027:
1028:            //---------------------------------------------------------------------
1029:            // Traversal/Positioning
1030:            //---------------------------------------------------------------------
1031:
1032:            /**
1033:             * Retrieves whether the cursor is before the first row in
1034:             * this <code>getResultSet()</code> object.
1035:             *
1036:             * @return <code>true</code> if the cursor is before the first row;
1037:             *         <code>false</code> if the cursor is at any other position or the
1038:             *         result set contains no rows
1039:             * @throws SQLException if a database access error occurs
1040:             * @since 1.2
1041:             */
1042:            public boolean isBeforeFirst() throws SQLException {
1043:                return getResultSet().isBeforeFirst();
1044:            }
1045:
1046:            /**
1047:             * Retrieves whether the cursor is after the last row in
1048:             * this <code>getResultSet()</code> object.
1049:             *
1050:             * @return <code>true</code> if the cursor is after the last row;
1051:             *         <code>false</code> if the cursor is at any other position or the
1052:             *         result set contains no rows
1053:             * @throws SQLException if a database access error occurs
1054:             * @since 1.2
1055:             */
1056:            public boolean isAfterLast() throws SQLException {
1057:                return getResultSet().isAfterLast();
1058:            }
1059:
1060:            /**
1061:             * Retrieves whether the cursor is on the first row of
1062:             * this <code>getResultSet()</code> object.
1063:             *
1064:             * @return <code>true</code> if the cursor is on the first row;
1065:             *         <code>false</code> otherwise
1066:             * @throws SQLException if a database access error occurs
1067:             * @since 1.2
1068:             */
1069:            public boolean isFirst() throws SQLException {
1070:                return getResultSet().isFirst();
1071:            }
1072:
1073:            /**
1074:             * Retrieves whether the cursor is on the last row of
1075:             * this <code>getResultSet()</code> object.
1076:             * Note: Calling the method <code>isLast</code> may be expensive
1077:             * because the JDBC driver
1078:             * might need to fetch ahead one row in order to determine
1079:             * whether the current row is the last row in the result set.
1080:             *
1081:             * @return <code>true</code> if the cursor is on the last row;
1082:             *         <code>false</code> otherwise
1083:             * @throws SQLException if a database access error occurs
1084:             * @since 1.2
1085:             */
1086:            public boolean isLast() throws SQLException {
1087:                return getResultSet().isLast();
1088:            }
1089:
1090:            /**
1091:             * Moves the cursor to the front of
1092:             * this <code>getResultSet()</code> object, just before the
1093:             * first row. This method has no effect if the result set contains no rows.
1094:             *
1095:             * @throws SQLException if a database access error
1096:             *                      occurs or the result set type is <code>TYPE_FORWARD_ONLY</code>
1097:             * @since 1.2
1098:             */
1099:            public void beforeFirst() throws SQLException {
1100:                getResultSet().beforeFirst();
1101:            }
1102:
1103:            /**
1104:             * Moves the cursor to the end of
1105:             * this <code>getResultSet()</code> object, just after the
1106:             * last row. This method has no effect if the result set contains no rows.
1107:             *
1108:             * @throws SQLException if a database access error
1109:             *                      occurs or the result set type is <code>TYPE_FORWARD_ONLY</code>
1110:             * @since 1.2
1111:             */
1112:            public void afterLast() throws SQLException {
1113:                getResultSet().afterLast();
1114:            }
1115:
1116:            /**
1117:             * Moves the cursor to the first row in
1118:             * this <code>getResultSet()</code> object.
1119:             *
1120:             * @return <code>true</code> if the cursor is on a valid row;
1121:             *         <code>false</code> if there are no rows in the result set
1122:             * @throws SQLException if a database access error
1123:             *                      occurs or the result set type is <code>TYPE_FORWARD_ONLY</code>
1124:             * @since 1.2
1125:             */
1126:            public boolean first() throws SQLException {
1127:                return getResultSet().first();
1128:            }
1129:
1130:            /**
1131:             * Moves the cursor to the last row in
1132:             * this <code>getResultSet()</code> object.
1133:             *
1134:             * @return <code>true</code> if the cursor is on a valid row;
1135:             *         <code>false</code> if there are no rows in the result set
1136:             * @throws SQLException if a database access error
1137:             *                      occurs or the result set type is <code>TYPE_FORWARD_ONLY</code>
1138:             * @since 1.2
1139:             */
1140:            public boolean last() throws SQLException {
1141:                return getResultSet().last();
1142:            }
1143:
1144:            /**
1145:             * Retrieves the current row number.  The first row is number 1, the
1146:             * second number 2, and so on.
1147:             *
1148:             * @return the current row number; <code>0</code> if there is no current row
1149:             * @throws SQLException if a database access error occurs
1150:             * @since 1.2
1151:             */
1152:            public int getRow() throws SQLException {
1153:                return getResultSet().getRow();
1154:            }
1155:
1156:            /**
1157:             * Moves the cursor to the given row number in
1158:             * this <code>getResultSet()</code> object.
1159:             * <p/>
1160:             * <p>If the row number is positive, the cursor moves to
1161:             * the given row number with respect to the
1162:             * beginning of the result set.  The first row is row 1, the second
1163:             * is row 2, and so on.
1164:             * <p/>
1165:             * <p>If the given row number is negative, the cursor moves to
1166:             * an absolute row position with respect to
1167:             * the end of the result set.  For example, calling the method
1168:             * <code>absolute(-1)</code> positions the
1169:             * cursor on the last row; calling the method <code>absolute(-2)</code>
1170:             * moves the cursor to the next-to-last row, and so on.
1171:             * <p/>
1172:             * <p>An attempt to position the cursor beyond the first/last row in
1173:             * the result set leaves the cursor before the first row or after
1174:             * the last row.
1175:             * <p/>
1176:             * <p><B>Note:</B> Calling <code>absolute(1)</code> is the same
1177:             * as calling <code>first()</code>. Calling <code>absolute(-1)</code>
1178:             * is the same as calling <code>last()</code>.
1179:             *
1180:             * @param row the number of the row to which the cursor should move.
1181:             *            A positive number indicates the row number counting from the
1182:             *            beginning of the result set; a negative number indicates the
1183:             *            row number counting from the end of the result set
1184:             * @return <code>true</code> if the cursor is on the result set;
1185:             *         <code>false</code> otherwise
1186:             * @throws SQLException if a database access error
1187:             *                      occurs, or the result set type is <code>TYPE_FORWARD_ONLY</code>
1188:             * @since 1.2
1189:             */
1190:            public boolean absolute(int row) throws SQLException {
1191:                return getResultSet().absolute(row);
1192:            }
1193:
1194:            /**
1195:             * Moves the cursor a relative number of rows, either positive or negative.
1196:             * Attempting to move beyond the first/last row in the
1197:             * result set positions the cursor before/after the
1198:             * the first/last row. Calling <code>relative(0)</code> is valid, but does
1199:             * not change the cursor position.
1200:             * <p/>
1201:             * <p>Note: Calling the method <code>relative(1)</code>
1202:             * is identical to calling the method <code>next()</code> and
1203:             * calling the method <code>relative(-1)</code> is identical
1204:             * to calling the method <code>previous()</code>.
1205:             *
1206:             * @param rows an <code>int</code> specifying the number of rows to
1207:             *             move from the current row; a positive number moves the cursor
1208:             *             forward; a negative number moves the cursor backward
1209:             * @return <code>true</code> if the cursor is on a row;
1210:             *         <code>false</code> otherwise
1211:             * @throws SQLException if a database access error occurs,
1212:             *                      there is no current row, or the result set type is
1213:             *                      <code>TYPE_FORWARD_ONLY</code>
1214:             * @since 1.2
1215:             */
1216:            public boolean relative(int rows) throws SQLException {
1217:                return getResultSet().relative(rows);
1218:            }
1219:
1220:            /**
1221:             * Moves the cursor to the previous row in this
1222:             * <code>getResultSet()</code> object.
1223:             *
1224:             * @return <code>true</code> if the cursor is on a valid row;
1225:             *         <code>false</code> if it is off the result set
1226:             * @throws SQLException if a database access error
1227:             *                      occurs or the result set type is <code>TYPE_FORWARD_ONLY</code>
1228:             * @since 1.2
1229:             */
1230:            public boolean previous() throws SQLException {
1231:                if (updated) {
1232:                    getResultSet().updateRow();
1233:                    updated = false;
1234:                }
1235:                return getResultSet().previous();
1236:            }
1237:
1238:            /**
1239:             * Gives a hint as to the direction in which the rows in this
1240:             * <code>getResultSet()</code> object will be processed.
1241:             * The initial value is determined by the
1242:             * <code>Statement</code> object
1243:             * that produced this <code>getResultSet()</code> object.
1244:             * The fetch direction may be changed at any time.
1245:             *
1246:             * @param direction an <code>int</code> specifying the suggested
1247:             *                  fetch direction; one of <code>getResultSet().FETCH_FORWARD</code>,
1248:             *                  <code>getResultSet().FETCH_REVERSE</code>, or
1249:             *                  <code>getResultSet().FETCH_UNKNOWN</code>
1250:             * @throws SQLException if a database access error occurs or
1251:             *                      the result set type is <code>TYPE_FORWARD_ONLY</code> and the fetch
1252:             *                      direction is not <code>FETCH_FORWARD</code>
1253:             * @see Statement#setFetchDirection
1254:             * @see #getFetchDirection
1255:             * @since 1.2
1256:             */
1257:            public void setFetchDirection(int direction) throws SQLException {
1258:                getResultSet().setFetchDirection(direction);
1259:            }
1260:
1261:            /**
1262:             * Retrieves the fetch direction for this
1263:             * <code>getResultSet()</code> object.
1264:             *
1265:             * @return the current fetch direction for this <code>getResultSet()</code> object
1266:             * @throws SQLException if a database access error occurs
1267:             * @see #setFetchDirection
1268:             * @since 1.2
1269:             */
1270:            public int getFetchDirection() throws SQLException {
1271:                return getResultSet().getFetchDirection();
1272:            }
1273:
1274:            /**
1275:             * Gives the JDBC driver a hint as to the number of rows that should
1276:             * be fetched from the database when more rows are needed for this
1277:             * <code>getResultSet()</code> object.
1278:             * If the fetch size specified is zero, the JDBC driver
1279:             * ignores the value and is free to make its own best guess as to what
1280:             * the fetch size should be.  The default value is set by the
1281:             * <code>Statement</code> object
1282:             * that created the result set.  The fetch size may be changed at any time.
1283:             *
1284:             * @param rows the number of rows to fetch
1285:             * @throws SQLException if a database access error occurs or the
1286:             *                      condition <code>0 <= rows <= Statement.getMaxRows()</code> is not satisfied
1287:             * @see #getFetchSize
1288:             * @since 1.2
1289:             */
1290:            public void setFetchSize(int rows) throws SQLException {
1291:                getResultSet().setFetchSize(rows);
1292:            }
1293:
1294:            /**
1295:             * Retrieves the fetch size for this
1296:             * <code>getResultSet()</code> object.
1297:             *
1298:             * @return the current fetch size for this <code>getResultSet()</code> object
1299:             * @throws SQLException if a database access error occurs
1300:             * @see #setFetchSize
1301:             * @since 1.2
1302:             */
1303:            public int getFetchSize() throws SQLException {
1304:                return getResultSet().getFetchSize();
1305:            }
1306:
1307:            /**
1308:             * Retrieves the type of this <code>getResultSet()</code> object.
1309:             * The type is determined by the <code>Statement</code> object
1310:             * that created the result set.
1311:             *
1312:             * @return <code>getResultSet().TYPE_FORWARD_ONLY</code>,
1313:             *         <code>getResultSet().TYPE_SCROLL_INSENSITIVE</code>,
1314:             *         or <code>getResultSet().TYPE_SCROLL_SENSITIVE</code>
1315:             * @throws SQLException if a database access error occurs
1316:             * @since 1.2
1317:             */
1318:            public int getType() throws SQLException {
1319:                return getResultSet().getType();
1320:            }
1321:
1322:            /**
1323:             * Retrieves the concurrency mode of this <code>getResultSet()</code> object.
1324:             * The concurrency used is determined by the
1325:             * <code>Statement</code> object that created the result set.
1326:             *
1327:             * @return the concurrency type, either
1328:             *         <code>getResultSet().CONCUR_READ_ONLY</code>
1329:             *         or <code>getResultSet().CONCUR_UPDATABLE</code>
1330:             * @throws SQLException if a database access error occurs
1331:             * @since 1.2
1332:             */
1333:            public int getConcurrency() throws SQLException {
1334:                return getResultSet().getConcurrency();
1335:            }
1336:
1337:            //---------------------------------------------------------------------
1338:            // Updates
1339:            //---------------------------------------------------------------------
1340:
1341:            /**
1342:             * Retrieves whether the current row has been updated.  The value returned
1343:             * depends on whether or not the result set can detect updates.
1344:             *
1345:             * @return <code>true</code> if both (1) the row has been visibly updated
1346:             *         by the owner or another and (2) updates are detected
1347:             * @throws SQLException if a database access error occurs
1348:             * @see java.sql.DatabaseMetaData#updatesAreDetected
1349:             * @since 1.2
1350:             */
1351:            public boolean rowUpdated() throws SQLException {
1352:                return getResultSet().rowUpdated();
1353:            }
1354:
1355:            /**
1356:             * Retrieves whether the current row has had an insertion.
1357:             * The value returned depends on whether or not this
1358:             * <code>getResultSet()</code> object can detect visible inserts.
1359:             *
1360:             * @return <code>true</code> if a row has had an insertion
1361:             *         and insertions are detected; <code>false</code> otherwise
1362:             * @throws SQLException if a database access error occurs
1363:             * @see java.sql.DatabaseMetaData#insertsAreDetected
1364:             * @since 1.2
1365:             */
1366:            public boolean rowInserted() throws SQLException {
1367:                return getResultSet().rowInserted();
1368:            }
1369:
1370:            /**
1371:             * Retrieves whether a row has been deleted.  A deleted row may leave
1372:             * a visible "hole" in a result set.  This method can be used to
1373:             * detect holes in a result set.  The value returned depends on whether
1374:             * or not this <code>getResultSet()</code> object can detect deletions.
1375:             *
1376:             * @return <code>true</code> if a row was deleted and deletions are detected;
1377:             *         <code>false</code> otherwise
1378:             * @throws SQLException if a database access error occurs
1379:             * @see java.sql.DatabaseMetaData#deletesAreDetected
1380:             * @since 1.2
1381:             */
1382:            public boolean rowDeleted() throws SQLException {
1383:                return getResultSet().rowDeleted();
1384:            }
1385:
1386:            /**
1387:             * Gives a nullable column a null value.
1388:             * <p/>
1389:             * The updater methods are used to update column values in the
1390:             * current row or the insert row.  The updater methods do not
1391:             * update the underlying database; instead the <code>updateRow</code>
1392:             * or <code>insertRow</code> methods are called to update the database.
1393:             *
1394:             * @param columnIndex the first column is 1, the second is 2, ...
1395:             * @throws SQLException if a database access error occurs
1396:             * @since 1.2
1397:             */
1398:            public void updateNull(int columnIndex) throws SQLException {
1399:                getResultSet().updateNull(columnIndex);
1400:            }
1401:
1402:            /**
1403:             * Updates the designated column with a <code>boolean</code> value.
1404:             * The updater methods are used to update column values in the
1405:             * current row or the insert row.  The updater methods do not
1406:             * update the underlying database; instead the <code>updateRow</code> or
1407:             * <code>insertRow</code> methods are called to update the database.
1408:             *
1409:             * @param columnIndex the first column is 1, the second is 2, ...
1410:             * @param x           the new column value
1411:             * @throws SQLException if a database access error occurs
1412:             * @since 1.2
1413:             */
1414:            public void updateBoolean(int columnIndex, boolean x)
1415:                    throws SQLException {
1416:                getResultSet().updateBoolean(columnIndex, x);
1417:            }
1418:
1419:            /**
1420:             * Updates the designated column with a <code>byte</code> value.
1421:             * The updater methods are used to update column values in the
1422:             * current row or the insert row.  The updater methods do not
1423:             * update the underlying database; instead the <code>updateRow</code> or
1424:             * <code>insertRow</code> methods are called to update the database.
1425:             *
1426:             * @param columnIndex the first column is 1, the second is 2, ...
1427:             * @param x           the new column value
1428:             * @throws SQLException if a database access error occurs
1429:             * @since 1.2
1430:             */
1431:            public void updateByte(int columnIndex, byte x) throws SQLException {
1432:                getResultSet().updateByte(columnIndex, x);
1433:            }
1434:
1435:            /**
1436:             * Updates the designated column with a <code>short</code> value.
1437:             * The updater methods are used to update column values in the
1438:             * current row or the insert row.  The updater methods do not
1439:             * update the underlying database; instead the <code>updateRow</code> or
1440:             * <code>insertRow</code> methods are called to update the database.
1441:             *
1442:             * @param columnIndex the first column is 1, the second is 2, ...
1443:             * @param x           the new column value
1444:             * @throws SQLException if a database access error occurs
1445:             * @since 1.2
1446:             */
1447:            public void updateShort(int columnIndex, short x)
1448:                    throws SQLException {
1449:                getResultSet().updateShort(columnIndex, x);
1450:            }
1451:
1452:            /**
1453:             * Updates the designated column with an <code>int</code> value.
1454:             * The updater methods are used to update column values in the
1455:             * current row or the insert row.  The updater methods do not
1456:             * update the underlying database; instead the <code>updateRow</code> or
1457:             * <code>insertRow</code> methods are called to update the database.
1458:             *
1459:             * @param columnIndex the first column is 1, the second is 2, ...
1460:             * @param x           the new column value
1461:             * @throws SQLException if a database access error occurs
1462:             * @since 1.2
1463:             */
1464:            public void updateInt(int columnIndex, int x) throws SQLException {
1465:                getResultSet().updateInt(columnIndex, x);
1466:            }
1467:
1468:            /**
1469:             * Updates the designated column with a <code>long</code> value.
1470:             * The updater methods are used to update column values in the
1471:             * current row or the insert row.  The updater methods do not
1472:             * update the underlying database; instead the <code>updateRow</code> or
1473:             * <code>insertRow</code> methods are called to update the database.
1474:             *
1475:             * @param columnIndex the first column is 1, the second is 2, ...
1476:             * @param x           the new column value
1477:             * @throws SQLException if a database access error occurs
1478:             * @since 1.2
1479:             */
1480:            public void updateLong(int columnIndex, long x) throws SQLException {
1481:                getResultSet().updateLong(columnIndex, x);
1482:            }
1483:
1484:            /**
1485:             * Updates the designated column with a <code>float</code> value.
1486:             * The updater methods are used to update column values in the
1487:             * current row or the insert row.  The updater methods do not
1488:             * update the underlying database; instead the <code>updateRow</code> or
1489:             * <code>insertRow</code> methods are called to update the database.
1490:             *
1491:             * @param columnIndex the first column is 1, the second is 2, ...
1492:             * @param x           the new column value
1493:             * @throws SQLException if a database access error occurs
1494:             * @since 1.2
1495:             */
1496:            public void updateFloat(int columnIndex, float x)
1497:                    throws SQLException {
1498:                getResultSet().updateFloat(columnIndex, x);
1499:            }
1500:
1501:            /**
1502:             * Updates the designated column with a <code>double</code> value.
1503:             * The updater methods are used to update column values in the
1504:             * current row or the insert row.  The updater methods do not
1505:             * update the underlying database; instead the <code>updateRow</code> or
1506:             * <code>insertRow</code> methods are called to update the database.
1507:             *
1508:             * @param columnIndex the first column is 1, the second is 2, ...
1509:             * @param x           the new column value
1510:             * @throws SQLException if a database access error occurs
1511:             * @since 1.2
1512:             */
1513:            public void updateDouble(int columnIndex, double x)
1514:                    throws SQLException {
1515:                getResultSet().updateDouble(columnIndex, x);
1516:            }
1517:
1518:            /**
1519:             * Updates the designated column with a <code>java.math.BigDecimal</code>
1520:             * value.
1521:             * The updater methods are used to update column values in the
1522:             * current row or the insert row.  The updater methods do not
1523:             * update the underlying database; instead the <code>updateRow</code> or
1524:             * <code>insertRow</code> methods are called to update the database.
1525:             *
1526:             * @param columnIndex the first column is 1, the second is 2, ...
1527:             * @param x           the new column value
1528:             * @throws SQLException if a database access error occurs
1529:             * @since 1.2
1530:             */
1531:            public void updateBigDecimal(int columnIndex, BigDecimal x)
1532:                    throws SQLException {
1533:                getResultSet().updateBigDecimal(columnIndex, x);
1534:            }
1535:
1536:            /**
1537:             * Updates the designated column with a <code>String</code> value.
1538:             * The updater methods are used to update column values in the
1539:             * current row or the insert row.  The updater methods do not
1540:             * update the underlying database; instead the <code>updateRow</code> or
1541:             * <code>insertRow</code> methods are called to update the database.
1542:             *
1543:             * @param columnIndex the first column is 1, the second is 2, ...
1544:             * @param x           the new column value
1545:             * @throws SQLException if a database access error occurs
1546:             * @since 1.2
1547:             */
1548:            public void updateString(int columnIndex, String x)
1549:                    throws SQLException {
1550:                getResultSet().updateString(columnIndex, x);
1551:            }
1552:
1553:            /**
1554:             * Updates the designated column with a <code>byte</code> array value.
1555:             * The updater methods are used to update column values in the
1556:             * current row or the insert row.  The updater methods do not
1557:             * update the underlying database; instead the <code>updateRow</code> or
1558:             * <code>insertRow</code> methods are called to update the database.
1559:             *
1560:             * @param columnIndex the first column is 1, the second is 2, ...
1561:             * @param x           the new column value
1562:             * @throws SQLException if a database access error occurs
1563:             * @since 1.2
1564:             */
1565:            public void updateBytes(int columnIndex, byte x[])
1566:                    throws SQLException {
1567:                getResultSet().updateBytes(columnIndex, x);
1568:            }
1569:
1570:            /**
1571:             * Updates the designated column with a <code>java.sql.Date</code> value.
1572:             * The updater methods are used to update column values in the
1573:             * current row or the insert row.  The updater methods do not
1574:             * update the underlying database; instead the <code>updateRow</code> or
1575:             * <code>insertRow</code> methods are called to update the database.
1576:             *
1577:             * @param columnIndex the first column is 1, the second is 2, ...
1578:             * @param x           the new column value
1579:             * @throws SQLException if a database access error occurs
1580:             * @since 1.2
1581:             */
1582:            public void updateDate(int columnIndex, java.sql.Date x)
1583:                    throws SQLException {
1584:                getResultSet().updateDate(columnIndex, x);
1585:            }
1586:
1587:            /**
1588:             * Updates the designated column with a <code>java.sql.Time</code> value.
1589:             * The updater methods are used to update column values in the
1590:             * current row or the insert row.  The updater methods do not
1591:             * update the underlying database; instead the <code>updateRow</code> or
1592:             * <code>insertRow</code> methods are called to update the database.
1593:             *
1594:             * @param columnIndex the first column is 1, the second is 2, ...
1595:             * @param x           the new column value
1596:             * @throws SQLException if a database access error occurs
1597:             * @since 1.2
1598:             */
1599:            public void updateTime(int columnIndex, java.sql.Time x)
1600:                    throws SQLException {
1601:                getResultSet().updateTime(columnIndex, x);
1602:            }
1603:
1604:            /**
1605:             * Updates the designated column with a <code>java.sql.Timestamp</code>
1606:             * value.
1607:             * The updater methods are used to update column values in the
1608:             * current row or the insert row.  The updater methods do not
1609:             * update the underlying database; instead the <code>updateRow</code> or
1610:             * <code>insertRow</code> methods are called to update the database.
1611:             *
1612:             * @param columnIndex the first column is 1, the second is 2, ...
1613:             * @param x           the new column value
1614:             * @throws SQLException if a database access error occurs
1615:             * @since 1.2
1616:             */
1617:            public void updateTimestamp(int columnIndex, java.sql.Timestamp x)
1618:                    throws SQLException {
1619:                getResultSet().updateTimestamp(columnIndex, x);
1620:            }
1621:
1622:            /**
1623:             * Updates the designated column with an ascii stream value.
1624:             * The updater methods are used to update column values in the
1625:             * current row or the insert row.  The updater methods do not
1626:             * update the underlying database; instead the <code>updateRow</code> or
1627:             * <code>insertRow</code> methods are called to update the database.
1628:             *
1629:             * @param columnIndex the first column is 1, the second is 2, ...
1630:             * @param x           the new column value
1631:             * @param length      the length of the stream
1632:             * @throws SQLException if a database access error occurs
1633:             * @since 1.2
1634:             */
1635:            public void updateAsciiStream(int columnIndex,
1636:                    java.io.InputStream x, int length) throws SQLException {
1637:                getResultSet().updateAsciiStream(columnIndex, x, length);
1638:            }
1639:
1640:            /**
1641:             * Updates the designated column with a binary stream value.
1642:             * The updater methods are used to update column values in the
1643:             * current row or the insert row.  The updater methods do not
1644:             * update the underlying database; instead the <code>updateRow</code> or
1645:             * <code>insertRow</code> methods are called to update the database.
1646:             *
1647:             * @param columnIndex the first column is 1, the second is 2, ...
1648:             * @param x           the new column value
1649:             * @param length      the length of the stream
1650:             * @throws SQLException if a database access error occurs
1651:             * @since 1.2
1652:             */
1653:            public void updateBinaryStream(int columnIndex,
1654:                    java.io.InputStream x, int length) throws SQLException {
1655:                getResultSet().updateBinaryStream(columnIndex, x, length);
1656:            }
1657:
1658:            /**
1659:             * Updates the designated column with a character stream value.
1660:             * The updater methods are used to update column values in the
1661:             * current row or the insert row.  The updater methods do not
1662:             * update the underlying database; instead the <code>updateRow</code> or
1663:             * <code>insertRow</code> methods are called to update the database.
1664:             *
1665:             * @param columnIndex the first column is 1, the second is 2, ...
1666:             * @param x           the new column value
1667:             * @param length      the length of the stream
1668:             * @throws SQLException if a database access error occurs
1669:             * @since 1.2
1670:             */
1671:            public void updateCharacterStream(int columnIndex,
1672:                    java.io.Reader x, int length) throws SQLException {
1673:                getResultSet().updateCharacterStream(columnIndex, x, length);
1674:            }
1675:
1676:            /**
1677:             * Updates the designated column with an <code>Object</code> value.
1678:             * The updater methods are used to update column values in the
1679:             * current row or the insert row.  The updater methods do not
1680:             * update the underlying database; instead the <code>updateRow</code> or
1681:             * <code>insertRow</code> methods are called to update the database.
1682:             *
1683:             * @param columnIndex the first column is 1, the second is 2, ...
1684:             * @param x           the new column value
1685:             * @param scale       for <code>java.sql.Types.DECIMA</code>
1686:             *                    or <code>java.sql.Types.NUMERIC</code> types,
1687:             *                    this is the number of digits after the decimal point.  For all other
1688:             *                    types this value will be ignored.
1689:             * @throws SQLException if a database access error occurs
1690:             * @since 1.2
1691:             */
1692:            public void updateObject(int columnIndex, Object x, int scale)
1693:                    throws SQLException {
1694:                getResultSet().updateObject(columnIndex, x, scale);
1695:            }
1696:
1697:            /**
1698:             * Updates the designated column with an <code>Object</code> value.
1699:             * The updater methods are used to update column values in the
1700:             * current row or the insert row.  The updater methods do not
1701:             * update the underlying database; instead the <code>updateRow</code> or
1702:             * <code>insertRow</code> methods are called to update the database.
1703:             *
1704:             * @param columnIndex the first column is 1, the second is 2, ...
1705:             * @param x           the new column value
1706:             * @throws SQLException if a database access error occurs
1707:             * @since 1.2
1708:             */
1709:            public void updateObject(int columnIndex, Object x)
1710:                    throws SQLException {
1711:                getResultSet().updateObject(columnIndex, x);
1712:            }
1713:
1714:            /**
1715:             * Updates the designated column with a <code>null</code> value.
1716:             * The updater methods are used to update column values in the
1717:             * current row or the insert row.  The updater methods do not
1718:             * update the underlying database; instead the <code>updateRow</code> or
1719:             * <code>insertRow</code> methods are called to update the database.
1720:             *
1721:             * @param columnName the name of the column
1722:             * @throws SQLException if a database access error occurs
1723:             * @since 1.2
1724:             */
1725:            public void updateNull(String columnName) throws SQLException {
1726:                getResultSet().updateNull(columnName);
1727:            }
1728:
1729:            /**
1730:             * Updates the designated column with a <code>boolean</code> value.
1731:             * The updater methods are used to update column values in the
1732:             * current row or the insert row.  The updater methods do not
1733:             * update the underlying database; instead the <code>updateRow</code> or
1734:             * <code>insertRow</code> methods are called to update the database.
1735:             *
1736:             * @param columnName the name of the column
1737:             * @param x          the new column value
1738:             * @throws SQLException if a database access error occurs
1739:             * @since 1.2
1740:             */
1741:            public void updateBoolean(String columnName, boolean x)
1742:                    throws SQLException {
1743:                getResultSet().updateBoolean(columnName, x);
1744:            }
1745:
1746:            /**
1747:             * Updates the designated column with a <code>byte</code> value.
1748:             * The updater methods are used to update column values in the
1749:             * current row or the insert row.  The updater methods do not
1750:             * update the underlying database; instead the <code>updateRow</code> or
1751:             * <code>insertRow</code> methods are called to update the database.
1752:             *
1753:             * @param columnName the name of the column
1754:             * @param x          the new column value
1755:             * @throws SQLException if a database access error occurs
1756:             * @since 1.2
1757:             */
1758:            public void updateByte(String columnName, byte x)
1759:                    throws SQLException {
1760:                getResultSet().updateByte(columnName, x);
1761:            }
1762:
1763:            /**
1764:             * Updates the designated column with a <code>short</code> value.
1765:             * The updater methods are used to update column values in the
1766:             * current row or the insert row.  The updater methods do not
1767:             * update the underlying database; instead the <code>updateRow</code> or
1768:             * <code>insertRow</code> methods are called to update the database.
1769:             *
1770:             * @param columnName the name of the column
1771:             * @param x          the new column value
1772:             * @throws SQLException if a database access error occurs
1773:             * @since 1.2
1774:             */
1775:            public void updateShort(String columnName, short x)
1776:                    throws SQLException {
1777:                getResultSet().updateShort(columnName, x);
1778:            }
1779:
1780:            /**
1781:             * Updates the designated column with an <code>int</code> value.
1782:             * The updater methods are used to update column values in the
1783:             * current row or the insert row.  The updater methods do not
1784:             * update the underlying database; instead the <code>updateRow</code> or
1785:             * <code>insertRow</code> methods are called to update the database.
1786:             *
1787:             * @param columnName the name of the column
1788:             * @param x          the new column value
1789:             * @throws SQLException if a database access error occurs
1790:             * @since 1.2
1791:             */
1792:            public void updateInt(String columnName, int x) throws SQLException {
1793:                getResultSet().updateInt(columnName, x);
1794:            }
1795:
1796:            /**
1797:             * Updates the designated column with a <code>long</code> value.
1798:             * The updater methods are used to update column values in the
1799:             * current row or the insert row.  The updater methods do not
1800:             * update the underlying database; instead the <code>updateRow</code> or
1801:             * <code>insertRow</code> methods are called to update the database.
1802:             *
1803:             * @param columnName the name of the column
1804:             * @param x          the new column value
1805:             * @throws SQLException if a database access error occurs
1806:             * @since 1.2
1807:             */
1808:            public void updateLong(String columnName, long x)
1809:                    throws SQLException {
1810:                getResultSet().updateLong(columnName, x);
1811:            }
1812:
1813:            /**
1814:             * Updates the designated column with a <code>float    </code> value.
1815:             * The updater methods are used to update column values in the
1816:             * current row or the insert row.  The updater methods do not
1817:             * update the underlying database; instead the <code>updateRow</code> or
1818:             * <code>insertRow</code> methods are called to update the database.
1819:             *
1820:             * @param columnName the name of the column
1821:             * @param x          the new column value
1822:             * @throws SQLException if a database access error occurs
1823:             * @since 1.2
1824:             */
1825:            public void updateFloat(String columnName, float x)
1826:                    throws SQLException {
1827:                getResultSet().updateFloat(columnName, x);
1828:            }
1829:
1830:            /**
1831:             * Updates the designated column with a <code>double</code> value.
1832:             * The updater methods are used to update column values in the
1833:             * current row or the insert row.  The updater methods do not
1834:             * update the underlying database; instead the <code>updateRow</code> or
1835:             * <code>insertRow</code> methods are called to update the database.
1836:             *
1837:             * @param columnName the name of the column
1838:             * @param x          the new column value
1839:             * @throws SQLException if a database access error occurs
1840:             * @since 1.2
1841:             */
1842:            public void updateDouble(String columnName, double x)
1843:                    throws SQLException {
1844:                getResultSet().updateDouble(columnName, x);
1845:            }
1846:
1847:            /**
1848:             * Updates the designated column with a <code>java.sql.BigDecimal</code>
1849:             * value.
1850:             * The updater methods are used to update column values in the
1851:             * current row or the insert row.  The updater methods do not
1852:             * update the underlying database; instead the <code>updateRow</code> or
1853:             * <code>insertRow</code> methods are called to update the database.
1854:             *
1855:             * @param columnName the name of the column
1856:             * @param x          the new column value
1857:             * @throws SQLException if a database access error occurs
1858:             * @since 1.2
1859:             */
1860:            public void updateBigDecimal(String columnName, BigDecimal x)
1861:                    throws SQLException {
1862:                getResultSet().updateBigDecimal(columnName, x);
1863:            }
1864:
1865:            /**
1866:             * Updates the designated column with a <code>String</code> value.
1867:             * The updater methods are used to update column values in the
1868:             * current row or the insert row.  The updater methods do not
1869:             * update the underlying database; instead the <code>updateRow</code> or
1870:             * <code>insertRow</code> methods are called to update the database.
1871:             *
1872:             * @param columnName the name of the column
1873:             * @param x          the new column value
1874:             * @throws SQLException if a database access error occurs
1875:             * @since 1.2
1876:             */
1877:            public void updateString(String columnName, String x)
1878:                    throws SQLException {
1879:                getResultSet().updateString(columnName, x);
1880:            }
1881:
1882:            /**
1883:             * Updates the designated column with a byte array value.
1884:             * <p/>
1885:             * The updater methods are used to update column values in the
1886:             * current row or the insert row.  The updater methods do not
1887:             * update the underlying database; instead the <code>updateRow</code>
1888:             * or <code>insertRow</code> methods are called to update the database.
1889:             *
1890:             * @param columnName the name of the column
1891:             * @param x          the new column value
1892:             * @throws SQLException if a database access error occurs
1893:             * @since 1.2
1894:             */
1895:            public void updateBytes(String columnName, byte x[])
1896:                    throws SQLException {
1897:                getResultSet().updateBytes(columnName, x);
1898:            }
1899:
1900:            /**
1901:             * Updates the designated column with a <code>java.sql.Date</code> value.
1902:             * The updater methods are used to update column values in the
1903:             * current row or the insert row.  The updater methods do not
1904:             * update the underlying database; instead the <code>updateRow</code> or
1905:             * <code>insertRow</code> methods are called to update the database.
1906:             *
1907:             * @param columnName the name of the column
1908:             * @param x          the new column value
1909:             * @throws SQLException if a database access error occurs
1910:             * @since 1.2
1911:             */
1912:            public void updateDate(String columnName, java.sql.Date x)
1913:                    throws SQLException {
1914:                getResultSet().updateDate(columnName, x);
1915:            }
1916:
1917:            /**
1918:             * Updates the designated column with a <code>java.sql.Time</code> value.
1919:             * The updater methods are used to update column values in the
1920:             * current row or the insert row.  The updater methods do not
1921:             * update the underlying database; instead the <code>updateRow</code> or
1922:             * <code>insertRow</code> methods are called to update the database.
1923:             *
1924:             * @param columnName the name of the column
1925:             * @param x          the new column value
1926:             * @throws SQLException if a database access error occurs
1927:             * @since 1.2
1928:             */
1929:            public void updateTime(String columnName, java.sql.Time x)
1930:                    throws SQLException {
1931:                getResultSet().updateTime(columnName, x);
1932:            }
1933:
1934:            /**
1935:             * Updates the designated column with a <code>java.sql.Timestamp</code>
1936:             * value.
1937:             * The updater methods are used to update column values in the
1938:             * current row or the insert row.  The updater methods do not
1939:             * update the underlying database; instead the <code>updateRow</code> or
1940:             * <code>insertRow</code> methods are called to update the database.
1941:             *
1942:             * @param columnName the name of the column
1943:             * @param x          the new column value
1944:             * @throws SQLException if a database access error occurs
1945:             * @since 1.2
1946:             */
1947:            public void updateTimestamp(String columnName, java.sql.Timestamp x)
1948:                    throws SQLException {
1949:                getResultSet().updateTimestamp(columnName, x);
1950:            }
1951:
1952:            /**
1953:             * Updates the designated column with an ascii stream value.
1954:             * The updater methods are used to update column values in the
1955:             * current row or the insert row.  The updater methods do not
1956:             * update the underlying database; instead the <code>updateRow</code> or
1957:             * <code>insertRow</code> methods are called to update the database.
1958:             *
1959:             * @param columnName the name of the column
1960:             * @param x          the new column value
1961:             * @param length     the length of the stream
1962:             * @throws SQLException if a database access error occurs
1963:             * @since 1.2
1964:             */
1965:            public void updateAsciiStream(String columnName,
1966:                    java.io.InputStream x, int length) throws SQLException {
1967:                getResultSet().updateAsciiStream(columnName, x, length);
1968:            }
1969:
1970:            /**
1971:             * Updates the designated column with a binary stream value.
1972:             * The updater methods are used to update column values in the
1973:             * current row or the insert row.  The updater methods do not
1974:             * update the underlying database; instead the <code>updateRow</code> or
1975:             * <code>insertRow</code> methods are called to update the database.
1976:             *
1977:             * @param columnName the name of the column
1978:             * @param x          the new column value
1979:             * @param length     the length of the stream
1980:             * @throws SQLException if a database access error occurs
1981:             * @since 1.2
1982:             */
1983:            public void updateBinaryStream(String columnName,
1984:                    java.io.InputStream x, int length) throws SQLException {
1985:                getResultSet().updateBinaryStream(columnName, x, length);
1986:            }
1987:
1988:            /**
1989:             * Updates the designated column with a character stream value.
1990:             * The updater methods are used to update column values in the
1991:             * current row or the insert row.  The updater methods do not
1992:             * update the underlying database; instead the <code>updateRow</code> or
1993:             * <code>insertRow</code> methods are called to update the database.
1994:             *
1995:             * @param columnName the name of the column
1996:             * @param reader     the <code>java.io.Reader</code> object containing
1997:             *                   the new column value
1998:             * @param length     the length of the stream
1999:             * @throws SQLException if a database access error occurs
2000:             * @since 1.2
2001:             */
2002:            public void updateCharacterStream(String columnName,
2003:                    java.io.Reader reader, int length) throws SQLException {
2004:                getResultSet()
2005:                        .updateCharacterStream(columnName, reader, length);
2006:            }
2007:
2008:            /**
2009:             * Updates the designated column with an <code>Object</code> value.
2010:             * The updater methods are used to update column values in the
2011:             * current row or the insert row.  The updater methods do not
2012:             * update the underlying database; instead the <code>updateRow</code> or
2013:             * <code>insertRow</code> methods are called to update the database.
2014:             *
2015:             * @param columnName the name of the column
2016:             * @param x          the new column value
2017:             * @param scale      for <code>java.sql.Types.DECIMAL</code>
2018:             *                   or <code>java.sql.Types.NUMERIC</code> types,
2019:             *                   this is the number of digits after the decimal point.  For all other
2020:             *                   types this value will be ignored.
2021:             * @throws SQLException if a database access error occurs
2022:             * @since 1.2
2023:             */
2024:            public void updateObject(String columnName, Object x, int scale)
2025:                    throws SQLException {
2026:                getResultSet().updateObject(columnName, x, scale);
2027:            }
2028:
2029:            /**
2030:             * Updates the designated column with an <code>Object</code> value.
2031:             * The updater methods are used to update column values in the
2032:             * current row or the insert row.  The updater methods do not
2033:             * update the underlying database; instead the <code>updateRow</code> or
2034:             * <code>insertRow</code> methods are called to update the database.
2035:             *
2036:             * @param columnName the name of the column
2037:             * @param x          the new column value
2038:             * @throws SQLException if a database access error occurs
2039:             * @since 1.2
2040:             */
2041:            public void updateObject(String columnName, Object x)
2042:                    throws SQLException {
2043:                getResultSet().updateObject(columnName, x);
2044:            }
2045:
2046:            /**
2047:             * Inserts the contents of the insert row into this
2048:             * <code>getResultSet()</code> object and into the database.
2049:             * The cursor must be on the insert row when this method is called.
2050:             *
2051:             * @throws SQLException if a database access error occurs,
2052:             *                      if this method is called when the cursor is not on the insert row,
2053:             *                      or if not all of non-nullable columns in
2054:             *                      the insert row have been given a value
2055:             * @since 1.2
2056:             */
2057:            public void insertRow() throws SQLException {
2058:                getResultSet().insertRow();
2059:            }
2060:
2061:            /**
2062:             * Updates the underlying database with the new contents of the
2063:             * current row of this <code>getResultSet()</code> object.
2064:             * This method cannot be called when the cursor is on the insert row.
2065:             *
2066:             * @throws SQLException if a database access error occurs or
2067:             *                      if this method is called when the cursor is on the insert row
2068:             * @since 1.2
2069:             */
2070:            public void updateRow() throws SQLException {
2071:                getResultSet().updateRow();
2072:            }
2073:
2074:            /**
2075:             * Deletes the current row from this <code>getResultSet()</code> object
2076:             * and from the underlying database.  This method cannot be called when
2077:             * the cursor is on the insert row.
2078:             *
2079:             * @throws SQLException if a database access error occurs
2080:             *                      or if this method is called when the cursor is on the insert row
2081:             * @since 1.2
2082:             */
2083:            public void deleteRow() throws SQLException {
2084:                getResultSet().deleteRow();
2085:            }
2086:
2087:            /**
2088:             * Refreshes the current row with its most recent value in
2089:             * the database.  This method cannot be called when
2090:             * the cursor is on the insert row.
2091:             * <p/>
2092:             * <P>The <code>refreshRow</code> method provides a way for an
2093:             * application to
2094:             * explicitly tell the JDBC driver to refetch a row(s) from the
2095:             * database.  An application may want to call <code>refreshRow</code> when
2096:             * caching or prefetching is being done by the JDBC driver to
2097:             * fetch the latest value of a row from the database.  The JDBC driver
2098:             * may actually refresh multiple rows at once if the fetch size is
2099:             * greater than one.
2100:             * <p/>
2101:             * <P> All values are refetched subject to the transaction isolation
2102:             * level and cursor sensitivity.  If <code>refreshRow</code> is called after
2103:             * calling an updater method, but before calling
2104:             * the method <code>updateRow</code>, then the
2105:             * updates made to the row are lost.  Calling the method
2106:             * <code>refreshRow</code> frequently will likely slow performance.
2107:             *
2108:             * @throws SQLException if a database access error
2109:             *                      occurs or if this method is called when the cursor is on the insert row
2110:             * @since 1.2
2111:             */
2112:            public void refreshRow() throws SQLException {
2113:                getResultSet().refreshRow();
2114:            }
2115:
2116:            /**
2117:             * Cancels the updates made to the current row in this
2118:             * <code>getResultSet()</code> object.
2119:             * This method may be called after calling an
2120:             * updater method(s) and before calling
2121:             * the method <code>updateRow</code> to roll back
2122:             * the updates made to a row.  If no updates have been made or
2123:             * <code>updateRow</code> has already been called, this method has no
2124:             * effect.
2125:             *
2126:             * @throws SQLException if a database access error
2127:             *                      occurs or if this method is called when the cursor is
2128:             *                      on the insert row
2129:             * @since 1.2
2130:             */
2131:            public void cancelRowUpdates() throws SQLException {
2132:                getResultSet().cancelRowUpdates();
2133:            }
2134:
2135:            /**
2136:             * Moves the cursor to the insert row.  The current cursor position is
2137:             * remembered while the cursor is positioned on the insert row.
2138:             * <p/>
2139:             * The insert row is a special row associated with an updatable
2140:             * result set.  It is essentially a buffer where a new row may
2141:             * be constructed by calling the updater methods prior to
2142:             * inserting the row into the result set.
2143:             * <p/>
2144:             * Only the updater, getter,
2145:             * and <code>insertRow</code> methods may be
2146:             * called when the cursor is on the insert row.  All of the columns in
2147:             * a result set must be given a value each time this method is
2148:             * called before calling <code>insertRow</code>.
2149:             * An updater method must be called before a
2150:             * getter method can be called on a column value.
2151:             *
2152:             * @throws SQLException if a database access error occurs
2153:             *                      or the result set is not updatable
2154:             * @since 1.2
2155:             */
2156:            public void moveToInsertRow() throws SQLException {
2157:                getResultSet().moveToInsertRow();
2158:            }
2159:
2160:            /**
2161:             * Moves the cursor to the remembered cursor position, usually the
2162:             * current row.  This method has no effect if the cursor is not on
2163:             * the insert row.
2164:             *
2165:             * @throws SQLException if a database access error occurs
2166:             *                      or the result set is not updatable
2167:             * @since 1.2
2168:             */
2169:            public void moveToCurrentRow() throws SQLException {
2170:                getResultSet().moveToCurrentRow();
2171:            }
2172:
2173:            /**
2174:             * Retrieves the <code>Statement</code> object that produced this
2175:             * <code>getResultSet()</code> object.
2176:             * If the result set was generated some other way, such as by a
2177:             * <code>DatabaseMetaData</code> method, this method returns
2178:             * <code>null</code>.
2179:             *
2180:             * @return the <code>Statment</code> object that produced
2181:             *         this <code>getResultSet()</code> object or <code>null</code>
2182:             *         if the result set was produced some other way
2183:             * @throws SQLException if a database access error occurs
2184:             * @since 1.2
2185:             */
2186:            public Statement getStatement() throws SQLException {
2187:                return getResultSet().getStatement();
2188:            }
2189:
2190:            /**
2191:             * Retrieves the value of the designated column in the current row
2192:             * of this <code>getResultSet()</code> object as an <code>Object</code>
2193:             * in the Java programming language.
2194:             * If the value is an SQL <code>NULL</code>,
2195:             * the driver returns a Java <code>null</code>.
2196:             * This method uses the given <code>Map</code> object
2197:             * for the custom mapping of the
2198:             * SQL structured or distinct type that is being retrieved.
2199:             *
2200:             * @param i   the first column is 1, the second is 2, ...
2201:             * @param map a <code>java.util.Map</code> object that contains the mapping
2202:             *            from SQL type names to classes in the Java programming language
2203:             * @return an <code>Object</code> in the Java programming language
2204:             *         representing the SQL value
2205:             * @throws SQLException if a database access error occurs
2206:             * @since 1.2
2207:             */
2208:            public Object getObject(int i, java.util.Map map)
2209:                    throws SQLException {
2210:                return getResultSet().getObject(i, map);
2211:            }
2212:
2213:            /**
2214:             * Retrieves the value of the designated column in the current row
2215:             * of this <code>getResultSet()</code> object as a <code>Ref</code> object
2216:             * in the Java programming language.
2217:             *
2218:             * @param i the first column is 1, the second is 2, ...
2219:             * @return a <code>Ref</code> object representing an SQL <code>REF</code>
2220:             *         value
2221:             * @throws SQLException if a database access error occurs
2222:             * @since 1.2
2223:             */
2224:            public Ref getRef(int i) throws SQLException {
2225:                return getResultSet().getRef(i);
2226:            }
2227:
2228:            /**
2229:             * Retrieves the value of the designated column in the current row
2230:             * of this <code>getResultSet()</code> object as a <code>Blob</code> object
2231:             * in the Java programming language.
2232:             *
2233:             * @param i the first column is 1, the second is 2, ...
2234:             * @return a <code>Blob</code> object representing the SQL
2235:             *         <code>BLOB</code> value in the specified column
2236:             * @throws SQLException if a database access error occurs
2237:             * @since 1.2
2238:             */
2239:            public Blob getBlob(int i) throws SQLException {
2240:                return getResultSet().getBlob(i);
2241:            }
2242:
2243:            /**
2244:             * Retrieves the value of the designated column in the current row
2245:             * of this <code>getResultSet()</code> object as a <code>Clob</code> object
2246:             * in the Java programming language.
2247:             *
2248:             * @param i the first column is 1, the second is 2, ...
2249:             * @return a <code>Clob</code> object representing the SQL
2250:             *         <code>CLOB</code> value in the specified column
2251:             * @throws SQLException if a database access error occurs
2252:             * @since 1.2
2253:             */
2254:            public Clob getClob(int i) throws SQLException {
2255:                return getResultSet().getClob(i);
2256:            }
2257:
2258:            /**
2259:             * Retrieves the value of the designated column in the current row
2260:             * of this <code>getResultSet()</code> object as an <code>Array</code> object
2261:             * in the Java programming language.
2262:             *
2263:             * @param i the first column is 1, the second is 2, ...
2264:             * @return an <code>Array</code> object representing the SQL
2265:             *         <code>ARRAY</code> value in the specified column
2266:             * @throws SQLException if a database access error occurs
2267:             * @since 1.2
2268:             */
2269:            public Array getArray(int i) throws SQLException {
2270:                return getResultSet().getArray(i);
2271:            }
2272:
2273:            /**
2274:             * Retrieves the value of the designated column in the current row
2275:             * of this <code>getResultSet()</code> object as an <code>Object</code>
2276:             * in the Java programming language.
2277:             * If the value is an SQL <code>NULL</code>,
2278:             * the driver returns a Java <code>null</code>.
2279:             * This method uses the specified <code>Map</code> object for
2280:             * custom mapping if appropriate.
2281:             *
2282:             * @param colName the name of the column from which to retrieve the value
2283:             * @param map     a <code>java.util.Map</code> object that contains the mapping
2284:             *                from SQL type names to classes in the Java programming language
2285:             * @return an <code>Object</code> representing the SQL value in the
2286:             *         specified column
2287:             * @throws SQLException if a database access error occurs
2288:             * @since 1.2
2289:             */
2290:            public Object getObject(String colName, java.util.Map map)
2291:                    throws SQLException {
2292:                return getResultSet().getObject(colName, map);
2293:            }
2294:
2295:            /**
2296:             * Retrieves the value of the designated column in the current row
2297:             * of this <code>getResultSet()</code> object as a <code>Ref</code> object
2298:             * in the Java programming language.
2299:             *
2300:             * @param colName the column name
2301:             * @return a <code>Ref</code> object representing the SQL <code>REF</code>
2302:             *         value in the specified column
2303:             * @throws SQLException if a database access error occurs
2304:             * @since 1.2
2305:             */
2306:            public Ref getRef(String colName) throws SQLException {
2307:                return getResultSet().getRef(colName);
2308:            }
2309:
2310:            /**
2311:             * Retrieves the value of the designated column in the current row
2312:             * of this <code>getResultSet()</code> object as a <code>Blob</code> object
2313:             * in the Java programming language.
2314:             *
2315:             * @param colName the name of the column from which to retrieve the value
2316:             * @return a <code>Blob</code> object representing the SQL <code>BLOB</code>
2317:             *         value in the specified column
2318:             * @throws SQLException if a database access error occurs
2319:             * @since 1.2
2320:             */
2321:            public Blob getBlob(String colName) throws SQLException {
2322:                return getResultSet().getBlob(colName);
2323:            }
2324:
2325:            /**
2326:             * Retrieves the value of the designated column in the current row
2327:             * of this <code>getResultSet()</code> object as a <code>Clob</code> object
2328:             * in the Java programming language.
2329:             *
2330:             * @param colName the name of the column from which to retrieve the value
2331:             * @return a <code>Clob</code> object representing the SQL <code>CLOB</code>
2332:             *         value in the specified column
2333:             * @throws SQLException if a database access error occurs
2334:             * @since 1.2
2335:             */
2336:            public Clob getClob(String colName) throws SQLException {
2337:                return getResultSet().getClob(colName);
2338:            }
2339:
2340:            /**
2341:             * Retrieves the value of the designated column in the current row
2342:             * of this <code>getResultSet()</code> object as an <code>Array</code> object
2343:             * in the Java programming language.
2344:             *
2345:             * @param colName the name of the column from which to retrieve the value
2346:             * @return an <code>Array</code> object representing the SQL <code>ARRAY</code> value in
2347:             *         the specified column
2348:             * @throws SQLException if a database access error occurs
2349:             * @since 1.2
2350:             */
2351:            public Array getArray(String colName) throws SQLException {
2352:                return getResultSet().getArray(colName);
2353:            }
2354:
2355:            /**
2356:             * Retrieves the value of the designated column in the current row
2357:             * of this <code>getResultSet()</code> object as a <code>java.sql.Date</code> object
2358:             * in the Java programming language.
2359:             * This method uses the given calendar to construct an appropriate millisecond
2360:             * value for the date if the underlying database does not store
2361:             * timezone information.
2362:             *
2363:             * @param columnIndex the first column is 1, the second is 2, ...
2364:             * @param cal         the <code>java.util.Calendar</code> object
2365:             *                    to use in constructing the date
2366:             * @return the column value as a <code>java.sql.Date</code> object;
2367:             *         if the value is SQL <code>NULL</code>,
2368:             *         the value returned is <code>null</code> in the Java programming language
2369:             * @throws SQLException if a database access error occurs
2370:             * @since 1.2
2371:             */
2372:            public java.sql.Date getDate(int columnIndex, Calendar cal)
2373:                    throws SQLException {
2374:                return getResultSet().getDate(columnIndex, cal);
2375:            }
2376:
2377:            /**
2378:             * Retrieves the value of the designated column in the current row
2379:             * of this <code>getResultSet()</code> object as a <code>java.sql.Date</code> object
2380:             * in the Java programming language.
2381:             * This method uses the given calendar to construct an appropriate millisecond
2382:             * value for the date if the underlying database does not store
2383:             * timezone information.
2384:             *
2385:             * @param columnName the SQL name of the column from which to retrieve the value
2386:             * @param cal        the <code>java.util.Calendar</code> object
2387:             *                   to use in constructing the date
2388:             * @return the column value as a <code>java.sql.Date</code> object;
2389:             *         if the value is SQL <code>NULL</code>,
2390:             *         the value returned is <code>null</code> in the Java programming language
2391:             * @throws SQLException if a database access error occurs
2392:             * @since 1.2
2393:             */
2394:            public java.sql.Date getDate(String columnName, Calendar cal)
2395:                    throws SQLException {
2396:                return getResultSet().getDate(columnName, cal);
2397:            }
2398:
2399:            /**
2400:             * Retrieves the value of the designated column in the current row
2401:             * of this <code>getResultSet()</code> object as a <code>java.sql.Time</code> object
2402:             * in the Java programming language.
2403:             * This method uses the given calendar to construct an appropriate millisecond
2404:             * value for the time if the underlying database does not store
2405:             * timezone information.
2406:             *
2407:             * @param columnIndex the first column is 1, the second is 2, ...
2408:             * @param cal         the <code>java.util.Calendar</code> object
2409:             *                    to use in constructing the time
2410:             * @return the column value as a <code>java.sql.Time</code> object;
2411:             *         if the value is SQL <code>NULL</code>,
2412:             *         the value returned is <code>null</code> in the Java programming language
2413:             * @throws SQLException if a database access error occurs
2414:             * @since 1.2
2415:             */
2416:            public java.sql.Time getTime(int columnIndex, Calendar cal)
2417:                    throws SQLException {
2418:                return getResultSet().getTime(columnIndex, cal);
2419:            }
2420:
2421:            /**
2422:             * Retrieves the value of the designated column in the current row
2423:             * of this <code>getResultSet()</code> object as a <code>java.sql.Time</code> object
2424:             * in the Java programming language.
2425:             * This method uses the given calendar to construct an appropriate millisecond
2426:             * value for the time if the underlying database does not store
2427:             * timezone information.
2428:             *
2429:             * @param columnName the SQL name of the column
2430:             * @param cal        the <code>java.util.Calendar</code> object
2431:             *                   to use in constructing the time
2432:             * @return the column value as a <code>java.sql.Time</code> object;
2433:             *         if the value is SQL <code>NULL</code>,
2434:             *         the value returned is <code>null</code> in the Java programming language
2435:             * @throws SQLException if a database access error occurs
2436:             * @since 1.2
2437:             */
2438:            public java.sql.Time getTime(String columnName, Calendar cal)
2439:                    throws SQLException {
2440:                return getResultSet().getTime(columnName, cal);
2441:            }
2442:
2443:            /**
2444:             * Retrieves the value of the designated column in the current row
2445:             * of this <code>getResultSet()</code> object as a <code>java.sql.Timestamp</code> object
2446:             * in the Java programming language.
2447:             * This method uses the given calendar to construct an appropriate millisecond
2448:             * value for the timestamp if the underlying database does not store
2449:             * timezone information.
2450:             *
2451:             * @param columnIndex the first column is 1, the second is 2, ...
2452:             * @param cal         the <code>java.util.Calendar</code> object
2453:             *                    to use in constructing the timestamp
2454:             * @return the column value as a <code>java.sql.Timestamp</code> object;
2455:             *         if the value is SQL <code>NULL</code>,
2456:             *         the value returned is <code>null</code> in the Java programming language
2457:             * @throws SQLException if a database access error occurs
2458:             * @since 1.2
2459:             */
2460:            public java.sql.Timestamp getTimestamp(int columnIndex, Calendar cal)
2461:                    throws SQLException {
2462:                return getResultSet().getTimestamp(columnIndex, cal);
2463:            }
2464:
2465:            /**
2466:             * Retrieves the value of the designated column in the current row
2467:             * of this <code>getResultSet()</code> object as a <code>java.sql.Timestamp</code> object
2468:             * in the Java programming language.
2469:             * This method uses the given calendar to construct an appropriate millisecond
2470:             * value for the timestamp if the underlying database does not store
2471:             * timezone information.
2472:             *
2473:             * @param columnName the SQL name of the column
2474:             * @param cal        the <code>java.util.Calendar</code> object
2475:             *                   to use in constructing the date
2476:             * @return the column value as a <code>java.sql.Timestamp</code> object;
2477:             *         if the value is SQL <code>NULL</code>,
2478:             *         the value returned is <code>null</code> in the Java programming language
2479:             * @throws SQLException if a database access error occurs
2480:             * @since 1.2
2481:             */
2482:            public java.sql.Timestamp getTimestamp(String columnName,
2483:                    Calendar cal) throws SQLException {
2484:                return getResultSet().getTimestamp(columnName, cal);
2485:            }
2486:
2487:            //-------------------------- JDBC 3.0 ----------------------------------------
2488:
2489:            /**
2490:             * Retrieves the value of the designated column in the current row
2491:             * of this <code>getResultSet()</code> object as a <code>java.net.URL</code>
2492:             * object in the Java programming language.
2493:             *
2494:             * @param columnIndex the index of the column 1 is the first, 2 is the second,...
2495:             * @return the column value as a <code>java.net.URL</code> object;
2496:             *         if the value is SQL <code>NULL</code>,
2497:             *         the value returned is <code>null</code> in the Java programming language
2498:             * @throws SQLException if a database access error occurs,
2499:             *                      or if a URL is malformed
2500:             * @since 1.4
2501:             */
2502:            public java.net.URL getURL(int columnIndex) throws SQLException {
2503:                return getResultSet().getURL(columnIndex);
2504:            }
2505:
2506:            /**
2507:             * Retrieves the value of the designated column in the current row
2508:             * of this <code>getResultSet()</code> object as a <code>java.net.URL</code>
2509:             * object in the Java programming language.
2510:             *
2511:             * @param columnName the SQL name of the column
2512:             * @return the column value as a <code>java.net.URL</code> object;
2513:             *         if the value is SQL <code>NULL</code>,
2514:             *         the value returned is <code>null</code> in the Java programming language
2515:             * @throws SQLException if a database access error occurs
2516:             *                      or if a URL is malformed
2517:             * @since 1.4
2518:             */
2519:            public java.net.URL getURL(String columnName) throws SQLException {
2520:                return getResultSet().getURL(columnName);
2521:            }
2522:
2523:            /**
2524:             * Updates the designated column with a <code>java.sql.Ref</code> value.
2525:             * The updater methods are used to update column values in the
2526:             * current row or the insert row.  The updater methods do not
2527:             * update the underlying database; instead the <code>updateRow</code> or
2528:             * <code>insertRow</code> methods are called to update the database.
2529:             *
2530:             * @param columnIndex the first column is 1, the second is 2, ...
2531:             * @param x           the new column value
2532:             * @throws SQLException if a database access error occurs
2533:             * @since 1.4
2534:             */
2535:            public void updateRef(int columnIndex, java.sql.Ref x)
2536:                    throws SQLException {
2537:                getResultSet().updateRef(columnIndex, x);
2538:            }
2539:
2540:            /**
2541:             * Updates the designated column with a <code>java.sql.Ref</code> value.
2542:             * The updater methods are used to update column values in the
2543:             * current row or the insert row.  The updater methods do not
2544:             * update the underlying database; instead the <code>updateRow</code> or
2545:             * <code>insertRow</code> methods are called to update the database.
2546:             *
2547:             * @param columnName the name of the column
2548:             * @param x          the new column value
2549:             * @throws SQLException if a database access error occurs
2550:             * @since 1.4
2551:             */
2552:            public void updateRef(String columnName, java.sql.Ref x)
2553:                    throws SQLException {
2554:                getResultSet().updateRef(columnName, x);
2555:            }
2556:
2557:            /**
2558:             * Updates the designated column with a <code>java.sql.Blob</code> value.
2559:             * The updater methods are used to update column values in the
2560:             * current row or the insert row.  The updater methods do not
2561:             * update the underlying database; instead the <code>updateRow</code> or
2562:             * <code>insertRow</code> methods are called to update the database.
2563:             *
2564:             * @param columnIndex the first column is 1, the second is 2, ...
2565:             * @param x           the new column value
2566:             * @throws SQLException if a database access error occurs
2567:             * @since 1.4
2568:             */
2569:            public void updateBlob(int columnIndex, java.sql.Blob x)
2570:                    throws SQLException {
2571:                getResultSet().updateBlob(columnIndex, x);
2572:            }
2573:
2574:            /**
2575:             * Updates the designated column with a <code>java.sql.Blob</code> value.
2576:             * The updater methods are used to update column values in the
2577:             * current row or the insert row.  The updater methods do not
2578:             * update the underlying database; instead the <code>updateRow</code> or
2579:             * <code>insertRow</code> methods are called to update the database.
2580:             *
2581:             * @param columnName the name of the column
2582:             * @param x          the new column value
2583:             * @throws SQLException if a database access error occurs
2584:             * @since 1.4
2585:             */
2586:            public void updateBlob(String columnName, java.sql.Blob x)
2587:                    throws SQLException {
2588:                getResultSet().updateBlob(columnName, x);
2589:            }
2590:
2591:            /**
2592:             * Updates the designated column with a <code>java.sql.Clob</code> value.
2593:             * The updater methods are used to update column values in the
2594:             * current row or the insert row.  The updater methods do not
2595:             * update the underlying database; instead the <code>updateRow</code> or
2596:             * <code>insertRow</code> methods are called to update the database.
2597:             *
2598:             * @param columnIndex the first column is 1, the second is 2, ...
2599:             * @param x           the new column value
2600:             * @throws SQLException if a database access error occurs
2601:             * @since 1.4
2602:             */
2603:            public void updateClob(int columnIndex, java.sql.Clob x)
2604:                    throws SQLException {
2605:                getResultSet().updateClob(columnIndex, x);
2606:            }
2607:
2608:            /**
2609:             * Updates the designated column with a <code>java.sql.Clob</code> value.
2610:             * The updater methods are used to update column values in the
2611:             * current row or the insert row.  The updater methods do not
2612:             * update the underlying database; instead the <code>updateRow</code> or
2613:             * <code>insertRow</code> methods are called to update the database.
2614:             *
2615:             * @param columnName the name of the column
2616:             * @param x          the new column value
2617:             * @throws SQLException if a database access error occurs
2618:             * @since 1.4
2619:             */
2620:            public void updateClob(String columnName, java.sql.Clob x)
2621:                    throws SQLException {
2622:                getResultSet().updateClob(columnName, x);
2623:            }
2624:
2625:            /**
2626:             * Updates the designated column with a <code>java.sql.Array</code> value.
2627:             * The updater methods are used to update column values in the
2628:             * current row or the insert row.  The updater methods do not
2629:             * update the underlying database; instead the <code>updateRow</code> or
2630:             * <code>insertRow</code> methods are called to update the database.
2631:             *
2632:             * @param columnIndex the first column is 1, the second is 2, ...
2633:             * @param x           the new column value
2634:             * @throws SQLException if a database access error occurs
2635:             * @since 1.4
2636:             */
2637:            public void updateArray(int columnIndex, java.sql.Array x)
2638:                    throws SQLException {
2639:                getResultSet().updateArray(columnIndex, x);
2640:            }
2641:
2642:            /**
2643:             * Updates the designated column with a <code>java.sql.Array</code> value.
2644:             * The updater methods are used to update column values in the
2645:             * current row or the insert row.  The updater methods do not
2646:             * update the underlying database; instead the <code>updateRow</code> or
2647:             * <code>insertRow</code> methods are called to update the database.
2648:             *
2649:             * @param columnName the name of the column
2650:             * @param x          the new column value
2651:             * @throws SQLException if a database access error occurs
2652:             * @since 1.4
2653:             */
2654:            public void updateArray(String columnName, java.sql.Array x)
2655:                    throws SQLException {
2656:                getResultSet().updateArray(columnName, x);
2657:            }
2658:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.