1 /*
   2  * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package com.sun.rowset;
  27 
  28 import java.sql.*;
  29 import javax.sql.*;
  30 import javax.naming.*;
  31 import java.io.*;
  32 import java.math.*;
  33 import java.util.*;
  34 import java.beans.*;
  35 
  36 import javax.sql.rowset.*;
  37 
  38 /**
  39  * The standard implementation of the <code>JdbcRowSet</code> interface. See the interface
  40  * defintion for full behavior and implementation requirements.
  41  *
  42  * @author Jonathan Bruce, Amit Handa
  43  */
  44 
  45 public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {
  46 
  47     /**
  48      * The <code>Connection</code> object that is this rowset's
  49      * current connection to the database.  This field is set
  50      * internally when the connection is established.
  51      */
  52     private Connection conn;
  53 
  54     /**
  55      * The <code>PreparedStatement</code> object that is this rowset's
  56      * current command.  This field is set internally when the method
  57      * <code>execute</code> creates the <code>PreparedStatement</code>
  58      * object.
  59      */
  60     private PreparedStatement ps;
  61 
  62     /**
  63      * The <code>ResultSet</code> object that is this rowset's
  64      * current result set.  This field is set internally when the method
  65      * <code>execute</code> executes the rowset's command and thereby
  66      * creates the rowset's <code>ResultSet</code> object.
  67      */
  68     private ResultSet rs;
  69 
  70     /**
  71      * The <code>RowSetMetaDataImpl</code> object that is contructed when
  72      * a <code>ResultSet</code> object is passed to the <code>JdbcRowSet</code>
  73      * constructor. This helps in constructing all metadata associated
  74      * with the <code>ResultSet</code> object using the setter methods of
  75      * <code>RowSetMetaDataImpl</code>.
  76      */
  77     private RowSetMetaDataImpl rowsMD;
  78 
  79     /**
  80      * The <code>ResultSetMetaData</code> object from which this
  81      * <code>RowSetMetaDataImpl</code> is formed and which  helps in getting
  82      * the metadata information.
  83      */
  84     private ResultSetMetaData resMD;
  85 
  86     /**
  87      * The property that helps to fire the property changed event when certain
  88      * properties are changed in the <code>JdbcRowSet</code> object. This property
  89      * is being added to satisfy Rave requirements.
  90      */
  91     private PropertyChangeSupport propertyChangeSupport;
  92 
  93     /**
  94      * The Vector holding the Match Columns
  95      */
  96     private Vector<Integer> iMatchColumns;
  97 
  98     /**
  99      * The Vector that will hold the Match Column names.
 100      */
 101     private Vector<String> strMatchColumns;
 102 
 103 
 104     protected transient JdbcRowSetResourceBundle resBundle;
 105 
 106     /**
 107      * Constructs a default <code>JdbcRowSet</code> object.
 108      * The new instance of <code>JdbcRowSet</code> will serve as a proxy
 109      * for the <code>ResultSet</code> object it creates, and by so doing,
 110      * it will make it possible to use the result set as a JavaBeans
 111      * component.
 112      * <P>
 113      * The following is true of a default <code>JdbcRowSet</code> instance:
 114      * <UL>
 115      *   <LI>Does not show deleted rows
 116      *   <LI>Has no time limit for how long a driver may take to
 117      *       execute the rowset's command
 118      *   <LI>Has no limit for the number of rows it may contain
 119      *   <LI>Has no limit for the number of bytes a column may contain
 120      *   <LI>Has a scrollable cursor and does not show changes
 121      *       made by others
 122      *   <LI>Will not see uncommitted data (make "dirty" reads)
 123      *   <LI>Has escape processing turned on
 124      *   <LI>Has its connection's type map set to <code>null</code>
 125      *   <LI>Has an empty <code>Hashtable</code> object for storing any
 126      *       parameters that are set
 127      * </UL>
 128      * A newly created <code>JdbcRowSet</code> object must have its
 129      * <code>execute</code> method invoked before other public methods
 130      * are called on it; otherwise, such method calls will cause an
 131      * exception to be thrown.
 132      *
 133      * @throws SQLException [1] if any of its public methods are called prior
 134      * to calling the <code>execute</code> method; [2] if invalid JDBC driver
 135      * properties are set or [3] if no connection to a data source exists.
 136      */
 137     public JdbcRowSetImpl() {
 138         conn = null;
 139         ps   = null;
 140         rs   = null;
 141 
 142         try {
 143            resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
 144         } catch(IOException ioe) {
 145             throw new RuntimeException(ioe);
 146         }
 147 
 148         propertyChangeSupport = new PropertyChangeSupport(this);
 149 
 150         initParams();
 151 
 152         // set the defaults
 153 
 154         try {
 155             setShowDeleted(false);
 156         } catch(SQLException sqle) {
 157              System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setshowdeleted").toString() +
 158                                 sqle.getLocalizedMessage());
 159         }
 160 
 161         try {
 162             setQueryTimeout(0);
 163         } catch(SQLException sqle) {
 164             System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setquerytimeout").toString() +
 165                                 sqle.getLocalizedMessage());
 166         }
 167 
 168         try {
 169             setMaxRows(0);
 170         } catch(SQLException sqle) {
 171             System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setmaxrows").toString() +
 172                                 sqle.getLocalizedMessage());
 173         }
 174 
 175         try {
 176             setMaxFieldSize(0);
 177         } catch(SQLException sqle) {
 178              System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setmaxfieldsize").toString() +
 179                                 sqle.getLocalizedMessage());
 180         }
 181 
 182         try {
 183             setEscapeProcessing(true);
 184         } catch(SQLException sqle) {
 185              System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setescapeprocessing").toString() +
 186                                 sqle.getLocalizedMessage());
 187         }
 188 
 189         try {
 190             setConcurrency(ResultSet.CONCUR_UPDATABLE);
 191         } catch (SQLException sqle) {
 192             System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setconcurrency").toString() +
 193                                 sqle.getLocalizedMessage());
 194         }
 195 
 196         setTypeMap(null);
 197 
 198         try {
 199             setType(ResultSet.TYPE_SCROLL_INSENSITIVE);
 200         } catch(SQLException sqle){
 201           System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.settype").toString() +
 202                                 sqle.getLocalizedMessage());
 203         }
 204 
 205         setReadOnly(true);
 206 
 207         try {
 208             setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
 209         } catch(SQLException sqle){
 210             System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.settransactionisolation").toString() +
 211                                 sqle.getLocalizedMessage());
 212         }
 213 
 214         //Instantiating the vector for MatchColumns
 215 
 216         iMatchColumns = new Vector<Integer>(10);
 217         for(int i = 0; i < 10 ; i++) {
 218            iMatchColumns.add(i,Integer.valueOf(-1));
 219         }
 220 
 221         strMatchColumns = new Vector<String>(10);
 222         for(int j = 0; j < 10; j++) {
 223            strMatchColumns.add(j,null);
 224         }
 225     }
 226 
 227     /**
 228      * Constructs a default <code>JdbcRowSet</code> object given a
 229      * valid <code>Connection</code> object. The new
 230      * instance of <code>JdbcRowSet</code> will serve as a proxy for
 231      * the <code>ResultSet</code> object it creates, and by so doing,
 232      * it will make it possible to use the result set as a JavaBeans
 233      * component.
 234      * <P>
 235      * The following is true of a default <code>JdbcRowSet</code> instance:
 236      * <UL>
 237      *   <LI>Does not show deleted rows
 238      *   <LI>Has no time limit for how long a driver may take to
 239      *       execute the rowset's command
 240      *   <LI>Has no limit for the number of rows it may contain
 241      *   <LI>Has no limit for the number of bytes a column may contain
 242      *   <LI>Has a scrollable cursor and does not show changes
 243      *       made by others
 244      *   <LI>Will not see uncommitted data (make "dirty" reads)
 245      *   <LI>Has escape processing turned on
 246      *   <LI>Has its connection's type map set to <code>null</code>
 247      *   <LI>Has an empty <code>Hashtable</code> object for storing any
 248      *       parameters that are set
 249      * </UL>
 250      * A newly created <code>JdbcRowSet</code> object must have its
 251      * <code>execute</code> method invoked before other public methods
 252      * are called on it; otherwise, such method calls will cause an
 253      * exception to be thrown.
 254      *
 255      * @throws SQLException [1] if any of its public methods are called prior
 256      * to calling the <code>execute</code> method, [2] if invalid JDBC driver
 257      * properties are set, or [3] if no connection to a data source exists.
 258      */
 259     public JdbcRowSetImpl(Connection con) throws SQLException {
 260 
 261         conn = con;
 262         ps = null;
 263         rs = null;
 264 
 265         try {
 266            resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
 267         } catch(IOException ioe) {
 268             throw new RuntimeException(ioe);
 269         }
 270 
 271         propertyChangeSupport = new PropertyChangeSupport(this);
 272 
 273         initParams();
 274         // set the defaults
 275         setShowDeleted(false);
 276         setQueryTimeout(0);
 277         setMaxRows(0);
 278         setMaxFieldSize(0);
 279 
 280         setParams();
 281 
 282         setReadOnly(true);
 283         setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
 284         setEscapeProcessing(true);
 285         setTypeMap(null);
 286 
 287         //Instantiating the vector for MatchColumns
 288 
 289         iMatchColumns = new Vector<Integer>(10);
 290         for(int i = 0; i < 10 ; i++) {
 291            iMatchColumns.add(i,Integer.valueOf(-1));
 292         }
 293 
 294         strMatchColumns = new Vector<String>(10);
 295         for(int j = 0; j < 10; j++) {
 296            strMatchColumns.add(j,null);
 297         }
 298     }
 299 
 300     /**
 301      * Constructs a default <code>JdbcRowSet</code> object using the
 302      * URL, username, and password arguments supplied. The new
 303      * instance of <code>JdbcRowSet</code> will serve as a proxy for
 304      * the <code>ResultSet</code> object it creates, and by so doing,
 305      * it will make it possible to use the result set as a JavaBeans
 306      * component.
 307      *
 308      * <P>
 309      * The following is true of a default <code>JdbcRowSet</code> instance:
 310      * <UL>
 311      *   <LI>Does not show deleted rows
 312      *   <LI>Has no time limit for how long a driver may take to
 313      *       execute the rowset's command
 314      *   <LI>Has no limit for the number of rows it may contain
 315      *   <LI>Has no limit for the number of bytes a column may contain
 316      *   <LI>Has a scrollable cursor and does not show changes
 317      *       made by others
 318      *   <LI>Will not see uncommitted data (make "dirty" reads)
 319      *   <LI>Has escape processing turned on
 320      *   <LI>Has its connection's type map set to <code>null</code>
 321      *   <LI>Has an empty <code>Hashtable</code> object for storing any
 322      *       parameters that are set
 323      * </UL>
 324      *
 325      * @param url - a JDBC URL for the database to which this <code>JdbcRowSet</code>
 326      *        object will be connected. The form for a JDBC URL is
 327      *        <code>jdbc:subprotocol:subname</code>.
 328      * @param user - the database user on whose behalf the connection
 329      *        is being made
 330      * @param password - the user's password
 331      *
 332      * @throws SQLException if a database access error occurs
 333      *
 334      */
 335     public JdbcRowSetImpl(String url, String user, String password) throws SQLException {
 336         conn = null;
 337         ps = null;
 338         rs = null;
 339 
 340         try {
 341            resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
 342         } catch(IOException ioe) {
 343             throw new RuntimeException(ioe);
 344         }
 345 
 346         propertyChangeSupport = new PropertyChangeSupport(this);
 347 
 348         initParams();
 349 
 350         // Pass the arguments to BaseRowSet
 351         // setter methods now.
 352 
 353         setUsername(user);
 354         setPassword(password);
 355         setUrl(url);
 356 
 357         // set the defaults
 358         setShowDeleted(false);
 359         setQueryTimeout(0);
 360         setMaxRows(0);
 361         setMaxFieldSize(0);
 362 
 363         // to ensure connection to a db call connect now
 364         // and associate a conn with "this" object
 365         // in this case.
 366         conn = connect();
 367         setParams();
 368 
 369         setReadOnly(true);
 370         setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
 371         setEscapeProcessing(true);
 372         setTypeMap(null);
 373 
 374         //Instantiating the vector for MatchColumns
 375 
 376         iMatchColumns = new Vector<Integer>(10);
 377         for(int i = 0; i < 10 ; i++) {
 378            iMatchColumns.add(i,Integer.valueOf(-1));
 379         }
 380 
 381         strMatchColumns = new Vector<String>(10);
 382         for(int j = 0; j < 10; j++) {
 383            strMatchColumns.add(j,null);
 384         }
 385     }
 386 
 387 
 388     /**
 389      * Constructs a <code>JdbcRowSet</code> object using the given valid
 390      * <code>ResultSet</code> object. The new
 391      * instance of <code>JdbcRowSet</code> will serve as a proxy for
 392      * the <code>ResultSet</code> object, and by so doing,
 393      * it will make it possible to use the result set as a JavaBeans
 394      * component.
 395      *
 396      * <P>
 397      * The following is true of a default <code>JdbcRowSet</code> instance:
 398      * <UL>
 399      *   <LI>Does not show deleted rows
 400      *   <LI>Has no time limit for how long a driver may take to
 401      *       execute the rowset's command
 402      *   <LI>Has no limit for the number of rows it may contain
 403      *   <LI>Has no limit for the number of bytes a column may contain
 404      *   <LI>Has a scrollable cursor and does not show changes
 405      *       made by others
 406      *   <LI>Will not see uncommitted data (make "dirty" reads)
 407      *   <LI>Has escape processing turned on
 408      *   <LI>Has its connection's type map set to <code>null</code>
 409      *   <LI>Has an empty <code>Hashtable</code> object for storing any
 410      *       parameters that are set
 411      * </UL>
 412      *
 413      * @param res a valid <code>ResultSet</code> object
 414      *
 415      * @throws SQLException if a database access occurs due to a non
 416      * valid ResultSet handle.
 417      */
 418     public JdbcRowSetImpl(ResultSet res) throws SQLException {
 419 
 420         // A ResultSet handle encapsulates a connection handle.
 421         // But there is no way we can retrieve a Connection handle
 422         // from a ResultSet object.
 423         // So to avoid any anomalies we keep the conn = null
 424         // The passed rs handle will be a wrapper around for
 425         // "this" object's all operations.
 426         conn = null;
 427 
 428         ps = null;
 429 
 430         rs = res;
 431 
 432         try {
 433            resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
 434         } catch(IOException ioe) {
 435             throw new RuntimeException(ioe);
 436         }
 437 
 438         propertyChangeSupport = new PropertyChangeSupport(this);
 439 
 440         initParams();
 441 
 442         // get the values from the resultset handle.
 443         setShowDeleted(false);
 444         setQueryTimeout(0);
 445         setMaxRows(0);
 446         setMaxFieldSize(0);
 447 
 448         setParams();
 449 
 450         setReadOnly(true);
 451         setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
 452         setEscapeProcessing(true);
 453         setTypeMap(null);
 454 
 455         // Get a handle to ResultSetMetaData
 456         // Construct RowSetMetaData out of it.
 457 
 458         resMD = rs.getMetaData();
 459 
 460         rowsMD = new RowSetMetaDataImpl();
 461 
 462         initMetaData(rowsMD, resMD);
 463 
 464         //Instantiating the vector for MatchColumns
 465 
 466         iMatchColumns = new Vector<Integer>(10);
 467         for(int i = 0; i < 10 ; i++) {
 468            iMatchColumns.add(i,Integer.valueOf(-1));
 469         }
 470 
 471         strMatchColumns = new Vector<String>(10);
 472         for(int j = 0; j < 10; j++) {
 473            strMatchColumns.add(j,null);
 474         }
 475     }
 476 
 477     /**
 478      * Initializes the given <code>RowSetMetaData</code> object with the values
 479      * in the given <code>ResultSetMetaData</code> object.
 480      *
 481      * @param md the <code>RowSetMetaData</code> object for this
 482      *           <code>JdbcRowSetImpl</code> object, which will be set with
 483      *           values from rsmd
 484      * @param rsmd the <code>ResultSetMetaData</code> object from which new
 485      *             values for md will be read
 486      * @throws SQLException if an error occurs
 487      */
 488     protected void initMetaData(RowSetMetaData md, ResultSetMetaData rsmd) throws SQLException {
 489         int numCols = rsmd.getColumnCount();
 490 
 491         md.setColumnCount(numCols);
 492         for (int col=1; col <= numCols; col++) {
 493             md.setAutoIncrement(col, rsmd.isAutoIncrement(col));
 494             md.setCaseSensitive(col, rsmd.isCaseSensitive(col));
 495             md.setCurrency(col, rsmd.isCurrency(col));
 496             md.setNullable(col, rsmd.isNullable(col));
 497             md.setSigned(col, rsmd.isSigned(col));
 498             md.setSearchable(col, rsmd.isSearchable(col));
 499             md.setColumnDisplaySize(col, rsmd.getColumnDisplaySize(col));
 500             md.setColumnLabel(col, rsmd.getColumnLabel(col));
 501             md.setColumnName(col, rsmd.getColumnName(col));
 502             md.setSchemaName(col, rsmd.getSchemaName(col));
 503             md.setPrecision(col, rsmd.getPrecision(col));
 504             md.setScale(col, rsmd.getScale(col));
 505             md.setTableName(col, rsmd.getTableName(col));
 506             md.setCatalogName(col, rsmd.getCatalogName(col));
 507             md.setColumnType(col, rsmd.getColumnType(col));
 508             md.setColumnTypeName(col, rsmd.getColumnTypeName(col));
 509         }
 510     }
 511 
 512 
 513     protected void checkState() throws SQLException {
 514 
 515         // If all the three i.e.  conn, ps & rs are
 516         // simultaneously null implies we are not connected
 517         // to the db, implies undesirable state so throw exception
 518 
 519         if (conn == null && ps == null && rs == null ) {
 520             throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.invalstate").toString());
 521         }
 522     }
 523 
 524     //---------------------------------------------------------------------
 525     // Reading and writing data
 526     //---------------------------------------------------------------------
 527 
 528     /**
 529      * Creates the internal <code>ResultSet</code> object for which this
 530      * <code>JdbcRowSet</code> object is a wrapper, effectively
 531      * making the result set a JavaBeans component.
 532      * <P>
 533      * Certain properties must have been set before this method is called
 534      * so that it can establish a connection to a database and execute the
 535      * query that will create the result set.  If a <code>DataSource</code>
 536      * object will be used to create the connection, properties for the
 537      * data source name, user name, and password must be set.  If the
 538      * <code>DriverManager</code> will be used, the properties for the
 539      * URL, user name, and password must be set.  In either case, the
 540      * property for the command must be set.  If the command has placeholder
 541      * parameters, those must also be set. This method throws
 542      * an exception if the required properties are not set.
 543      * <P>
 544      * Other properties have default values that may optionally be set
 545      * to new values. The <code>execute</code> method will use the value
 546      * for the command property to create a <code>PreparedStatement</code>
 547      * object and set its properties (escape processing, maximum field
 548      * size, maximum number of rows, and query timeout limit) to be those
 549      * of this rowset.
 550      *
 551      * @throws SQLException if (1) a database access error occurs,
 552      * (2) any required JDBC properties are not set, or (3) if an
 553      * invalid connection exists.
 554      */
 555     public void execute() throws SQLException {
 556         /*
 557          * To execute based on the properties:
 558          * i) determine how to get a connection
 559          * ii) prepare the statement
 560          * iii) set the properties of the statement
 561          * iv) parse the params. and set them
 562          * v) execute the statement
 563          *
 564          * During all of this try to tolerate as many errors
 565          * as possible, many drivers will not support all of
 566          * the properties and will/should throw SQLException
 567          * at us...
 568          *
 569          */
 570 
 571         prepare();
 572 
 573         // set the properties of our shiny new statement
 574         setProperties(ps);
 575 
 576 
 577         // set the parameters
 578         decodeParams(getParams(), ps);
 579 
 580 
 581         // execute the statement
 582         rs = ps.executeQuery();
 583 
 584 
 585         // notify listeners
 586         notifyRowSetChanged();
 587 
 588 
 589     }
 590 
 591     protected void setProperties(PreparedStatement ps) throws SQLException {
 592 
 593         try {
 594             ps.setEscapeProcessing(getEscapeProcessing());
 595         } catch (SQLException ex) {
 596             System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setescapeprocessing").toString() +
 597                                 ex.getLocalizedMessage());
 598         }
 599 
 600         try {
 601             ps.setMaxFieldSize(getMaxFieldSize());
 602         } catch (SQLException ex) {
 603             System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setmaxfieldsize").toString() +
 604                                 ex.getLocalizedMessage());
 605         }
 606 
 607         try {
 608             ps.setMaxRows(getMaxRows());
 609         } catch (SQLException ex) {
 610            System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setmaxrows").toString() +
 611                                 ex.getLocalizedMessage());
 612         }
 613 
 614         try {
 615             ps.setQueryTimeout(getQueryTimeout());
 616         } catch (SQLException ex) {
 617            System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setquerytimeout").toString() +
 618                                 ex.getLocalizedMessage());
 619         }
 620 
 621     }
 622 
 623     // An alternate solution is required instead of having the
 624     // connect method as protected.
 625     // This is a work around to assist Rave Team
 626     // :ah
 627 
 628     protected Connection connect() throws SQLException {
 629 
 630         // Get a JDBC connection.
 631 
 632         // First check for Connection handle object as such if
 633         // "this" initialized  using conn.
 634 
 635         if(conn != null) {
 636             return conn;
 637 
 638         } else if (getDataSourceName() != null) {
 639 
 640             // Connect using JNDI.
 641             try {
 642                 Context ctx = new InitialContext();
 643                 DataSource ds = (DataSource)ctx.lookup
 644                     (getDataSourceName());
 645                 //return ds.getConnection(getUsername(),getPassword());
 646 
 647                 if(getUsername() != null && !getUsername().equals("")) {
 648                      return ds.getConnection(getUsername(),getPassword());
 649                 } else {
 650                      return ds.getConnection();
 651                 }
 652             }
 653             catch (javax.naming.NamingException ex) {
 654                 throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.connect").toString());
 655             }
 656 
 657         } else if (getUrl() != null) {
 658             // Check only for getUrl() != null because
 659             // user, passwd can be null
 660             // Connect using the driver manager.
 661 
 662             return DriverManager.getConnection
 663                     (getUrl(), getUsername(), getPassword());
 664         }
 665         else {
 666             return null;
 667         }
 668 
 669     }
 670 
 671     protected PreparedStatement prepare() throws SQLException {
 672         // get a connection
 673         conn = connect();
 674 
 675         try {
 676 
 677             Map<String, Class<?>> aMap = getTypeMap();
 678             if( aMap != null) {
 679                 conn.setTypeMap(aMap);
 680             }
 681             ps = conn.prepareStatement(getCommand(),ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
 682         } catch (SQLException ex) {
 683             System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.prepare").toString() +
 684                                 ex.getLocalizedMessage());
 685 
 686             if (ps != null)
 687                 ps.close();
 688             if (conn != null)
 689                 conn.close();
 690 
 691             throw new SQLException(ex.getMessage());
 692         }
 693 
 694         return ps;
 695     }
 696 
 697     @SuppressWarnings("deprecation")
 698     private void decodeParams(Object[] params, PreparedStatement ps)
 699     throws SQLException {
 700 
 701     // There is a corresponding decodeParams in JdbcRowSetImpl
 702     // which does the same as this method. This is a design flaw.
 703     // Update the CachedRowsetReader.decodeParams when you update
 704     // this method.
 705 
 706     // Adding the same comments to CachedRowsetReader.decodeParams.
 707 
 708         int arraySize;
 709         Object[] param = null;
 710 
 711         for (int i=0; i < params.length; i++) {
 712             if (params[i] instanceof Object[]) {
 713                 param = (Object[])params[i];
 714 
 715                 if (param.length == 2) {
 716                     if (param[0] == null) {
 717                         ps.setNull(i + 1, ((Integer)param[1]).intValue());
 718                         continue;
 719                     }
 720 
 721                     if (param[0] instanceof java.sql.Date ||
 722                         param[0] instanceof java.sql.Time ||
 723                         param[0] instanceof java.sql.Timestamp) {
 724                         System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.detecteddate"));
 725                         if (param[1] instanceof java.util.Calendar) {
 726                             System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.detectedcalendar"));
 727                             ps.setDate(i + 1, (java.sql.Date)param[0],
 728                                        (java.util.Calendar)param[1]);
 729                             continue;
 730                         }
 731                         else {
 732                             throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.paramtype").toString());
 733                         }
 734                     }
 735 
 736                     if (param[0] instanceof Reader) {
 737                         ps.setCharacterStream(i + 1, (Reader)param[0],
 738                                               ((Integer)param[1]).intValue());
 739                         continue;
 740                     }
 741 
 742                     /*
 743                      * What's left should be setObject(int, Object, scale)
 744                      */
 745                     if (param[1] instanceof Integer) {
 746                         ps.setObject(i + 1, param[0], ((Integer)param[1]).intValue());
 747                         continue;
 748                     }
 749 
 750                 } else if (param.length == 3) {
 751 
 752                     if (param[0] == null) {
 753                         ps.setNull(i + 1, ((Integer)param[1]).intValue(),
 754                                    (String)param[2]);
 755                         continue;
 756                     }
 757 
 758                     if (param[0] instanceof java.io.InputStream) {
 759                         switch (((Integer)param[2]).intValue()) {
 760                         case JdbcRowSetImpl.UNICODE_STREAM_PARAM:
 761                             ps.setUnicodeStream(i + 1,
 762                                                 (java.io.InputStream)param[0],
 763                                                 ((Integer)param[1]).intValue());
 764                         case JdbcRowSetImpl.BINARY_STREAM_PARAM:
 765                             ps.setBinaryStream(i + 1,
 766                                                (java.io.InputStream)param[0],
 767                                                ((Integer)param[1]).intValue());
 768                         case JdbcRowSetImpl.ASCII_STREAM_PARAM:
 769                             ps.setAsciiStream(i + 1,
 770                                               (java.io.InputStream)param[0],
 771                                               ((Integer)param[1]).intValue());
 772                         default:
 773                             throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.paramtype").toString());
 774                         }
 775                     }
 776 
 777                     /*
 778                      * no point at looking at the first element now;
 779                      * what's left must be the setObject() cases.
 780                      */
 781                     if (param[1] instanceof Integer && param[2] instanceof Integer) {
 782                         ps.setObject(i + 1, param[0], ((Integer)param[1]).intValue(),
 783                                      ((Integer)param[2]).intValue());
 784                         continue;
 785                     }
 786 
 787                     throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.paramtype").toString());
 788 
 789                 } else {
 790                     // common case - this catches all SQL92 types
 791                     ps.setObject(i + 1, params[i]);
 792                     continue;
 793                 }
 794             }  else {
 795                // Try to get all the params to be set here
 796                ps.setObject(i + 1, params[i]);
 797 
 798             }
 799         }
 800     }
 801 
 802     /**
 803      * Moves the cursor for this rowset's <code>ResultSet</code>
 804      * object down one row from its current position.
 805      * A <code>ResultSet</code> cursor is initially positioned
 806      * before the first row; the first call to the method
 807      * <code>next</code> makes the first row the current row; the
 808      * second call makes the second row the current row, and so on.
 809      *
 810      * <P>If an input stream is open for the current row, a call
 811      * to the method <code>next</code> will
 812      * implicitly close it. A <code>ResultSet</code> object's
 813      * warning chain is cleared when a new row is read.
 814      *
 815      * @return <code>true</code> if the new current row is valid;
 816      *         <code>false</code> if there are no more rows
 817      * @throws SQLException if a database access error occurs
 818      *            or this rowset does not currently have a valid connection,
 819      *            prepared statement, and result set
 820      */
 821     public boolean next() throws SQLException {
 822         checkState();
 823 
 824         boolean b = rs.next();
 825         notifyCursorMoved();
 826         return b;
 827     }
 828 
 829     /**
 830      * Releases this rowset's <code>ResultSet</code> object's database and
 831      * JDBC resources immediately instead of waiting for
 832      * this to happen when it is automatically closed.
 833      *
 834      * <P><B>Note:</B> A <code>ResultSet</code> object
 835      * is automatically closed by the
 836      * <code>Statement</code> object that generated it when
 837      * that <code>Statement</code> object is closed,
 838      * re-executed, or is used to retrieve the next result from a
 839      * sequence of multiple results. A <code>ResultSet</code> object
 840      * is also automatically closed when it is garbage collected.
 841      *
 842      * @throws SQLException if a database access error occurs
 843      */
 844     public void close() throws SQLException {
 845         if (rs != null)
 846             rs.close();
 847         if (ps != null)
 848             ps.close();
 849         if (conn != null)
 850             conn.close();
 851     }
 852 
 853     /**
 854      * Reports whether the last column read from this rowset's
 855      * <code>ResultSet</code> object had a value of SQL <code>NULL</code>.
 856      * Note that you must first call one of the <code>getXXX</code> methods
 857      * on a column to try to read its value and then call
 858      * the method <code>wasNull</code> to see if the value read was
 859      * SQL <code>NULL</code>.
 860      *
 861      * @return <code>true</code> if the last column value read was SQL
 862      *         <code>NULL</code> and <code>false</code> otherwise
 863      * @throws SQLException if a database access error occurs
 864      *            or this rowset does not have a currently valid connection,
 865      *            prepared statement, and result set
 866      */
 867     public boolean wasNull() throws SQLException {
 868         checkState();
 869 
 870         return rs.wasNull();
 871     }
 872 
 873     //======================================================================
 874     // Methods for accessing results by column index
 875     //======================================================================
 876 
 877     /**
 878      * Gets the value of the designated column in the current row
 879      * of this rowset's <code>ResultSet</code> object as
 880      * a <code>String</code>.
 881      *
 882      * @param columnIndex the first column is 1, the second is 2, and so on
 883      * @return the column value; if the value is SQL <code>NULL</code>, the
 884      * value returned is <code>null</code>
 885      * @throws SQLException if (1) a database access error occurs
 886      *            or (2) this rowset does not currently have a valid connection,
 887      *            prepared statement, and result set
 888      */
 889     public String getString(int columnIndex) throws SQLException {
 890         checkState();
 891 
 892         return rs.getString(columnIndex);
 893     }
 894 
 895     /**
 896      * Gets the value of the designated column in the current row
 897      * of this rowset's <code>ResultSet</code> object as
 898      * a <code>boolean</code>.
 899      *
 900      * @param columnIndex the first column is 1, the second is 2, and so on
 901      * @return the column value; if the value is SQL <code>NULL</code>, the
 902      * value returned is <code>false</code>
 903      * @throws SQLException if (1) a database access error occurs
 904      *            or (2) this rowset does not have a currently valid connection,
 905      *            prepared statement, and result set
 906      */
 907     public boolean getBoolean(int columnIndex) throws SQLException {
 908         checkState();
 909 
 910         return rs.getBoolean(columnIndex);
 911     }
 912 
 913     /**
 914      * Gets the value of the designated column in the current row
 915      * of this rowset's <code>ResultSet</code> object as
 916      * a <code>byte</code>.
 917      *
 918      * @param columnIndex the first column is 1, the second is 2, and so on
 919      * @return the column value; if the value is SQL <code>NULL</code>, the
 920      * value returned is <code>0</code>
 921      * @throws SQLException if (1) a database access error occurs
 922      *            or (2) this rowset does not have a currently valid connection,
 923      *            prepared statement, and result set
 924      */
 925     public byte getByte(int columnIndex) throws SQLException {
 926         checkState();
 927 
 928         return rs.getByte(columnIndex);
 929     }
 930 
 931     /**
 932      * Gets the value of the designated column in the current row
 933      * of this rowset's <code>ResultSet</code> object as
 934      * a <code>short</code>.
 935      *
 936      * @param columnIndex the first column is 1, the second is 2, and so on
 937      * @return the column value; if the value is SQL <code>NULL</code>, the
 938      * value returned is <code>0</code>
 939      * @throws SQLException if (1) a database access error occurs
 940      *            or (2) this rowset does not have a currently valid connection,
 941      *            prepared statement, and result set
 942      */
 943     public short getShort(int columnIndex) throws SQLException {
 944         checkState();
 945 
 946         return rs.getShort(columnIndex);
 947     }
 948 
 949     /**
 950      * Gets the value of the designated column in the current row
 951      * of this rowset's <code>ResultSet</code> object as
 952      * an <code>int</code>.
 953      *
 954      * @param columnIndex the first column is 1, the second is 2, and so on
 955      * @return the column value; if the value is SQL <code>NULL</code>, the
 956      * value returned is <code>0</code>
 957      * @throws SQLException if (1) a database access error occurs
 958      *            or (2) this rowset does not have a currently valid connection,
 959      *            prepared statement, and result set
 960      */
 961     public int getInt(int columnIndex) throws SQLException {
 962         checkState();
 963 
 964         return rs.getInt(columnIndex);
 965     }
 966 
 967     /**
 968      * Gets the value of the designated column in the current row
 969      * of this rowset's <code>ResultSet</code> object as
 970      * a <code>long</code>.
 971      *
 972      * @param columnIndex the first column is 1, the second is 2, and so on
 973      * @return the column value; if the value is SQL <code>NULL</code>, the
 974      * value returned is <code>0</code>
 975      * @throws SQLException if (1) a database access error occurs
 976      *            or (2) this rowset does not have a currently valid connection,
 977      *            prepared statement, and result set
 978      */
 979     public long getLong(int columnIndex) throws SQLException {
 980         checkState();
 981 
 982         return rs.getLong(columnIndex);
 983     }
 984 
 985     /**
 986      * Gets the value of the designated column in the current row
 987      * of this rowset's <code>ResultSet</code> object as
 988      * a <code>float</code>.
 989      *
 990      * @param columnIndex the first column is 1, the second is 2, and so on
 991      * @return the column value; if the value is SQL <code>NULL</code>, the
 992      * value returned is <code>0</code>
 993      * @throws SQLException if (1) a database access error occurs
 994      *            or (2) this rowset does not have a currently valid connection,
 995      *            prepared statement, and result set
 996      */
 997     public float getFloat(int columnIndex) throws SQLException {
 998         checkState();
 999 
1000         return rs.getFloat(columnIndex);
1001     }
1002 
1003     /**
1004      * Gets the value of the designated column in the current row
1005      * of this rowset's <code>ResultSet</code> object as
1006      * a <code>double</code>.
1007      *
1008      * @param columnIndex the first column is 1, the second is 2, and so on
1009      * @return the column value; if the value is SQL <code>NULL</code>, the
1010      * value returned is <code>0</code>
1011      * @throws SQLException if (1) a database access error occurs
1012      *            or (2) this rowset does not have a currently valid connection,
1013      *            prepared statement, and result set
1014      */
1015     public double getDouble(int columnIndex) throws SQLException {
1016         checkState();
1017 
1018         return rs.getDouble(columnIndex);
1019     }
1020 
1021     /**
1022      * Gets the value of the designated column in the current row
1023      * of this rowset's <code>ResultSet</code> object as
1024      * a <code>java.sql.BigDecimal</code>.
1025      *
1026      * @param columnIndex the first column is 1, the second is 2, and so on
1027      * @param scale the number of digits to the right of the decimal point
1028      * @return the column value; if the value is SQL <code>NULL</code>, the
1029      * value returned is <code>null</code>
1030      * @throws SQLException if (1) database access error occurs
1031      *            or (2) this rowset does not have a currently valid connection,
1032      *            prepared statement, and result set
1033      * @deprecated
1034      */
1035     public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException {
1036         checkState();
1037 
1038         return rs.getBigDecimal(columnIndex, scale);
1039     }
1040 
1041     /**
1042      * Gets the value of the designated column in the current row
1043      * of this rowset's <code>ResultSet</code> object as
1044      * a <code>byte</code> array in the Java programming language.
1045      * The bytes represent the raw values returned by the driver.
1046      *
1047      * @param columnIndex the first column is 1, the second is 2, and so on
1048      * @return the column value; if the value is SQL <code>NULL</code>, the
1049      * value returned is <code>null</code>
1050      * @throws SQLException if (1) a database access error occurs
1051      *            or (2) this rowset does not have a currently valid connection,
1052      *            prepared statement, and result set
1053      */
1054     public byte[] getBytes(int columnIndex) throws SQLException {
1055         checkState();
1056 
1057         return rs.getBytes(columnIndex);
1058     }
1059 
1060     /**
1061      * Gets the value of the designated column in the current row
1062      * of this rowset's <code>ResultSet</code> object as
1063      * a <code>java.sql.Date</code> object in the Java programming language.
1064      *
1065      * @param columnIndex the first column is 1, the second is 2, and so on
1066      * @return the column value; if the value is SQL <code>NULL</code>, the
1067      * value returned is <code>null</code>
1068      * @throws SQLException if (1) a database access error occurs
1069      *            or (2) this rowset does not have a currently valid connection,
1070      *            prepared statement, and result set
1071      */
1072     public java.sql.Date getDate(int columnIndex) throws SQLException {
1073         checkState();
1074 
1075         return rs.getDate(columnIndex);
1076     }
1077 
1078     /**
1079      * Gets the value of the designated column in the current row
1080      * of this rowset's <code>ResultSet</code> object as
1081      * a <code>java.sql.Time</code> object in the Java programming language.
1082      *
1083      * @param columnIndex the first column is 1, the second is 2, and so on
1084      * @return the column value; if the value is SQL <code>NULL</code>, the
1085      * value returned is <code>null</code>
1086      * @throws SQLException if (1) a database access error occurs
1087      *            or (2) this rowset does not have a currently valid connection,
1088      *            prepared statement, and result set
1089      */
1090     public java.sql.Time getTime(int columnIndex) throws SQLException {
1091         checkState();
1092 
1093         return rs.getTime(columnIndex);
1094     }
1095 
1096     /**
1097      * Gets the value of the designated column in the current row
1098      * of this rowset's <code>ResultSet</code> object as
1099      * a <code>java.sql.Timestamp</code> object in the Java programming language.
1100      *
1101      * @param columnIndex the first column is 1, the second is 2, and so on
1102      * @return the column value; if the value is SQL <code>NULL</code>, the
1103      * value returned is <code>null</code>
1104      * @throws SQLException if (1) a database access error occurs
1105      *            or (2) this rowset does not have a currently valid connection,
1106      *            prepared statement, and result set
1107      */
1108     public java.sql.Timestamp getTimestamp(int columnIndex) throws SQLException {
1109         checkState();
1110 
1111         return rs.getTimestamp(columnIndex);
1112     }
1113 
1114     /**
1115      * Gets the value of the designated column in the current row
1116      * of this rowset's <code>ResultSet</code> object as
1117      * a stream of ASCII characters. The value can then be read in chunks from the
1118      * stream. This method is particularly
1119      * suitable for retrieving large <code>LONGVARCHAR</code> values.
1120      * The JDBC driver will
1121      * do any necessary conversion from the database format into ASCII.
1122      *
1123      * <P><B>Note:</B> All the data in the returned stream must be
1124      * read prior to getting the value of any other column. The next
1125      * call to a <code>getXXX</code> method implicitly closes the stream.  Also, a
1126      * stream may return <code>0</code> when the method
1127      * <code>InputStream.available</code>
1128      * is called whether there is data available or not.
1129      *
1130      * @param columnIndex the first column is 1, the second is 2, and so on
1131      * @return a Java input stream that delivers the database column value
1132      * as a stream of one-byte ASCII characters;
1133      * if the value is SQL <code>NULL</code>, the
1134      * value returned is <code>null</code>
1135      * @throws SQLException if (1) database access error occurs
1136      *            (2) this rowset does not have a currently valid connection,
1137      *            prepared statement, and result set
1138      */
1139     public java.io.InputStream getAsciiStream(int columnIndex) throws SQLException {
1140         checkState();
1141 
1142         return rs.getAsciiStream(columnIndex);
1143     }
1144 
1145     /**
1146      * Gets the value of the designated column in the current row
1147      * of this rowset's <code>ResultSet</code> object as
1148      * as a stream of Unicode characters.
1149      * The value can then be read in chunks from the
1150      * stream. This method is particularly
1151      * suitable for retrieving large<code>LONGVARCHAR</code>values.  The JDBC driver will
1152      * do any necessary conversion from the database format into Unicode.
1153      * The byte format of the Unicode stream must be Java UTF-8,
1154      * as specified in the Java virtual machine specification.
1155      *
1156      * <P><B>Note:</B> All the data in the returned stream must be
1157      * read prior to getting the value of any other column. The next
1158      * call to a <code>getXXX</code> method implicitly closes the stream.  Also, a
1159      * stream may return <code>0</code> when the method
1160      * <code>InputStream.available</code>
1161      * is called whether there is data available or not.
1162      *
1163      * @param columnIndex the first column is 1, the second is 2, and so on
1164      * @return a Java input stream that delivers the database column value
1165      * as a stream in Java UTF-8 byte format;
1166      * if the value is SQL <code>NULL</code>, the value returned is <code>null</code>
1167      * @throws SQLException if (1) a database access error occurs
1168      *            or (2) this rowset does not have a currently valid connection,
1169      *            prepared statement, and result set
1170      * @deprecated use <code>getCharacterStream</code> in place of
1171      *              <code>getUnicodeStream</code>
1172      */
1173     public java.io.InputStream getUnicodeStream(int columnIndex) throws SQLException {
1174         checkState();
1175 
1176         return rs.getUnicodeStream(columnIndex);
1177     }
1178 
1179     /**
1180      * Gets the value of a column in the current row as a stream of
1181      * the value of the designated column in the current row
1182      * of this rowset's <code>ResultSet</code> object as a binary stream of
1183      * uninterpreted bytes. The value can then be read in chunks from the
1184      * stream. This method is particularly
1185      * suitable for retrieving large <code>LONGVARBINARY</code> values.
1186      *
1187      * <P><B>Note:</B> All the data in the returned stream must be
1188      * read prior to getting the value of any other column. The next
1189      * call to a <code>getXXX</code> method implicitly closes the stream.  Also, a
1190      * stream may return <code>0</code> when the method
1191      * <code>InputStream.available</code>
1192      * is called whether there is data available or not.
1193      *
1194      * @param columnIndex the first column is 1, the second is 2, and so on
1195      * @return a Java input stream that delivers the database column value
1196      * as a stream of uninterpreted bytes;
1197      * if the value is SQL <code>NULL</code>, the value returned is <code>null</code>
1198      * @throws SQLException if (1) a database access error occurs
1199      *            or (2) this rowset does not have a currently valid connection,
1200      *            prepared statement, and result set
1201      */
1202     public java.io.InputStream getBinaryStream(int columnIndex) throws SQLException {
1203         checkState();
1204 
1205         return rs.getBinaryStream(columnIndex);
1206     }
1207 
1208 
1209     //======================================================================
1210     // Methods for accessing results by column name
1211     //======================================================================
1212 
1213     /**
1214      * Gets the value of the designated column in the current row
1215      * of this rowset's <code>ResultSet</code> object as
1216      * a <code>String</code>.
1217      *
1218      * @param columnName the SQL name of the column
1219      * @return the column value; if the value is SQL <code>NULL</code>, the
1220      * value returned is <code>null</code>
1221      * @throws SQLException if (1) a database access error occurs
1222      *            or (2) this rowset does not have a currently valid connection,
1223      *            prepared statement, and result set
1224      */
1225     public String getString(String columnName) throws SQLException {
1226         return getString(findColumn(columnName));
1227     }
1228 
1229     /**
1230      * Gets the value of the designated column in the current row
1231      * of this rowset's <code>ResultSet</code> object as
1232      * a <code>boolean</code>.
1233      *
1234      * @param columnName the SQL name of the column
1235      * @return the column value; if the value is SQL <code>NULL</code>, the
1236      * value returned is <code>false</code>
1237      * @throws SQLException if (1) a database access error occurs
1238      *            or (2) this rowset does not have a currently valid connection,
1239      *            prepared statement, and result set
1240      */
1241     public boolean getBoolean(String columnName) throws SQLException {
1242         return getBoolean(findColumn(columnName));
1243     }
1244 
1245     /**
1246      * Gets the value of the designated column in the current row
1247      * of this rowset's <code>ResultSet</code> object as
1248      * a <code>byte</code>.
1249      *
1250      * @param columnName the SQL name of the column
1251      * @return the column value; if the value is SQL <code>NULL</code>, the
1252      * value returned is <code>0</code>
1253      * @throws SQLException if (1) a database access error occurs
1254      *            or (2) this rowset does not have a currently valid connection,
1255      *            prepared statement, and result set
1256      */
1257     public byte getByte(String columnName) throws SQLException {
1258         return getByte(findColumn(columnName));
1259     }
1260 
1261     /**
1262      * Gets the value of the designated column in the current row
1263      * of this rowset's <code>ResultSet</code> object as
1264      * a <code>short</code>.
1265      *
1266      * @param columnName the SQL name of the column
1267      * @return the column value; if the value is SQL <code>NULL</code>, the
1268      * value returned is <code>0</code>
1269      * @throws SQLException if (1) a database access error occurs
1270      *            or (2) this rowset does not have a currently valid connection,
1271      *            prepared statement, and result set
1272      */
1273     public short getShort(String columnName) throws SQLException {
1274         return getShort(findColumn(columnName));
1275     }
1276 
1277     /**
1278      * Gets the value of the designated column in the current row
1279      * of this rowset's <code>ResultSet</code> object as
1280      * an <code>int</code>.
1281      *
1282      * @param columnName the SQL name of the column
1283      * @return the column value; if the value is SQL <code>NULL</code>, the
1284      * value returned is <code>0</code>
1285      * @throws SQLException if (1) a database access error occurs
1286      *            or (2) this rowset does not have a currently valid connection,
1287      *            prepared statement, and result set
1288      */
1289     public int getInt(String columnName) throws SQLException {
1290         return getInt(findColumn(columnName));
1291     }
1292 
1293     /**
1294      * Gets the value of the designated column in the current row
1295      * of this rowset's <code>ResultSet</code> object as
1296      * a <code>long</code>.
1297      *
1298      * @param columnName the SQL name of the column
1299      * @return the column value; if the value is SQL <code>NULL</code>, the
1300      * value returned is <code>0</code>
1301      * @throws SQLException if a database access error occurs
1302      *            or this rowset does not have a currently valid connection,
1303      *            prepared statement, and result set
1304      */
1305     public long getLong(String columnName) throws SQLException {
1306         return getLong(findColumn(columnName));
1307     }
1308 
1309     /**
1310      * Gets the value of the designated column in the current row
1311      * of this rowset's <code>ResultSet</code> object as
1312      * a <code>float</code>.
1313      *
1314      * @param columnName the SQL name of the column
1315      * @return the column value; if the value is SQL <code>NULL</code>, the
1316      * value returned is <code>0</code>
1317      * @throws SQLException if (1) a database access error occurs
1318      *            or (2) this rowset does not have a currently valid connection,
1319      *            prepared statement, and result set
1320      */
1321     public float getFloat(String columnName) throws SQLException {
1322         return getFloat(findColumn(columnName));
1323     }
1324 
1325     /**
1326      * Gets the value of the designated column in the current row
1327      * of this rowset's <code>ResultSet</code> object as
1328      * a <code>double</code>.
1329      *
1330      * @param columnName the SQL name of the column
1331      * @return the column value; if the value is SQL <code>NULL</code>, the
1332      * value returned is <code>0</code>
1333      * @throws SQLException if (1) a database access error occurs
1334      *            or (2) this rowset does not have a currently valid connection,
1335      *            prepared statement, and result set
1336      */
1337     public double getDouble(String columnName) throws SQLException {
1338         return getDouble(findColumn(columnName));
1339     }
1340 
1341     /**
1342      * Gets the value of the designated column in the current row
1343      * of this rowset's <code>ResultSet</code> object as
1344      * a <code>java.math.BigDecimal</code>.
1345      *
1346      * @param columnName the SQL name of the column
1347      * @param scale the number of digits to the right of the decimal point
1348      * @return the column value; if the value is SQL <code>NULL</code>, the
1349      * value returned is <code>null</code>
1350      * @throws SQLException if (1) adatabase access error occurs
1351      *            or (2) this rowset does not have a currently valid connection,
1352      *            prepared statement, and result set
1353      * @deprecated
1354      */
1355     public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException {
1356         return getBigDecimal(findColumn(columnName), scale);
1357     }
1358 
1359     /**
1360      * Gets the value of the designated column in the current row
1361      * of this rowset's <code>ResultSet</code> object as
1362      * a <code>byte</code> array in the Java programming language.
1363      * The bytes represent the raw values returned by the driver.
1364      *
1365      * @param columnName the SQL name of the column
1366      * @return the column value; if the value is SQL <code>NULL</code>, the
1367      * value returned is <code>null</code>
1368      * @throws SQLException if (1) a database access error occurs
1369      *            or (2) this rowset does not have a currently valid connection,
1370      *            prepared statement, and result set
1371      */
1372     public byte[] getBytes(String columnName) throws SQLException {
1373         return getBytes(findColumn(columnName));
1374     }
1375 
1376     /**
1377      * Gets the value of the designated column in the current row
1378      * of this rowset's <code>ResultSet</code> object as
1379      * a <code>java.sql.Date</code> object in the Java programming language.
1380      *
1381      * @param columnName the SQL name of the column
1382      * @return the column value; if the value is SQL <code>NULL</code>, the
1383      * value returned is <code>null</code>
1384      * @throws SQLException if (1) a database access error occurs
1385      *            or (2) this rowset does not have a currently valid connection,
1386      *            prepared statement, and result set
1387      */
1388     public java.sql.Date getDate(String columnName) throws SQLException {
1389         return getDate(findColumn(columnName));
1390     }
1391 
1392     /**
1393      * Gets the value of the designated column in the current row
1394      * of this rowset's <code>ResultSet</code> object as
1395      * a <code>java.sql.Time</code> object in the Java programming language.
1396      *
1397      * @param columnName the SQL name of the column
1398      * @return the column value;
1399      * if the value is SQL <code>NULL</code>,
1400      * the value returned is <code>null</code>
1401      * @throws SQLException if (1) a database access error occurs
1402      *            or (2) this rowset does not have a currently valid connection,
1403      *            prepared statement, and result set
1404      */
1405     public java.sql.Time getTime(String columnName) throws SQLException {
1406         return getTime(findColumn(columnName));
1407     }
1408 
1409     /**
1410      * Gets the value of the designated column in the current row
1411      * of this rowset's <code>ResultSet</code> object as
1412      * a <code>java.sql.Timestamp</code> object.
1413      *
1414      * @param columnName the SQL name of the column
1415      * @return the column value; if the value is SQL <code>NULL</code>, the
1416      * value returned is <code>null</code>
1417      * @throws SQLException if (1) a database access error occurs
1418      *            or (2) this rowset does not have a currently valid connection,
1419      *            prepared statement, and result set
1420      */
1421     public java.sql.Timestamp getTimestamp(String columnName) throws SQLException {
1422         return getTimestamp(findColumn(columnName));
1423     }
1424 
1425     /**
1426      * Gets the value of the designated column in the current row
1427      * of this rowset's <code>ResultSet</code> object as a stream of
1428      * ASCII characters. The value can then be read in chunks from the
1429      * stream. This method is particularly
1430      * suitable for retrieving large <code>LONGVARCHAR</code> values.
1431      * The JDBC driver will
1432      * do any necessary conversion from the database format into ASCII.
1433      *
1434      * <P><B>Note:</B> All the data in the returned stream must be
1435      * read prior to getting the value of any other column. The next
1436      * call to a <code>getXXX</code> method implicitly closes the stream. Also, a
1437      * stream may return <code>0</code> when the method <code>available</code>
1438      * is called whether there is data available or not.
1439      *
1440      * @param columnName the SQL name of the column
1441      * @return a Java input stream that delivers the database column value
1442      * as a stream of one-byte ASCII characters.
1443      * If the value is SQL <code>NULL</code>,
1444      * the value returned is <code>null</code>.
1445      * @throws SQLException if (1) a database access error occurs
1446      *            or (2) this rowset does not have a currently valid connection,
1447      *            prepared statement, and result set
1448      */
1449     public java.io.InputStream getAsciiStream(String columnName) throws SQLException {
1450         return getAsciiStream(findColumn(columnName));
1451     }
1452 
1453     /**
1454      * Gets the value of the designated column in the current row
1455      * of this rowset's <code>ResultSet</code> object as a stream of
1456      * Unicode characters. The value can then be read in chunks from the
1457      * stream. This method is particularly
1458      * suitable for retrieving large <code>LONGVARCHAR</code> values.
1459      * The JDBC driver will
1460      * do any necessary conversion from the database format into Unicode.
1461      * The byte format of the Unicode stream must be Java UTF-8,
1462      * as defined in the Java virtual machine specification.
1463      *
1464      * <P><B>Note:</B> All the data in the returned stream must be
1465      * read prior to getting the value of any other column. The next
1466      * call to a <code>getXXX</code> method implicitly closes the stream. Also, a
1467      * stream may return <code>0</code> when the method <code>available</code>
1468      * is called whether there is data available or not.
1469      *
1470      * @param columnName the SQL name of the column
1471      * @return a Java input stream that delivers the database column value
1472      * as a stream of two-byte Unicode characters.
1473      * If the value is SQL <code>NULL</code>,
1474      * the value returned is <code>null</code>.
1475      * @throws SQLException if (1) a database access error occurs
1476      *            or (2) this rowset does not have a currently valid connection,
1477      *            prepared statement, and result set
1478      * @deprecated
1479      */
1480     public java.io.InputStream getUnicodeStream(String columnName) throws SQLException {
1481         return getUnicodeStream(findColumn(columnName));
1482     }
1483 
1484     /**
1485      * Gets the value of the designated column in the current row
1486      * of this rowset's <code>ResultSet</code> object as a stream of uninterpreted
1487      * <code>byte</code>s.
1488      * The value can then be read in chunks from the
1489      * stream. This method is particularly
1490      * suitable for retrieving large <code>LONGVARBINARY</code>
1491      * values.
1492      *
1493      * <P><B>Note:</B> All the data in the returned stream must be
1494      * read prior to getting the value of any other column. The next
1495      * call to a <code>getXXX</code> method implicitly closes the stream. Also, a
1496      * stream may return <code>0</code> when the method <code>available</code>
1497      * is called whether there is data available or not.
1498      *
1499      * @param columnName the SQL name of the column
1500      * @return a Java input stream that delivers the database column value
1501      * as a stream of uninterpreted bytes;
1502      * if the value is SQL <code>NULL</code>, the result is <code>null</code>
1503      * @throws SQLException if (1) a database access error occurs
1504      *            or (2) this rowset does not have a currently valid connection,
1505      *            prepared statement, and result set
1506      */
1507     public java.io.InputStream getBinaryStream(String columnName) throws SQLException {
1508         return getBinaryStream(findColumn(columnName));
1509     }
1510 
1511 
1512     //=====================================================================
1513     // Advanced features:
1514     //=====================================================================
1515 
1516     /**
1517      * Returns the first warning reported by calls on this rowset's
1518      * <code>ResultSet</code> object.
1519      * Subsequent warnings on this rowset's <code>ResultSet</code> object
1520      * will be chained to the <code>SQLWarning</code> object that
1521      * this method returns.
1522      *
1523      * <P>The warning chain is automatically cleared each time a new
1524      * row is read.
1525      *
1526      * <P><B>Note:</B> This warning chain only covers warnings caused
1527      * by <code>ResultSet</code> methods.  Any warning caused by
1528      * <code>Statement</code> methods
1529      * (such as reading OUT parameters) will be chained on the
1530      * <code>Statement</code> object.
1531      *
1532      * @return the first <code>SQLWarning</code> object reported or <code>null</code>
1533      * @throws SQLException if (1) a database access error occurs
1534      *            or (2) this rowset does not have a currently valid connection,
1535      *            prepared statement, and result set
1536      */
1537     public SQLWarning getWarnings() throws SQLException {
1538         checkState();
1539 
1540         return rs.getWarnings();
1541     }
1542 
1543     /**
1544      * Clears all warnings reported on this rowset's <code>ResultSet</code> object.
1545      * After this method is called, the method <code>getWarnings</code>
1546      * returns <code>null</code> until a new warning is
1547      * reported for this rowset's <code>ResultSet</code> object.
1548      *
1549      * @throws SQLException if (1) a database access error occurs
1550      *            or (2) this rowset does not have a currently valid connection,
1551      *            prepared statement, and result set
1552      */
1553     public void clearWarnings() throws SQLException {
1554         checkState();
1555 
1556         rs.clearWarnings();
1557     }
1558 
1559     /**
1560      * Gets the name of the SQL cursor used by this rowset's <code>ResultSet</code>
1561      * object.
1562      *
1563      * <P>In SQL, a result table is retrieved through a cursor that is
1564      * named. The current row of a result set can be updated or deleted
1565      * using a positioned update/delete statement that references the
1566      * cursor name. To insure that the cursor has the proper isolation
1567      * level to support update, the cursor's <code>select</code> statement should be
1568      * of the form 'select for update'. If the 'for update' clause is
1569      * omitted, the positioned updates may fail.
1570      *
1571      * <P>The JDBC API supports this SQL feature by providing the name of the
1572      * SQL cursor used by a <code>ResultSet</code> object.
1573      * The current row of a <code>ResultSet</code> object
1574      * is also the current row of this SQL cursor.
1575      *
1576      * <P><B>Note:</B> If positioned update is not supported, a
1577      * <code>SQLException</code> is thrown.
1578      *
1579      * @return the SQL name for this rowset's <code>ResultSet</code> object's cursor
1580      * @throws SQLException if (1) a database access error occurs
1581      *            or (2) xthis rowset does not have a currently valid connection,
1582      *            prepared statement, and result set
1583      */
1584     public String getCursorName() throws SQLException {
1585         checkState();
1586 
1587         return rs.getCursorName();
1588     }
1589 
1590     /**
1591      * Retrieves the  number, types and properties of
1592      * this rowset's <code>ResultSet</code> object's columns.
1593      *
1594      * @return the description of this rowset's <code>ResultSet</code>
1595      *     object's columns
1596      * @throws SQLException if (1) a database access error occurs
1597      *     or (2) this rowset does not have a currently valid connection,
1598      *     prepared statement, and result set
1599      */
1600     public ResultSetMetaData getMetaData() throws SQLException {
1601 
1602         checkState();
1603 
1604         // It may be the case that JdbcRowSet might not have been
1605         // initialized with ResultSet handle and may be by PreparedStatement
1606         // internally when we set JdbcRowSet.setCommand().
1607         // We may require all the basic properties of setEscapeProcessing
1608         // setMaxFieldSize etc. which an application can use before we call
1609         // execute.
1610         try {
1611              checkState();
1612         } catch(SQLException sqle) {
1613              prepare();
1614              // will return ResultSetMetaData
1615              return ps.getMetaData();
1616         }
1617         return rs.getMetaData();
1618     }
1619 
1620     /**
1621      * <p>Gets the value of the designated column in the current row
1622      * of this rowset's <code>ResultSet</code> object as
1623      * an <code>Object</code>.
1624      *
1625      * <p>This method will return the value of the given column as a
1626      * Java object.  The type of the Java object will be the default
1627      * Java object type corresponding to the column's SQL type,
1628      * following the mapping for built-in types specified in the JDBC
1629      * specification.
1630      *
1631      * <p>This method may also be used to read datatabase-specific
1632      * abstract data types.
1633      *
1634      * In the JDBC 3.0 API, the behavior of method
1635      * <code>getObject</code> is extended to materialize
1636      * data of SQL user-defined types.  When a column contains
1637      * a structured or distinct value, the behavior of this method is as
1638      * if it were a call to: <code>getObject(columnIndex,
1639      * this.getStatement().getConnection().getTypeMap())</code>.
1640      *
1641      * @param columnIndex the first column is 1, the second is 2, and so on
1642      * @return a <code>java.lang.Object</code> holding the column value
1643      * @throws SQLException if (1) a database access error occurs
1644      *            or (2) this rowset does not currently have a valid connection,
1645      *            prepared statement, and result set
1646      */
1647     public Object getObject(int columnIndex) throws SQLException {
1648         checkState();
1649 
1650         return rs.getObject(columnIndex);
1651     }
1652 
1653     /**
1654      * <p>Gets the value of the designated column in the current row
1655      * of this rowset's <code>ResultSet</code> object as
1656      * an <code>Object</code>.
1657      *
1658      * <p>This method will return the value of the given column as a
1659      * Java object.  The type of the Java object will be the default
1660      * Java object type corresponding to the column's SQL type,
1661      * following the mapping for built-in types specified in the JDBC
1662      * specification.
1663      *
1664      * <p>This method may also be used to read datatabase-specific
1665      * abstract data types.
1666      *
1667      * In the JDBC 3.0 API, the behavior of the method
1668      * <code>getObject</code> is extended to materialize
1669      * data of SQL user-defined types.  When a column contains
1670      * a structured or distinct value, the behavior of this method is as
1671      * if it were a call to: <code>getObject(columnIndex,
1672      * this.getStatement().getConnection().getTypeMap())</code>.
1673      *
1674      * @param columnName the SQL name of the column
1675      * @return a <code>java.lang.Object</code> holding the column value
1676      * @throws SQLException if (1) a database access error occurs
1677      *            or (2) this rowset does not currently have a valid connection,
1678      *            prepared statement, and result set
1679      */
1680     public Object getObject(String columnName) throws SQLException {
1681         return getObject(findColumn(columnName));
1682     }
1683 
1684     //----------------------------------------------------------------
1685 
1686     /**
1687      * Maps the given <code>JdbcRowSetImpl</code> column name to its
1688      * <code>JdbcRowSetImpl</code> column index and reflects this on
1689      * the internal <code>ResultSet</code> object.
1690      *
1691      * @param columnName the name of the column
1692      * @return the column index of the given column name
1693      * @throws SQLException if (1) a database access error occurs
1694      * (2) this rowset does not have a currently valid connection,
1695      * prepared statement, and result set
1696      */
1697     public int findColumn(String columnName) throws SQLException {
1698         checkState();
1699 
1700         return rs.findColumn(columnName);
1701     }
1702 
1703 
1704     //--------------------------JDBC 2.0-----------------------------------
1705 
1706     //---------------------------------------------------------------------
1707     // Getters and Setters
1708     //---------------------------------------------------------------------
1709 
1710     /**
1711      * Gets the value of the designated column in the current row
1712      * of this rowset's <code>ResultSet</code> object as a
1713      * <code>java.io.Reader</code> object.
1714      * @return a <code>java.io.Reader</code> object that contains the column
1715      * value; if the value is SQL <code>NULL</code>, the value returned is
1716      * <code>null</code>.
1717      * @param columnIndex the first column is 1, the second is 2, and so on
1718      *
1719      */
1720     public java.io.Reader getCharacterStream(int columnIndex) throws SQLException {
1721         checkState();
1722 
1723         return rs.getCharacterStream(columnIndex);
1724     }
1725 
1726     /**
1727      * Gets the value of the designated column in the current row
1728      * of this rowset's <code>ResultSet</code> object as a
1729      * <code>java.io.Reader</code> object.
1730      *
1731      * @return a <code>java.io.Reader</code> object that contains the column
1732      * value; if the value is SQL <code>NULL</code>, the value returned is
1733      * <code>null</code>.
1734      * @param columnName the name of the column
1735      * @return the value in the specified column as a <code>java.io.Reader</code>
1736      *
1737      */
1738     public java.io.Reader getCharacterStream(String columnName) throws SQLException {
1739         return getCharacterStream(findColumn(columnName));
1740     }
1741 
1742     /**
1743      * Gets the value of the designated column in the current row
1744      * of this rowset's <code>ResultSet</code> object as a
1745      * <code>java.math.BigDecimal</code> with full precision.
1746      *
1747      * @param columnIndex the first column is 1, the second is 2, and so on
1748      * @return the column value (full precision);
1749      * if the value is SQL <code>NULL</code>, the value returned is
1750      * <code>null</code>.
1751      * @throws SQLException if a database access error occurs
1752      *            or this rowset does not currently have a valid
1753      *            connection, prepared statement, and result set
1754      */
1755     public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
1756         checkState();
1757 
1758         return rs.getBigDecimal(columnIndex);
1759     }
1760 
1761     /**
1762      * Gets the value of the designated column in the current row
1763      * of this rowset's <code>ResultSet</code> object as a
1764      * <code>java.math.BigDecimal</code> with full precision.
1765      *
1766      * @param columnName the column name
1767      * @return the column value (full precision);
1768      * if the value is SQL <code>NULL</code>, the value returned is
1769      * <code>null</code>.
1770      * @throws SQLException if a database access error occurs
1771      *            or this rowset does not currently have a valid
1772      *            connection, prepared statement, and result set
1773      */
1774     public BigDecimal getBigDecimal(String columnName) throws SQLException {
1775         return getBigDecimal(findColumn(columnName));
1776     }
1777 
1778     //---------------------------------------------------------------------
1779     // Traversal/Positioning
1780     //---------------------------------------------------------------------
1781 
1782     /**
1783      * Indicates whether the cursor is before the first row in
1784      * this rowset's <code>ResultSet</code> object.
1785      *
1786      * @return <code>true</code> if the cursor is before the first row;
1787      * <code>false</code> if the cursor is at any other position or the
1788      * result set contains no rows
1789      * @throws SQLException if a database access error occurs
1790      *            or this rowset does not currently have a valid
1791      *            connection, prepared statement, and result set
1792      */
1793     public boolean isBeforeFirst() throws SQLException {
1794         checkState();
1795 
1796         return rs.isBeforeFirst();
1797     }
1798 
1799     /**
1800      * Indicates whether the cursor is after the last row in
1801      * this rowset's <code>ResultSet</code> object.
1802      *
1803      * @return <code>true</code> if the cursor is after the last row;
1804      * <code>false</code> if the cursor is at any other position or the
1805      * result set contains no rows
1806      * @throws SQLException if a database access error occurs
1807      *            or this rowset does not currently have a valid
1808      *            connection, prepared statement, and result set
1809      */
1810     public boolean isAfterLast() throws SQLException {
1811         checkState();
1812 
1813         return rs.isAfterLast();
1814     }
1815 
1816     /**
1817      * Indicates whether the cursor is on the first row of
1818      * this rowset's <code>ResultSet</code> object.
1819      *
1820      * @return <code>true</code> if the cursor is on the first row;
1821      * <code>false</code> otherwise
1822      * @throws SQLException if a database access error occurs
1823      *            or this rowset does not currently have a valid
1824      *            connection, prepared statement, and result set
1825      */
1826     public boolean isFirst() throws SQLException {
1827         checkState();
1828 
1829         return rs.isFirst();
1830     }
1831 
1832     /**
1833      * Indicates whether the cursor is on the last row of
1834      * this rowset's <code>ResultSet</code> object.
1835      * Note: Calling the method <code>isLast</code> may be expensive
1836      * because the JDBC driver
1837      * might need to fetch ahead one row in order to determine
1838      * whether the current row is the last row in the result set.
1839      *
1840      * @return <code>true</code> if the cursor is on the last row;
1841      * <code>false</code> otherwise
1842      * @throws SQLException if a database access error occurs
1843      *            or this rowset does not currently have a valid
1844      *            connection, prepared statement, and result set
1845      *
1846      */
1847     public boolean isLast() throws SQLException {
1848         checkState();
1849 
1850         return rs.isLast();
1851     }
1852 
1853     /**
1854      * Moves the cursor to the front of
1855      * this rowset's <code>ResultSet</code> object, just before the
1856      * first row. This method has no effect if the result set contains no rows.
1857      *
1858      * @throws SQLException if (1) a database access error occurs,
1859      *            (2) the result set type is <code>TYPE_FORWARD_ONLY</code>,
1860      *            or (3) this rowset does not currently have a valid
1861      *            connection, prepared statement, and result set
1862      */
1863     public void beforeFirst() throws SQLException {
1864         checkState();
1865 
1866         rs.beforeFirst();
1867         notifyCursorMoved();
1868     }
1869 
1870     /**
1871      * Moves the cursor to the end of
1872      * this rowset's <code>ResultSet</code> object, just after the
1873      * last row. This method has no effect if the result set contains no rows.
1874      * @throws SQLException if (1) a database access error occurs,
1875      *            (2) the result set type is <code>TYPE_FORWARD_ONLY</code>,
1876      *            or (3) this rowset does not currently have a valid
1877      *            connection, prepared statement, and result set
1878      */
1879     public void afterLast() throws SQLException {
1880         checkState();
1881 
1882         rs.afterLast();
1883         notifyCursorMoved();
1884     }
1885 
1886     /**
1887      * Moves the cursor to the first row in
1888      * this rowset's <code>ResultSet</code> object.
1889      *
1890      * @return <code>true</code> if the cursor is on a valid row;
1891      * <code>false</code> if there are no rows in the result set
1892      * @throws SQLException if (1) a database access error occurs,
1893      *            (2) the result set type is <code>TYPE_FORWARD_ONLY</code>,
1894      *            or (3) this rowset does not currently have a valid
1895      *            connection, prepared statement, and result set
1896      */
1897     public boolean first() throws SQLException {
1898         checkState();
1899 
1900         boolean b = rs.first();
1901         notifyCursorMoved();
1902         return b;
1903 
1904     }
1905 
1906     /**
1907      * Moves the cursor to the last row in
1908      * this rowset's <code>ResultSet</code> object.
1909      *
1910      * @return <code>true</code> if the cursor is on a valid row;
1911      * <code>false</code> if there are no rows in the result set
1912      * @throws SQLException if (1) a database access error occurs,
1913      *            (2) the result set type is <code>TYPE_FORWARD_ONLY</code>,
1914      *            or (3) this rowset does not currently have a valid
1915      *            connection, prepared statement, and result set
1916      */
1917     public boolean last() throws SQLException {
1918         checkState();
1919 
1920         boolean b = rs.last();
1921         notifyCursorMoved();
1922         return b;
1923     }
1924 
1925     /**
1926      * Retrieves the current row number.  The first row is number 1, the
1927      * second is number 2, and so on.
1928      *
1929      * @return the current row number; <code>0</code> if there is no current row
1930      * @throws SQLException if a database access error occurs
1931      *            or this rowset does not currently have a valid connection,
1932      *            prepared statement, and result set
1933      */
1934     public int getRow() throws SQLException {
1935         checkState();
1936 
1937         return rs.getRow();
1938     }
1939 
1940     /**
1941      * Moves the cursor to the given row number in
1942      * this rowset's internal <code>ResultSet</code> object.
1943      *
1944      * <p>If the row number is positive, the cursor moves to
1945      * the given row number with respect to the
1946      * beginning of the result set.  The first row is row 1, the second
1947      * is row 2, and so on.
1948      *
1949      * <p>If the given row number is negative, the cursor moves to
1950      * an absolute row position with respect to
1951      * the end of the result set.  For example, calling the method
1952      * <code>absolute(-1)</code> positions the
1953      * cursor on the last row, calling the method <code>absolute(-2)</code>
1954      * moves the cursor to the next-to-last row, and so on.
1955      *
1956      * <p>An attempt to position the cursor beyond the first/last row in
1957      * the result set leaves the cursor before the first row or after
1958      * the last row.
1959      *
1960      * <p><B>Note:</B> Calling <code>absolute(1)</code> is the same
1961      * as calling <code>first()</code>. Calling <code>absolute(-1)</code>
1962      * is the same as calling <code>last()</code>.
1963      *
1964      * @return <code>true</code> if the cursor is on the result set;
1965      * <code>false</code> otherwise
1966      * @throws SQLException if (1) a database access error occurs,
1967      *            (2) the row is <code>0</code>, (3) the result set
1968      *            type is <code>TYPE_FORWARD_ONLY</code>, or (4) this
1969      *            rowset does not currently have a valid connection,
1970      *            prepared statement, and result set
1971      */
1972     public boolean absolute(int row) throws SQLException {
1973         checkState();
1974 
1975         boolean b = rs.absolute(row);
1976         notifyCursorMoved();
1977         return b;
1978     }
1979 
1980     /**
1981      * Moves the cursor a relative number of rows, either positive or negative.
1982      * Attempting to move beyond the first/last row in the
1983      * result set positions the cursor before/after the
1984      * the first/last row. Calling <code>relative(0)</code> is valid, but does
1985      * not change the cursor position.
1986      *
1987      * <p>Note: Calling the method <code>relative(1)</code>
1988      * is different from calling the method <code>next()</code>
1989      * because is makes sense to call <code>next()</code> when there
1990      * is no current row,
1991      * for example, when the cursor is positioned before the first row
1992      * or after the last row of the result set.
1993      *
1994      * @return <code>true</code> if the cursor is on a row;
1995      * <code>false</code> otherwise
1996      * @throws SQLException if (1) a database access error occurs,
1997      *            (2) there is no current row, (3) the result set
1998      *            type is <code>TYPE_FORWARD_ONLY</code>, or (4) this
1999      *            rowset does not currently have a valid connection,
2000      *            prepared statement, and result set
2001      */
2002     public boolean relative(int rows) throws SQLException {
2003         checkState();
2004 
2005         boolean b = rs.relative(rows);
2006         notifyCursorMoved();
2007         return b;
2008     }
2009 
2010     /**
2011      * Moves the cursor to the previous row in this
2012      * <code>ResultSet</code> object.
2013      *
2014      * <p><B>Note:</B> Calling the method <code>previous()</code> is not the same as
2015      * calling the method <code>relative(-1)</code> because it
2016      * makes sense to call <code>previous()</code> when there is no current row.
2017      *
2018      * @return <code>true</code> if the cursor is on a valid row;
2019      * <code>false</code> if it is off the result set
2020      * @throws SQLException if (1) a database access error occurs,
2021      *            (2) the result set type is <code>TYPE_FORWARD_ONLY</code>,
2022      *            or (3) this rowset does not currently have a valid
2023      *            connection, prepared statement, and result set
2024      */
2025     public boolean previous() throws SQLException {
2026         checkState();
2027 
2028         boolean b = rs.previous();
2029         notifyCursorMoved();
2030         return b;
2031     }
2032 
2033     /**
2034      * Gives a hint as to the direction in which the rows in this
2035      * <code>ResultSet</code> object will be processed.
2036      * The initial value is determined by the
2037      * <code>Statement</code> object
2038      * that produced this rowset's <code>ResultSet</code> object.
2039      * The fetch direction may be changed at any time.
2040      *
2041      * @throws SQLException if (1) a database access error occurs,
2042      *            (2) the result set type is <code>TYPE_FORWARD_ONLY</code>
2043      *            and the fetch direction is not <code>FETCH_FORWARD</code>,
2044      *            or (3) this rowset does not currently have a valid
2045      *            connection, prepared statement, and result set
2046      * @see java.sql.Statement#setFetchDirection
2047      */
2048     public void setFetchDirection(int direction) throws SQLException {
2049         checkState();
2050 
2051         rs.setFetchDirection(direction);
2052     }
2053 
2054     /**
2055      * Returns the fetch direction for this
2056      * <code>ResultSet</code> object.
2057      *
2058      * @return the current fetch direction for this rowset's
2059      *         <code>ResultSet</code> object
2060      * @throws SQLException if a database access error occurs
2061      *            or this rowset does not currently have a valid connection,
2062      *            prepared statement, and result set
2063      */
2064     public int getFetchDirection() throws SQLException {
2065         try {
2066              checkState();
2067         } catch(SQLException sqle) {
2068              super.getFetchDirection();
2069         }
2070         return rs.getFetchDirection();
2071     }
2072 
2073     /**
2074      * Gives the JDBC driver a hint as to the number of rows that should
2075      * be fetched from the database when more rows are needed for this
2076      * <code>ResultSet</code> object.
2077      * If the fetch size specified is zero, the JDBC driver
2078      * ignores the value and is free to make its own best guess as to what
2079      * the fetch size should be.  The default value is set by the
2080      * <code>Statement</code> object
2081      * that created the result set.  The fetch size may be changed at any time.
2082      *
2083      * @param rows the number of rows to fetch
2084      * @throws SQLException if (1) a database access error occurs, (2) the
2085      *            condition <code>0 <= rows <= this.getMaxRows()</code> is not
2086      *            satisfied, or (3) this rowset does not currently have a valid
2087      *            connection, prepared statement, and result set
2088      *
2089      */
2090     public void setFetchSize(int rows) throws SQLException {
2091         checkState();
2092 
2093         rs.setFetchSize(rows);
2094     }
2095 
2096     /**
2097      *
2098      * Returns the fetch size for this
2099      * <code>ResultSet</code> object.
2100      *
2101      * @return the current fetch size for this rowset's <code>ResultSet</code> object
2102      * @throws SQLException if a database access error occurs
2103      *            or this rowset does not currently have a valid connection,
2104      *            prepared statement, and result set
2105      */
2106     public int getType() throws SQLException {
2107         try {
2108              checkState();
2109         } catch(SQLException sqle) {
2110             return super.getType();
2111         }
2112 
2113         // If the ResultSet has not been created, then return the default type
2114         // otherwise return the type from the ResultSet.
2115         if(rs == null) {
2116             return super.getType();
2117         } else {
2118            int rstype = rs.getType();
2119             return rstype;
2120         }
2121 
2122 
2123     }
2124 
2125     /**
2126      * Returns the concurrency mode of this rowset's <code>ResultSet</code> object.
2127      * The concurrency used is determined by the
2128      * <code>Statement</code> object that created the result set.
2129      *
2130      * @return the concurrency type, either <code>CONCUR_READ_ONLY</code>
2131      * or <code>CONCUR_UPDATABLE</code>
2132      * @throws SQLException if (1) a database access error occurs
2133      *            or (2) this rowset does not currently have a valid connection,
2134      *            prepared statement, and result set
2135      */
2136     public int getConcurrency() throws SQLException {
2137         try {
2138              checkState();
2139         } catch(SQLException sqle) {
2140              super.getConcurrency();
2141         }
2142         return rs.getConcurrency();
2143     }
2144 
2145     //---------------------------------------------------------------------
2146     // Updates
2147     //---------------------------------------------------------------------
2148 
2149     /**
2150      * Indicates whether the current row has been updated.  The value returned
2151      * depends on whether or not the result set can detect updates.
2152      *
2153      * @return <code>true</code> if the row has been visibly updated
2154      * by the owner or another, and updates are detected
2155      * @throws SQLException if a database access error occurs
2156      *            or this rowset does not currently have a valid connection,
2157      *            prepared statement, and result set
2158      * @see java.sql.DatabaseMetaData#updatesAreDetected
2159      */
2160     public boolean rowUpdated() throws SQLException {
2161         checkState();
2162 
2163         return rs.rowUpdated();
2164     }
2165 
2166     /**
2167      * Indicates whether the current row has had an insertion.
2168      * The value returned depends on whether or not this
2169      * <code>ResultSet</code> object can detect visible inserts.
2170      *
2171      * @return <code>true</code> if a row has had an insertion
2172      * and insertions are detected; <code>false</code> otherwise
2173      * @throws SQLException if a database access error occurs
2174      *            or this rowset does not currently have a valid connection,
2175      *            prepared statement, and result set
2176      * @see java.sql.DatabaseMetaData#insertsAreDetected
2177      *
2178      */
2179     public boolean rowInserted() throws SQLException {
2180         checkState();
2181 
2182         return rs.rowInserted();
2183     }
2184 
2185     /**
2186      * Indicates whether a row has been deleted.  A deleted row may leave
2187      * a visible "hole" in a result set.  This method can be used to
2188      * detect holes in a result set.  The value returned depends on whether
2189      * or not this rowset's <code>ResultSet</code> object can detect deletions.
2190      *
2191      * @return <code>true</code> if a row was deleted and deletions are detected;
2192      * <code>false</code> otherwise
2193      * @throws SQLException if a database access error occurs
2194      *            or this rowset does not currently have a valid connection,
2195      *            prepared statement, and result set
2196      * @see java.sql.DatabaseMetaData#deletesAreDetected
2197      */
2198     public boolean rowDeleted() throws SQLException {
2199         checkState();
2200 
2201         return rs.rowDeleted();
2202     }
2203 
2204     /**
2205      * Gives a nullable column a null value.
2206      *
2207      * The <code>updateXXX</code> methods are used to update column values in the
2208      * current row or the insert row.  The <code>updateXXX</code> methods do not
2209      * update the underlying database; instead the <code>updateRow</code>
2210      * or <code>insertRow</code> methods are called to update the database.
2211      *
2212      * @param columnIndex the first column is 1, the second is 2, and so on
2213      * @throws SQLException if a database access error occurs
2214      *            or this rowset does not currently have a valid connection,
2215      *            prepared statement, and result set
2216      */
2217     public void updateNull(int columnIndex) throws SQLException {
2218         checkState();
2219 
2220         // To check the type and concurrency of the ResultSet
2221         // to verify whether updates are possible or not
2222         checkTypeConcurrency();
2223 
2224         rs.updateNull(columnIndex);
2225     }
2226 
2227     /**
2228      * Updates the designated column with a <code>boolean</code> value.
2229      * The <code>updateXXX</code> methods are used to update column values in the
2230      * current row or the insert row.  The <code>updateXXX</code> methods do not
2231      * update the underlying database; instead the <code>updateRow</code> or
2232      * <code>insertRow</code> methods are called to update the database.
2233      *
2234      * @param columnIndex the first column is 1, the second is 2, and so on
2235      * @param x the new column value
2236      * @throws SQLException if a database access error occurs
2237      *            or this rowset does not currently have a valid connection,
2238      *            prepared statement, and result set
2239      *
2240      */
2241     public void updateBoolean(int columnIndex, boolean x) throws SQLException {
2242         checkState();
2243 
2244         // To check the type and concurrency of the ResultSet
2245         // to verify whether updates are possible or not
2246         checkTypeConcurrency();
2247 
2248         rs.updateBoolean(columnIndex, x);
2249     }
2250 
2251     /**
2252      * Updates the designated column with a <code>byte</code> value.
2253      * The <code>updateXXX</code> methods are used to update column values in the
2254      * current row or the insert row.  The <code>updateXXX</code> methods do not
2255      * update the underlying database; instead the <code>updateRow</code> or
2256      * <code>insertRow</code> methods are called to update the database.
2257      *
2258      *
2259      * @param columnIndex the first column is 1, the second is 2, and so on
2260      * @param x the new column value
2261      * @throws SQLException if a database access error occurs
2262      *            or this rowset does not currently have a valid connection,
2263      *            prepared statement, and result set
2264      *
2265      */
2266     public void updateByte(int columnIndex, byte x) throws SQLException {
2267         checkState();
2268 
2269         // To check the type and concurrency of the ResultSet
2270         // to verify whether updates are possible or not
2271         checkTypeConcurrency();
2272 
2273         rs.updateByte(columnIndex, x);
2274     }
2275 
2276     /**
2277      * Updates the designated column with a <code>short</code> value.
2278      * The <code>updateXXX</code> methods are used to update column values in the
2279      * current row or the insert row.  The <code>updateXXX</code> methods do not
2280      * update the underlying database; instead the <code>updateRow</code> or
2281      * <code>insertRow</code> methods are called to update the database.
2282      *
2283      * @param columnIndex the first column is 1, the second is 2, and so on
2284      * @param x the new column value
2285      * @throws SQLException if a database access error occurs
2286      *            or this rowset does not currently have a valid connection,
2287      *            prepared statement, and result set
2288      *
2289      */
2290     public void updateShort(int columnIndex, short x) throws SQLException {
2291         checkState();
2292 
2293         // To check the type and concurrency of the ResultSet
2294         // to verify whether updates are possible or not
2295         checkTypeConcurrency();
2296 
2297         rs.updateShort(columnIndex, x);
2298     }
2299 
2300     /**
2301      * Updates the designated column with an <code>int</code> value.
2302      * The <code>updateXXX</code> methods are used to update column values in the
2303      * current row or the insert row.  The <code>updateXXX</code> methods do not
2304      * update the underlying database; instead the <code>updateRow</code> or
2305      * <code>insertRow</code> methods are called to update the database.
2306      *
2307      * @param columnIndex the first column is 1, the second is 2, and so on
2308      * @param x the new column value
2309      * @throws SQLException if a database access error occurs
2310      *            or this rowset does not currently have a valid connection,
2311      *            prepared statement, and result set
2312      */
2313     public void updateInt(int columnIndex, int x) throws SQLException {
2314         checkState();
2315 
2316         // To check the type and concurrency of the ResultSet
2317         // to verify whether updates are possible or not
2318         checkTypeConcurrency();
2319 
2320         rs.updateInt(columnIndex, x);
2321     }
2322 
2323     /**
2324      * Updates the designated column with a <code>long</code> value.
2325      * The <code>updateXXX</code> methods are used to update column values in the
2326      * current row or the insert row.  The <code>updateXXX</code> methods do not
2327      * update the underlying database; instead the <code>updateRow</code> or
2328      * <code>insertRow</code> methods are called to update the database.
2329      *
2330      * @param columnIndex the first column is 1, the second is 2, and so on
2331      * @param x the new column value
2332      * @throws SQLException if a database access error occurs
2333      *            or this rowset does not currently have a valid connection,
2334      *            prepared statement, and result set
2335      *
2336      */
2337     public void updateLong(int columnIndex, long x) throws SQLException {
2338         checkState();
2339 
2340         // To check the type and concurrency of the ResultSet
2341         // to verify whether updates are possible or not
2342         checkTypeConcurrency();
2343 
2344         rs.updateLong(columnIndex, x);
2345     }
2346 
2347     /**
2348      * Updates the designated column with a <code>float</code> value.
2349      * The <code>updateXXX</code> methods are used to update column values in the
2350      * current row or the insert row.  The <code>updateXXX</code> methods do not
2351      * update the underlying database; instead the <code>updateRow</code> or
2352      * <code>insertRow</code> methods are called to update the database.
2353      *
2354      * @param columnIndex the first column is 1, the second is 2, and so on
2355      * @param x the new column value
2356      * @throws SQLException if a database access error occurs
2357      *            or this rowset does not currently have a valid connection,
2358      *            prepared statement, and result set
2359      *
2360      */
2361     public void updateFloat(int columnIndex, float x) throws SQLException {
2362         checkState();
2363 
2364         // To check the type and concurrency of the ResultSet
2365         // to verify whether updates are possible or not
2366         checkTypeConcurrency();
2367 
2368         rs.updateFloat(columnIndex, x);
2369     }
2370 
2371     /**
2372      * Updates the designated column with a <code>double</code> value.
2373      * The <code>updateXXX</code> methods are used to update column values in the
2374      * current row or the insert row.  The <code>updateXXX</code> methods do not
2375      * update the underlying database; instead the <code>updateRow</code> or
2376      * <code>insertRow</code> methods are called to update the database.
2377      *
2378      * @param columnIndex the first column is 1, the second is 2, and so on
2379      * @param x the new column value
2380      * @throws SQLException if a database access error occurs
2381      *            or this rowset does not currently have a valid connection,
2382      *            prepared statement, and result set
2383      *
2384      */
2385     public void updateDouble(int columnIndex, double x) throws SQLException {
2386         checkState();
2387 
2388         // To check the type and concurrency of the ResultSet
2389         // to verify whether updates are possible or not
2390         checkTypeConcurrency();
2391 
2392         rs.updateDouble(columnIndex, x);
2393     }
2394 
2395     /**
2396      * Updates the designated column with a <code>java.math.BigDecimal</code>
2397      * value.
2398      * The <code>updateXXX</code> methods are used to update column values in the
2399      * current row or the insert row.  The <code>updateXXX</code> methods do not
2400      * update the underlying database; instead the <code>updateRow</code> or
2401      * <code>insertRow</code> methods are called to update the database.
2402      *
2403      * @param columnIndex the first column is 1, the second is 2, and so on
2404      * @param x the new column value
2405      * @throws SQLException if a database access error occurs
2406      *            or this rowset does not currently have a valid connection,
2407      *            prepared statement, and result set
2408      *
2409      */
2410     public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException {
2411         checkState();
2412 
2413         // To check the type and concurrency of the ResultSet
2414         // to verify whether updates are possible or not
2415         checkTypeConcurrency();
2416 
2417         rs.updateBigDecimal(columnIndex, x);
2418     }
2419 
2420     /**
2421      * Updates the designated column with a <code>String</code> value.
2422      * The <code>updateXXX</code> methods are used to update column values in the
2423      * current row or the insert row.  The <code>updateXXX</code> methods do not
2424      * update the underlying database; instead the <code>updateRow</code> or
2425      * <code>insertRow</code> methods are called to update the database.
2426      *
2427      * @param columnIndex the first column is 1, the second is 2, and so on
2428      * @param x the new column value
2429      * @throws SQLException if a database access error occurs
2430      *            or this rowset does not currently have a valid connection,
2431      *            prepared statement, and result set
2432      *
2433      */
2434     public void updateString(int columnIndex, String x) throws SQLException {
2435         checkState();
2436 
2437         // To check the type and concurrency of the ResultSet
2438         // to verify whether updates are possible or not
2439         checkTypeConcurrency();
2440 
2441         rs.updateString(columnIndex, x);
2442     }
2443 
2444     /**
2445      * Updates the designated column with a <code>byte</code> array value.
2446      * The <code>updateXXX</code> methods are used to update column values in the
2447      * current row or the insert row.  The <code>updateXXX</code> methods do not
2448      * update the underlying database; instead the <code>updateRow</code> or
2449      * <code>insertRow</code> methods are called to update the database.
2450      *
2451      * @param columnIndex the first column is 1, the second is 2, and so on
2452      * @param x the new column value
2453      * @throws SQLException if a database access error occurs
2454      *            or this rowset does not currently have a valid connection,
2455      *            prepared statement, and result set
2456      *
2457      */
2458     public void updateBytes(int columnIndex, byte x[]) throws SQLException {
2459         checkState();
2460 
2461         // To check the type and concurrency of the ResultSet
2462         // to verify whether updates are possible or not
2463         checkTypeConcurrency();
2464 
2465         rs.updateBytes(columnIndex, x);
2466     }
2467 
2468     /**
2469      * Updates the designated column with a <code>java.sql.Date</code> value.
2470      * The <code>updateXXX</code> methods are used to update column values in the
2471      * current row or the insert row.  The <code>updateXXX</code> methods do not
2472      * update the underlying database; instead the <code>updateRow</code> or
2473      * <code>insertRow</code> methods are called to update the database.
2474      *
2475      * @param columnIndex the first column is 1, the second is 2, and so on
2476      * @param x the new column value
2477      * @throws SQLException if a database access error occurs
2478      *            or this rowset does not currently have a valid connection,
2479      *            prepared statement, and result set
2480      *
2481      */
2482     public void updateDate(int columnIndex, java.sql.Date x) throws SQLException {
2483         checkState();
2484 
2485         // To check the type and concurrency of the ResultSet
2486         // to verify whether updates are possible or not
2487         checkTypeConcurrency();
2488 
2489         rs.updateDate(columnIndex, x);
2490     }
2491 
2492 
2493     /**
2494      * Updates the designated column with a <code>java.sql.Time</code> value.
2495      * The <code>updateXXX</code> methods are used to update column values in the
2496      * current row or the insert row.  The <code>updateXXX</code> methods do not
2497      * update the underlying database; instead the <code>updateRow</code> or
2498      * <code>insertRow</code> methods are called to update the database.
2499      *
2500      * @param columnIndex the first column is 1, the second is 2, and so on
2501      * @param x the new column value
2502      * @throws SQLException if a database access error occurs
2503      *            or this rowset does not currently have a valid connection,
2504      *            prepared statement, and result set
2505      *
2506      */
2507     public void updateTime(int columnIndex, java.sql.Time x) throws SQLException {
2508         checkState();
2509 
2510         // To check the type and concurrency of the ResultSet
2511         // to verify whether updates are possible or not
2512         checkTypeConcurrency();
2513 
2514         rs.updateTime(columnIndex, x);
2515     }
2516 
2517     /**
2518      * Updates the designated column with a <code>java.sql.Timestamp</code>
2519      * value.
2520      * The <code>updateXXX</code> methods are used to update column values in the
2521      * current row or the insert row.  The <code>updateXXX</code> methods do not
2522      * update the underlying database; instead the <code>updateRow</code> or
2523      * <code>insertRow</code> methods are called to update the database.
2524      *
2525      * @param columnIndex the first column is 1, the second is 2, and so on
2526      * @param x the new column value
2527      * @throws SQLException if a database access error occurs
2528      *            or this rowset does not currently have a valid connection,
2529      *            prepared statement, and result set
2530      *
2531      */
2532     public void updateTimestamp(int columnIndex, java.sql.Timestamp x) throws SQLException {
2533         checkState();
2534 
2535         // To check the type and concurrency of the ResultSet
2536         // to verify whether updates are possible or not
2537         checkTypeConcurrency();
2538 
2539         rs.updateTimestamp(columnIndex, x);
2540     }
2541 
2542     /**
2543      * Updates the designated column with an ascii stream value.
2544      * The <code>updateXXX</code> methods are used to update column values in the
2545      * current row or the insert row.  The <code>updateXXX</code> methods do not
2546      * update the underlying database; instead the <code>updateRow</code> or
2547      * <code>insertRow</code> methods are called to update the database.
2548      *
2549      * @param columnIndex the first column is 1, the second is 2, and so on
2550      * @param x the new column value
2551      * @param length the length of the stream
2552      * @throws SQLException if (1) a database access error occurs
2553      *            (2) or this rowset does not currently have a valid connection,
2554      *            prepared statement, and result set
2555      *
2556      */
2557     public void updateAsciiStream(int columnIndex, java.io.InputStream x, int length) throws SQLException {
2558         checkState();
2559 
2560         // To check the type and concurrency of the ResultSet
2561         // to verify whether updates are possible or not
2562         checkTypeConcurrency();
2563 
2564         rs.updateAsciiStream(columnIndex, x, length);
2565     }
2566 
2567     /**
2568      * Updates the designated column with a binary stream value.
2569      * The <code>updateXXX</code> methods are used to update column values in the
2570      * current row or the insert row.  The <code>updateXXX</code> methods do not
2571      * update the underlying database; instead the <code>updateRow</code> or
2572      * <code>insertRow</code> methods are called to update the database.
2573      *
2574      * @param columnIndex the first column is 1, the second is 2, and so on
2575      * @param x the new column value
2576      * @param length the length of the stream
2577      * @throws SQLException if a database access error occurs
2578      *            or this rowset does not currently have a valid connection,
2579      *            prepared statement, and result set
2580      *
2581      */
2582     public void updateBinaryStream(int columnIndex, java.io.InputStream x, int length) throws SQLException {
2583         checkState();
2584 
2585         // To check the type and concurrency of the ResultSet
2586         // to verify whether updates are possible or not
2587         checkTypeConcurrency();
2588 
2589         rs.updateBinaryStream(columnIndex, x, length);
2590     }
2591 
2592     /**
2593      * Updates the designated column with a character stream value.
2594      * The <code>updateXXX</code> methods are used to update column values in the
2595      * current row or the insert row.  The <code>updateXXX</code> methods do not
2596      * update the underlying database; instead the <code>updateRow</code> or
2597      * <code>insertRow</code> methods are called to update the database.
2598      *
2599      * @param columnIndex the first column is 1, the second is 2, and so on
2600      * @param x the new column value
2601      * @param length the length of the stream
2602      * @throws SQLException if a database access error occurs
2603      *            or this rowset does not currently have a valid connection,
2604      *            prepared statement, and result set
2605      *
2606      */
2607     public void updateCharacterStream(int columnIndex, java.io.Reader x, int length) throws SQLException {
2608         checkState();
2609 
2610         // To check the type and concurrency of the ResultSet
2611         // to verify whether updates are possible or not
2612         checkTypeConcurrency();
2613 
2614         rs.updateCharacterStream(columnIndex, x, length);
2615     }
2616 
2617     /**
2618      * Updates the designated column with an <code>Object</code> value.
2619      * The <code>updateXXX</code> methods are used to update column values in the
2620      * current row or the insert row.  The <code>updateXXX</code> methods do not
2621      * update the underlying database; instead the <code>updateRow</code> or
2622      * <code>insertRow</code> methods are called to update the database.
2623      *
2624      * @param columnIndex the first column is 1, the second is 2, and so on
2625      * @param x the new column value
2626      * @param scale for <code>java.sql.Types.DECIMAl</code>
2627      *  or <code>java.sql.Types.NUMERIC</code> types,
2628      *  this is the number of digits after the decimal point.  For all other
2629      *  types this value will be ignored.
2630      * @throws SQLException if a database access error occurs
2631      *            or this rowset does not currently have a valid connection,
2632      *            prepared statement, and result set
2633      *
2634      */
2635     public void updateObject(int columnIndex, Object x, int scale) throws SQLException {
2636         checkState();
2637 
2638         // To check the type and concurrency of the ResultSet
2639         // to verify whether updates are possible or not
2640         checkTypeConcurrency();
2641 
2642         rs.updateObject(columnIndex, x, scale);
2643     }
2644 
2645     /**
2646      * Updates the designated column with an <code>Object</code> value.
2647      * The <code>updateXXX</code> methods are used to update column values in the
2648      * current row or the insert row.  The <code>updateXXX</code> methods do not
2649      * update the underlying database; instead the <code>updateRow</code> or
2650      * <code>insertRow</code> methods are called to update the database.
2651      *
2652      * @param columnIndex the first column is 1, the second is 2, and so on
2653      * @param x the new column value
2654      * @throws SQLException if a database access error occurs
2655      *            or this rowset does not currently have a valid connection,
2656      *            prepared statement, and result set
2657      *
2658      */
2659     public void updateObject(int columnIndex, Object x) throws SQLException {
2660         checkState();
2661 
2662         // To check the type and concurrency of the ResultSet
2663         // to verify whether updates are possible or not
2664         checkTypeConcurrency();
2665 
2666         rs.updateObject(columnIndex, x);
2667     }
2668 
2669     /**
2670      * Updates the designated column with a <code>null</code> value.
2671      * The <code>updateXXX</code> methods are used to update column values in the
2672      * current row or the insert row.  The <code>updateXXX</code> methods do not
2673      * update the underlying database; instead the <code>updateRow</code> or
2674      * <code>insertRow</code> methods are called to update the database.
2675      *
2676      * @param columnName the name of the column
2677      * @throws SQLException if a database access error occurs
2678      *            or this rowset does not currently have a valid connection,
2679      *            prepared statement, and result set
2680      *
2681      */
2682     public void updateNull(String columnName) throws SQLException {
2683         updateNull(findColumn(columnName));
2684     }
2685 
2686     /**
2687      * Updates the designated column with a <code>boolean</code> value.
2688      * The <code>updateXXX</code> methods are used to update column values in the
2689      * current row or the insert row.  The <code>updateXXX</code> methods do not
2690      * update the underlying database; instead the <code>updateRow</code> or
2691      * <code>insertRow</code> methods are called to update the database.
2692      *
2693      * @param columnName the name of the column
2694      * @param x the new column value
2695      * @throws SQLException if a database access error occurs
2696      *
2697      */
2698     public void updateBoolean(String columnName, boolean x) throws SQLException {
2699         updateBoolean(findColumn(columnName), x);
2700     }
2701 
2702     /**
2703      * Updates the designated column with a <code>byte</code> value.
2704      * The <code>updateXXX</code> methods are used to update column values in the
2705      * current row or the insert row.  The <code>updateXXX</code> methods do not
2706      * update the underlying database; instead the <code>updateRow</code> or
2707      * <code>insertRow</code> methods are called to update the database.
2708      *
2709      * @param columnName the name of the column
2710      * @param x the new column value
2711      * @throws SQLException if a database access error occurs
2712      *
2713      */
2714     public void updateByte(String columnName, byte x) throws SQLException {
2715         updateByte(findColumn(columnName), x);
2716     }
2717 
2718     /**
2719      * Updates the designated column with a <code>short</code> value.
2720      * The <code>updateXXX</code> methods are used to update column values in the
2721      * current row or the insert row.  The <code>updateXXX</code> methods do not
2722      * update the underlying database; instead the <code>updateRow</code> or
2723      * <code>insertRow</code> methods are called to update the database.
2724      *
2725      * @param columnName the name of the column
2726      * @param x the new column value
2727      * @throws SQLException if a database access error occurs
2728      *
2729      */
2730     public void updateShort(String columnName, short x) throws SQLException {
2731         updateShort(findColumn(columnName), x);
2732     }
2733 
2734     /**
2735      * Updates the designated column with an <code>int</code> value.
2736      * The <code>updateXXX</code> methods are used to update column values in the
2737      * current row or the insert row.  The <code>updateXXX</code> methods do not
2738      * update the underlying database; instead the <code>updateRow</code> or
2739      * <code>insertRow</code> methods are called to update the database.
2740      *
2741      * @param columnName the name of the column
2742      * @param x the new column value
2743      * @throws SQLException if a database access error occurs
2744      *
2745      */
2746     public void updateInt(String columnName, int x) throws SQLException {
2747         updateInt(findColumn(columnName), x);
2748     }
2749 
2750     /**
2751      * Updates the designated column with a <code>long</code> value.
2752      * The <code>updateXXX</code> methods are used to update column values in the
2753      * current row or the insert row.  The <code>updateXXX</code> methods do not
2754      * update the underlying database; instead the <code>updateRow</code> or
2755      * <code>insertRow</code> methods are called to update the database.
2756      *
2757      * @param columnName the name of the column
2758      * @param x the new column value
2759      * @throws SQLException if a database access error occurs
2760      *
2761      */
2762     public void updateLong(String columnName, long x) throws SQLException {
2763         updateLong(findColumn(columnName), x);
2764     }
2765 
2766     /**
2767      * Updates the designated column with a <code>float </code> value.
2768      * The <code>updateXXX</code> methods are used to update column values in the
2769      * current row or the insert row.  The <code>updateXXX</code> methods do not
2770      * update the underlying database; instead the <code>updateRow</code> or
2771      * <code>insertRow</code> methods are called to update the database.
2772      *
2773      * @param columnName the name of the column
2774      * @param x the new column value
2775      * @throws SQLException if a database access error occurs
2776      *
2777      */
2778     public void updateFloat(String columnName, float x) throws SQLException {
2779         updateFloat(findColumn(columnName), x);
2780     }
2781 
2782     /**
2783      * Updates the designated column with a <code>double</code> value.
2784      * The <code>updateXXX</code> methods are used to update column values in the
2785      * current row or the insert row.  The <code>updateXXX</code> methods do not
2786      * update the underlying database; instead the <code>updateRow</code> or
2787      * <code>insertRow</code> methods are called to update the database.
2788      *
2789      * @param columnName the name of the column
2790      * @param x the new column value
2791      * @throws SQLException if a database access error occurs
2792      *
2793      */
2794     public void updateDouble(String columnName, double x) throws SQLException {
2795         updateDouble(findColumn(columnName), x);
2796     }
2797 
2798     /**
2799      * Updates the designated column with a <code>java.sql.BigDecimal</code>
2800      * value.
2801      * The <code>updateXXX</code> methods are used to update column values in the
2802      * current row or the insert row.  The <code>updateXXX</code> methods do not
2803      * update the underlying database; instead the <code>updateRow</code> or
2804      * <code>insertRow</code> methods are called to update the database.
2805      *
2806      * @param columnName the name of the column
2807      * @param x the new column value
2808      * @throws SQLException if a database access error occurs
2809      *
2810      */
2811     public void updateBigDecimal(String columnName, BigDecimal x) throws SQLException {
2812         updateBigDecimal(findColumn(columnName), x);
2813     }
2814 
2815     /**
2816      * Updates the designated column with a <code>String</code> value.
2817      * The <code>updateXXX</code> methods are used to update column values in the
2818      * current row or the insert row.  The <code>updateXXX</code> methods do not
2819      * update the underlying database; instead the <code>updateRow</code> or
2820      * <code>insertRow</code> methods are called to update the database.
2821      *
2822      * @param columnName the name of the column
2823      * @param x the new column value
2824      * @throws SQLException if a database access error occurs
2825      *
2826      */
2827     public void updateString(String columnName, String x) throws SQLException {
2828         updateString(findColumn(columnName), x);
2829     }
2830 
2831     /**
2832      * Updates the designated column with a <code>boolean</code> value.
2833      * The <code>updateXXX</code> methods are used to update column values in the
2834      * current row or the insert row.  The <code>updateXXX</code> methods do not
2835      * update the underlying database; instead the <code>updateRow</code> or
2836      * <code>insertRow</code> methods are called to update the database.
2837      *
2838      * JDBC 2.0
2839      *
2840      * Updates a column with a byte array value.
2841      *
2842      * The <code>updateXXX</code> methods are used to update column values in the
2843      * current row, or the insert row.  The <code>updateXXX</code> methods do not
2844      * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
2845      * methods are called to update the database.
2846      *
2847      * @param columnName the name of the column
2848      * @param x the new column value
2849      * @throws SQLException if a database access error occurs
2850      *
2851      */
2852     public void updateBytes(String columnName, byte x[]) throws SQLException {
2853         updateBytes(findColumn(columnName), x);
2854     }
2855 
2856     /**
2857      * Updates the designated column with a <code>java.sql.Date</code> value.
2858      * The <code>updateXXX</code> methods are used to update column values in the
2859      * current row or the insert row.  The <code>updateXXX</code> methods do not
2860      * update the underlying database; instead the <code>updateRow</code> or
2861      * <code>insertRow</code> methods are called to update the database.
2862      *
2863      * @param columnName the name of the column
2864      * @param x the new column value
2865      * @throws SQLException if a database access error occurs
2866      *
2867      */
2868     public void updateDate(String columnName, java.sql.Date x) throws SQLException {
2869         updateDate(findColumn(columnName), x);
2870     }
2871 
2872     /**
2873      * Updates the designated column with a <code>java.sql.Time</code> value.
2874      * The <code>updateXXX</code> methods are used to update column values in the
2875      * current row or the insert row.  The <code>updateXXX</code> methods do not
2876      * update the underlying database; instead the <code>updateRow</code> or
2877      * <code>insertRow</code> methods are called to update the database.
2878      *
2879      * @param columnName the name of the column
2880      * @param x the new column value
2881      * @throws SQLException if a database access error occurs
2882      *
2883      */
2884     public void updateTime(String columnName, java.sql.Time x) throws SQLException {
2885         updateTime(findColumn(columnName), x);
2886     }
2887 
2888     /**
2889      * Updates the designated column with a <code>java.sql.Timestamp</code>
2890      * value.
2891      * The <code>updateXXX</code> methods are used to update column values in the
2892      * current row or the insert row.  The <code>updateXXX</code> methods do not
2893      * update the underlying database; instead the <code>updateRow</code> or
2894      * <code>insertRow</code> methods are called to update the database.
2895      *
2896      * @param columnName the name of the column
2897      * @param x the new column value
2898      * @throws SQLException if a database access error occurs
2899      *
2900      */
2901     public void updateTimestamp(String columnName, java.sql.Timestamp x) throws SQLException {
2902         updateTimestamp(findColumn(columnName), x);
2903     }
2904 
2905     /**
2906      * Updates the designated column with an ascii stream value.
2907      * The <code>updateXXX</code> methods are used to update column values in the
2908      * current row or the insert row.  The <code>updateXXX</code> methods do not
2909      * update the underlying database; instead the <code>updateRow</code> or
2910      * <code>insertRow</code> methods are called to update the database.
2911      *
2912      * @param columnName the name of the column
2913      * @param x the new column value
2914      * @param length the length of the stream
2915      * @throws SQLException if a database access error occurs
2916      *
2917      */
2918     public void updateAsciiStream(String columnName, java.io.InputStream x, int length) throws SQLException {
2919         updateAsciiStream(findColumn(columnName), x, length);
2920     }
2921 
2922     /**
2923      * Updates the designated column with a binary stream value.
2924      * The <code>updateXXX</code> methods are used to update column values in the
2925      * current row or the insert row.  The <code>updateXXX</code> methods do not
2926      * update the underlying database; instead the <code>updateRow</code> or
2927      * <code>insertRow</code> methods are called to update the database.
2928      *
2929      * @param columnName the name of the column
2930      * @param x the new column value
2931      * @param length the length of the stream
2932      * @throws SQLException if a database access error occurs
2933      *
2934      */
2935     public void updateBinaryStream(String columnName, java.io.InputStream x, int length) throws SQLException {
2936         updateBinaryStream(findColumn(columnName), x, length);
2937     }
2938 
2939     /**
2940      * Updates the designated column with a character stream value.
2941      * The <code>updateXXX</code> methods are used to update column values
2942      * in the current row or the insert row.  The <code>updateXXX</code>
2943      * methods do not update the underlying database; instead the
2944      * <code>updateRow</code> or <code>insertRow</code> methods are called
2945      * to update the database.
2946      *
2947      * @param columnName the name of the column
2948      * @param reader the new column <code>Reader</code> stream value
2949      * @param length the length of the stream
2950      * @throws SQLException if a database access error occurs
2951      *
2952      */
2953     public void updateCharacterStream(String columnName, java.io.Reader reader, int length) throws SQLException {
2954         updateCharacterStream(findColumn(columnName), reader, length);
2955     }
2956 
2957     /**
2958      * Updates the designated column with an <code>Object</code> value.
2959      * The <code>updateXXX</code> methods are used to update column values in the
2960      * current row or the insert row.  The <code>updateXXX</code> methods do not
2961      * update the underlying database; instead the <code>updateRow</code> or
2962      * <code>insertRow</code> methods are called to update the database.
2963      *
2964      * @param columnName the name of the column
2965      * @param x the new column value
2966      * @param scale for <code>java.sql.Types.DECIMAL</code>
2967      *  or <code>java.sql.Types.NUMERIC</code> types,
2968      *  this is the number of digits after the decimal point.  For all other
2969      *  types this value will be ignored.
2970      * @throws SQLException if a database access error occurs
2971      *
2972      */
2973     public void updateObject(String columnName, Object x, int scale) throws SQLException {
2974         updateObject(findColumn(columnName), x, scale);
2975     }
2976 
2977     /**
2978      * Updates the designated column with an <code>Object</code> value.
2979      * The <code>updateXXX</code> methods are used to update column values in the
2980      * current row or the insert row.  The <code>updateXXX</code> methods do not
2981      * update the underlying database; instead the <code>updateRow</code> or
2982      * <code>insertRow</code> methods are called to update the database.
2983      *
2984      * @param columnName the name of the column
2985      * @param x the new column value
2986      * @throws SQLException if a database access error occurs
2987      *
2988      */
2989     public void updateObject(String columnName, Object x) throws SQLException {
2990         updateObject(findColumn(columnName), x);
2991     }
2992 
2993     /**
2994      * Inserts the contents of the insert row into this
2995      * <code>ResultSet</code> object and into the database
2996      * and also notifies listeners that a row has changed.
2997      * The cursor must be on the insert row when this method is called.
2998      *
2999      * @throws SQLException if (1) a database access error occurs,
3000      *            (2) this method is called when the cursor is not
3001      *             on the insert row, (3) not all non-nullable columns in
3002      *             the insert row have been given a value, or (4) this
3003      *             rowset does not currently have a valid connection,
3004      *             prepared statement, and result set
3005      */
3006     public void insertRow() throws SQLException {
3007         checkState();
3008 
3009         rs.insertRow();
3010         notifyRowChanged();
3011     }
3012 
3013     /**
3014      * Updates the underlying database with the new contents of the
3015      * current row of this rowset's <code>ResultSet</code> object
3016      * and notifies listeners that a row has changed.
3017      * This method cannot be called when the cursor is on the insert row.
3018      *
3019      * @throws SQLException if (1) a database access error occurs,
3020      *            (2) this method is called when the cursor is
3021      *             on the insert row, (3) the concurrency of the result
3022      *             set is <code>ResultSet.CONCUR_READ_ONLY</code>, or
3023      *             (4) this rowset does not currently have a valid connection,
3024      *             prepared statement, and result set
3025      */
3026     public void updateRow() throws SQLException {
3027         checkState();
3028 
3029         rs.updateRow();
3030         notifyRowChanged();
3031     }
3032 
3033     /**
3034      * Deletes the current row from this rowset's <code>ResultSet</code> object
3035      * and from the underlying database and also notifies listeners that a row
3036      * has changed.  This method cannot be called when the cursor is on the insert
3037      * row.
3038      *
3039      * @throws SQLException if a database access error occurs
3040      * or if this method is called when the cursor is on the insert row
3041      * @throws SQLException if (1) a database access error occurs,
3042      *            (2) this method is called when the cursor is before the
3043      *            first row, after the last row, or on the insert row,
3044      *            (3) the concurrency of this rowset's result
3045      *            set is <code>ResultSet.CONCUR_READ_ONLY</code>, or
3046      *            (4) this rowset does not currently have a valid connection,
3047      *            prepared statement, and result set
3048      */
3049     public void deleteRow() throws SQLException {
3050         checkState();
3051 
3052         rs.deleteRow();
3053         notifyRowChanged();
3054     }
3055 
3056     /**
3057      * Refreshes the current row of this rowset's <code>ResultSet</code>
3058      * object with its most recent value in the database.  This method
3059      * cannot be called when the cursor is on the insert row.
3060      *
3061      * <P>The <code>refreshRow</code> method provides a way for an
3062      * application to explicitly tell the JDBC driver to refetch
3063      * a row(s) from the database.  An application may want to call
3064      * <code>refreshRow</code> when caching or prefetching is being
3065      * done by the JDBC driver to fetch the latest value of a row
3066      * from the database.  The JDBC driver may actually refresh multiple
3067      * rows at once if the fetch size is greater than one.
3068      *
3069      * <P> All values are refetched subject to the transaction isolation
3070      * level and cursor sensitivity.  If <code>refreshRow</code> is called after
3071      * calling an <code>updateXXX</code> method, but before calling
3072      * the method <code>updateRow</code>, then the
3073      * updates made to the row are lost.  Calling the method
3074      * <code>refreshRow</code> frequently will likely slow performance.
3075      *
3076      * @throws SQLException if (1) a database access error occurs,
3077      *            (2) this method is called when the cursor is
3078      *             on the insert row, or (3) this rowset does not
3079      *             currently have a valid connection, prepared statement,
3080      *             and result set
3081      *
3082      */
3083     public void refreshRow() throws SQLException {
3084         checkState();
3085 
3086         rs.refreshRow();
3087     }
3088 
3089     /**
3090      * Cancels the updates made to the current row in this
3091      * <code>ResultSet</code> object and notifies listeners that a row
3092      * has changed. This method may be called after calling an
3093      * <code>updateXXX</code> method(s) and before calling
3094      * the method <code>updateRow</code> to roll back
3095      * the updates made to a row.  If no updates have been made or
3096      * <code>updateRow</code> has already been called, this method has no
3097      * effect.
3098      *
3099      * @throws SQLException if (1) a database access error occurs,
3100      *            (2) this method is called when the cursor is
3101      *             on the insert row, or (3) this rowset does not
3102      *             currently have a valid connection, prepared statement,
3103      *             and result set
3104      */
3105     public void cancelRowUpdates() throws SQLException {
3106         checkState();
3107 
3108         rs.cancelRowUpdates();
3109 
3110         notifyRowChanged();
3111     }
3112 
3113     /**
3114      * Moves the cursor to the insert row.  The current cursor position is
3115      * remembered while the cursor is positioned on the insert row.
3116      *
3117      * The insert row is a special row associated with an updatable
3118      * result set.  It is essentially a buffer where a new row may
3119      * be constructed by calling the <code>updateXXX</code> methods prior to
3120      * inserting the row into the result set.
3121      *
3122      * Only the <code>updateXXX</code>, <code>getXXX</code>,
3123      * and <code>insertRow</code> methods may be
3124      * called when the cursor is on the insert row.  All of the columns in
3125      * a result set must be given a value each time this method is
3126      * called before calling <code>insertRow</code>.
3127      * An <code>updateXXX</code> method must be called before a
3128      * <code>getXXX</code> method can be called on a column value.
3129      *
3130      * @throws SQLException if (1) a database access error occurs,
3131      *            (2) this rowset's <code>ResultSet</code> object is
3132      *             not updatable, or (3) this rowset does not
3133      *             currently have a valid connection, prepared statement,
3134      *             and result set
3135      *
3136      */
3137     public void moveToInsertRow() throws SQLException {
3138         checkState();
3139 
3140         rs.moveToInsertRow();
3141     }
3142 
3143     /**
3144      * Moves the cursor to the remembered cursor position, usually the
3145      * current row.  This method has no effect if the cursor is not on
3146      * the insert row.
3147      *
3148      * @throws SQLException if (1) a database access error occurs,
3149      *            (2) this rowset's <code>ResultSet</code> object is
3150      *             not updatable, or (3) this rowset does not
3151      *             currently have a valid connection, prepared statement,
3152      *             and result set
3153      */
3154     public void moveToCurrentRow() throws SQLException {
3155         checkState();
3156 
3157         rs.moveToCurrentRow();
3158     }
3159 
3160     /**
3161      * Returns the <code>Statement</code> object that produced this
3162      * <code>ResultSet</code> object.
3163      * If the result set was generated some other way, such as by a
3164      * <code>DatabaseMetaData</code> method, this method returns
3165      * <code>null</code>.
3166      *
3167      * @return the <code>Statment</code> object that produced
3168      * this rowset's <code>ResultSet</code> object or <code>null</code>
3169      * if the result set was produced some other way
3170      * @throws SQLException if a database access error occurs
3171      */
3172     public java.sql.Statement getStatement() throws SQLException {
3173 
3174         if(rs != null)
3175         {
3176            return rs.getStatement();
3177         } else {
3178            return null;
3179         }
3180     }
3181 
3182     /**
3183      * Returns the value of the designated column in the current row
3184      * of this rowset's <code>ResultSet</code> object as an <code>Object</code>.
3185      * This method uses the given <code>Map</code> object
3186      * for the custom mapping of the
3187      * SQL structured or distinct type that is being retrieved.
3188      *
3189      * @param i the first column is 1, the second is 2, and so on
3190      * @param map a <code>java.util.Map</code> object that contains the mapping
3191      * from SQL type names to classes in the Java programming language
3192      * @return an <code>Object</code> in the Java programming language
3193      * representing the SQL value
3194      * @throws SQLException if (1) a database access error occurs
3195      *            or (2) this rowset does not currently have a valid connection,
3196      *            prepared statement, and result set
3197      */
3198     public Object getObject(int i, java.util.Map<String,Class<?>> map)
3199         throws SQLException
3200     {
3201         checkState();
3202 
3203         return rs.getObject(i, map);
3204     }
3205 
3206     /**
3207      * Returns the value of the designated column in the current row
3208      * of this rowset's <code>ResultSet</code> object as a <code>Ref</code> object.
3209      *
3210      * @param i the first column is 1, the second is 2, and so on
3211      * @return a <code>Ref</code> object representing an SQL <code>REF</code> value
3212      * @throws SQLException if (1) a database access error occurs
3213      *            or (2) this rowset does not currently have a valid connection,
3214      *            prepared statement, and result set
3215      */
3216     public Ref getRef(int i) throws SQLException {
3217         checkState();
3218 
3219         return rs.getRef(i);
3220     }
3221 
3222 
3223     /**
3224      * Returns the value of the designated column in the current row
3225      * of this rowset's <code>ResultSet</code> object as a <code>Blob</code> object.
3226      *
3227      * @param i the first column is 1, the second is 2, and so on
3228      * @return a <code>Blob</code> object representing the SQL <code>BLOB</code>
3229      *         value in the specified column
3230      * @throws SQLException if (1) a database access error occurs
3231      *            or (2) this rowset does not currently have a valid connection,
3232      *            prepared statement, and result set
3233      */
3234     public Blob getBlob(int i) throws SQLException {
3235         checkState();
3236 
3237         return rs.getBlob(i);
3238     }
3239 
3240     /**
3241      * Returns the value of the designated column in the current row
3242      * of this rowset's <code>ResultSet</code> object as a <code>Clob</code> object.
3243      *
3244      * @param i the first column is 1, the second is 2, and so on
3245      * @return a <code>Clob</code> object representing the SQL <code>CLOB</code>
3246      *         value in the specified column
3247      * @throws SQLException if (1) a database access error occurs
3248      *            or (2) this rowset does not currently have a valid connection,
3249      *            prepared statement, and result set
3250      */
3251     public Clob getClob(int i) throws SQLException {
3252         checkState();
3253 
3254         return rs.getClob(i);
3255     }
3256 
3257     /**
3258      * Returns the value of the designated column in the current row
3259      * of this rowset's <code>ResultSet</code> object as an <code>Array</code> object.
3260      *
3261      * @param i the first column is 1, the second is 2, and so on.
3262      * @return an <code>Array</code> object representing the SQL <code>ARRAY</code>
3263      *         value in the specified column
3264      * @throws SQLException if (1) a database access error occurs
3265      *            or (2) this rowset does not currently have a valid connection,
3266      *            prepared statement, and result set
3267      */
3268     public Array getArray(int i) throws SQLException {
3269         checkState();
3270 
3271         return rs.getArray(i);
3272     }
3273 
3274     /**
3275      * Returns the value of the designated column in the current row
3276      * of this rowset's <code>ResultSet</code> object as an <code>Object</code>.
3277      * This method uses the specified <code>Map</code> object for
3278      * custom mapping if appropriate.
3279      *
3280      * @param colName the name of the column from which to retrieve the value
3281      * @param map a <code>java.util.Map</code> object that contains the mapping
3282      * from SQL type names to classes in the Java programming language
3283      * @return an <code>Object</code> representing the SQL
3284      *         value in the specified column
3285      * @throws SQLException if (1) a database access error occurs
3286      *            or (2) this rowset does not currently have a valid connection,
3287      *            prepared statement, and result set
3288      */
3289     public Object getObject(String colName, java.util.Map<String,Class<?>> map)
3290         throws SQLException
3291     {
3292         return getObject(findColumn(colName), map);
3293     }
3294 
3295     /**
3296      * Returns the value of the designated column in the current row
3297      * of this rowset's <code>ResultSet</code> object as a <code>Ref</code> object.
3298      *
3299      * @param colName the column name
3300      * @return a <code>Ref</code> object representing the SQL <code>REF</code> value in
3301      *         the specified column
3302      * @throws SQLException if (1) a database access error occurs
3303      *            or (2) this rowset does not currently have a valid connection,
3304      *            prepared statement, and result set
3305      */
3306     public Ref getRef(String colName) throws SQLException {
3307         return getRef(findColumn(colName));
3308     }
3309 
3310     /**
3311      * Returns the value of the designated column in the current row
3312      * of this rowset's <code>ResultSet</code> object as a <code>Blob</code> object.
3313      *
3314      * @param colName the name of the column from which to retrieve the value
3315      * @return a <code>Blob</code> object representing the SQL <code>BLOB</code>
3316      *         value in the specified column
3317      * @throws SQLException if (1) a database access error occurs
3318      *            or (2) this rowset does not currently have a valid connection,
3319      *            prepared statement, and result set
3320      */
3321     public Blob getBlob(String colName) throws SQLException {
3322         return getBlob(findColumn(colName));
3323     }
3324 
3325     /**
3326      * Returns the value of the designated column in the current row
3327      * of this rowset's <code>ResultSet</code> object as a <code>Clob</code> object.
3328      *
3329      * @param colName the name of the column from which to retrieve the value
3330      * @return a <code>Clob</code> object representing the SQL <code>CLOB</code>
3331      *         value in the specified column
3332      * @throws SQLException if (1) a database access error occurs
3333      *            or (2) this rowset does not currently have a valid connection,
3334      *            prepared statement, and result set
3335      */
3336     public Clob getClob(String colName) throws SQLException {
3337         return getClob(findColumn(colName));
3338     }
3339 
3340     /**
3341      * Returns the value of the designated column in the current row
3342      * of this rowset's <code>ResultSet</code> object as an <code>Array</code> object.
3343      *
3344      * @param colName the name of the column from which to retrieve the value
3345      * @return an <code>Array</code> object representing the SQL <code>ARRAY</code>
3346      *         value in the specified column
3347      * @throws SQLException if (1) a database access error occurs
3348      *            or (2) this rowset does not currently have a valid connection,
3349      *            prepared statement, and result set
3350      */
3351     public Array getArray(String colName) throws SQLException {
3352         return getArray(findColumn(colName));
3353     }
3354 
3355     /**
3356      * Returns the value of the designated column in the current row
3357      * of this rowset's <code>ResultSet</code> object as a <code>java.sql.Date</code>
3358      * object. This method uses the given calendar to construct an appropriate
3359      * millisecond value for the date if the underlying database does not store
3360      * timezone information.
3361      *
3362      * @param columnIndex the first column is 1, the second is 2, and so on
3363      * @param cal the <code>java.util.Calendar</code> object
3364      *        to use in constructing the date
3365      * @return the column value as a <code>java.sql.Date</code> object;
3366      *         if the value is SQL <code>NULL</code>,
3367      *         the value returned is <code>null</code>
3368      * @throws SQLException if (1) a database access error occurs
3369      *            or (2) this rowset does not currently have a valid connection,
3370      *            prepared statement, and result set
3371      */
3372     public java.sql.Date getDate(int columnIndex, Calendar cal) throws SQLException {
3373         checkState();
3374 
3375         return rs.getDate(columnIndex, cal);
3376     }
3377 
3378     /**
3379      * Returns the value of the designated column in the current row
3380      * of this rowset's <code>ResultSet</code> object as a <code>java.sql.Date</code>
3381      * object. This method uses the given calendar to construct an appropriate
3382      * millisecond value for the date if the underlying database does not store
3383      * timezone information.
3384      *
3385      * @param columnName the SQL name of the column from which to retrieve the value
3386      * @param cal the <code>java.util.Calendar</code> object
3387      *        to use in constructing the date
3388      * @return the column value as a <code>java.sql.Date</code> object;
3389      *         if the value is SQL <code>NULL</code>,
3390      *         the value returned is <code>null</code>
3391      * @throws SQLException if a database access error occurs
3392      *            or this rowset does not currently have a valid connection,
3393      *            prepared statement, and result set
3394      *
3395      */
3396     public java.sql.Date getDate(String columnName, Calendar cal) throws SQLException {
3397         return getDate(findColumn(columnName), cal);
3398     }
3399 
3400     /**
3401      * Returns the value of the designated column in the current row
3402      * of this rowset's <code>ResultSet</code> object as a <code>java.sql.Time</code>
3403      * object. This method uses the given calendar to construct an appropriate
3404      * millisecond value for the date if the underlying database does not store
3405      * timezone information.
3406      *
3407      * @param columnIndex the first column is 1, the second is 2, and so on
3408      * @param cal the <code>java.util.Calendar</code> object
3409      *        to use in constructing the time
3410      * @return the column value as a <code>java.sql.Time</code> object;
3411      *         if the value is SQL <code>NULL</code>,
3412      *         the value returned is <code>null</code> in the Java programming language
3413      * @throws SQLException if a database access error occurs
3414      *            or this rowset does not currently have a valid connection,
3415      *            prepared statement, and result set
3416      */
3417     public java.sql.Time getTime(int columnIndex, Calendar cal) throws SQLException {
3418         checkState();
3419 
3420         return rs.getTime(columnIndex, cal);
3421     }
3422 
3423     /**
3424      * Returns the value of the designated column in the current row
3425      * of this rowset's <code>ResultSet</code> object as a <code>java.sql.Time</code>
3426      * object. This method uses the given calendar to construct an appropriate
3427      * millisecond value for the date if the underlying database does not store
3428      * timezone information.
3429      *
3430      * @param columnName the SQL name of the column
3431      * @param cal the <code>java.util.Calendar</code> object
3432      *        to use in constructing the time
3433      * @return the column value as a <code>java.sql.Time</code> object;
3434      *         if the value is SQL <code>NULL</code>,
3435      *         the value returned is <code>null</code> in the Java programming language
3436      * @throws SQLException if a database access error occurs
3437      *            or this rowset does not currently have a valid connection,
3438      *            prepared statement, and result set
3439      */
3440     public java.sql.Time getTime(String columnName, Calendar cal) throws SQLException {
3441         return getTime(findColumn(columnName), cal);
3442     }
3443 
3444     /**
3445      * Returns the value of the designated column in the current row
3446      * of this rowset's <code>ResultSet</code> object as a
3447      * <code>java.sql.Timestamp</code> object.
3448      * This method uses the given calendar to construct an appropriate millisecond
3449      * value for the timestamp if the underlying database does not store
3450      * timezone information.
3451      *
3452      * @param columnIndex the first column is 1, the second is 2, and so on
3453      * @param cal the <code>java.util.Calendar</code> object
3454      *        to use in constructing the timestamp
3455      * @return the column value as a <code>java.sql.Timestamp</code> object;
3456      *         if the value is SQL <code>NULL</code>,
3457      *         the value returned is <code>null</code>
3458      * @throws SQLException if a database access error occurs
3459      *            or this rowset does not currently have a valid connection,
3460      *            prepared statement, and result set
3461      */
3462     public java.sql.Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException {
3463         checkState();
3464 
3465         return rs.getTimestamp(columnIndex, cal);
3466     }
3467 
3468     /**
3469      * Returns the value of the designated column in the current row
3470      * of this rowset's <code>ResultSet</code> object as a
3471      * <code>java.sql.Timestamp</code> object.
3472      * This method uses the given calendar to construct an appropriate millisecond
3473      * value for the timestamp if the underlying database does not store
3474      * timezone information.
3475      *
3476      * @param columnName the SQL name of the column
3477      * @param cal the <code>java.util.Calendar</code> object
3478      *        to use in constructing the timestamp
3479      * @return the column value as a <code>java.sql.Timestamp</code> object;
3480      *         if the value is SQL <code>NULL</code>,
3481      *         the value returned is <code>null</code>
3482      * @throws SQLException if a database access error occurs
3483      *            or this rowset does not currently have a valid connection,
3484      *            prepared statement, and result set
3485      */
3486     public java.sql.Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException {
3487         return getTimestamp(findColumn(columnName), cal);
3488     }
3489 
3490 
3491     /**
3492      * Sets the designated column in either the current row or the insert
3493      * row of this <code>JdbcRowSetImpl</code> object with the given
3494      * <code>double</code> value.
3495      *
3496      * This method updates a column value in either the current row or
3497      * the insert row of this rowset, but it does not update the
3498      * database.  If the cursor is on a row in the rowset, the
3499      * method {@link #updateRow} must be called to update the database.
3500      * If the cursor is on the insert row, the method {@link #insertRow}
3501      * must be called, which will insert the new row into both this rowset
3502      * and the database. Both of these methods must be called before the
3503      * cursor moves to another row.
3504      *
3505      * @param columnIndex the first column is <code>1</code>, the second
3506      *        is <code>2</code>, and so on; must be <code>1</code> or larger
3507      *        and equal to or less than the number of columns in this rowset
3508      * @param ref the new <code>Ref</code> column value
3509      * @throws SQLException if (1) the given column index is out of bounds,
3510      *            (2) the cursor is not on one of this rowset's rows or its
3511      *            insert row, or (3) this rowset is
3512      *            <code>ResultSet.CONCUR_READ_ONLY</code>
3513      */
3514     public void updateRef(int columnIndex, java.sql.Ref ref)
3515         throws SQLException {
3516         checkState();
3517         rs.updateRef(columnIndex, ref);
3518     }
3519 
3520     /**
3521      * Sets the designated column in either the current row or the insert
3522      * row of this <code>JdbcRowSetImpl</code> object with the given
3523      * <code>double</code> value.
3524      *
3525      * This method updates a column value in either the current row or
3526      * the insert row of this rowset, but it does not update the
3527      * database.  If the cursor is on a row in the rowset, the
3528      * method {@link #updateRow} must be called to update the database.
3529      * If the cursor is on the insert row, the method {@link #insertRow}
3530      * must be called, which will insert the new row into both this rowset
3531      * and the database. Both of these methods must be called before the
3532      * cursor moves to another row.
3533      *
3534      * @param columnName a <code>String</code> object that must match the
3535      *        SQL name of a column in this rowset, ignoring case
3536      * @param ref the new column value
3537      * @throws SQLException if (1) the given column name does not match the
3538      *            name of a column in this rowset, (2) the cursor is not on
3539      *            one of this rowset's rows or its insert row, or (3) this
3540      *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
3541      */
3542     public void updateRef(String columnName, java.sql.Ref ref)
3543         throws SQLException {
3544         updateRef(findColumn(columnName), ref);
3545     }
3546 
3547     /**
3548      * Sets the designated column in either the current row or the insert
3549      * row of this <code>JdbcRowSetImpl</code> object with the given
3550      * <code>double</code> value.
3551      *
3552      * This method updates a column value in either the current row or
3553      * the insert row of this rowset, but it does not update the
3554      * database.  If the cursor is on a row in the rowset, the
3555      * method {@link #updateRow} must be called to update the database.
3556      * If the cursor is on the insert row, the method {@link #insertRow}
3557      * must be called, which will insert the new row into both this rowset
3558      * and the database. Both of these methods must be called before the
3559      * cursor moves to another row.
3560      *
3561      * @param columnIndex the first column is <code>1</code>, the second
3562      *        is <code>2</code>, and so on; must be <code>1</code> or larger
3563      *        and equal to or less than the number of columns in this rowset
3564      * @param c the new column <code>Clob</code> value
3565      * @throws SQLException if (1) the given column index is out of bounds,
3566      *            (2) the cursor is not on one of this rowset's rows or its
3567      *            insert row, or (3) this rowset is
3568      *            <code>ResultSet.CONCUR_READ_ONLY</code>
3569      */
3570     public void updateClob(int columnIndex, Clob c) throws SQLException {
3571         checkState();
3572         rs.updateClob(columnIndex, c);
3573     }
3574 
3575 
3576     /**
3577      * Sets the designated column in either the current row or the insert
3578      * row of this <code>JdbcRowSetImpl</code> object with the given
3579      * <code>double</code> value.
3580      *
3581      * This method updates a column value in either the current row or
3582      * the insert row of this rowset, but it does not update the
3583      * database.  If the cursor is on a row in the rowset, the
3584      * method {@link #updateRow} must be called to update the database.
3585      * If the cursor is on the insert row, the method {@link #insertRow}
3586      * must be called, which will insert the new row into both this rowset
3587      * and the database. Both of these methods must be called before the
3588      * cursor moves to another row.
3589      *
3590      * @param columnName a <code>String</code> object that must match the
3591      *        SQL name of a column in this rowset, ignoring case
3592      * @param c the new column <code>Clob</code> value
3593      * @throws SQLException if (1) the given column name does not match the
3594      *            name of a column in this rowset, (2) the cursor is not on
3595      *            one of this rowset's rows or its insert row, or (3) this
3596      *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
3597      */
3598     public void updateClob(String columnName, Clob c) throws SQLException {
3599         updateClob(findColumn(columnName), c);
3600     }
3601 
3602     /**
3603      * Sets the designated column in either the current row or the insert
3604      * row of this <code>JdbcRowSetImpl</code> object with the given
3605      * <code>java.sql.Blob</code> value.
3606      *
3607      * This method updates a column value in either the current row or
3608      * the insert row of this rowset, but it does not update the
3609      * database.  If the cursor is on a row in the rowset, the
3610      * method {@link #updateRow} must be called to update the database.
3611      * If the cursor is on the insert row, the method {@link #insertRow}
3612      * must be called, which will insert the new row into both this rowset
3613      * and the database. Both of these methods must be called before the
3614      * cursor moves to another row.
3615      *
3616      * @param columnIndex the first column is <code>1</code>, the second
3617      *        is <code>2</code>, and so on; must be <code>1</code> or larger
3618      *        and equal to or less than the number of columns in this rowset
3619      * @param b the new column <code>Blob</code> value
3620      * @throws SQLException if (1) the given column index is out of bounds,
3621      *            (2) the cursor is not on one of this rowset's rows or its
3622      *            insert row, or (3) this rowset is
3623      *            <code>ResultSet.CONCUR_READ_ONLY</code>
3624      */
3625     public void updateBlob(int columnIndex, Blob b) throws SQLException {
3626         checkState();
3627         rs.updateBlob(columnIndex, b);
3628     }
3629 
3630     /**
3631      * Sets the designated column in either the current row or the insert
3632      * row of this <code>JdbcRowSetImpl</code> object with the given
3633      * <code>java.sql.Blob </code> value.
3634      *
3635      * This method updates a column value in either the current row or
3636      * the insert row of this rowset, but it does not update the
3637      * database.  If the cursor is on a row in the rowset, the
3638      * method {@link #updateRow} must be called to update the database.
3639      * If the cursor is on the insert row, the method {@link #insertRow}
3640      * must be called, which will insert the new row into both this rowset
3641      * and the database. Both of these methods must be called before the
3642      * cursor moves to another row.
3643      *
3644      * @param columnName a <code>String</code> object that must match the
3645      *        SQL name of a column in this rowset, ignoring case
3646      * @param b the new column <code>Blob</code> value
3647      * @throws SQLException if (1) the given column name does not match the
3648      *            name of a column in this rowset, (2) the cursor is not on
3649      *            one of this rowset's rows or its insert row, or (3) this
3650      *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
3651      */
3652     public void updateBlob(String columnName, Blob b) throws SQLException {
3653         updateBlob(findColumn(columnName), b);
3654     }
3655 
3656     /**
3657      * Sets the designated column in either the current row or the insert
3658      * row of this <code>JdbcRowSetImpl</code> object with the given
3659      * <code>java.sql.Array</code> values.
3660      *
3661      * This method updates a column value in either the current row or
3662      * the insert row of this rowset, but it does not update the
3663      * database.  If the cursor is on a row in the rowset, the
3664      * method {@link #updateRow} must be called to update the database.
3665      * If the cursor is on the insert row, the method {@link #insertRow}
3666      * must be called, which will insert the new row into both this rowset
3667      * and the database. Both of these methods must be called before the
3668      * cursor moves to another row.
3669      *
3670      * @param columnIndex the first column is <code>1</code>, the second
3671      *        is <code>2</code>, and so on; must be <code>1</code> or larger
3672      *        and equal to or less than the number of columns in this rowset
3673      * @param a the new column <code>Array</code> value
3674      * @throws SQLException if (1) the given column index is out of bounds,
3675      *            (2) the cursor is not on one of this rowset's rows or its
3676      *            insert row, or (3) this rowset is
3677      *            <code>ResultSet.CONCUR_READ_ONLY</code>
3678      */
3679     public void updateArray(int columnIndex, Array a) throws SQLException {
3680         checkState();
3681         rs.updateArray(columnIndex, a);
3682     }
3683 
3684     /**
3685      * Sets the designated column in either the current row or the insert
3686      * row of this <code>JdbcRowSetImpl</code> object with the given
3687      * <code>java.sql.Array</code> value.
3688      *
3689      * This method updates a column value in either the current row or
3690      * the insert row of this rowset, but it does not update the
3691      * database.  If the cursor is on a row in the rowset, the
3692      * method {@link #updateRow} must be called to update the database.
3693      * If the cursor is on the insert row, the method {@link #insertRow}
3694      * must be called, which will insert the new row into both this rowset
3695      * and the database. Both of these methods must be called before the
3696      * cursor moves to another row.
3697      *
3698      * @param columnName a <code>String</code> object that must match the
3699      *        SQL name of a column in this rowset, ignoring case
3700      * @param a the new column <code>Array</code> value
3701      * @throws SQLException if (1) the given column name does not match the
3702      *            name of a column in this rowset, (2) the cursor is not on
3703      *            one of this rowset's rows or its insert row, or (3) this
3704      *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
3705      */
3706     public void updateArray(String columnName, Array a) throws SQLException {
3707         updateArray(findColumn(columnName), a);
3708     }
3709 
3710     /**
3711      * Provide interface coverage for getURL(int) in ResultSet->RowSet
3712      */
3713     public java.net.URL getURL(int columnIndex) throws SQLException {
3714         checkState();
3715         return rs.getURL(columnIndex);
3716     }
3717 
3718     /**
3719      * Provide interface coverage for getURL(String) in ResultSet->RowSet
3720      */
3721     public java.net.URL getURL(String columnName) throws SQLException {
3722         return getURL(findColumn(columnName));
3723     }
3724 
3725     /**
3726      * Return the RowSetWarning object for the current row of a
3727      * <code>JdbcRowSetImpl</code>
3728      */
3729     public RowSetWarning getRowSetWarnings() throws SQLException {
3730        return null;
3731     }
3732     /**
3733      * Unsets the designated parameter to the given int array.
3734      * This was set using <code>setMatchColumn</code>
3735      * as the column which will form the basis of the join.
3736      * <P>
3737      * The parameter value unset by this method should be same
3738      * as was set.
3739      *
3740      * @param columnIdxes the index into this rowset
3741      *        object's internal representation of parameter values
3742      * @throws SQLException if an error occurs or the
3743      *  parameter index is out of bounds or if the columnIdx is
3744      *  not the same as set using <code>setMatchColumn(int [])</code>
3745      */
3746     public void unsetMatchColumn(int[] columnIdxes) throws SQLException {
3747 
3748          int i_val;
3749          for( int j= 0 ;j < columnIdxes.length; j++) {
3750             i_val = (Integer.parseInt(iMatchColumns.get(j).toString()));
3751             if(columnIdxes[j] != i_val) {
3752                throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols").toString());
3753             }
3754          }
3755 
3756          for( int i = 0;i < columnIdxes.length ;i++) {
3757             iMatchColumns.set(i,Integer.valueOf(-1));
3758          }
3759     }
3760 
3761    /**
3762      * Unsets the designated parameter to the given String array.
3763      * This was set using <code>setMatchColumn</code>
3764      * as the column which will form the basis of the join.
3765      * <P>
3766      * The parameter value unset by this method should be same
3767      * as was set.
3768      *
3769      * @param columnIdxes the index into this rowset
3770      *        object's internal representation of parameter values
3771      * @throws SQLException if an error occurs or the
3772      *  parameter index is out of bounds or if the columnName is
3773      *  not the same as set using <code>setMatchColumn(String [])</code>
3774      */
3775     public void unsetMatchColumn(String[] columnIdxes) throws SQLException {
3776 
3777         for(int j = 0 ;j < columnIdxes.length; j++) {
3778            if( !columnIdxes[j].equals(strMatchColumns.get(j)) ){
3779               throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols").toString());
3780            }
3781         }
3782 
3783         for(int i = 0 ; i < columnIdxes.length; i++) {
3784            strMatchColumns.set(i,null);
3785         }
3786     }
3787 
3788     /**
3789      * Retrieves the column name as <code>String</code> array
3790      * that was set using <code>setMatchColumn(String [])</code>
3791      * for this rowset.
3792      *
3793      * @return a <code>String</code> array object that contains the column names
3794      *         for the rowset which has this the match columns
3795      *
3796      * @throws SQLException if an error occurs or column name is not set
3797      */
3798     public String[] getMatchColumnNames() throws SQLException {
3799 
3800         String []str_temp = new String[strMatchColumns.size()];
3801 
3802         if( strMatchColumns.get(0) == null) {
3803            throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.setmatchcols").toString());
3804         }
3805 
3806         strMatchColumns.copyInto(str_temp);
3807         return str_temp;
3808     }
3809 
3810     /**
3811      * Retrieves the column id as <code>int</code> array that was set using
3812      * <code>setMatchColumn(int [])</code> for this rowset.
3813      *
3814      * @return a <code>int</code> array object that contains the column ids
3815      *         for the rowset which has this as the match columns.
3816      *
3817      * @throws SQLException if an error occurs or column index is not set
3818      */
3819     public int[] getMatchColumnIndexes() throws SQLException {
3820 
3821         Integer []int_temp = new Integer[iMatchColumns.size()];
3822         int [] i_temp = new int[iMatchColumns.size()];
3823         int i_val;
3824 
3825         i_val = ((Integer)iMatchColumns.get(0)).intValue();
3826 
3827         if( i_val == -1 ) {
3828            throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.setmatchcols").toString());
3829         }
3830 
3831 
3832         iMatchColumns.copyInto(int_temp);
3833 
3834         for(int i = 0; i < int_temp.length; i++) {
3835            i_temp[i] = (int_temp[i]).intValue();
3836         }
3837 
3838         return i_temp;
3839     }
3840 
3841     /**
3842      * Sets the designated parameter to the given int array.
3843      * This forms the basis of the join for the
3844      * <code>JoinRowSet</code> as the column which will form the basis of the
3845      * join.
3846      * <P>
3847      * The parameter value set by this method is stored internally and
3848      * will be supplied as the appropriate parameter in this rowset's
3849      * command when the method <code>getMatchColumnIndexes</code> is called.
3850      *
3851      * @param columnIdxes the indexes into this rowset
3852      *        object's internal representation of parameter values; the
3853      *        first parameter is 0, the second is 1, and so on; must be
3854      *        <code>0</code> or greater
3855      * @throws SQLException if an error occurs or the
3856      *                         parameter index is out of bounds
3857      */
3858     public void setMatchColumn(int[] columnIdxes) throws SQLException {
3859 
3860         for(int j = 0 ; j < columnIdxes.length; j++) {
3861            if( columnIdxes[j] < 0 ) {
3862               throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols1").toString());
3863            }
3864         }
3865         for(int i = 0 ;i < columnIdxes.length; i++) {
3866            iMatchColumns.add(i,Integer.valueOf(columnIdxes[i]));
3867         }
3868     }
3869 
3870     /**
3871      * Sets the designated parameter to the given String array.
3872      *  This forms the basis of the join for the
3873      * <code>JoinRowSet</code> as the column which will form the basis of the
3874      * join.
3875      * <P>
3876      * The parameter value set by this method is stored internally and
3877      * will be supplied as the appropriate parameter in this rowset's
3878      * command when the method <code>getMatchColumn</code> is called.
3879      *
3880      * @param columnNames the name of the column into this rowset
3881      *        object's internal representation of parameter values
3882      * @throws SQLException if an error occurs or the
3883      *  parameter index is out of bounds
3884      */
3885     public void setMatchColumn(String[] columnNames) throws SQLException {
3886 
3887         for(int j = 0; j < columnNames.length; j++) {
3888            if( columnNames[j] == null || columnNames[j].equals("")) {
3889               throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols2").toString());
3890            }
3891         }
3892         for( int i = 0; i < columnNames.length; i++) {
3893            strMatchColumns.add(i,columnNames[i]);
3894         }
3895     }
3896 
3897 
3898         /**
3899      * Sets the designated parameter to the given <code>int</code>
3900      * object.  This forms the basis of the join for the
3901      * <code>JoinRowSet</code> as the column which will form the basis of the
3902      * join.
3903      * <P>
3904      * The parameter value set by this method is stored internally and
3905      * will be supplied as the appropriate parameter in this rowset's
3906      * command when the method <code>getMatchColumn</code> is called.
3907      *
3908      * @param columnIdx the index into this rowset
3909      *        object's internal representation of parameter values; the
3910      *        first parameter is 0, the second is 1, and so on; must be
3911      *        <code>0</code> or greater
3912      * @throws SQLException if an error occurs or the
3913      *                         parameter index is out of bounds
3914      */
3915     public void setMatchColumn(int columnIdx) throws SQLException {
3916         // validate, if col is ok to be set
3917         if(columnIdx < 0) {
3918             throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols1").toString());
3919         } else {
3920             // set iMatchColumn
3921             iMatchColumns.set(0, Integer.valueOf(columnIdx));
3922             //strMatchColumn = null;
3923         }
3924     }
3925 
3926     /**
3927      * Sets the designated parameter to the given <code>String</code>
3928      * object.  This forms the basis of the join for the
3929      * <code>JoinRowSet</code> as the column which will form the basis of the
3930      * join.
3931      * <P>
3932      * The parameter value set by this method is stored internally and
3933      * will be supplied as the appropriate parameter in this rowset's
3934      * command when the method <code>getMatchColumn</code> is called.
3935      *
3936      * @param columnName the name of the column into this rowset
3937      *        object's internal representation of parameter values
3938      * @throws SQLException if an error occurs or the
3939      *  parameter index is out of bounds
3940      */
3941     public void setMatchColumn(String columnName) throws SQLException {
3942         // validate, if col is ok to be set
3943         if(columnName == null || (columnName= columnName.trim()).equals("")) {
3944             throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols2").toString());
3945         } else {
3946             // set strMatchColumn
3947             strMatchColumns.set(0, columnName);
3948             //iMatchColumn = -1;
3949         }
3950     }
3951 
3952     /**
3953      * Unsets the designated parameter to the given <code>int</code>
3954      * object.  This was set using <code>setMatchColumn</code>
3955      * as the column which will form the basis of the join.
3956      * <P>
3957      * The parameter value unset by this method should be same
3958      * as was set.
3959      *
3960      * @param columnIdx the index into this rowset
3961      *        object's internal representation of parameter values
3962      * @throws SQLException if an error occurs or the
3963      *  parameter index is out of bounds or if the columnIdx is
3964      *  not the same as set using <code>setMatchColumn(int)</code>
3965      */
3966     public void unsetMatchColumn(int columnIdx) throws SQLException {
3967         // check if we are unsetting the SAME column
3968         if(! iMatchColumns.get(0).equals(Integer.valueOf(columnIdx) )  ) {
3969             throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.unsetmatch").toString());
3970         } else if(strMatchColumns.get(0) != null) {
3971             throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.usecolname").toString());
3972         } else {
3973                 // that is, we are unsetting it.
3974                iMatchColumns.set(0, Integer.valueOf(-1));
3975         }
3976     }
3977 
3978     /**
3979      * Unsets the designated parameter to the given <code>String</code>
3980      * object.  This was set using <code>setMatchColumn</code>
3981      * as the column which will form the basis of the join.
3982      * <P>
3983      * The parameter value unset by this method should be same
3984      * as was set.
3985      *
3986      * @param columnName the index into this rowset
3987      *        object's internal representation of parameter values
3988      * @throws SQLException if an error occurs or the
3989      *  parameter index is out of bounds or if the columnName is
3990      *  not the same as set using <code>setMatchColumn(String)</code>
3991      *
3992      */
3993     public void unsetMatchColumn(String columnName) throws SQLException {
3994         // check if we are unsetting the same column
3995         columnName = columnName.trim();
3996 
3997         if(!((strMatchColumns.get(0)).equals(columnName))) {
3998             throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.unsetmatch").toString());
3999         } else if( ((Integer)(iMatchColumns.get(0))).intValue() > 0) {
4000             throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.usecolid").toString());
4001         } else {
4002             strMatchColumns.set(0, null);   // that is, we are unsetting it.
4003         }
4004     }
4005 
4006     /**
4007      * Retrieves the <code>DatabaseMetaData</code> associated with
4008      * the connection handle associated this this
4009      * <code>JdbcRowSet</code> object.
4010      *
4011      * @return the <code>DatabaseMetadata</code> associated
4012      *  with the rowset's connection.
4013      * @throws SQLException if a database access error occurs
4014      */
4015     public DatabaseMetaData getDatabaseMetaData() throws SQLException {
4016         Connection con = connect();
4017         return con.getMetaData();
4018     }
4019 
4020     /**
4021      * Retrieves the <code>ParameterMetaData</code> associated with
4022      * the connection handle associated this this
4023      * <code>JdbcRowSet</code> object.
4024      *
4025      * @return the <code>ParameterMetadata</code> associated
4026      *  with the rowset's connection.
4027      * @throws SQLException if a database access error occurs
4028      */
4029     public ParameterMetaData getParameterMetaData() throws SQLException {
4030         prepare();
4031         return (ps.getParameterMetaData());
4032     }
4033 
4034     /**
4035      * Commits all updates in this <code>JdbcRowSet</code> object by
4036      * wrapping the internal <code>Connection</code> object and calling
4037      * its <code>commit</code> method.
4038      * This method sets this <code>JdbcRowSet</code> object's private field
4039      * <code>rs</code> to <code>null</code> after saving its value to another
4040      * object, but only if the <code>ResultSet</code>
4041      * constant <code>HOLD_CURSORS_OVER_COMMIT</code> has not been set.
4042      * (The field <code>rs</code> is this <code>JdbcRowSet</code> object's
4043      * <code>ResultSet</code> object.)
4044      *
4045      * @throws SQLException if autoCommit is set to true or if a database
4046      * access error occurs
4047      */
4048     public void commit() throws SQLException {
4049       conn.commit();
4050 
4051       // Checking the holadbility value and making the result set handle null
4052       // Added as per Rave requirements
4053 
4054       if( conn.getHoldability() != HOLD_CURSORS_OVER_COMMIT) {
4055          ResultSet oldVal = rs;
4056          rs = null;
4057          // propertyChangeSupport.firePropertyChange("ResultSet",oldVal,rs);
4058       }
4059     }
4060 
4061     /**
4062      * Sets auto-commit on the internal <code>Connection</code> object with this
4063      * <code>JdbcRowSet</code>
4064      *
4065      * @throws SQLException if a database access error occurs
4066      */
4067     public void setAutoCommit(boolean autoCommit) throws SQLException {
4068         // The connection object should be there
4069         // in order to commit the connection handle on or off.
4070 
4071         if(conn != null) {
4072            conn.setAutoCommit(autoCommit);
4073         } else {
4074            // Coming here means the connection object is null.
4075            // So generate a connection handle internally, since
4076            // a JdbcRowSet is always connected to a db, it is fine
4077            // to get a handle to the connection.
4078 
4079            // Get hold of a connection handle
4080            // and change the autcommit as passesd.
4081            conn = connect();
4082 
4083            // After setting the below the conn.getAutoCommit()
4084            // should return the same value.
4085            conn.setAutoCommit(autoCommit);
4086 
4087         }
4088     }
4089 
4090     /**
4091      * Returns the auto-commit status with this <code>JdbcRowSet</code>.
4092      *
4093      * @return true if auto commit is true; false otherwise
4094      * @throws SQLException if a database access error occurs
4095      */
4096     public boolean getAutoCommit() throws SQLException {
4097         return conn.getAutoCommit();
4098     }
4099 
4100     /**
4101      * Rolls back all the updates in this <code>JdbcRowSet</code> object by
4102      * wrapping the internal <code>Connection</code> object and calling its
4103      * <code>rollback</code> method.
4104      * This method sets this <code>JdbcRowSet</code> object's private field
4105      * <code>rs</code> to <code>null</code> after saving its value to another object.
4106      * (The field <code>rs</code> is this <code>JdbcRowSet</code> object's
4107      * internal <code>ResultSet</code> object.)
4108      *
4109      * @throws SQLException if autoCommit is set to true or a database
4110      * access error occurs
4111      */
4112     public void rollback() throws SQLException {
4113         conn.rollback();
4114 
4115         // Makes the result ste handle null after rollback
4116         // Added as per Rave requirements
4117 
4118         ResultSet oldVal = rs;
4119         rs = null;
4120         // propertyChangeSupport.firePropertyChange("ResultSet", oldVal,rs);
4121     }
4122 
4123 
4124     /**
4125      * Rollbacks all the updates in the <code>JdbcRowSet</code> back to the
4126      * last <code>Savepoint</code> transaction marker. Wraps the internal
4127      * <code>Connection</code> object and call it's rollback method
4128      *
4129      * @param s the <code>Savepoint</code> transaction marker to roll the
4130      * transaction to.
4131      * @throws SQLException if autoCommit is set to true; or ia a database
4132      * access error occurs
4133      */
4134     public void rollback(Savepoint s) throws SQLException {
4135         conn.rollback(s);
4136     }
4137 
4138     // Setting the ResultSet Type and Concurrency
4139     protected void setParams() throws SQLException {
4140         if(rs == null) {
4141            setType(ResultSet.TYPE_SCROLL_INSENSITIVE);
4142            setConcurrency(ResultSet.CONCUR_UPDATABLE);
4143         }
4144         else {
4145             setType(rs.getType());
4146             setConcurrency(rs.getConcurrency());
4147         }
4148     }
4149 
4150 
4151     // Checking ResultSet Type and Concurrency
4152     private void checkTypeConcurrency() throws SQLException {
4153         if(rs.getType() == TYPE_FORWARD_ONLY ||
4154            rs.getConcurrency() == CONCUR_READ_ONLY) {
4155               throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.resnotupd").toString());
4156          }
4157     }
4158 
4159      // Returns a Connection Handle
4160     //  Added as per Rave requirements
4161 
4162     /**
4163      * Gets this <code>JdbcRowSet</code> object's Connection property
4164      *
4165      *
4166      * @return the <code>Connection</code> object associated with this rowset;
4167      */
4168 
4169     protected Connection getConnection() {
4170        return conn;
4171     }
4172 
4173     // Sets the connection handle with the parameter
4174     // Added as per rave requirements
4175 
4176     /**
4177      * Sets this <code>JdbcRowSet</code> object's connection property
4178      * to the given <code>Connection</code> object.
4179      *
4180      * @param connection the <code>Connection</code> object.
4181      */
4182 
4183     protected void setConnection(Connection connection) {
4184        conn = connection;
4185     }
4186 
4187     // Returns a PreparedStatement Handle
4188     // Added as per Rave requirements
4189 
4190     /**
4191      * Gets this <code>JdbcRowSet</code> object's PreparedStatement property
4192      *
4193      *
4194      * @return the <code>PreparedStatement</code> object associated with this rowset;
4195      */
4196 
4197     protected PreparedStatement getPreparedStatement() {
4198        return ps;
4199     }
4200 
4201     //Sets the prepared statement handle to the parameter
4202     // Added as per Rave requirements
4203 
4204     /**
4205      * Sets this <code>JdbcRowSet</code> object's preparedtsatement property
4206      * to the given <code>PreparedStatemennt</code> object.
4207      *
4208      * @param preparedStatement the <code>PreparedStatement</code> object
4209      *
4210      */
4211     protected void setPreparedStatement(PreparedStatement preparedStatement) {
4212        ps = preparedStatement;
4213     }
4214 
4215     // Returns a ResultSet handle
4216     // Added as per Rave requirements
4217 
4218     /**
4219      * Gets this <code>JdbcRowSet</code> object's ResultSet property
4220      *
4221      *
4222      * @return the <code>ResultSet</code> object associated with this rowset;
4223      */
4224 
4225     protected ResultSet getResultSet() throws SQLException {
4226 
4227        checkState();
4228 
4229        return rs;
4230     }
4231 
4232     // Sets the result set handle to the parameter
4233     // Added as per Rave requirements
4234 
4235     /**
4236      * Sets this <code>JdbcRowSet</code> object's resultset property
4237      * to the given <code>ResultSet</code> object.
4238      *
4239      * @param resultSet the <code>ResultSet</code> object
4240      *
4241      */
4242     protected void setResultSet(ResultSet resultSet) {
4243        rs = resultSet;
4244     }
4245 
4246 
4247     // Over riding the setCommand from BaseRowSet for
4248     // firing the propertyChangeSupport Event for
4249     // Rave requirements when this property's value
4250     // changes.
4251 
4252     /**
4253      * Sets this <code>JdbcRowSet</code> object's <code>command</code> property to
4254      * the given <code>String</code> object and clears the parameters, if any,
4255      * that were set for the previous command. In addition,
4256      * if the <code>command</code> property has previously been set to a
4257      * non-null value and it is
4258      * different from the <code>String</code> object supplied,
4259      * this method sets this <code>JdbcRowSet</code> object's private fields
4260      * <code>ps</code> and <code>rs</code> to <code>null</code>.
4261      * (The field <code>ps</code> is its <code>PreparedStatement</code> object, and
4262      * the field <code>rs</code> is its <code>ResultSet</code> object.)
4263      * <P>
4264      * The <code>command</code> property may not be needed if the <code>RowSet</code>
4265      * object gets its data from a source that does not support commands,
4266      * such as a spreadsheet or other tabular file.
4267      * Thus, this property is optional and may be <code>null</code>.
4268      *
4269      * @param command a <code>String</code> object containing an SQL query
4270      *            that will be set as this <code>RowSet</code> object's command
4271      *            property; may be <code>null</code> but may not be an empty string
4272      * @throws SQLException if an empty string is provided as the command value
4273      * @see #getCommand
4274      */
4275     public void setCommand(String command) throws SQLException {
4276        String oldVal;
4277 
4278        if (getCommand() != null) {
4279           if(!getCommand().equals(command)) {
4280              oldVal = getCommand();
4281              super.setCommand(command);
4282              ps = null;
4283              rs = null;
4284              propertyChangeSupport.firePropertyChange("command", oldVal,command);
4285           }
4286        }
4287        else {
4288           super.setCommand(command);
4289           propertyChangeSupport.firePropertyChange("command", null,command);
4290        }
4291     }
4292 
4293     // Over riding the setDataSourceName from BaseRowSet for
4294     // firing the propertyChangeSupport Event for
4295     // Rave requirements when this property's values
4296     // changes.
4297 
4298     /**
4299      * Sets the <code>dataSourceName</code> property for this <code>JdbcRowSet</code>
4300      * object to the given logical name and sets this <code>JdbcRowSet</code> object's
4301      * Url property to <code>null</code>. In addition, if the <code>dataSourceName</code>
4302      * property has previously been set and is different from the one supplied,
4303      * this method sets this <code>JdbcRowSet</code> object's private fields
4304      * <code>ps</code>, <code>rs</code>, and <code>conn</code> to <code>null</code>.
4305      * (The field <code>ps</code> is its <code>PreparedStatement</code> object,
4306      * the field <code>rs</code> is its <code>ResultSet</code> object, and
4307      * the field <code>conn</code> is its <code>Connection</code> object.)
4308      * <P>
4309      * The name supplied to this method must have been bound to a
4310      * <code>DataSource</code> object in a JNDI naming service so that an
4311      * application can do a lookup using that name to retrieve the
4312      * <code>DataSource</code> object bound to it. The <code>DataSource</code>
4313      * object can then be used to establish a connection to the data source it
4314      * represents.
4315      * <P>
4316      * Users should set either the Url property or the dataSourceName property.
4317      * If both properties are set, the driver will use the property set most recently.
4318      *
4319      * @param dsName a <code>String</code> object with the name that can be supplied
4320      *        to a naming service based on JNDI technology to retrieve the
4321      *        <code>DataSource</code> object that can be used to get a connection;
4322      *        may be <code>null</code>
4323      * @throws SQLException if there is a problem setting the
4324      *          <code>dataSourceName</code> property
4325      * @see #getDataSourceName
4326      */
4327     public void setDataSourceName(String dsName) throws SQLException{
4328        String oldVal;
4329 
4330        if(getDataSourceName() != null) {
4331           if(!getDataSourceName().equals(dsName)) {
4332              oldVal = getDataSourceName();
4333              super.setDataSourceName(dsName);
4334              conn = null;
4335              ps = null;
4336              rs = null;
4337              propertyChangeSupport.firePropertyChange("dataSourceName",oldVal,dsName);
4338           }
4339        }
4340        else {
4341           super.setDataSourceName(dsName);
4342           propertyChangeSupport.firePropertyChange("dataSourceName",null,dsName);
4343        }
4344     }
4345 
4346     // Over riding the setUrl from BaseRowSet for
4347     // firing the propertyChangeSupport Event for
4348     // Rave requirements when this property's values
4349     // changes.
4350 
4351     /**
4352      * Sets the Url property for this <code>JdbcRowSet</code> object
4353      * to the given <code>String</code> object and sets the dataSource name
4354      * property to <code>null</code>. In addition, if the Url property has
4355      * previously been set to a non <code>null</code> value and its value
4356      * is different from the value to be set,
4357      * this method sets this <code>JdbcRowSet</code> object's private fields
4358      * <code>ps</code>, <code>rs</code>, and <code>conn</code> to <code>null</code>.
4359      * (The field <code>ps</code> is its <code>PreparedStatement</code> object,
4360      * the field <code>rs</code> is its <code>ResultSet</code> object, and
4361      * the field <code>conn</code> is its <code>Connection</code> object.)
4362      * <P>
4363      * The Url property is a JDBC URL that is used when
4364      * the connection is created using a JDBC technology-enabled driver
4365      * ("JDBC driver") and the <code>DriverManager</code>.
4366      * The correct JDBC URL for the specific driver to be used can be found
4367      * in the driver documentation.  Although there are guidelines for for how
4368      * a JDBC URL is formed,
4369      * a driver vendor can specify any <code>String</code> object except
4370      * one with a length of <code>0</code> (an empty string).
4371      * <P>
4372      * Setting the Url property is optional if connections are established using
4373      * a <code>DataSource</code> object instead of the <code>DriverManager</code>.
4374      * The driver will use either the URL property or the
4375      * dataSourceName property to create a connection, whichever was
4376      * specified most recently. If an application uses a JDBC URL, it
4377      * must load a JDBC driver that accepts the JDBC URL before it uses the
4378      * <code>RowSet</code> object to connect to a database.  The <code>RowSet</code>
4379      * object will use the URL internally to create a database connection in order
4380      * to read or write data.
4381      *
4382      * @param url a <code>String</code> object that contains the JDBC URL
4383      *            that will be used to establish the connection to a database for this
4384      *            <code>RowSet</code> object; may be <code>null</code> but must not
4385      *            be an empty string
4386      * @throws SQLException if an error occurs setting the Url property or the
4387      *         parameter supplied is a string with a length of <code>0</code> (an
4388      *         empty string)
4389      * @see #getUrl
4390      */
4391 
4392     public void setUrl(String url) throws SQLException {
4393        String oldVal;
4394 
4395        if(getUrl() != null) {
4396           if(!getUrl().equals(url)) {
4397              oldVal = getUrl();
4398              super.setUrl(url);
4399              conn = null;
4400              ps = null;
4401              rs = null;
4402              propertyChangeSupport.firePropertyChange("url", oldVal, url);
4403           }
4404        }
4405        else {
4406           super.setUrl(url);
4407           propertyChangeSupport.firePropertyChange("url", null, url);
4408        }
4409     }
4410 
4411     // Over riding the setUsername from BaseRowSet for
4412     // firing the propertyChangeSupport Event for
4413     // Rave requirements when this property's values
4414     // changes.
4415 
4416      /**
4417      * Sets the username property for this <code>JdbcRowSet</code> object
4418      * to the given user name. Because it
4419      * is not serialized, the username property is set at run time before
4420      * calling the method <code>execute</code>. In addition,
4421      * if the <code>username</code> property is already set with a
4422      * non-null value and that value is different from the <code>String</code>
4423      * object to be set,
4424      * this method sets this <code>JdbcRowSet</code> object's private fields
4425      * <code>ps</code>, <code>rs</code>, and <code>conn</code> to <code>null</code>.
4426      * (The field <code>ps</code> is its <code>PreparedStatement</code> object,
4427      * <code>rs</code> is its <code>ResultSet</code> object, and
4428      * <code>conn</code> is its <code>Connection</code> object.)
4429      * Setting these fields to <code>null</code> ensures that only current
4430      * values will be used.
4431      *
4432      * @param uname the <code>String</code> object containing the user name that
4433      *     is supplied to the data source to create a connection. It may be null.
4434      * @see #getUsername
4435      */
4436     public void setUsername(String uname) {
4437        String oldVal;
4438 
4439        if( getUsername() != null) {
4440           if(!getUsername().equals(uname)) {
4441              oldVal = getUsername();
4442              super.setUsername(uname);
4443              conn = null;
4444              ps = null;
4445              rs = null;
4446              propertyChangeSupport.firePropertyChange("username",oldVal,uname);
4447           }
4448        }
4449        else{
4450           super.setUsername(uname);
4451           propertyChangeSupport.firePropertyChange("username",null,uname);
4452        }
4453     }
4454 
4455     // Over riding the setPassword from BaseRowSet for
4456     // firing the propertyChangeSupport Event for
4457     // Rave requirements when this property's values
4458     // changes.
4459 
4460      /**
4461      * Sets the password property for this <code>JdbcRowSet</code> object
4462      * to the given <code>String</code> object. Because it
4463      * is not serialized, the password property is set at run time before
4464      * calling the method <code>execute</code>. Its default valus is
4465      * <code>null</code>. In addition,
4466      * if the <code>password</code> property is already set with a
4467      * non-null value and that value is different from the one being set,
4468      * this method sets this <code>JdbcRowSet</code> object's private fields
4469      * <code>ps</code>, <code>rs</code>, and <code>conn</code> to <code>null</code>.
4470      * (The field <code>ps</code> is its <code>PreparedStatement</code> object,
4471      * <code>rs</code> is its <code>ResultSet</code> object, and
4472      * <code>conn</code> is its <code>Connection</code> object.)
4473      * Setting these fields to <code>null</code> ensures that only current
4474      * values will be used.
4475      *
4476      * @param password the <code>String</code> object that represents the password
4477      *     that must be supplied to the database to create a connection
4478      */
4479     public void setPassword(String password) {
4480        String oldVal;
4481 
4482        if ( getPassword() != null) {
4483           if(!getPassword().equals(password)) {
4484              oldVal = getPassword();
4485              super.setPassword(password);
4486              conn = null;
4487              ps = null;
4488              rs = null;
4489              propertyChangeSupport.firePropertyChange("password",oldVal,password);
4490           }
4491        }
4492        else{
4493           super.setPassword(password);
4494           propertyChangeSupport.firePropertyChange("password",null,password);
4495        }
4496     }
4497 
4498     /**
4499      * Sets the type for this <code>RowSet</code> object to the specified type.
4500      * The default type is <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>.
4501      *
4502      * @param type one of the following constants:
4503      *             <code>ResultSet.TYPE_FORWARD_ONLY</code>,
4504      *             <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
4505      *             <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
4506      * @throws SQLException if the parameter supplied is not one of the
4507      *         following constants:
4508      *          <code>ResultSet.TYPE_FORWARD_ONLY</code> or
4509      *          <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>
4510      *          <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
4511      * @see #getConcurrency
4512      * @see #getType
4513      */
4514 
4515     public void setType(int type) throws SQLException {
4516 
4517        int oldVal;
4518 
4519        try {
4520           oldVal = getType();
4521         }catch(SQLException ex) {
4522            oldVal = 0;
4523         }
4524 
4525        if(oldVal != type) {
4526            super.setType(type);
4527            propertyChangeSupport.firePropertyChange("type",oldVal,type);
4528        }
4529 
4530     }
4531 
4532     /**
4533      * Sets the concurrency for this <code>RowSet</code> object to
4534      * the specified concurrency. The default concurrency for any <code>RowSet</code>
4535      * object (connected or disconnected) is <code>ResultSet.CONCUR_UPDATABLE</code>,
4536      * but this method may be called at any time to change the concurrency.
4537      *
4538      * @param concur one of the following constants:
4539      *                    <code>ResultSet.CONCUR_READ_ONLY</code> or
4540      *                    <code>ResultSet.CONCUR_UPDATABLE</code>
4541      * @throws SQLException if the parameter supplied is not one of the
4542      *         following constants:
4543      *          <code>ResultSet.CONCUR_UPDATABLE</code> or
4544      *          <code>ResultSet.CONCUR_READ_ONLY</code>
4545      * @see #getConcurrency
4546      * @see #isReadOnly
4547      */
4548     public void setConcurrency(int concur) throws SQLException {
4549 
4550        int oldVal;
4551 
4552        try {
4553           oldVal = getConcurrency();
4554         }catch(NullPointerException ex) {
4555            oldVal = 0;
4556         }
4557 
4558        if(oldVal != concur) {
4559            super.setConcurrency(concur);
4560            propertyChangeSupport.firePropertyChange("concurrency",oldVal,concur);
4561        }
4562 
4563     }
4564 
4565     /**
4566      * Sets the transaction isolation property for this JDBC <code>RowSet</code> object to the given
4567      * constant. The DBMS will use this transaction isolation level for
4568      * transactions if it can.
4569      * <p>
4570      * For <code>RowSet</code> implementations such as
4571      * the <code>CachedRowSet</code> that operate in a disconnected environment,
4572      * the <code>SyncProvider</code> object being used
4573      * offers complementary locking and data integrity options. The
4574      * options described below are pertinent only to connected <code>RowSet</code>
4575      * objects (<code>JdbcRowSet</code> objects).
4576      *
4577      * @param transIso one of the following constants, listed in ascending order:
4578      *              <code>Connection.TRANSACTION_NONE</code>,
4579      *              <code>Connection.TRANSACTION_READ_UNCOMMITTED</code>,
4580      *              <code>Connection.TRANSACTION_READ_COMMITTED</code>,
4581      *              <code>Connection.TRANSACTION_REPEATABLE_READ</code>, or
4582      *              <code>Connection.TRANSACTION_SERIALIZABLE</code>
4583      * @throws SQLException if the given parameter is not one of the Connection
4584      *          constants
4585      * @see javax.sql.rowset.spi.SyncFactory
4586      * @see javax.sql.rowset.spi.SyncProvider
4587      * @see #getTransactionIsolation
4588      */
4589     public void setTransactionIsolation(int transIso) throws SQLException {
4590 
4591        int oldVal;
4592 
4593        try {
4594           oldVal = getTransactionIsolation();
4595         }catch(NullPointerException ex) {
4596            oldVal = 0;
4597         }
4598 
4599        if(oldVal != transIso) {
4600            super.setTransactionIsolation(transIso);
4601            propertyChangeSupport.firePropertyChange("transactionIsolation",oldVal,transIso);
4602        }
4603 
4604     }
4605 
4606     /**
4607      * Sets the maximum number of rows that this <code>RowSet</code> object may contain to
4608      * the given number. If this limit is exceeded, the excess rows are
4609      * silently dropped.
4610      *
4611      * @param mRows an <code>int</code> indicating the current maximum number
4612      *     of rows; zero means that there is no limit
4613      * @throws SQLException if an error occurs internally setting the
4614      *     maximum limit on the number of rows that a JDBC <code>RowSet</code> object
4615      *     can contain; or if <i>max</i> is less than <code>0</code>; or
4616      *     if <i>max</i> is less than the <code>fetchSize</code> of the
4617      *     <code>RowSet</code>
4618      */
4619     public void setMaxRows(int mRows) throws SQLException {
4620 
4621        int oldVal;
4622 
4623        try {
4624           oldVal = getMaxRows();
4625         }catch(NullPointerException ex) {
4626            oldVal = 0;
4627         }
4628 
4629        if(oldVal != mRows) {
4630            super.setMaxRows(mRows);
4631            propertyChangeSupport.firePropertyChange("maxRows",oldVal,mRows);
4632        }
4633 
4634     }
4635 
4636     /**
4637      * Retrieves the value of the designated <code>SQL XML</code> parameter as a
4638      * <code>SQLXML</code> object in the Java programming language.
4639      * @param columnIndex the first column is 1, the second is 2, ...
4640      * @return a SQLXML object that maps an SQL XML value
4641      * @throws SQLException if a database access error occurs
4642      * @since 6.0
4643      */
4644     public SQLXML getSQLXML(int columnIndex) throws SQLException {
4645         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
4646     }
4647 
4648     /**
4649      * Retrieves the value of the designated <code>SQL XML</code> parameter as a
4650      * <code>SQLXML</code> object in the Java programming language.
4651      * @param colName the name of the column from which to retrieve the value
4652      * @return a SQLXML object that maps an SQL XML value
4653      * @throws SQLException if a database access error occurs
4654      */
4655     public SQLXML getSQLXML(String colName) throws SQLException {
4656         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
4657     }
4658 
4659     /**
4660      * Retrieves the value of the designated column in the current row of this
4661      * <code>ResultSet</code> object as a java.sql.RowId object in the Java
4662      * programming language.
4663      *
4664      * @param columnIndex the first column is 1, the second 2, ...
4665      * @return the column value if the value is a SQL <code>NULL</code> the
4666      *     value returned is <code>null</code>
4667      * @throws SQLException if a database access error occurs
4668      * @since 6.0
4669      */
4670     public RowId getRowId(int columnIndex) throws SQLException {
4671         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
4672     }
4673 
4674     /**
4675      * Retrieves the value of the designated column in the current row of this
4676      * <code>ResultSet</code> object as a java.sql.RowId object in the Java
4677      * programming language.
4678      *
4679      * @param columnName the name of the column
4680      * @return the column value if the value is a SQL <code>NULL</code> the
4681      *     value returned is <code>null</code>
4682      * @throws SQLException if a database access error occurs
4683      * @since 6.0
4684      */
4685     public RowId getRowId(String columnName) throws SQLException {
4686         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
4687     }
4688 
4689     /**
4690      * Updates the designated column with a <code>RowId</code> value. The updater
4691      * methods are used to update column values in the current row or the insert
4692      * row. The updater methods do not update the underlying database; instead
4693      * the <code>updateRow<code> or <code>insertRow</code> methods are called
4694      * to update the database.
4695      *
4696      * @param columnIndex the first column is 1, the second 2, ...
4697      * @param x the column value
4698      * @throws SQLException if a database access occurs
4699      * @since 6.0
4700      */
4701     public void updateRowId(int columnIndex, RowId x) throws SQLException {
4702         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
4703     }
4704 
4705     /**
4706      * Updates the designated column with a <code>RowId</code> value. The updater
4707      * methods are used to update column values in the current row or the insert
4708      * row. The updater methods do not update the underlying database; instead
4709      * the <code>updateRow<code> or <code>insertRow</code> methods are called
4710      * to update the database.
4711      *
4712      * @param columnName the name of the column
4713      * @param x the column value
4714      * @throws SQLException if a database access occurs
4715      * @since 6.0
4716      */
4717     public void updateRowId(String columnName, RowId x) throws SQLException {
4718         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
4719     }
4720 
4721     /**
4722      * Retrieves the holdability of this ResultSet object
4723      * @return  either ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
4724      * @throws SQLException if a database error occurs
4725      * @since 6.0
4726      */
4727     public int getHoldability() throws SQLException {
4728         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
4729     }
4730 
4731     /**
4732      * Retrieves whether this ResultSet object has been closed. A ResultSet is closed if the
4733      * method close has been called on it, or if it is automatically closed.
4734      * @return true if this ResultSet object is closed; false if it is still open
4735      * @throws SQLException if a database access error occurs
4736      * @since 6.0
4737      */
4738     public boolean isClosed() throws SQLException {
4739         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
4740     }
4741 
4742     /**
4743      * This method is used for updating columns that support National Character sets.
4744      * It can be used for updating NCHAR,NVARCHAR and LONGNVARCHAR columns.
4745      * @param columnIndex the first column is 1, the second 2, ...
4746      * @param nString the value for the column to be updated
4747      * @throws SQLException if a database access error occurs
4748      * @since 6.0
4749      */
4750     public void updateNString(int columnIndex, String nString) throws SQLException {
4751         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
4752     }
4753 
4754     /**
4755      * This method is used for updating columns that support National Character sets.
4756      * It can be used for updating NCHAR,NVARCHAR and LONGNVARCHAR columns.
4757      * @param columnName name of the Column
4758      * @param nString the value for the column to be updated
4759      * @throws SQLException if a database access error occurs
4760      * @since 6.0
4761      */
4762     public void updateNString(String columnName, String nString) throws SQLException {
4763         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
4764     }
4765 
4766 
4767     /*o
4768      * This method is used for updating SQL <code>NCLOB</code>  type that maps
4769      * to <code>java.sql.Types.NCLOB</code>
4770      * @param columnIndex the first column is 1, the second 2, ...
4771      * @param nClob the value for the column to be updated
4772      * @throws SQLException if a database access error occurs
4773      * @since 6.0
4774      */
4775     public void updateNClob(int columnIndex, NClob nClob) throws SQLException {
4776         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
4777     }
4778 
4779     /**
4780      * This method is used for updating SQL <code>NCLOB</code>  type that maps
4781      * to <code>java.sql.Types.NCLOB</code>
4782      * @param columnName name of the column
4783      * @param nClob the value for the column to be updated
4784      * @throws SQLException if a database access error occurs
4785      * @since 6.0
4786      */
4787     public void updateNClob(String columnName, NClob nClob) throws SQLException {
4788         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
4789     }
4790 
4791     /**
4792      * Retrieves the value of the designated column in the current row
4793      * of this <code>ResultSet</code> object as a <code>NClob</code> object
4794      * in the Java programming language.
4795      *
4796      * @param i the first column is 1, the second is 2, ...
4797      * @return a <code>NClob</code> object representing the SQL
4798      *         <code>NCLOB</code> value in the specified column
4799      * @exception SQLException if a database access error occurs
4800      * @since 6.0
4801      */
4802     public NClob getNClob(int i) throws SQLException {
4803         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
4804     }
4805 
4806 
4807   /**
4808      * Retrieves the value of the designated column in the current row
4809      * of this <code>ResultSet</code> object as a <code>NClob</code> object
4810      * in the Java programming language.
4811      *
4812      * @param colName the name of the column from which to retrieve the value
4813      * @return a <code>NClob</code> object representing the SQL <code>NCLOB</code>
4814      * value in the specified column
4815      * @exception SQLException if a database access error occurs
4816      * @since 6.0
4817      */
4818     public NClob getNClob(String colName) throws SQLException {
4819         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
4820     }
4821 
4822     public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException{
4823         return null;
4824     }
4825 
4826     public boolean isWrapperFor(Class<?> interfaces) throws SQLException {
4827         return false;
4828     }
4829 
4830     /**
4831       * Sets the designated parameter to the given <code>java.sql.SQLXML</code> object. The driver converts this to an
4832       * SQL <code>XML</code> value when it sends it to the database.
4833       * @param parameterIndex index of the first parameter is 1, the second is 2, ...
4834       * @param xmlObject a <code>SQLXML</code> object that maps an SQL <code>XML</code> value
4835       * @throws SQLException if a database access error occurs
4836       * @since 1.6
4837       */
4838      public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException {
4839          throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
4840      }
4841 
4842     /**
4843      * Sets the designated parameter to the given <code>java.sql.SQLXML</code> object. The driver converts this to an
4844      * <code>SQL XML</code> value when it sends it to the database.
4845      * @param parameterName the name of the parameter
4846      * @param xmlObject a <code>SQLXML</code> object that maps an <code>SQL XML</code> value
4847      * @throws SQLException if a database access error occurs
4848      * @since 1.6
4849      */
4850     public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException {
4851          throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
4852      }
4853 
4854     /**
4855      * Sets the designated parameter to the given <code>java.sql.RowId</code> object. The
4856      * driver converts this to a SQL <code>ROWID</code> value when it sends it
4857      * to the database
4858      *
4859      * @param parameterIndex the first parameter is 1, the second is 2, ...
4860      * @param x the parameter value
4861      * @throws SQLException if a database access error occurs
4862      *
4863      * @since 1.6
4864      */
4865     public void setRowId(int parameterIndex, RowId x) throws SQLException {
4866          throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
4867      }
4868 
4869     /**
4870     * Sets the designated parameter to the given <code>java.sql.RowId</code> object. The
4871     * driver converts this to a SQL <code>ROWID</code> when it sends it to the
4872     * database.
4873     *
4874     * @param parameterName the name of the parameter
4875     * @param x the parameter value
4876     * @throws SQLException if a database access error occurs
4877     * @since 1.6
4878     */
4879    public void setRowId(String parameterName, RowId x) throws SQLException {
4880          throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
4881      }
4882 
4883 
4884    /**
4885      * Sets the designated paramter to the given <code>String</code> object.
4886      * The driver converts this to a SQL <code>NCHAR</code> or
4887      * <code>NVARCHAR</code> or <code>LONGNVARCHAR</code> value
4888      * (depending on the argument's
4889      * size relative to the driver's limits on <code>NVARCHAR</code> values)
4890      * when it sends it to the database.
4891      *
4892      * @param parameterIndex of the first parameter is 1, the second is 2, ...
4893      * @param value the parameter value
4894      * @throws SQLException if the driver does not support national
4895      *         character sets;  if the driver can detect that a data conversion
4896      *  error could occur ; or if a database access error occurs
4897      * @since 1.6
4898      */
4899      public void setNString(int parameterIndex, String value) throws SQLException {
4900         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
4901      }
4902 
4903 
4904    /**
4905     * Sets the designated parameter in this <code>RowSet</code> object's command
4906     * to a <code>Reader</code> object. The
4907     * <code>Reader</code> reads the data till end-of-file is reached. The
4908     * driver does the necessary conversion from Java character format to
4909     * the national character set in the database.
4910 
4911     * <P><B>Note:</B> This stream object can either be a standard
4912     * Java stream object or your own subclass that implements the
4913     * standard interface.
4914     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
4915     * it might be more efficient to use a version of
4916     * <code>setNCharacterStream</code> which takes a length parameter.
4917     *
4918     * @param parameterIndex of the first parameter is 1, the second is 2, ...
4919     * @param value the parameter value
4920     * @throws SQLException if the driver does not support national
4921     *         character sets;  if the driver can detect that a data conversion
4922     *  error could occur ; if a database access error occurs; or
4923     * this method is called on a closed <code>PreparedStatement</code>
4924     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
4925     * @since 1.6
4926     */
4927     public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException {
4928         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
4929     }
4930 
4931   /**
4932     * Sets the designated parameter to a <code>java.sql.NClob</code> object. The object
4933     * implements the <code>java.sql.NClob</code> interface. This <code>NClob</code>
4934     * object maps to a SQL <code>NCLOB</code>.
4935     * @param parameterName the name of the column to be set
4936     * @param value the parameter value
4937     * @throws SQLException if the driver does not support national
4938     *         character sets;  if the driver can detect that a data conversion
4939     *  error could occur; or if a database access error occurs
4940     * @since 1.6
4941     */
4942     public void setNClob(String parameterName, NClob value) throws SQLException {
4943          throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
4944      }
4945 
4946 
4947   /**
4948      * Retrieves the value of the designated column in the current row
4949      * of this <code>ResultSet</code> object as a
4950      * <code>java.io.Reader</code> object.
4951      * It is intended for use when
4952      * accessing  <code>NCHAR</code>,<code>NVARCHAR</code>
4953      * and <code>LONGNVARCHAR</code> columns.
4954      *
4955      * @return a <code>java.io.Reader</code> object that contains the column
4956      * value; if the value is SQL <code>NULL</code>, the value returned is
4957      * <code>null</code> in the Java programming language.
4958      * @param columnIndex the first column is 1, the second is 2, ...
4959      * @exception SQLException if a database access error occurs
4960      * @since 1.6
4961      */
4962     public java.io.Reader getNCharacterStream(int columnIndex) throws SQLException {
4963        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
4964      }
4965 
4966 
4967     /**
4968      * Retrieves the value of the designated column in the current row
4969      * of this <code>ResultSet</code> object as a
4970      * <code>java.io.Reader</code> object.
4971      * It is intended for use when
4972      * accessing  <code>NCHAR</code>,<code>NVARCHAR</code>
4973      * and <code>LONGNVARCHAR</code> columns.
4974      *
4975      * @param columnName the name of the column
4976      * @return a <code>java.io.Reader</code> object that contains the column
4977      * value; if the value is SQL <code>NULL</code>, the value returned is
4978      * <code>null</code> in the Java programming language
4979      * @exception SQLException if a database access error occurs
4980      * @since 1.6
4981      */
4982     public java.io.Reader getNCharacterStream(String columnName) throws SQLException {
4983        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
4984      }
4985 
4986     /**
4987      * Updates the designated column with a <code>java.sql.SQLXML</code> value.
4988      * The updater
4989      * methods are used to update column values in the current row or the insert
4990      * row. The updater methods do not update the underlying database; instead
4991      * the <code>updateRow</code> or <code>insertRow</code> methods are called
4992      * to update the database.
4993      * @param columnIndex the first column is 1, the second 2, ...
4994      * @param xmlObject the value for the column to be updated
4995      * @throws SQLException if a database access error occurs
4996      * @since 1.6
4997      */
4998     public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException {
4999         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5000     }
5001 
5002     /**
5003      * Updates the designated column with a <code>java.sql.SQLXML</code> value.
5004      * The updater
5005      * methods are used to update column values in the current row or the insert
5006      * row. The updater methods do not update the underlying database; instead
5007      * the <code>updateRow</code> or <code>insertRow</code> methods are called
5008      * to update the database.
5009      *
5010      * @param columnName the name of the column
5011      * @param xmlObject the column value
5012      * @throws SQLException if a database access occurs
5013      * @since 1.6
5014      */
5015     public void updateSQLXML(String columnName, SQLXML xmlObject) throws SQLException {
5016         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5017     }
5018 
5019      /**
5020      * Retrieves the value of the designated column in the current row
5021      * of this <code>ResultSet</code> object as
5022      * a <code>String</code> in the Java programming language.
5023      * It is intended for use when
5024      * accessing  <code>NCHAR</code>,<code>NVARCHAR</code>
5025      * and <code>LONGNVARCHAR</code> columns.
5026      *
5027      * @param columnIndex the first column is 1, the second is 2, ...
5028      * @return the column value; if the value is SQL <code>NULL</code>, the
5029      * value returned is <code>null</code>
5030      * @exception SQLException if a database access error occurs
5031      * @since 1.6
5032      */
5033     public String getNString(int columnIndex) throws SQLException {
5034         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5035     }
5036 
5037     /**
5038      * Retrieves the value of the designated column in the current row
5039      * of this <code>ResultSet</code> object as
5040      * a <code>String</code> in the Java programming language.
5041      * It is intended for use when
5042      * accessing  <code>NCHAR</code>,<code>NVARCHAR</code>
5043      * and <code>LONGNVARCHAR</code> columns.
5044      *
5045      * @param columnName the SQL name of the column
5046      * @return the column value; if the value is SQL <code>NULL</code>, the
5047      * value returned is <code>null</code>
5048      * @exception SQLException if a database access error occurs
5049      * @since 1.6
5050      */
5051     public String getNString(String columnName) throws SQLException {
5052         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5053     }
5054 
5055      /**
5056        * Updates the designated column with a character stream value, which will
5057        * have the specified number of bytes. The driver does the necessary conversion
5058        * from Java character format to the national character set in the database.
5059        * It is intended for use when updating NCHAR,NVARCHAR and LONGNVARCHAR columns.
5060        * The updater methods are used to update column values in the current row or
5061        * the insert row. The updater methods do not update the underlying database;
5062        * instead the updateRow or insertRow methods are called to update the database.
5063        *
5064        * @param columnIndex - the first column is 1, the second is 2, ...
5065        * @param x - the new column value
5066        * @param length - the length of the stream
5067        * @exception SQLException if a database access error occurs
5068        * @since 1.6
5069        */
5070        public void updateNCharacterStream(int columnIndex,
5071                             java.io.Reader x,
5072                             long length)
5073                             throws SQLException {
5074           throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5075        }
5076 
5077      /**
5078        * Updates the designated column with a character stream value, which will
5079        * have the specified number of bytes. The driver does the necessary conversion
5080        * from Java character format to the national character set in the database.
5081        * It is intended for use when updating NCHAR,NVARCHAR and LONGNVARCHAR columns.
5082        * The updater methods are used to update column values in the current row or
5083        * the insert row. The updater methods do not update the underlying database;
5084        * instead the updateRow or insertRow methods are called to update the database.
5085        *
5086        * @param columnName - name of the Column
5087        * @param x - the new column value
5088        * @param length - the length of the stream
5089        * @exception SQLException if a database access error occurs
5090        * @since 1.6
5091        */
5092        public void updateNCharacterStream(String columnName,
5093                             java.io.Reader x,
5094                             long length)
5095                             throws SQLException {
5096           throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5097        }
5098 
5099     /**
5100      * Updates the designated column with a character stream value.   The
5101      * driver does the necessary conversion from Java character format to
5102      * the national character set in the database.
5103      * It is intended for use when
5104      * updating  <code>NCHAR</code>,<code>NVARCHAR</code>
5105      * and <code>LONGNVARCHAR</code> columns.
5106      *
5107      * The updater methods are used to update column values in the
5108      * current row or the insert row.  The updater methods do not
5109      * update the underlying database; instead the <code>updateRow</code> or
5110      * <code>insertRow</code> methods are called to update the database.
5111      *
5112      * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
5113      * it might be more efficient to use a version of
5114      * <code>updateNCharacterStream</code> which takes a length parameter.
5115      *
5116      * @param columnIndex the first column is 1, the second is 2, ...
5117      * @param x the new column value
5118      * @exception SQLException if a database access error occurs,
5119      * the result set concurrency is <code>CONCUR_READ_ONLY</code> or this method is called on a closed result set
5120      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
5121      * this method
5122      * @since 1.6
5123      */
5124     public void updateNCharacterStream(int columnIndex,
5125                              java.io.Reader x) throws SQLException {
5126         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5127     }
5128 
5129     /**
5130      * Updates the designated column with a character stream value.  The
5131      * driver does the necessary conversion from Java character format to
5132      * the national character set in the database.
5133      * It is intended for use when
5134      * updating  <code>NCHAR</code>,<code>NVARCHAR</code>
5135      * and <code>LONGNVARCHAR</code> columns.
5136      *
5137      * The updater methods are used to update column values in the
5138      * current row or the insert row.  The updater methods do not
5139      * update the underlying database; instead the <code>updateRow</code> or
5140      * <code>insertRow</code> methods are called to update the database.
5141      *
5142      * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
5143      * it might be more efficient to use a version of
5144      * <code>updateNCharacterStream</code> which takes a length parameter.
5145      *
5146      * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the la
5147 bel is the name of the column
5148      * @param reader the <code>java.io.Reader</code> object containing
5149      *        the new column value
5150      * @exception SQLException if a database access error occurs,
5151      * the result set concurrency is <code>CONCUR_READ_ONLY</code> or this method is called on a closed result set
5152       * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
5153      * this method
5154      * @since 1.6
5155      */
5156     public void updateNCharacterStream(String columnLabel,
5157                              java.io.Reader reader) throws SQLException {
5158         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5159     }
5160 
5161     /**
5162      * Updates the designated column using the given input stream, which
5163      * will have the specified number of bytes.
5164      * When a very large ASCII value is input to a <code>LONGVARCHAR</code>
5165      * parameter, it may be more practical to send it via a
5166      * <code>java.io.InputStream</code>. Data will be read from the stream
5167      * as needed until end-of-file is reached.  The JDBC driver will
5168      * do any necessary conversion from ASCII to the database char format.
5169      *
5170      * <P><B>Note:</B> This stream object can either be a standard
5171      * Java stream object or your own subclass that implements the
5172      * standard interface.
5173      * <p>
5174      * The updater methods are used to update column values in the
5175      * current row or the insert row.  The updater methods do not
5176      * update the underlying database; instead the <code>updateRow</code> or
5177      * <code>insertRow</code> methods are called to update the database.
5178      *
5179      * @param columnIndex the first column is 1, the second is 2, ...
5180      * @param inputStream An object that contains the data to set the parameter
5181      * value to.
5182      * @param length the number of bytes in the parameter data.
5183      * @exception SQLException if a database access error occurs,
5184      * the result set concurrency is <code>CONCUR_READ_ONLY</code>
5185      * or this method is called on a closed result set
5186      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
5187      * this method
5188      * @since 1.6
5189      */
5190     public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException{
5191         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5192     }
5193 
5194     /**
5195      * Updates the designated column using the given input stream, which
5196      * will have the specified number of bytes.
5197      * When a very large ASCII value is input to a <code>LONGVARCHAR</code>
5198      * parameter, it may be more practical to send it via a
5199      * <code>java.io.InputStream</code>. Data will be read from the stream
5200      * as needed until end-of-file is reached.  The JDBC driver will
5201      * do any necessary conversion from ASCII to the database char format.
5202      *
5203      * <P><B>Note:</B> This stream object can either be a standard
5204      * Java stream object or your own subclass that implements the
5205      * standard interface.
5206      * <p>
5207      * The updater methods are used to update column values in the
5208      * current row or the insert row.  The updater methods do not
5209      * update the underlying database; instead the <code>updateRow</code> or
5210      * <code>insertRow</code> methods are called to update the database.
5211      *
5212      * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the label is the name of the column
5213      * @param inputStream An object that contains the data to set the parameter
5214      * value to.
5215      * @param length the number of bytes in the parameter data.
5216      * @exception SQLException if a database access error occurs,
5217      * the result set concurrency is <code>CONCUR_READ_ONLY</code>
5218      * or this method is called on a closed result set
5219      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
5220      * this method
5221      * @since 1.6
5222      */
5223     public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException {
5224         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5225     }
5226 
5227     /**
5228      * Updates the designated column using the given input stream.
5229      * When a very large ASCII value is input to a <code>LONGVARCHAR</code>
5230      * parameter, it may be more practical to send it via a
5231      * <code>java.io.InputStream</code>. Data will be read from the stream
5232      * as needed until end-of-file is reached.  The JDBC driver will
5233      * do any necessary conversion from ASCII to the database char format.
5234      *
5235      * <P><B>Note:</B> This stream object can either be a standard
5236      * Java stream object or your own subclass that implements the
5237      * standard interface.
5238      *
5239      *  <P><B>Note:</B> Consult your JDBC driver documentation to determine if
5240      * it might be more efficient to use a version of
5241      * <code>updateBlob</code> which takes a length parameter.
5242      * <p>
5243      * The updater methods are used to update column values in the
5244      * current row or the insert row.  The updater methods do not
5245      * update the underlying database; instead the <code>updateRow</code> or
5246      * <code>insertRow</code> methods are called to update the database.
5247      *
5248      * @param columnIndex the first column is 1, the second is 2, ...
5249      * @param inputStream An object that contains the data to set the parameter
5250      * value to.
5251      * @exception SQLException if a database access error occurs,
5252      * the result set concurrency is <code>CONCUR_READ_ONLY</code>
5253      * or this method is called on a closed result set
5254      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
5255      * this method
5256      * @since 1.6
5257      */
5258     public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException {
5259         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5260     }
5261 
5262     /**
5263      * Updates the designated column using the given input stream.
5264      * When a very large ASCII value is input to a <code>LONGVARCHAR</code>
5265      * parameter, it may be more practical to send it via a
5266      * <code>java.io.InputStream</code>. Data will be read from the stream
5267      * as needed until end-of-file is reached.  The JDBC driver will
5268      * do any necessary conversion from ASCII to the database char format.
5269      *
5270      * <P><B>Note:</B> This stream object can either be a standard
5271      * Java stream object or your own subclass that implements the
5272      * standard interface.
5273      *   <P><B>Note:</B> Consult your JDBC driver documentation to determine if
5274      * it might be more efficient to use a version of
5275      * <code>updateBlob</code> which takes a length parameter.
5276      * <p>
5277      * The updater methods are used to update column values in the
5278      * current row or the insert row.  The updater methods do not
5279      * update the underlying database; instead the <code>updateRow</code> or
5280      * <code>insertRow</code> methods are called to update the database.
5281      *
5282      * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the la
5283 bel is the name of the column
5284      * @param inputStream An object that contains the data to set the parameter
5285      * value to.
5286      * @exception SQLException if a database access error occurs,
5287      * the result set concurrency is <code>CONCUR_READ_ONLY</code>
5288      * or this method is called on a closed result set
5289      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
5290      * this method
5291      * @since 1.6
5292      */
5293     public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException {
5294         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5295     }
5296 
5297     /**
5298      * Updates the designated column using the given <code>Reader</code>
5299      * object, which is the given number of characters long.
5300      * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
5301      * parameter, it may be more practical to send it via a
5302      * <code>java.io.Reader</code> object. The data will be read from the stream
5303      * as needed until end-of-file is reached.  The JDBC driver will
5304      * do any necessary conversion from UNICODE to the database char format.
5305      *
5306      * <P><B>Note:</B> This stream object can either be a standard
5307      * Java stream object or your own subclass that implements the
5308      * standard interface.
5309      * <p>
5310      * The updater methods are used to update column values in the
5311      * current row or the insert row.  The updater methods do not
5312      * update the underlying database; instead the <code>updateRow</code> or
5313      * <code>insertRow</code> methods are called to update the database.
5314      *
5315      * @param columnIndex the first column is 1, the second is 2, ...
5316      * @param reader An object that contains the data to set the parameter value to.
5317      * @param length the number of characters in the parameter data.
5318      * @exception SQLException if a database access error occurs,
5319      * the result set concurrency is <code>CONCUR_READ_ONLY</code>
5320      * or this method is called on a closed result set
5321      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
5322      * this method
5323      * @since 1.6
5324      */
5325     public void updateClob(int columnIndex,  Reader reader, long length) throws SQLException {
5326         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5327     }
5328 
5329     /**
5330      * Updates the designated column using the given <code>Reader</code>
5331      * object, which is the given number of characters long.
5332      * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
5333      * parameter, it may be more practical to send it via a
5334      * <code>java.io.Reader</code> object. The data will be read from the stream
5335      * as needed until end-of-file is reached.  The JDBC driver will
5336      * do any necessary conversion from UNICODE to the database char format.
5337      *
5338      * <P><B>Note:</B> This stream object can either be a standard
5339      * Java stream object or your own subclass that implements the
5340      * standard interface.
5341      * <p>
5342      * The updater methods are used to update column values in the
5343      * current row or the insert row.  The updater methods do not
5344      * update the underlying database; instead the <code>updateRow</code> or
5345      * <code>insertRow</code> methods are called to update the database.
5346      *
5347      * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the label is the name of the column
5348      * @param reader An object that contains the data to set the parameter value to.
5349      * @param length the number of characters in the parameter data.
5350      * @exception SQLException if a database access error occurs,
5351      * the result set concurrency is <code>CONCUR_READ_ONLY</code>
5352      * or this method is called on a closed result set
5353      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
5354      * this method
5355      * @since 1.6
5356      */
5357     public void updateClob(String columnLabel,  Reader reader, long length) throws SQLException {
5358         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5359     }
5360 
5361     /**
5362      * Updates the designated column using the given <code>Reader</code>
5363      * object.
5364      * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
5365      * parameter, it may be more practical to send it via a
5366      * <code>java.io.Reader</code> object. The data will be read from the stream
5367      * as needed until end-of-file is reached.  The JDBC driver will
5368      * do any necessary conversion from UNICODE to the database char format.
5369      *
5370      * <P><B>Note:</B> This stream object can either be a standard
5371      * Java stream object or your own subclass that implements the
5372      * standard interface.
5373      *   <P><B>Note:</B> Consult your JDBC driver documentation to determine if
5374      * it might be more efficient to use a version of
5375      * <code>updateClob</code> which takes a length parameter.
5376      * <p>
5377      * The updater methods are used to update column values in the
5378      * current row or the insert row.  The updater methods do not
5379      * update the underlying database; instead the <code>updateRow</code> or
5380      * <code>insertRow</code> methods are called to update the database.
5381      *
5382      * @param columnIndex the first column is 1, the second is 2, ...
5383      * @param reader An object that contains the data to set the parameter value to.
5384      * @exception SQLException if a database access error occurs,
5385      * the result set concurrency is <code>CONCUR_READ_ONLY</code>
5386      * or this method is called on a closed result set
5387      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
5388      * this method
5389      * @since 1.6
5390      */
5391     public void updateClob(int columnIndex,  Reader reader) throws SQLException {
5392         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5393     }
5394 
5395     /**
5396      * Updates the designated column using the given <code>Reader</code>
5397      * object.
5398      * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
5399      * parameter, it may be more practical to send it via a
5400      * <code>java.io.Reader</code> object. The data will be read from the stream
5401      * as needed until end-of-file is reached.  The JDBC driver will
5402      * do any necessary conversion from UNICODE to the database char format.
5403      *
5404      * <P><B>Note:</B> This stream object can either be a standard
5405      * Java stream object or your own subclass that implements the
5406      * standard interface.
5407      *  <P><B>Note:</B> Consult your JDBC driver documentation to determine if
5408      * it might be more efficient to use a version of
5409      * <code>updateClob</code> which takes a length parameter.
5410      * <p>
5411      * The updater methods are used to update column values in the
5412      * current row or the insert row.  The updater methods do not
5413      * update the underlying database; instead the <code>updateRow</code> or
5414      * <code>insertRow</code> methods are called to update the database.
5415      *
5416      * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the la
5417 bel is the name of the column
5418      * @param reader An object that contains the data to set the parameter value to.
5419      * @exception SQLException if a database access error occurs,
5420      * the result set concurrency is <code>CONCUR_READ_ONLY</code>
5421      * or this method is called on a closed result set
5422      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
5423      * this method
5424      * @since 1.6
5425      */
5426     public void updateClob(String columnLabel,  Reader reader) throws SQLException {
5427         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5428     }
5429 
5430    /**
5431      * Updates the designated column using the given <code>Reader</code>
5432      * object, which is the given number of characters long.
5433      * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
5434      * parameter, it may be more practical to send it via a
5435      * <code>java.io.Reader</code> object. The data will be read from the stream
5436      * as needed until end-of-file is reached.  The JDBC driver will
5437      * do any necessary conversion from UNICODE to the database char format.
5438      *
5439      * <P><B>Note:</B> This stream object can either be a standard
5440      * Java stream object or your own subclass that implements the
5441      * standard interface.
5442      * <p>
5443      * The updater methods are used to update column values in the
5444      * current row or the insert row.  The updater methods do not
5445      * update the underlying database; instead the <code>updateRow</code> or
5446      * <code>insertRow</code> methods are called to update the database.
5447      *
5448      * @param columnIndex the first column is 1, the second 2, ...
5449      * @param reader An object that contains the data to set the parameter value to.
5450      * @param length the number of characters in the parameter data.
5451      * @throws SQLException if the driver does not support national
5452      *         character sets;  if the driver can detect that a data conversion
5453      *  error could occur; this method is called on a closed result set,
5454      * if a database access error occurs or
5455      * the result set concurrency is <code>CONCUR_READ_ONLY</code>
5456      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
5457      * this method
5458      * @since 1.6
5459      */
5460     public void updateNClob(int columnIndex,  Reader reader, long length) throws SQLException {
5461         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5462     }
5463 
5464     /**
5465      * Updates the designated column using the given <code>Reader</code>
5466      * object, which is the given number of characters long.
5467      * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
5468      * parameter, it may be more practical to send it via a
5469      * <code>java.io.Reader</code> object. The data will be read from the stream
5470      * as needed until end-of-file is reached.  The JDBC driver will
5471      * do any necessary conversion from UNICODE to the database char format.
5472      *
5473      * <P><B>Note:</B> This stream object can either be a standard
5474      * Java stream object or your own subclass that implements the
5475      * standard interface.
5476      * <p>
5477      * The updater methods are used to update column values in the
5478      * current row or the insert row.  The updater methods do not
5479      * update the underlying database; instead the <code>updateRow</code> or
5480      * <code>insertRow</code> methods are called to update the database.
5481      *
5482      * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the label is the name of the column
5483      * @param reader An object that contains the data to set the parameter value to.
5484      * @param length the number of characters in the parameter data.
5485      * @throws SQLException if the driver does not support national
5486      *         character sets;  if the driver can detect that a data conversion
5487      *  error could occur; this method is called on a closed result set;
5488      *  if a database access error occurs or
5489      * the result set concurrency is <code>CONCUR_READ_ONLY</code>
5490      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
5491      * this method
5492      * @since 1.6
5493      */
5494     public void updateNClob(String columnLabel,  Reader reader, long length) throws SQLException {
5495         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5496     }
5497 
5498     /**
5499      * Updates the designated column using the given <code>Reader</code>
5500      * object.
5501      * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
5502      * parameter, it may be more practical to send it via a
5503      * <code>java.io.Reader</code> object. The data will be read from the stream
5504      * as needed until end-of-file is reached.  The JDBC driver will
5505      * do any necessary conversion from UNICODE to the database char format.
5506      *
5507      * <P><B>Note:</B> This stream object can either be a standard
5508      * Java stream object or your own subclass that implements the
5509      * standard interface.
5510      * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
5511      * it might be more efficient to use a version of
5512      * <code>updateNClob</code> which takes a length parameter.
5513      * <p>
5514      * The updater methods are used to update column values in the
5515      * current row or the insert row.  The updater methods do not
5516      * update the underlying database; instead the <code>updateRow</code> or
5517      * <code>insertRow</code> methods are called to update the database.
5518      *
5519      * @param columnIndex the first column is 1, the second 2, ...
5520      * @param reader An object that contains the data to set the parameter value to.
5521      * @throws SQLException if the driver does not support national
5522      *         character sets;  if the driver can detect that a data conversion
5523      *  error could occur; this method is called on a closed result set,
5524      * if a database access error occurs or
5525      * the result set concurrency is <code>CONCUR_READ_ONLY</code>
5526      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
5527      * this method
5528      * @since 1.6
5529      */
5530     public void updateNClob(int columnIndex,  Reader reader) throws SQLException {
5531         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5532     }
5533 
5534     /**
5535      * Updates the designated column using the given <code>Reader</code>
5536      * object.
5537      * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
5538      * parameter, it may be more practical to send it via a
5539      * <code>java.io.Reader</code> object. The data will be read from the stream
5540      * as needed until end-of-file is reached.  The JDBC driver will
5541      * do any necessary conversion from UNICODE to the database char format.
5542      *
5543      * <P><B>Note:</B> This stream object can either be a standard
5544      * Java stream object or your own subclass that implements the
5545      * standard interface.
5546      * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
5547      * it might be more efficient to use a version of
5548      * <code>updateNClob</code> which takes a length parameter.
5549      * <p>
5550      * The updater methods are used to update column values in the
5551      * current row or the insert row.  The updater methods do not
5552      * update the underlying database; instead the <code>updateRow</code> or
5553      * <code>insertRow</code> methods are called to update the database.
5554      *
5555      * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the la
5556 bel is the name of the column
5557      * @param reader An object that contains the data to set the parameter value to.
5558      * @throws SQLException if the driver does not support national
5559      *         character sets;  if the driver can detect that a data conversion
5560      *  error could occur; this method is called on a closed result set;
5561      *  if a database access error occurs or
5562      * the result set concurrency is <code>CONCUR_READ_ONLY</code>
5563      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
5564      * this method
5565      * @since 1.6
5566      */
5567     public void updateNClob(String columnLabel,  Reader reader) throws SQLException {
5568         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5569     }
5570 
5571 
5572         /**
5573      * Updates the designated column with an ascii stream value, which will have
5574      * the specified number of bytes.
5575      * The updater methods are used to update column values in the
5576      * current row or the insert row.  The updater methods do not
5577      * update the underlying database; instead the <code>updateRow</code> or
5578      * <code>insertRow</code> methods are called to update the database.
5579      *
5580      * @param columnIndex the first column is 1, the second is 2, ...
5581      * @param x the new column value
5582      * @param length the length of the stream
5583      * @exception SQLException if a database access error occurs,
5584      * the result set concurrency is <code>CONCUR_READ_ONLY</code>
5585      * or this method is called on a closed result set
5586      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
5587      * this method
5588      * @since 1.6
5589      */
5590     public void updateAsciiStream(int columnIndex,
5591                            java.io.InputStream x,
5592                            long length) throws SQLException {
5593         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5594     }
5595 
5596     /**
5597      * Updates the designated column with a binary stream value, which will have
5598      * the specified number of bytes.
5599      * The updater methods are used to update column values in the
5600      * current row or the insert row.  The updater methods do not
5601      * update the underlying database; instead the <code>updateRow</code> or
5602      * <code>insertRow</code> methods are called to update the database.
5603      *
5604      * @param columnIndex the first column is 1, the second is 2, ...
5605      * @param x the new column value
5606      * @param length the length of the stream
5607      * @exception SQLException if a database access error occurs,
5608      * the result set concurrency is <code>CONCUR_READ_ONLY</code>
5609      * or this method is called on a closed result set
5610      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
5611      * this method
5612      * @since 1.6
5613      */
5614     public void updateBinaryStream(int columnIndex,
5615                             java.io.InputStream x,
5616                             long length) throws SQLException {
5617         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5618     }
5619 
5620     /**
5621      * Updates the designated column with a character stream value, which will have
5622      * the specified number of bytes.
5623      * The updater methods are used to update column values in the
5624      * current row or the insert row.  The updater methods do not
5625      * update the underlying database; instead the <code>updateRow</code> or
5626      * <code>insertRow</code> methods are called to update the database.
5627      *
5628      * @param columnIndex the first column is 1, the second is 2, ...
5629      * @param x the new column value
5630      * @param length the length of the stream
5631      * @exception SQLException if a database access error occurs,
5632      * the result set concurrency is <code>CONCUR_READ_ONLY</code>
5633      * or this method is called on a closed result set
5634      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
5635      * this method
5636      * @since 1.6
5637      */
5638     public void updateCharacterStream(int columnIndex,
5639                              java.io.Reader x,
5640                              long length) throws SQLException {
5641         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5642     }
5643 
5644      /**
5645      * Updates the designated column with an ascii stream value, which will have
5646      * the specified number of bytes..
5647      * The updater methods are used to update column values in the
5648      * current row or the insert row.  The updater methods do not
5649      * update the underlying database; instead the <code>updateRow</code> or
5650      * <code>insertRow</code> methods are called to update the database.
5651      *
5652      * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the label is the name of the column
5653      * @param x the new column value
5654      * @param length the length of the stream
5655      * @exception SQLException if a database access error occurs,
5656      * the result set concurrency is <code>CONCUR_READ_ONLY</code>
5657      * or this method is called on a closed result set
5658      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
5659      * this method
5660      * @since 1.6
5661      */
5662     public void updateAsciiStream(String columnLabel,
5663                            java.io.InputStream x,
5664                            long length) throws SQLException {
5665         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5666     }
5667 
5668     /**
5669      * Updates the designated column with an ascii stream value.
5670      * The updater methods are used to update column values in the
5671      * current row or the insert row.  The updater methods do not
5672      * update the underlying database; instead the <code>updateRow</code> or
5673      * <code>insertRow</code> methods are called to update the database.
5674      *
5675      * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
5676      * it might be more efficient to use a version of
5677      * <code>updateAsciiStream</code> which takes a length parameter.
5678      *
5679      * @param columnIndex the first column is 1, the second is 2, ...
5680      * @param x the new column value
5681      * @exception SQLException if a database access error occurs,
5682      * the result set concurrency is <code>CONCUR_READ_ONLY</code>
5683      * or this method is called on a closed result set
5684      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
5685      * this method
5686      * @since 1.6
5687      */
5688     public void updateAsciiStream(int columnIndex,
5689                            java.io.InputStream x) throws SQLException {
5690         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5691     }
5692 
5693     /**
5694      * Updates the designated column with an ascii stream value.
5695      * The updater methods are used to update column values in the
5696      * current row or the insert row.  The updater methods do not
5697      * update the underlying database; instead the <code>updateRow</code> or
5698      * <code>insertRow</code> methods are called to update the database.
5699      *
5700      * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
5701      * it might be more efficient to use a version of
5702      * <code>updateAsciiStream</code> which takes a length parameter.
5703      *
5704      * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the la
5705 bel is the name of the column
5706      * @param x the new column value
5707      * @exception SQLException if a database access error occurs,
5708      * the result set concurrency is <code>CONCUR_READ_ONLY</code>
5709      * or this method is called on a closed result set
5710      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
5711      * this method
5712      * @since 1.6
5713      */
5714     public void updateAsciiStream(String columnLabel,
5715                            java.io.InputStream x) throws SQLException {
5716         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5717     }
5718 
5719 
5720     /**
5721      * Updates the designated column with a binary stream value, which will have
5722      * the specified number of bytes.
5723      * The updater methods are used to update column values in the
5724      * current row or the insert row.  The updater methods do not
5725      * update the underlying database; instead the <code>updateRow</code> or
5726      * <code>insertRow</code> methods are called to update the database.
5727      *
5728      * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the label is the name of the column
5729      * @param x the new column value
5730      * @param length the length of the stream
5731      * @exception SQLException if a database access error occurs,
5732      * the result set concurrency is <code>CONCUR_READ_ONLY</code>
5733      * or this method is called on a closed result set
5734      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
5735      * this method
5736      * @since 1.6
5737      */
5738     public void updateBinaryStream(String columnLabel,
5739                             java.io.InputStream x,
5740                             long length) throws SQLException {
5741         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5742     }
5743 
5744     /**
5745      * Updates the designated column with a binary stream value.
5746      * The updater methods are used to update column values in the
5747      * current row or the insert row.  The updater methods do not
5748      * update the underlying database; instead the <code>updateRow</code> or
5749      * <code>insertRow</code> methods are called to update the database.
5750      *
5751      * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
5752      * it might be more efficient to use a version of
5753      * <code>updateBinaryStream</code> which takes a length parameter.
5754      *
5755      * @param columnIndex the first column is 1, the second is 2, ...
5756      * @param x the new column value
5757      * @exception SQLException if a database access error occurs,
5758      * the result set concurrency is <code>CONCUR_READ_ONLY</code>
5759      * or this method is called on a closed result set
5760      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
5761      * this method
5762      * @since 1.6
5763      */
5764     public void updateBinaryStream(int columnIndex,
5765                             java.io.InputStream x) throws SQLException {
5766         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5767     }
5768 
5769 
5770     /**
5771      * Updates the designated column with a binary stream value.
5772      * The updater methods are used to update column values in the
5773      * current row or the insert row.  The updater methods do not
5774      * update the underlying database; instead the <code>updateRow</code> or
5775      * <code>insertRow</code> methods are called to update the database.
5776      *
5777      * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
5778      * it might be more efficient to use a version of
5779      * <code>updateBinaryStream</code> which takes a length parameter.
5780      *
5781      * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the la
5782 bel is the name of the column
5783      * @param x the new column value
5784      * @exception SQLException if a database access error occurs,
5785      * the result set concurrency is <code>CONCUR_READ_ONLY</code>
5786      * or this method is called on a closed result set
5787      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
5788      * this method
5789      * @since 1.6
5790      */
5791     public void updateBinaryStream(String columnLabel,
5792                             java.io.InputStream x) throws SQLException {
5793         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5794     }
5795 
5796 
5797     /**
5798      * Updates the designated column with a character stream value, which will have
5799      * the specified number of bytes.
5800      * The updater methods are used to update column values in the
5801      * current row or the insert row.  The updater methods do not
5802      * update the underlying database; instead the <code>updateRow</code> or
5803      * <code>insertRow</code> methods are called to update the database.
5804      *
5805      * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the label is the name of the column
5806      * @param reader the <code>java.io.Reader</code> object containing
5807      *        the new column value
5808      * @param length the length of the stream
5809      * @exception SQLException if a database access error occurs,
5810      * the result set concurrency is <code>CONCUR_READ_ONLY</code>
5811      * or this method is called on a closed result set
5812      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
5813      * this method
5814      * @since 1.6
5815      */
5816     public void updateCharacterStream(String columnLabel,
5817                              java.io.Reader reader,
5818                              long length) throws SQLException {
5819         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5820     }
5821 
5822     /**
5823      * Updates the designated column with a character stream value.
5824      * The updater methods are used to update column values in the
5825      * current row or the insert row.  The updater methods do not
5826      * update the underlying database; instead the <code>updateRow</code> or
5827      * <code>insertRow</code> methods are called to update the database.
5828      *
5829      * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
5830      * it might be more efficient to use a version of
5831      * <code>updateCharacterStream</code> which takes a length parameter.
5832      *
5833      * @param columnIndex the first column is 1, the second is 2, ...
5834      * @param x the new column value
5835      * @exception SQLException if a database access error occurs,
5836      * the result set concurrency is <code>CONCUR_READ_ONLY</code>
5837      * or this method is called on a closed result set
5838      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
5839      * this method
5840      * @since 1.6
5841      */
5842     public void updateCharacterStream(int columnIndex,
5843                              java.io.Reader x) throws SQLException {
5844         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5845     }
5846 
5847     /**
5848      * Updates the designated column with a character stream value.
5849      * The updater methods are used to update column values in the
5850      * current row or the insert row.  The updater methods do not
5851      * update the underlying database; instead the <code>updateRow</code> or
5852      * <code>insertRow</code> methods are called to update the database.
5853      *
5854      * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
5855      * it might be more efficient to use a version of
5856      * <code>updateCharacterStream</code> which takes a length parameter.
5857      *
5858      * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the la
5859 bel is the name of the column
5860      * @param reader the <code>java.io.Reader</code> object containing
5861      *        the new column value
5862      * @exception SQLException if a database access error occurs,
5863      * the result set concurrency is <code>CONCUR_READ_ONLY</code>
5864      * or this method is called on a closed result set
5865      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
5866      * this method
5867      * @since 1.6
5868      */
5869     public void updateCharacterStream(String columnLabel,
5870                              java.io.Reader reader) throws SQLException {
5871         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5872     }
5873 
5874 
5875      /**
5876   * Sets the designated parameter to the given <code>java.net.URL</code> value.
5877   * The driver converts this to an SQL <code>DATALINK</code> value
5878   * when it sends it to the database.
5879   *
5880   * @param parameterIndex the first parameter is 1, the second is 2, ...
5881   * @param x the <code>java.net.URL</code> object to be set
5882   * @exception SQLException if a database access error occurs or
5883   * this method is called on a closed <code>PreparedStatement</code>
5884   * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
5885   * @since 1.4
5886   */
5887   public void setURL(int parameterIndex, java.net.URL x) throws SQLException{
5888         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5889    }
5890 
5891 
5892    /**
5893   * Sets the designated parameter to a <code>Reader</code> object.
5894   * This method differs from the <code>setCharacterStream (int, Reader)</code> method
5895   * because it informs the driver that the parameter value should be sent to
5896   * the server as a <code>NCLOB</code>.  When the <code>setCharacterStream</code> method is used, the
5897   * driver may have to do extra work to determine whether the parameter
5898   * data should be sent to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code>
5899   * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
5900   * it might be more efficient to use a version of
5901   * <code>setNClob</code> which takes a length parameter.
5902   *
5903   * @param parameterIndex index of the first parameter is 1, the second is 2, ...
5904   * @param reader An object that contains the data to set the parameter value to.
5905   * @throws SQLException if parameterIndex does not correspond to a parameter
5906   * marker in the SQL statement;
5907   * if the driver does not support national character sets;
5908   * if the driver can detect that a data conversion
5909   *  error could occur;  if a database access error occurs or
5910   * this method is called on a closed <code>PreparedStatement</code>
5911   * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
5912   *
5913   * @since 1.6
5914   */
5915   public void setNClob(int parameterIndex, Reader reader)
5916     throws SQLException{
5917         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5918    }
5919 
5920    /**
5921   * Sets the designated parameter to a <code>Reader</code> object.  The <code>reader</code> must contain the number
5922              * of characters specified by length otherwise a <code>SQLException</code> will be
5923             * generated when the <code>CallableStatement</code> is executed.
5924             * This method differs from the <code>setCharacterStream (int, Reader, int)</code> method
5925             * because it informs the driver that the parameter value should be sent to
5926             * the server as a <code>NCLOB</code>.  When the <code>setCharacterStream</code> method is used, the
5927             * driver may have to do extra work to determine whether the parameter
5928             * data should be send to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code>
5929             *
5930             * @param parameterName the name of the parameter to be set
5931             * @param reader An object that contains the data to set the parameter value to.
5932             * @param length the number of characters in the parameter data.
5933             * @throws SQLException if parameterIndex does not correspond to a parameter
5934             * marker in the SQL statement; if the length specified is less than zero;
5935             * if the driver does not support national
5936             *         character sets;  if the driver can detect that a data conversion
5937             *  error could occur; if a database access error occurs or
5938             * this method is called on a closed <code>CallableStatement</code>
5939             * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
5940             * this method
5941             * @since 1.6
5942             */
5943             public void setNClob(String parameterName, Reader reader, long length)
5944     throws SQLException{
5945         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5946    }
5947 
5948 
5949  /**
5950   * Sets the designated parameter to a <code>Reader</code> object.
5951   * This method differs from the <code>setCharacterStream (int, Reader)</code> method
5952   * because it informs the driver that the parameter value should be sent to
5953   * the server as a <code>NCLOB</code>.  When the <code>setCharacterStream</code> method is used, the
5954   * driver may have to do extra work to determine whether the parameter
5955   * data should be send to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code>
5956   * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
5957   * it might be more efficient to use a version of
5958   * <code>setNClob</code> which takes a length parameter.
5959   *
5960   * @param parameterName the name of the parameter
5961   * @param reader An object that contains the data to set the parameter value to.
5962   * @throws SQLException if the driver does not support national character sets;
5963   * if the driver can detect that a data conversion
5964   *  error could occur;  if a database access error occurs or
5965   * this method is called on a closed <code>CallableStatement</code>
5966   * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
5967   *
5968   * @since 1.6
5969   */
5970   public void setNClob(String parameterName, Reader reader)
5971     throws SQLException{
5972              throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
5973    }
5974 
5975 
5976    /**
5977      ** of characters specified by length otherwise a <code>SQLException</code> will becontain  the number
5978      * generated when the <code>PreparedStatement</code> is executed.
5979      * This method differs from the <code>setCharacterStream (int, Reader, int)</code> method
5980      * because it informs the driver that the parameter value should be sent to
5981      * the server as a <code>NCLOB</code>.  When the <code>setCharacterStream</code> method is used, the
5982      * driver may have to do extra work to determine whether the parameter
5983      * data should be sent to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code>
5984      * @param parameterIndex index of the first parameter is 1, the second is 2, ...
5985      * @param reader An object that contains the data to set the parameter value to.
5986      * @param length the number of characters in the parameter data.
5987      * @throws SQLException if parameterIndex does not correspond to a parameter
5988      * marker in the SQL statement; if the length specified is less than zero;
5989      * if the driver does not support national character sets;
5990      * if the driver can detect that a data conversion
5991      *  error could occur;  if a database access error occurs or
5992      * this method is called on a closed <code>PreparedStatement</code>
5993      * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
5994      *
5995      * @since 1.6
5996      */
5997      public void setNClob(int parameterIndex, Reader reader, long length)
5998        throws SQLException{
5999         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6000    }
6001 
6002 
6003     /**
6004      * Sets the designated parameter to a <code>java.sql.NClob</code> object. The driver converts this to
6005 a
6006      * SQL <code>NCLOB</code> value when it sends it to the database.
6007      * @param parameterIndex of the first parameter is 1, the second is 2, ...
6008      * @param value the parameter value
6009      * @throws SQLException if the driver does not support national
6010      *         character sets;  if the driver can detect that a data conversion
6011      *  error could occur ; or if a database access error occurs
6012      * @since 1.6
6013      */
6014      public void setNClob(int parameterIndex, NClob value) throws SQLException{
6015         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6016    }
6017 
6018 
6019  /**
6020   * Sets the designated paramter to the given <code>String</code> object.
6021   * The driver converts this to a SQL <code>NCHAR</code> or
6022   * <code>NVARCHAR</code> or <code>LONGNVARCHAR</code>
6023   * @param parameterName the name of the column to be set
6024   * @param value the parameter value
6025   * @throws SQLException if the driver does not support national
6026   *         character sets;  if the driver can detect that a data conversion
6027   *  error could occur; or if a database access error occurs
6028   * @since 1.6
6029   */
6030  public void setNString(String parameterName, String value)
6031          throws SQLException{
6032         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6033    }
6034 
6035  /**
6036   * Sets the designated parameter to a <code>Reader</code> object. The
6037   * <code>Reader</code> reads the data till end-of-file is reached. The
6038   * driver does the necessary conversion from Java character format to
6039   * the national character set in the database.
6040   * @param parameterIndex of the first parameter is 1, the second is 2, ...
6041   * @param value the parameter value
6042   * @param length the number of characters in the parameter data.
6043   * @throws SQLException if the driver does not support national
6044   *         character sets;  if the driver can detect that a data conversion
6045   *  error could occur ; or if a database access error occurs
6046   * @since 1.6
6047   */
6048   public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException{
6049         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6050    }
6051 
6052 
6053 
6054  /**
6055   * Sets the designated parameter to a <code>Reader</code> object. The
6056   * <code>Reader</code> reads the data till end-of-file is reached. The
6057   * driver does the necessary conversion from Java character format to
6058   * the national character set in the database.
6059   * @param parameterName the name of the column to be set
6060   * @param value the parameter value
6061   * @param length the number of characters in the parameter data.
6062   * @throws SQLException if the driver does not support national
6063   *         character sets;  if the driver can detect that a data conversion
6064   *  error could occur; or if a database access error occurs
6065   * @since 1.6
6066   */
6067  public void setNCharacterStream(String parameterName, Reader value, long length)
6068          throws SQLException{
6069         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6070    }
6071 
6072   /**
6073   * Sets the designated parameter to a <code>Reader</code> object. The
6074   * <code>Reader</code> reads the data till end-of-file is reached. The
6075   * driver does the necessary conversion from Java character format to
6076   * the national character set in the database.
6077 
6078   * <P><B>Note:</B> This stream object can either be a standard
6079   * Java stream object or your own subclass that implements the
6080   * standard interface.
6081   * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
6082   * it might be more efficient to use a version of
6083   * <code>setNCharacterStream</code> which takes a length parameter.
6084   *
6085   * @param parameterName the name of the parameter
6086   * @param value the parameter value
6087   * @throws SQLException if the driver does not support national
6088   *         character sets;  if the driver can detect that a data conversion
6089   *  error could occur ; if a database access error occurs; or
6090   * this method is called on a closed <code>CallableStatement</code>
6091   * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
6092   * @since 1.6
6093   */
6094   public void setNCharacterStream(String parameterName, Reader value) throws SQLException{
6095         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6096    }
6097 
6098   /**
6099     * Sets the designated parameter to the given <code>java.sql.Timestamp</code> value,
6100     * using the given <code>Calendar</code> object.  The driver uses
6101     * the <code>Calendar</code> object to construct an SQL <code>TIMESTAMP</code> value,
6102     * which the driver then sends to the database.  With a
6103     * a <code>Calendar</code> object, the driver can calculate the timestamp
6104     * taking into account a custom timezone.  If no
6105     * <code>Calendar</code> object is specified, the driver uses the default
6106     * timezone, which is that of the virtual machine running the application.
6107     *
6108     * @param parameterName the name of the parameter
6109     * @param x the parameter value
6110     * @param cal the <code>Calendar</code> object the driver will use
6111     *            to construct the timestamp
6112     * @exception SQLException if a database access error occurs or
6113     * this method is called on a closed <code>CallableStatement</code>
6114     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
6115     * this method
6116     * @see #getTimestamp
6117     * @since 1.4
6118     */
6119     public void setTimestamp(String parameterName, java.sql.Timestamp x, Calendar cal)
6120        throws SQLException{
6121         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6122    }
6123 
6124     /**
6125     * Sets the designated parameter to a <code>Reader</code> object.  The <code>reader</code> must contain  the number
6126                * of characters specified by length otherwise a <code>SQLException</code> will be
6127                * generated when the <code>CallableStatement</code> is executed.
6128               * This method differs from the <code>setCharacterStream (int, Reader, int)</code> method
6129               * because it informs the driver that the parameter value should be sent to
6130               * the server as a <code>CLOB</code>.  When the <code>setCharacterStream</code> method is used, the
6131                * driver may have to do extra work to determine whether the parameter
6132                * data should be send to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code>
6133                * @param parameterName the name of the parameter to be set
6134               * @param reader An object that contains the data to set the parameter value to.
6135               * @param length the number of characters in the parameter data.
6136               * @throws SQLException if parameterIndex does not correspond to a parameter
6137               * marker in the SQL statement; if the length specified is less than zero;
6138               * a database access error occurs or
6139               * this method is called on a closed <code>CallableStatement</code>
6140               * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
6141               * this method
6142               *
6143               * @since 1.6
6144               */
6145       public  void setClob(String parameterName, Reader reader, long length)
6146       throws SQLException{
6147         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6148    }
6149 
6150 
6151 
6152   /**
6153     * Sets the designated parameter to the given <code>java.sql.Clob</code> object.
6154     * The driver converts this to an SQL <code>CLOB</code> value when it
6155     * sends it to the database.
6156     *
6157     * @param parameterName the name of the parameter
6158     * @param x a <code>Clob</code> object that maps an SQL <code>CLOB</code> value
6159     * @exception SQLException if a database access error occurs or
6160     * this method is called on a closed <code>CallableStatement</code>
6161     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
6162     * this method
6163     * @since 1.6
6164     */
6165     public void setClob (String parameterName, Clob x) throws SQLException{
6166         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6167    }
6168 
6169  /**
6170     * Sets the designated parameter to a <code>Reader</code> object.
6171     * This method differs from the <code>setCharacterStream (int, Reader)</code> method
6172     * because it informs the driver that the parameter value should be sent to
6173     * the server as a <code>CLOB</code>.  When the <code>setCharacterStream</code> method is used, the
6174     * driver may have to do extra work to determine whether the parameter
6175     * data should be send to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code>
6176     *
6177     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
6178     * it might be more efficient to use a version of
6179     * <code>setClob</code> which takes a length parameter.
6180     *
6181     * @param parameterName the name of the parameter
6182     * @param reader An object that contains the data to set the parameter value to.
6183     * @throws SQLException if a database access error occurs or this method is called on
6184     * a closed <code>CallableStatement</code>
6185     *
6186     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
6187     * @since 1.6
6188     */
6189     public void setClob(String parameterName, Reader reader)
6190       throws SQLException{
6191         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6192    }
6193 
6194 
6195  /**
6196     * Sets the designated parameter to the given <code>java.sql.Date</code> value
6197     * using the default time zone of the virtual machine that is running
6198     * the application.
6199     * The driver converts this
6200     * to an SQL <code>DATE</code> value when it sends it to the database.
6201     *
6202     * @param parameterName the name of the parameter
6203     * @param x the parameter value
6204     * @exception SQLException if a database access error occurs or
6205     * this method is called on a closed <code>CallableStatement</code>
6206     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
6207     * this method
6208     * @see #getDate
6209     * @since 1.4
6210     */
6211     public void setDate(String parameterName, java.sql.Date x)
6212        throws SQLException{
6213         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6214    }
6215 
6216    /**
6217     * Sets the designated parameter to the given <code>java.sql.Date</code> value,
6218     * using the given <code>Calendar</code> object.  The driver uses
6219     * the <code>Calendar</code> object to construct an SQL <code>DATE</code> value,
6220     * which the driver then sends to the database.  With a
6221     * a <code>Calendar</code> object, the driver can calculate the date
6222     * taking into account a custom timezone.  If no
6223     * <code>Calendar</code> object is specified, the driver uses the default
6224     * timezone, which is that of the virtual machine running the application.
6225     *
6226     * @param parameterName the name of the parameter
6227     * @param x the parameter value
6228     * @param cal the <code>Calendar</code> object the driver will use
6229     *            to construct the date
6230     * @exception SQLException if a database access error occurs or
6231     * this method is called on a closed <code>CallableStatement</code>
6232     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
6233     * this method
6234     * @see #getDate
6235     * @since 1.4
6236     */
6237    public void setDate(String parameterName, java.sql.Date x, Calendar cal)
6238        throws SQLException{
6239         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6240    }
6241 
6242 
6243  /**
6244     * Sets the designated parameter to the given <code>java.sql.Time</code> value.
6245     * The driver converts this
6246     * to an SQL <code>TIME</code> value when it sends it to the database.
6247     *
6248     * @param parameterName the name of the parameter
6249     * @param x the parameter value
6250     * @exception SQLException if a database access error occurs or
6251     * this method is called on a closed <code>CallableStatement</code>
6252     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
6253     * this method
6254     * @see #getTime
6255     * @since 1.4
6256     */
6257    public void setTime(String parameterName, java.sql.Time x)
6258        throws SQLException{
6259         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6260    }
6261 
6262  /**
6263     * Sets the designated parameter to the given <code>java.sql.Time</code> value,
6264     * using the given <code>Calendar</code> object.  The driver uses
6265     * the <code>Calendar</code> object to construct an SQL <code>TIME</code> value,
6266     * which the driver then sends to the database.  With a
6267     * a <code>Calendar</code> object, the driver can calculate the time
6268     * taking into account a custom timezone.  If no
6269     * <code>Calendar</code> object is specified, the driver uses the default
6270     * timezone, which is that of the virtual machine running the application.
6271     *
6272     * @param parameterName the name of the parameter
6273     * @param x the parameter value
6274     * @param cal the <code>Calendar</code> object the driver will use
6275     *            to construct the time
6276     * @exception SQLException if a database access error occurs or
6277     * this method is called on a closed <code>CallableStatement</code>
6278     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
6279     * this method
6280     * @see #getTime
6281     * @since 1.4
6282     */
6283    public void setTime(String parameterName, java.sql.Time x, Calendar cal)
6284        throws SQLException{
6285         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6286    }
6287 
6288    /**
6289    * Sets the designated parameter to a <code>Reader</code> object.
6290    * This method differs from the <code>setCharacterStream (int, Reader)</code> method
6291    * because it informs the driver that the parameter value should be sent to
6292    * the server as a <code>CLOB</code>.  When the <code>setCharacterStream</code> method is used, the
6293    * driver may have to do extra work to determine whether the parameter
6294    * data should be sent to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code>
6295    *
6296    * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
6297    * it might be more efficient to use a version of
6298    * <code>setClob</code> which takes a length parameter.
6299    *
6300    * @param parameterIndex index of the first parameter is 1, the second is 2, ...
6301    * @param reader An object that contains the data to set the parameter value to.
6302    * @throws SQLException if a database access error occurs, this method is called on
6303    * a closed <code>PreparedStatement</code>or if parameterIndex does not correspond to a parameter
6304    * marker in the SQL statement
6305    *
6306    * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
6307    * @since 1.6
6308    */
6309    public void setClob(int parameterIndex, Reader reader)
6310      throws SQLException{
6311         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6312    }
6313 
6314 
6315    /**
6316    * Sets the designated parameter to a <code>Reader</code> object.  The reader must contain  the number
6317    * of characters specified by length otherwise a <code>SQLException</code> will be
6318    * generated when the <code>PreparedStatement</code> is executed.
6319    *This method differs from the <code>setCharacterStream (int, Reader, int)</code> method
6320    * because it informs the driver that the parameter value should be sent to
6321    * the server as a <code>CLOB</code>.  When the <code>setCharacterStream</code> method is used, the
6322    * driver may have to do extra work to determine whether the parameter
6323    * data should be sent to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code>
6324    * @param parameterIndex index of the first parameter is 1, the second is 2, ...
6325    * @param reader An object that contains the data to set the parameter value to.
6326    * @param length the number of characters in the parameter data.
6327    * @throws SQLException if a database access error occurs, this method is called on
6328    * a closed <code>PreparedStatement</code>, if parameterIndex does not correspond to a parameter
6329    * marker in the SQL statement, or if the length specified is less than zero.
6330    *
6331    * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
6332    * @since 1.6
6333    */
6334    public void setClob(int parameterIndex, Reader reader, long length)
6335      throws SQLException{
6336         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6337    }
6338 
6339 
6340  /**
6341     * Sets the designated parameter to a <code>InputStream</code> object.  The inputstream must contain  the number
6342     * of characters specified by length otherwise a <code>SQLException</code> will be
6343     * generated when the <code>PreparedStatement</code> is executed.
6344     * This method differs from the <code>setBinaryStream (int, InputStream, int)</code>
6345     * method because it informs the driver that the parameter value should be
6346     * sent to the server as a <code>BLOB</code>.  When the <code>setBinaryStream</code> method is used,
6347     * the driver may have to do extra work to determine whether the parameter
6348     * data should be sent to the server as a <code>LONGVARBINARY</code> or a <code>BLOB</code>
6349     * @param parameterIndex index of the first parameter is 1,
6350     * the second is 2, ...
6351     * @param inputStream An object that contains the data to set the parameter
6352     * value to.
6353     * @param length the number of bytes in the parameter data.
6354     * @throws SQLException if a database access error occurs,
6355     * this method is called on a closed <code>PreparedStatement</code>,
6356     * if parameterIndex does not correspond
6357     * to a parameter marker in the SQL statement,  if the length specified
6358     * is less than zero or if the number of bytes in the inputstream does not match
6359     * the specfied length.
6360     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
6361     *
6362     * @since 1.6
6363     */
6364     public void setBlob(int parameterIndex, InputStream inputStream, long length)
6365        throws SQLException{
6366         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6367    }
6368 
6369  /**
6370     * Sets the designated parameter to a <code>InputStream</code> object.
6371     * This method differs from the <code>setBinaryStream (int, InputStream)</code>
6372     * This method differs from the <code>setBinaryStream (int, InputStream)</code>
6373     * method because it informs the driver that the parameter value should be
6374     * sent to the server as a <code>BLOB</code>.  When the <code>setBinaryStream</code> method is used,
6375     * the driver may have to do extra work to determine whether the parameter
6376     * data should be sent to the server as a <code>LONGVARBINARY</code> or a <code>BLOB</code>
6377     *
6378     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
6379     * it might be more efficient to use a version of
6380     * <code>setBlob</code> which takes a length parameter.
6381     *
6382     * @param parameterIndex index of the first parameter is 1,
6383     * the second is 2, ...
6384 
6385 
6386     * @param inputStream An object that contains the data to set the parameter
6387     * value to.
6388     * @throws SQLException if a database access error occurs,
6389     * this method is called on a closed <code>PreparedStatement</code> or
6390     * if parameterIndex does not correspond
6391     * to a parameter marker in the SQL statement,
6392     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
6393     *
6394     * @since 1.6
6395     */
6396     public void setBlob(int parameterIndex, InputStream inputStream)
6397        throws SQLException{
6398         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6399    }
6400 
6401  /**
6402     * Sets the designated parameter to a <code>InputStream</code> object.  The <code>inputstream</code> must contain  the number
6403       * of characters specified by length, otherwise a <code>SQLException</code> will be
6404       * generated when the <code>CallableStatement</code> is executed.
6405       * This method differs from the <code>setBinaryStream (int, InputStream, int)</code>
6406       * method because it informs the driver that the parameter value should be
6407       * sent to the server as a <code>BLOB</code>.  When the <code>setBinaryStream</code> method is used,
6408       * the driver may have to do extra work to determine whether the parameter
6409       * data should be sent to the server as a <code>LONGVARBINARY</code> or a <code>BLOB</code>
6410       *
6411       * @param parameterName the name of the parameter to be set
6412       * the second is 2, ...
6413       *
6414       * @param inputStream An object that contains the data to set the parameter
6415       * value to.
6416       * @param length the number of bytes in the parameter data.
6417       * @throws SQLException  if parameterIndex does not correspond
6418       * to a parameter marker in the SQL statement,  or if the length specified
6419       * is less than zero; if the number of bytes in the inputstream does not match
6420       * the specfied length; if a database access error occurs or
6421       * this method is called on a closed <code>CallableStatement</code>
6422       * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
6423       * this method
6424       *
6425       * @since 1.6
6426       */
6427       public void setBlob(String parameterName, InputStream inputStream, long length)
6428          throws SQLException{
6429          throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6430     }
6431 
6432 
6433  /**
6434     * Sets the designated parameter to the given <code>java.sql.Blob</code> object.
6435     * The driver converts this to an SQL <code>BLOB</code> value when it
6436     * sends it to the database.
6437     *
6438     * @param parameterName the name of the parameter
6439     * @param x a <code>Blob</code> object that maps an SQL <code>BLOB</code> value
6440     * @exception SQLException if a database access error occurs or
6441     * this method is called on a closed <code>CallableStatement</code>
6442     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
6443     * this method
6444     * @since 1.6
6445     */
6446    public void setBlob (String parameterName, Blob x) throws SQLException{
6447         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6448    }
6449 
6450  /**
6451     * Sets the designated parameter to a <code>InputStream</code> object.
6452     * This method differs from the <code>setBinaryStream (int, InputStream)</code>
6453     * method because it informs the driver that the parameter value should be
6454     * sent to the server as a <code>BLOB</code>.  When the <code>setBinaryStream</code> method is used,
6455     * the driver may have to do extra work to determine whether the parameter
6456     * data should be send to the server as a <code>LONGVARBINARY</code> or a <code>BLOB</code>
6457     *
6458     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
6459     * it might be more efficient to use a version of
6460     * <code>setBlob</code> which takes a length parameter.
6461     *
6462     * @param parameterName the name of the parameter
6463     * @param inputStream An object that contains the data to set the parameter
6464     * value to.
6465     * @throws SQLException if a database access error occurs or
6466     * this method is called on a closed <code>CallableStatement</code>
6467     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
6468     *
6469     * @since 1.6
6470     */
6471     public void setBlob(String parameterName, InputStream inputStream)
6472        throws SQLException{
6473         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6474    }
6475 
6476   /**
6477   * Sets the value of the designated parameter with the given object. The second
6478   * argument must be an object type; for integral values, the
6479   * <code>java.lang</code> equivalent objects should be used.
6480   *
6481   * <p>The given Java object will be converted to the given targetSqlType
6482   * before being sent to the database.
6483   *
6484   * If the object has a custom mapping (is of a class implementing the
6485   * interface <code>SQLData</code>),
6486   * the JDBC driver should call the method <code>SQLData.writeSQL</code> to write it
6487   * to the SQL data stream.
6488   * If, on the other hand, the object is of a class implementing
6489   * <code>Ref</code>, <code>Blob</code>, <code>Clob</code>,  <code>NClob</code>,
6490   *  <code>Struct</code>, <code>java.net.URL</code>,
6491   * or <code>Array</code>, the driver should pass it to the database as a
6492   * value of the corresponding SQL type.
6493   * <P>
6494   * Note that this method may be used to pass datatabase-
6495   * specific abstract data types.
6496   *
6497   * @param parameterName the name of the parameter
6498   * @param x the object containing the input parameter value
6499   * @param targetSqlType the SQL type (as defined in java.sql.Types) to be
6500   * sent to the database. The scale argument may further qualify this type.
6501   * @param scale for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types,
6502   *          this is the number of digits after the decimal point.  For all other
6503   *          types, this value will be ignored.
6504   * @exception SQLException if a database access error occurs or
6505   * this method is called on a closed <code>CallableStatement</code>
6506   * @exception SQLFeatureNotSupportedException if <code>targetSqlType</code> is
6507   * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>,
6508   * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>,
6509   * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>,
6510   *  <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code>
6511   * or  <code>STRUCT</code> data type and the JDBC driver does not support
6512   * this data type
6513   * @see Types
6514   * @see #getObject
6515   * @since 1.4
6516   */
6517   public void setObject(String parameterName, Object x, int targetSqlType, int scale)
6518      throws SQLException{
6519       throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6520  }
6521 
6522   /**
6523     * Sets the value of the designated parameter with the given object.
6524     * This method is like the method <code>setObject</code>
6525     * above, except that it assumes a scale of zero.
6526     *
6527     * @param parameterName the name of the parameter
6528     * @param x the object containing the input parameter value
6529     * @param targetSqlType the SQL type (as defined in java.sql.Types) to be
6530     *                      sent to the database
6531     * @exception SQLException if a database access error occurs or
6532     * this method is called on a closed <code>CallableStatement</code>
6533     * @exception SQLFeatureNotSupportedException if <code>targetSqlType</code> is
6534     * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>,
6535     * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>,
6536     * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>,
6537     *  <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code>
6538     * or  <code>STRUCT</code> data type and the JDBC driver does not support
6539     * this data type
6540     * @see #getObject
6541     * @since 1.4
6542     */
6543     public void setObject(String parameterName, Object x, int targetSqlType)
6544        throws SQLException{
6545         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6546    }
6547 
6548  /**
6549    * Sets the value of the designated parameter with the given object.
6550    * The second parameter must be of type <code>Object</code>; therefore, the
6551    * <code>java.lang</code> equivalent objects should be used for built-in types.
6552    *
6553    * <p>The JDBC specification specifies a standard mapping from
6554    * Java <code>Object</code> types to SQL types.  The given argument
6555    * will be converted to the corresponding SQL type before being
6556    * sent to the database.
6557    *
6558    * <p>Note that this method may be used to pass datatabase-
6559    * specific abstract data types, by using a driver-specific Java
6560    * type.
6561    *
6562    * If the object is of a class implementing the interface <code>SQLData</code>,
6563    * the JDBC driver should call the method <code>SQLData.writeSQL</code>
6564    * to write it to the SQL data stream.
6565    * If, on the other hand, the object is of a class implementing
6566    * <code>Ref</code>, <code>Blob</code>, <code>Clob</code>,  <code>NClob</code>,
6567    *  <code>Struct</code>, <code>java.net.URL</code>,
6568    * or <code>Array</code>, the driver should pass it to the database as a
6569    * value of the corresponding SQL type.
6570    * <P>
6571    * This method throws an exception if there is an ambiguity, for example, if the
6572    * object is of a class implementing more than one of the interfaces named above.
6573    *
6574    * @param parameterName the name of the parameter
6575    * @param x the object containing the input parameter value
6576    * @exception SQLException if a database access error occurs,
6577    * this method is called on a closed <code>CallableStatement</code> or if the given
6578    *            <code>Object</code> parameter is ambiguous
6579    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
6580    * this method
6581    * @see #getObject
6582    * @since 1.4
6583    */
6584    public void setObject(String parameterName, Object x) throws SQLException{
6585         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6586    }
6587 
6588   /**
6589   * Sets the designated parameter to the given input stream, which will have
6590   * the specified number of bytes.
6591   * When a very large ASCII value is input to a <code>LONGVARCHAR</code>
6592   * parameter, it may be more practical to send it via a
6593   * <code>java.io.InputStream</code>. Data will be read from the stream
6594   * as needed until end-of-file is reached.  The JDBC driver will
6595   * do any necessary conversion from ASCII to the database char format.
6596   *
6597   * <P><B>Note:</B> This stream object can either be a standard
6598   * Java stream object or your own subclass that implements the
6599   * standard interface.
6600   *
6601   * @param parameterName the name of the parameter
6602   * @param x the Java input stream that contains the ASCII parameter value
6603   * @param length the number of bytes in the stream
6604   * @exception SQLException if a database access error occurs or
6605   * this method is called on a closed <code>CallableStatement</code>
6606   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
6607   * this method
6608   * @since 1.4
6609   */
6610  public void setAsciiStream(String parameterName, java.io.InputStream x, int length)
6611      throws SQLException{
6612       throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6613  }
6614 
6615 
6616 /**
6617   * Sets the designated parameter to the given input stream, which will have
6618   * the specified number of bytes.
6619   * When a very large binary value is input to a <code>LONGVARBINARY</code>
6620   * parameter, it may be more practical to send it via a
6621   * <code>java.io.InputStream</code> object. The data will be read from the stream
6622   * as needed until end-of-file is reached.
6623   *
6624   * <P><B>Note:</B> This stream object can either be a standard
6625   * Java stream object or your own subclass that implements the
6626   * standard interface.
6627   *
6628   * @param parameterName the name of the parameter
6629   * @param x the java input stream which contains the binary parameter value
6630   * @param length the number of bytes in the stream
6631   * @exception SQLException if a database access error occurs or
6632   * this method is called on a closed <code>CallableStatement</code>
6633   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
6634   * this method
6635   * @since 1.4
6636   */
6637  public void setBinaryStream(String parameterName, java.io.InputStream x,
6638                       int length) throws SQLException{
6639       throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6640  }
6641 
6642  /**
6643    * Sets the designated parameter to the given <code>Reader</code>
6644    * object, which is the given number of characters long.
6645    * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
6646    * parameter, it may be more practical to send it via a
6647    * <code>java.io.Reader</code> object. The data will be read from the stream
6648    * as needed until end-of-file is reached.  The JDBC driver will
6649    * do any necessary conversion from UNICODE to the database char format.
6650    *
6651    * <P><B>Note:</B> This stream object can either be a standard
6652    * Java stream object or your own subclass that implements the
6653    * standard interface.
6654    *
6655    * @param parameterName the name of the parameter
6656    * @param reader the <code>java.io.Reader</code> object that
6657    *        contains the UNICODE data used as the designated parameter
6658    * @param length the number of characters in the stream
6659    * @exception SQLException if a database access error occurs or
6660    * this method is called on a closed <code>CallableStatement</code>
6661    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
6662    * this method
6663    * @since 1.4
6664    */
6665   public void setCharacterStream(String parameterName,
6666                           java.io.Reader reader,
6667                           int length) throws SQLException{
6668        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6669   }
6670 
6671   /**
6672    * Sets the designated parameter to the given input stream.
6673    * When a very large ASCII value is input to a <code>LONGVARCHAR</code>
6674    * parameter, it may be more practical to send it via a
6675    * <code>java.io.InputStream</code>. Data will be read from the stream
6676    * as needed until end-of-file is reached.  The JDBC driver will
6677    * do any necessary conversion from ASCII to the database char format.
6678    *
6679    * <P><B>Note:</B> This stream object can either be a standard
6680    * Java stream object or your own subclass that implements the
6681    * standard interface.
6682    * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
6683    * it might be more efficient to use a version of
6684    * <code>setAsciiStream</code> which takes a length parameter.
6685    *
6686    * @param parameterName the name of the parameter
6687    * @param x the Java input stream that contains the ASCII parameter value
6688    * @exception SQLException if a database access error occurs or
6689    * this method is called on a closed <code>CallableStatement</code>
6690    * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
6691      * @since 1.6
6692   */
6693   public void setAsciiStream(String parameterName, java.io.InputStream x)
6694           throws SQLException{
6695         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6696    }
6697 
6698 
6699  /**
6700     * Sets the designated parameter to the given input stream.
6701     * When a very large binary value is input to a <code>LONGVARBINARY</code>
6702     * parameter, it may be more practical to send it via a
6703     * <code>java.io.InputStream</code> object. The data will be read from the
6704     * stream as needed until end-of-file is reached.
6705     *
6706     * <P><B>Note:</B> This stream object can either be a standard
6707     * Java stream object or your own subclass that implements the
6708     * standard interface.
6709     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
6710     * it might be more efficient to use a version of
6711     * <code>setBinaryStream</code> which takes a length parameter.
6712     *
6713     * @param parameterName the name of the parameter
6714     * @param x the java input stream which contains the binary parameter value
6715     * @exception SQLException if a database access error occurs or
6716     * this method is called on a closed <code>CallableStatement</code>
6717     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
6718     * @since 1.6
6719     */
6720    public void setBinaryStream(String parameterName, java.io.InputStream x)
6721    throws SQLException{
6722         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6723    }
6724 
6725  /**
6726     * Sets the designated parameter to the given <code>Reader</code>
6727     * object.
6728     * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
6729     * parameter, it may be more practical to send it via a
6730     * <code>java.io.Reader</code> object. The data will be read from the stream
6731     * as needed until end-of-file is reached.  The JDBC driver will
6732     * do any necessary conversion from UNICODE to the database char format.
6733     *
6734     * <P><B>Note:</B> This stream object can either be a standard
6735     * Java stream object or your own subclass that implements the
6736     * standard interface.
6737     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
6738     * it might be more efficient to use a version of
6739     * <code>setCharacterStream</code> which takes a length parameter.
6740     *
6741     * @param parameterName the name of the parameter
6742     * @param reader the <code>java.io.Reader</code> object that contains the
6743     *        Unicode data
6744     * @exception SQLException if a database access error occurs or
6745     * this method is called on a closed <code>CallableStatement</code>
6746     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
6747     * @since 1.6
6748     */
6749    public void setCharacterStream(String parameterName,
6750                          java.io.Reader reader) throws SQLException{
6751         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6752    }
6753 
6754    /**
6755     * Sets the designated parameter to the given
6756     * <code>java.math.BigDecimal</code> value.
6757     * The driver converts this to an SQL <code>NUMERIC</code> value when
6758     * it sends it to the database.
6759     *
6760     * @param parameterName the name of the parameter
6761     * @param x the parameter value
6762     * @exception SQLException if a database access error occurs or
6763     * this method is called on a closed <code>CallableStatement</code>
6764     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
6765     * this method
6766     * @see #getBigDecimal
6767     * @since 1.4
6768     */
6769    public void setBigDecimal(String parameterName, BigDecimal x) throws SQLException{
6770         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6771    }
6772 
6773  /**
6774     * Sets the designated parameter to the given Java <code>String</code> value.
6775     * The driver converts this
6776     * to an SQL <code>VARCHAR</code> or <code>LONGVARCHAR</code> value
6777     * (depending on the argument's
6778     * size relative to the driver's limits on <code>VARCHAR</code> values)
6779     * when it sends it to the database.
6780     *
6781     * @param parameterName the name of the parameter
6782     * @param x the parameter value
6783     * @exception SQLException if a database access error occurs or
6784     * this method is called on a closed <code>CallableStatement</code>
6785     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
6786     * this method
6787     * @see #getString
6788     * @since 1.4
6789     */
6790    public void setString(String parameterName, String x) throws SQLException{
6791         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6792    }
6793 
6794 
6795 
6796  /**
6797     * Sets the designated parameter to the given Java array of bytes.
6798     * The driver converts this to an SQL <code>VARBINARY</code> or
6799     * <code>LONGVARBINARY</code> (depending on the argument's size relative
6800     * to the driver's limits on <code>VARBINARY</code> values) when it sends
6801     * it to the database.
6802     *
6803     * @param parameterName the name of the parameter
6804     * @param x the parameter value
6805     * @exception SQLException if a database access error occurs or
6806     * this method is called on a closed <code>CallableStatement</code>
6807     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
6808     * this method
6809     * @see #getBytes
6810     * @since 1.4
6811     */
6812    public void setBytes(String parameterName, byte x[]) throws SQLException{
6813         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6814    }
6815 
6816  /**
6817     * Sets the designated parameter to the given <code>java.sql.Timestamp</code> value.
6818     * The driver
6819     * converts this to an SQL <code>TIMESTAMP</code> value when it sends it to the
6820     * database.
6821     *
6822     * @param parameterName the name of the parameter
6823     * @param x the parameter value
6824     * @exception SQLException if a database access error occurs or
6825     * this method is called on a closed <code>CallableStatement</code>
6826     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
6827     * this method
6828     * @see #getTimestamp
6829     * @since 1.4
6830     */
6831    public void setTimestamp(String parameterName, java.sql.Timestamp x)
6832        throws SQLException{
6833         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6834    }
6835 
6836     /**
6837     * Sets the designated parameter to SQL <code>NULL</code>.
6838     *
6839     * <P><B>Note:</B> You must specify the parameter's SQL type.
6840     *
6841     * @param parameterName the name of the parameter
6842     * @param sqlType the SQL type code defined in <code>java.sql.Types</code>
6843     * @exception SQLException if a database access error occurs or
6844     * this method is called on a closed <code>CallableStatement</code>
6845     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
6846     * this method
6847     * @since 1.4
6848     */
6849    public void setNull(String parameterName, int sqlType) throws SQLException {
6850         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6851    }
6852 
6853  /**
6854     * Sets the designated parameter to SQL <code>NULL</code>.
6855     * This version of the method <code>setNull</code> should
6856     * be used for user-defined types and REF type parameters.  Examples
6857     * of user-defined types include: STRUCT, DISTINCT, JAVA_OBJECT, and
6858     * named array types.
6859     *
6860     * <P><B>Note:</B> To be portable, applications must give the
6861     * SQL type code and the fully-qualified SQL type name when specifying
6862     * a NULL user-defined or REF parameter.  In the case of a user-defined type
6863     * the name is the type name of the parameter itself.  For a REF
6864     * parameter, the name is the type name of the referenced type.  If
6865     * a JDBC driver does not need the type code or type name information,
6866     * it may ignore it.
6867     *
6868     * Although it is intended for user-defined and Ref parameters,
6869     * this method may be used to set a null parameter of any JDBC type.
6870     * If the parameter does not have a user-defined or REF type, the given
6871     * typeName is ignored.
6872     *
6873     *
6874     * @param parameterName the name of the parameter
6875     * @param sqlType a value from <code>java.sql.Types</code>
6876     * @param typeName the fully-qualified name of an SQL user-defined type;
6877     *        ignored if the parameter is not a user-defined type or
6878     *        SQL <code>REF</code> value
6879     * @exception SQLException if a database access error occurs or
6880     * this method is called on a closed <code>CallableStatement</code>
6881     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
6882     * this method
6883     * @since 1.4
6884     */
6885    public void setNull (String parameterName, int sqlType, String typeName)
6886        throws SQLException{
6887         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6888    }
6889 
6890  /**
6891     * Sets the designated parameter to the given Java <code>boolean</code> value.
6892     * The driver converts this
6893     * to an SQL <code>BIT</code> or <code>BOOLEAN</code> value when it sends it to the database.
6894     *
6895     * @param parameterName the name of the parameter
6896     * @param x the parameter value
6897     * @exception SQLException if a database access error occurs or
6898     * this method is called on a closed <code>CallableStatement</code>
6899     * @see #getBoolean
6900     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
6901     * this method
6902     * @since 1.4
6903     */
6904    public void setBoolean(String parameterName, boolean x) throws SQLException{
6905         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6906    }
6907 
6908 
6909 
6910  /**
6911     * Sets the designated parameter to the given Java <code>byte</code> value.
6912     * The driver converts this
6913     * to an SQL <code>TINYINT</code> value when it sends it to the database.
6914     *
6915     * @param parameterName the name of the parameter
6916     * @param x the parameter value
6917     * @exception SQLException if a database access error occurs or
6918     * this method is called on a closed <code>CallableStatement</code>
6919     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
6920     * this method
6921     * @see #getByte
6922     * @since 1.4
6923     */
6924    public void setByte(String parameterName, byte x) throws SQLException{
6925         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6926    }
6927 
6928 
6929  /**
6930     * Sets the designated parameter to the given Java <code>short</code> value.
6931     * The driver converts this
6932     * to an SQL <code>SMALLINT</code> value when it sends it to the database.
6933     *
6934     * @param parameterName the name of the parameter
6935     * @param x the parameter value
6936     * @exception SQLException if a database access error occurs or
6937     * this method is called on a closed <code>CallableStatement</code>
6938     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
6939     * this method
6940     * @see #getShort
6941     * @since 1.4
6942     */
6943    public void setShort(String parameterName, short x) throws SQLException{
6944         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6945    }
6946 
6947 
6948    /**
6949     * Sets the designated parameter to the given Java <code>int</code> value.
6950     * The driver converts this
6951     * to an SQL <code>INTEGER</code> value when it sends it to the database.
6952     *
6953     * @param parameterName the name of the parameter
6954     * @param x the parameter value
6955     * @exception SQLException if a database access error occurs or
6956     * this method is called on a closed <code>CallableStatement</code>
6957     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
6958     * this method
6959     * @see #getInt
6960     * @since 1.4
6961     */
6962    public void setInt(String parameterName, int x) throws SQLException{
6963         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6964    }
6965 
6966  /**
6967     * Sets the designated parameter to the given Java <code>long</code> value.
6968     * The driver converts this
6969     * to an SQL <code>BIGINT</code> value when it sends it to the database.
6970     *
6971     * @param parameterName the name of the parameter
6972     * @param x the parameter value
6973     * @exception SQLException if a database access error occurs or
6974     * this method is called on a closed <code>CallableStatement</code>
6975     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
6976     * this method
6977     * @see #getLong
6978     * @since 1.4
6979     */
6980    public void setLong(String parameterName, long x) throws SQLException{
6981         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
6982    }
6983 
6984 
6985  /**
6986     * Sets the designated parameter to the given Java <code>float</code> value.
6987     * The driver converts this
6988     * to an SQL <code>FLOAT</code> value when it sends it to the database.
6989     *
6990     * @param parameterName the name of the parameter
6991     * @param x the parameter value
6992     * @exception SQLException if a database access error occurs or
6993     * this method is called on a closed <code>CallableStatement</code>
6994     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
6995     * this method
6996     * @see #getFloat
6997     * @since 1.4
6998     */
6999    public void setFloat(String parameterName, float x) throws SQLException{
7000         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
7001    }
7002 
7003  /**
7004     * Sets the designated parameter to the given Java <code>double</code> value.
7005     * The driver converts this
7006     * to an SQL <code>DOUBLE</code> value when it sends it to the database.
7007     *
7008     * @param parameterName the name of the parameter
7009     * @param x the parameter value
7010     * @exception SQLException if a database access error occurs or
7011     * this method is called on a closed <code>CallableStatement</code>
7012     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
7013     * this method
7014     * @see #getDouble
7015     * @since 1.4
7016     */
7017    public void setDouble(String parameterName, double x) throws SQLException{
7018         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
7019    }
7020 
7021     /**
7022      * This method re populates the resBundle
7023      * during the deserialization process
7024      *
7025      */
7026     private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
7027         // Default state initialization happens here
7028         ois.defaultReadObject();
7029         // Initialization of transient Res Bundle happens here .
7030         try {
7031            resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
7032         } catch(IOException ioe) {}
7033 
7034     }
7035 
7036    static final long serialVersionUID = -3591946023893483003L;
7037 
7038  //------------------------- JDBC 4.1 -----------------------------------
7039 
7040     public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
7041         throw new SQLFeatureNotSupportedException("Not supported yet.");
7042     }
7043 
7044     public <T> T getObject(String columnLabel, Class<T> type) throws SQLException {
7045         throw new SQLFeatureNotSupportedException("Not supported yet.");
7046     }
7047 }