View Javadoc
1 /* 2 Copyright (C) 2003 Together 3 4 This library is free software; you can redistribute it and/or 5 modify it under the terms of the GNU Lesser General Public 6 License as published by the Free Software Foundation; either 7 version 2.1 of the License, or (at your option) any later version. 8 9 This library is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 Lesser General Public License for more details. 13 14 You should have received a copy of the GNU Lesser General Public 15 License along with this library; if not, write to the Free Software 16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 */ 18 19 package org.webdocwf.util.xml; 20 21 import java.io.ByteArrayInputStream; 22 import java.io.IOException; 23 import java.io.InputStream; 24 import java.io.Reader; 25 import java.io.StringReader; 26 import java.math.BigDecimal; 27 import java.net.URL; 28 import java.sql.*; 29 import java.util.ArrayList; 30 import java.util.Map; 31 import java.util.Calendar; 32 33 /*** 34 * Class that implements JDBC ResultSet interface. 35 * 36 * @author Zoran Milakovic 37 */ 38 public class XmlResultSet implements ResultSet { 39 40 /*** Metadata for this ResultSet */ 41 protected ResultSetMetaData resultSetMetaData; 42 43 /*** Statement that produced this ResultSet */ 44 protected Statement statement; 45 46 /*** Helper class that performs the actual file reads */ 47 protected XmlReader reader; 48 49 /*** Table referenced by the Statement */ 50 protected String tableName; 51 52 /*** Array of available columns for referenced table */ 53 protected String[] columnNames; 54 55 /*** Array of column values for referenced table */ 56 protected String[] columnValues; 57 58 protected String[] whereColumnNames; 59 60 protected String[] whereColumnValues; 61 62 63 /*** Last column name index read */ 64 protected int lastIndexRead = -1; 65 66 /*** InputStream to keep track of */ 67 protected InputStream is; 68 69 /*** 70 * Constructor for the XmlResultSet object 71 * 72 * @param statement Statement that produced this ResultSet 73 * @param reader Helper class that performs the actual file reads 74 * @param tableName Table referenced by the Statement 75 * @param columnNames Array of available columns for referenced table 76 * @param whereColumnNames is an array of column names 77 * @param whereColumnValues is an array of column values 78 */ 79 protected XmlResultSet(Statement statement, XmlReader reader , String tableName , String[] columnNames 80 , String[] whereColumnNames , String[] whereColumnValues ) { 81 this.statement = statement; 82 this.reader = reader; 83 this.tableName = tableName; 84 this.columnNames = columnNames; 85 this.whereColumnNames = whereColumnNames; 86 this.whereColumnValues = whereColumnValues; 87 } 88 89 90 public void select() throws SQLException { 91 reader.select( tableName , columnNames , whereColumnNames , whereColumnValues); 92 this.rset = reader.getResultSet(); 93 } 94 95 public void selectTableNames() throws SQLException { 96 reader.selectTableNames(); 97 this.rset = reader.getResultSet(); 98 } 99 public void close() { 100 } 101 102 private int index = 0; 103 private ArrayList rset = new ArrayList(); 104 /*** 105 *Description of the Method 106 * 107 * @return Description of the Returned Value 108 * @exception SQLException 109 * @since 110 */ 111 public boolean next() throws SQLException { 112 boolean retVal = false; 113 try { 114 if( !(rset.size() <= index) ) { 115 this.columnValues = (String[])rset.get( index ); 116 index++; 117 retVal = true; 118 } else { 119 index = 0; 120 rset = new ArrayList(); 121 this.columnValues = new String[0]; 122 retVal = false; 123 } 124 }catch( Exception e ) { throw new SQLException("Error in ResultSet.next() : "+e.getMessage()); } 125 return retVal; 126 } 127 128 public String getString(int i) throws SQLException { 129 try { 130 lastIndexRead = i; 131 return this.columnValues[i-1].toString(); 132 }catch(Exception e) { throw new SQLException("Error ResultSet.getString( index ) : "+e.getMessage()); } 133 } 134 135 /*** 136 * Reports whether 137 * the last column read had a value of SQL <code>NULL</code>. 138 * Note that you must first call one of the getter methods 139 * on a column to try to read its value and then call 140 * the method <code>wasNull</code> to see if the value read was 141 * SQL <code>NULL</code>. 142 * 143 * @return <code>true</code> if the last column value read was SQL 144 * <code>NULL</code> and <code>false</code> otherwise 145 * @exception SQLException if a database access error occurs 146 */ 147 public boolean wasNull() throws SQLException { 148 if(lastIndexRead >= 0) { 149 return (getString(lastIndexRead) == null) || (getString(lastIndexRead) == "null"); 150 } else { 151 throw new SQLException("No previous getter method called"); 152 } 153 } 154 155 //====================================================================== 156 // Methods for accessing results by column index 157 //====================================================================== 158 159 160 /*** 161 * Retrieves the value of the designated column in the current row 162 * of this <code>ResultSet</code> object as 163 * a <code>boolean</code> in the Java programming language. 164 * 165 * @param columnIndex the first column is 1, the second is 2, ... 166 * @return the column value; if the value is SQL <code>NULL</code>, the 167 * value returned is <code>false</code> 168 * @exception SQLException if a database access error occurs 169 */ 170 public boolean getBoolean(int columnIndex) throws SQLException { 171 String str = getString(columnIndex); 172 return (str == null) ? false : Boolean.valueOf(str).booleanValue(); 173 } 174 175 /*** 176 * Retrieves the value of the designated column in the current row 177 * of this <code>ResultSet</code> object as 178 * a <code>byte</code> in the Java programming language. 179 * 180 * @param columnIndex the first column is 1, the second is 2, ... 181 * @return the column value; if the value is SQL <code>NULL</code>, the 182 * value returned is <code>0</code> 183 * @exception SQLException if a database access error occurs 184 */ 185 public byte getByte(int columnIndex) throws SQLException { 186 String str = getString(columnIndex); 187 return (str == null) ? 0 : Byte.parseByte(str); 188 } 189 190 /*** 191 * Retrieves the value of the designated column in the current row 192 * of this <code>ResultSet</code> object as 193 * a <code>short</code> in the Java programming language. 194 * 195 * @param columnIndex the first column is 1, the second is 2, ... 196 * @return the column value; if the value is SQL <code>NULL</code>, the 197 * value returned is <code>0</code> 198 * @exception SQLException if a database access error occurs 199 */ 200 public short getShort(int columnIndex) throws SQLException { 201 String str = getString(columnIndex); 202 return (str == null) ? 0 : Short.parseShort(str); 203 } 204 205 /*** 206 * Gets the value of the designated column in the current row 207 * of this <code>ResultSet</code> object as 208 * an <code>int</code> in the Java programming language. 209 * 210 * @param columnIndex the first column is 1, the second is 2, ... 211 * @return the column value; if the value is SQL <code>NULL</code>, the 212 * value returned is <code>0</code> 213 * @exception SQLException if a database access error occurs 214 */ 215 public int getInt(int columnIndex) throws SQLException { 216 String str = getString(columnIndex); 217 return (str == null) ? 0 : Integer.parseInt(str); 218 } 219 220 /*** 221 * Retrieves the value of the designated column in the current row 222 * of this <code>ResultSet</code> object as 223 * a <code>long</code> in the Java programming language. 224 * 225 * @param columnIndex the first column is 1, the second is 2, ... 226 * @return the column value; if the value is SQL <code>NULL</code>, the 227 * value returned is <code>0</code> 228 * @exception SQLException if a database access error occurs 229 */ 230 public long getLong(int columnIndex) throws SQLException { 231 String str = getString(columnIndex); 232 return (str == null) ? 0L : Long.parseLong(str); 233 } 234 235 /*** 236 * Gets the value of the designated column in the current row 237 * of this <code>ResultSet</code> object as 238 * a <code>float</code> in the Java programming language. 239 * 240 * @param columnIndex the first column is 1, the second is 2, ... 241 * @return the column value; if the value is SQL <code>NULL</code>, the 242 * value returned is <code>0</code> 243 * @exception SQLException if a database access error occurs 244 */ 245 public float getFloat(int columnIndex) throws SQLException { 246 String str = getString(columnIndex); 247 return (str == null) ? 0F : Float.parseFloat(str); 248 } 249 250 /*** 251 * Retrieves the value of the designated column in the current row 252 * of this <code>ResultSet</code> object as 253 * a <code>double</code> in the Java programming language. 254 * 255 * @param columnIndex the first column is 1, the second is 2, ... 256 * @return the column value; if the value is SQL <code>NULL</code>, the 257 * value returned is <code>0</code> 258 * @exception SQLException if a database access error occurs 259 */ 260 public double getDouble(int columnIndex) throws SQLException { 261 String str = getString(columnIndex); 262 return (str == null) ? 0D : Double.parseDouble(str); 263 } 264 265 /*** 266 * Retrieves the value of the designated column in the current row 267 * of this <code>ResultSet</code> object as 268 * a <code>java.sql.BigDecimal</code> in the Java programming language. 269 * 270 * @param columnIndex the first column is 1, the second is 2, ... 271 * @param scale the number of digits to the right of the decimal point 272 * @return the column value; if the value is SQL <code>NULL</code>, the 273 * value returned is <code>null</code> 274 * @exception SQLException if a database access error occurs 275 * @deprecated 276 */ 277 public BigDecimal getBigDecimal(int columnIndex, int scale) 278 throws SQLException { 279 // let getBigDecimal(int) handle this for now 280 return getBigDecimal(columnIndex); 281 } 282 283 /*** 284 * Retrieves the value of the designated column in the current row 285 * of this <code>ResultSet</code> object as 286 * a <code>byte</code> array in the Java programming language. 287 * The bytes represent the raw values returned by the driver. 288 * 289 * @param columnIndex the first column is 1, the second is 2, ... 290 * @return the column value; if the value is SQL <code>NULL</code>, the 291 * value returned is <code>null</code> 292 * @exception SQLException if a database access error occurs 293 */ 294 public byte[] getBytes(int columnIndex) throws SQLException { 295 String str = getString(columnIndex); 296 return (str == null) ? null : Utils.hexStringToBytes(str); 297 } 298 299 /*** 300 * Retrieves the value of the designated column in the current row 301 * of this <code>ResultSet</code> object as 302 * a <code>java.sql.Date</code> object in the Java programming language. 303 * 304 * @param columnIndex the first column is 1, the second is 2, ... 305 * @return the column value; if the value is SQL <code>NULL</code>, the 306 * value returned is <code>null</code> 307 * @exception SQLException if a database access error occurs 308 */ 309 public Date getDate(int columnIndex) throws SQLException { 310 String str = getString(columnIndex); 311 return (str == null) ? null : Date.valueOf(str); 312 } 313 314 /*** 315 * Retrieves the value of the designated column in the current row 316 * of this <code>ResultSet</code> object as 317 * a <code>java.sql.Time</code> object in the Java programming language. 318 * 319 * @param columnIndex the first column is 1, the second is 2, ... 320 * @return the column value; if the value is SQL <code>NULL</code>, the 321 * value returned is <code>null</code> 322 * @exception SQLException if a database access error occurs 323 */ 324 public Time getTime(int columnIndex) throws SQLException { 325 String str = getString(columnIndex); 326 return (str == null) ? null : Time.valueOf(str); 327 } 328 329 /*** 330 * Retrieves the value of the designated column in the current row 331 * of this <code>ResultSet</code> object as a 332 * <code>java.sql.Timestamp</code> object in the Java programming language. 333 * 334 * @param columnIndex the first column is 1, the second is 2, ... 335 * @return the column value; if the value is SQL <code>NULL</code>, the 336 * value returned is <code>null</code> 337 * @exception SQLException if a database access error occurs 338 */ 339 public Timestamp getTimestamp(int columnIndex) throws SQLException { 340 String str = getString(columnIndex); 341 return (str == null) ? null : Timestamp.valueOf(str); 342 } 343 344 /*** 345 * Retrieves the value of the designated column in the current row 346 * of this <code>ResultSet</code> object as a stream of ASCII characters. 347 * The value can then be read in chunks from the stream. This method is 348 * particularly suitable for retrieving large <char>LONGVARCHAR</char> 349 * values. The JDBC driver will do any necessary conversion from the 350 * database format into ASCII. 351 * 352 * <P><B>Note:</B> All the data in the returned stream must be 353 * read prior to getting the value of any other column. The next 354 * call to a getter method implicitly closes the stream. Also, a 355 * stream may return <code>0</code> when the method 356 * <code>InputStream.available</code> 357 * is called whether there is data available or not. 358 * 359 * @param columnIndex the first column is 1, the second is 2, ... 360 * @return a Java input stream that delivers the database column value 361 * as a stream of one-byte ASCII characters; 362 * if the value is SQL <code>NULL</code>, the 363 * value returned is <code>null</code> 364 * @exception SQLException if a database access error occurs 365 */ 366 public InputStream getAsciiStream(int columnIndex) throws SQLException { 367 String str = getString(columnIndex); 368 is = new ByteArrayInputStream(str.getBytes()); 369 return (str == null) ? null : is; 370 } 371 372 /*** 373 * Retrieves the value of the designated column in the current row 374 * of this <code>ResultSet</code> object as 375 * as a stream of two-byte Unicode characters. The first byte is 376 * the high byte; the second byte is the low byte. 377 * 378 * The value can then be read in chunks from the 379 * stream. This method is particularly 380 * suitable for retrieving large <code>LONGVARCHAR</code>values. The 381 * JDBC driver will do any necessary conversion from the database 382 * format into Unicode. 383 * 384 * <P><B>Note:</B> All the data in the returned stream must be 385 * read prior to getting the value of any other column. The next 386 * call to a getter method implicitly closes the stream. 387 * Also, a stream may return <code>0</code> when the method 388 * <code>InputStream.available</code> 389 * is called, whether there is data available or not. 390 * 391 * @param columnIndex the first column is 1, the second is 2, ... 392 * @return a Java input stream that delivers the database column value 393 * as a stream of two-byte Unicode characters; 394 * if the value is SQL <code>NULL</code>, the value returned is 395 * <code>null</code> 396 * 397 * @exception SQLException if a database access error occurs 398 * @deprecated use <code>getCharacterStream</code> in place of 399 * <code>getUnicodeStream</code> 400 */ 401 public InputStream getUnicodeStream(int columnIndex) throws SQLException { 402 // delegate to getAsciiStream(int) 403 return getAsciiStream(columnIndex); 404 } 405 406 /*** 407 * Retrieves the value of the designated column in the current row 408 * of this <code>ResultSet</code> object as a binary stream of 409 * uninterpreted bytes. The value can then be read in chunks from the 410 * stream. This method is particularly 411 * suitable for retrieving large <code>LONGVARBINARY</code> values. 412 * 413 * <P><B>Note:</B> All the data in the returned stream must be 414 * read prior to getting the value of any other column. The next 415 * call to a getter method implicitly closes the stream. Also, a 416 * stream may return <code>0</code> when the method 417 * <code>InputStream.available</code> 418 * is called whether there is data available or not. 419 * 420 * @param columnIndex the first column is 1, the second is 2, ... 421 * @return a Java input stream that delivers the database column value 422 * as a stream of uninterpreted bytes; 423 * if the value is SQL <code>NULL</code>, the value returned is 424 * <code>null</code> 425 * @exception SQLException if a database access error occurs 426 */ 427 public InputStream getBinaryStream(int columnIndex) throws SQLException { 428 // delegate to getAsciiStream(int) 429 return getAsciiStream(columnIndex); 430 } 431 432 //====================================================================== 433 // Methods for accessing results by column name 434 //====================================================================== 435 436 /*** 437 * Retrieves the value of the designated column in the current row 438 * of this <code>ResultSet</code> object as 439 * a <code>String</code> in the Java programming language. 440 * 441 * @param columnName the SQL name of the column 442 * @return the column value; if the value is SQL <code>NULL</code>, the 443 * value returned is <code>null</code> 444 * @exception SQLException if a database access error occurs 445 */ 446 public String getString(String columnName) throws SQLException { 447 int colIndex = -1; 448 for( int i = 0; i < this.columnNames.length; i++ ) { 449 if(columnName.equalsIgnoreCase( this.columnNames[i] )){ 450 colIndex = i; 451 lastIndexRead = i+1; 452 } 453 } 454 if( colIndex == -1 ) 455 throw new SQLException("Column "+columnName+" not found."); 456 return this.columnValues[colIndex]; 457 } 458 459 /*** 460 * Retrieves the value of the designated column in the current row 461 * of this <code>ResultSet</code> object as 462 * a <code>boolean</code> in the Java programming language. 463 * 464 * @param columnName the SQL name of the column 465 * @return the column value; if the value is SQL <code>NULL</code>, the 466 * value returned is <code>false</code> 467 * @exception SQLException if a database access error occurs 468 */ 469 public boolean getBoolean(String columnName) throws SQLException { 470 String str = getString(columnName); 471 return (str == null) ? false : Boolean.valueOf(str).booleanValue(); 472 } 473 474 /*** 475 * Retrieves the value of the designated column in the current row 476 * of this <code>ResultSet</code> object as 477 * a <code>byte</code> in the Java programming language. 478 * 479 * @param columnName the SQL name of the column 480 * @return the column value; if the value is SQL <code>NULL</code>, the 481 * value returned is <code>0</code> 482 * @exception SQLException if a database access error occurs 483 */ 484 public byte getByte(String columnName) throws SQLException { 485 String str = getString(columnName); 486 return (str == null) ? 0 : Byte.parseByte(str); 487 } 488 489 /*** 490 * Retrieves the value of the designated column in the current row 491 * of this <code>ResultSet</code> object as 492 * a <code>short</code> in the Java programming language. 493 * 494 * @param columnName the SQL name of the column 495 * @return the column value; if the value is SQL <code>NULL</code>, the 496 * value returned is <code>0</code> 497 * @exception SQLException if a database access error occurs 498 */ 499 public short getShort(String columnName) throws SQLException { 500 String str = getString(columnName); 501 return (str == null) ? 0 : Short.parseShort(str); 502 } 503 504 /*** 505 * Gets the value of the designated column in the current row 506 * of this <code>ResultSet</code> object as 507 * an <code>int</code> in the Java programming language. 508 * 509 * @param columnName the SQL name of the column 510 * @return the column value; if the value is SQL <code>NULL</code>, the 511 * value returned is <code>0</code> 512 * @exception SQLException if a database access error occurs 513 */ 514 public int getInt(String columnName) throws SQLException { 515 String str = getString(columnName); 516 return (str == null) ? 0 : Integer.parseInt(str); 517 } 518 519 /*** 520 * Retrieves the value of the designated column in the current row 521 * of this <code>ResultSet</code> object as 522 * a <code>long</code> in the Java programming language. 523 * 524 * @param columnName the SQL name of the column 525 * @return the column value; if the value is SQL <code>NULL</code>, the 526 * value returned is <code>0</code> 527 * @exception SQLException if a database access error occurs 528 */ 529 public long getLong(String columnName) throws SQLException { 530 String str = getString(columnName); 531 return (str == null) ? 0L : Long.parseLong(str); 532 } 533 534 /*** 535 * Gets the value of the designated column in the current row 536 * of this <code>ResultSet</code> object as 537 * a <code>float</code> in the Java programming language. 538 * 539 * @param columnName the SQL name of the column 540 * @return the column value; if the value is SQL <code>NULL</code>, the 541 * value returned is <code>0</code> 542 * @exception SQLException if a database access error occurs 543 */ 544 public float getFloat(String columnName) throws SQLException { 545 String str = getString(columnName); 546 return (str == null) ? 0F : Float.parseFloat(str); 547 } 548 549 /*** 550 * Retrieves the value of the designated column in the current row 551 * of this <code>ResultSet</code> object as 552 * a <code>double</code> in the Java programming language. 553 * 554 * @param columnName the SQL name of the column 555 * @return the column value; if the value is SQL <code>NULL</code>, the 556 * value returned is <code>0</code> 557 * @exception SQLException if a database access error occurs 558 */ 559 public double getDouble(String columnName) throws SQLException { 560 String str = getString(columnName); 561 return (str == null) ? 0D : Double.parseDouble(str); 562 } 563 564 /*** 565 * Retrieves the value of the designated column in the current row 566 * of this <code>ResultSet</code> object as 567 * a <code>java.math.BigDecimal</code> in the Java programming language. 568 * 569 * @param columnName the SQL name of the column 570 * @param scale the number of digits to the right of the decimal point 571 * @return the column value; if the value is SQL <code>NULL</code>, the 572 * value returned is <code>null</code> 573 * @exception SQLException if a database access error occurs 574 * @deprecated 575 */ 576 public BigDecimal getBigDecimal(String columnName, int scale) 577 throws SQLException { 578 // let getBigDecimal(String) handle this for now 579 return getBigDecimal(columnName); 580 } 581 582 /*** 583 * Retrieves the value of the designated column in the current row 584 * of this <code>ResultSet</code> object as 585 * a <code>byte</code> array in the Java programming language. 586 * The bytes represent the raw values returned by the driver. 587 * 588 * @param columnName the SQL name of the column 589 * @return the column value; if the value is SQL <code>NULL</code>, the 590 * value returned is <code>null</code> 591 * @exception SQLException if a database access error occurs 592 */ 593 public byte[] getBytes(String columnName) throws SQLException { 594 String str = getString(columnName); 595 return (str == null) ? null : str.getBytes(); 596 } 597 598 /*** 599 * Retrieves the value of the designated column in the current row 600 * of this <code>ResultSet</code> object as 601 * a <code>java.sql.Date</code> object in the Java programming language. 602 * 603 * @param columnName the SQL name of the column 604 * @return the column value; if the value is SQL <code>NULL</code>, the 605 * value returned is <code>null</code> 606 * @exception SQLException if a database access error occurs 607 */ 608 public Date getDate(String columnName) throws SQLException { 609 String str = getString(columnName); 610 return (str == null) ? null : Date.valueOf(str); 611 } 612 613 /*** 614 * Retrieves the value of the designated column in the current row 615 * of this <code>ResultSet</code> object as 616 * a <code>java.sql.Time</code> object in the Java programming language. 617 * 618 * @param columnName the SQL name of the column 619 * @return the column value; 620 * if the value is SQL <code>NULL</code>, 621 * the value returned is <code>null</code> 622 * @exception SQLException if a database access error occurs 623 */ 624 public Time getTime(String columnName) throws SQLException { 625 String str = getString(columnName); 626 return (str == null) ? null : Time.valueOf(str); 627 } 628 629 /*** 630 * Retrieves the value of the designated column in the current row 631 * of this <code>ResultSet</code> object as 632 * a <code>java.sql.Timestamp</code> object. 633 * 634 * @param columnName the SQL name of the column 635 * @return the column value; if the value is SQL <code>NULL</code>, the 636 * value returned is <code>null</code> 637 * @exception SQLException if a database access error occurs 638 */ 639 public Timestamp getTimestamp(String columnName) throws SQLException { 640 String str = getString(columnName); 641 return (str == null) ? null : Timestamp.valueOf(str); 642 } 643 644 /*** 645 * Retrieves the value of the designated column in the current row 646 * of this <code>ResultSet</code> object as a stream of 647 * ASCII characters. The value can then be read in chunks from the 648 * stream. This method is particularly 649 * suitable for retrieving large <code>LONGVARCHAR</code> values. 650 * The JDBC driver will 651 * do any necessary conversion from the database format into ASCII. 652 * 653 * <P><B>Note:</B> All the data in the returned stream must be 654 * read prior to getting the value of any other column. The next 655 * call to a getter method implicitly closes the stream. Also, a 656 * stream may return <code>0</code> when the method <code>available</code> 657 * is called whether there is data available or not. 658 * 659 * @param columnName the SQL name of the column 660 * @return a Java input stream that delivers the database column value 661 * as a stream of one-byte ASCII characters. 662 * If the value is SQL <code>NULL</code>, 663 * the value returned is <code>null</code>. 664 * @exception SQLException if a database access error occurs 665 */ 666 public InputStream getAsciiStream(String columnName) throws SQLException { 667 String str = getString(columnName); 668 is = new ByteArrayInputStream(str.getBytes()); 669 return (str == null) ? null : is; 670 } 671 672 /*** 673 * Retrieves the value of the designated column in the current row 674 * of this <code>ResultSet</code> object as a stream of two-byte 675 * Unicode characters. The first byte is the high byte; the second 676 * byte is the low byte. 677 * 678 * The value can then be read in chunks from the 679 * stream. This method is particularly 680 * suitable for retrieving large <code>LONGVARCHAR</code> values. 681 * The JDBC technology-enabled driver will 682 * do any necessary conversion from the database format into Unicode. 683 * 684 * <P><B>Note:</B> All the data in the returned stream must be 685 * read prior to getting the value of any other column. The next 686 * call to a getter method implicitly closes the stream. 687 * Also, a stream may return <code>0</code> when the method 688 * <code>InputStream.available</code> is called, whether there 689 * is data available or not. 690 * 691 * @param columnName the SQL name of the column 692 * @return a Java input stream that delivers the database column value 693 * as a stream of two-byte Unicode characters. 694 * If the value is SQL <code>NULL</code>, the value returned 695 * is <code>null</code>. 696 * @exception SQLException if a database access error occurs 697 * @deprecated use <code>getCharacterStream</code> instead 698 */ 699 public InputStream getUnicodeStream(String columnName) throws SQLException { 700 // delegate to getAsciiStream(String) 701 return getAsciiStream(columnName); 702 } 703 704 /*** 705 * Retrieves the value of the designated column in the current row 706 * of this <code>ResultSet</code> object as a stream of uninterpreted 707 * <code>byte</code>s. 708 * The value can then be read in chunks from the 709 * stream. This method is particularly 710 * suitable for retrieving large <code>LONGVARBINARY</code> 711 * values. 712 * 713 * <P><B>Note:</B> All the data in the returned stream must be 714 * read prior to getting the value of any other column. The next 715 * call to a getter method implicitly closes the stream. Also, a 716 * stream may return <code>0</code> when the method <code>available</code> 717 * is called whether there is data available or not. 718 * 719 * @param columnName the SQL name of the column 720 * @return a Java input stream that delivers the database column value 721 * as a stream of uninterpreted bytes; 722 * if the value is SQL <code>NULL</code>, the result is <code>null</code> 723 * @exception SQLException if a database access error occurs 724 */ 725 public InputStream getBinaryStream(String columnName) throws SQLException { 726 // delegate to getAsciiStream(String) 727 return getAsciiStream(columnName); 728 } 729 730 //===================================================================== 731 // Advanced features: 732 //===================================================================== 733 734 /*** 735 * Retrieves the first warning reported by calls on this 736 * <code>ResultSet</code> object. 737 * Subsequent warnings on this <code>ResultSet</code> object 738 * will be chained to the <code>SQLWarning</code> object that 739 * this method returns. 740 * 741 * <P>The warning chain is automatically cleared each time a new 742 * row is read. This method may not be called on a <code>ResultSet</code> 743 * object that has been closed; doing so will cause an 744 * <code>SQLException</code> to be thrown. 745 * <P> 746 * <B>Note:</B> This warning chain only covers warnings caused 747 * by <code>ResultSet</code> methods. Any warning caused by 748 * <code>Statement</code> methods 749 * (such as reading OUT parameters) will be chained on the 750 * <code>Statement</code> object. 751 * 752 * @return the first <code>SQLWarning</code> object reported or 753 * <code>null</code> if there are none 754 * @exception SQLException if a database access error occurs or this method 755 * is called on a closed result set 756 */ 757 public SQLWarning getWarnings() throws SQLException { 758 throw new UnsupportedOperationException( 759 "ResultSet.getWarnings() unsupported"); 760 } 761 762 /*** 763 * Clears all warnings reported on this <code>ResultSet</code> object. 764 * After this method is called, the method <code>getWarnings</code> 765 * returns <code>null</code> until a new warning is 766 * reported for this <code>ResultSet</code> object. 767 * 768 * @exception SQLException if a database access error occurs 769 */ 770 public void clearWarnings() throws SQLException { 771 throw new UnsupportedOperationException( 772 "ResultSet.clearWarnings() unsupported"); 773 } 774 775 /*** 776 * Retrieves the name of the SQL cursor used by this <code>ResultSet</code> 777 * object. 778 * 779 * <P>In SQL, a result table is retrieved through a cursor that is 780 * named. The current row of a result set can be updated or deleted 781 * using a positioned update/delete statement that references the 782 * cursor name. To insure that the cursor has the proper isolation 783 * level to support update, the cursor's <code>SELECT</code> statement 784 * should be of the form <code>SELECT FOR UPDATE</code>. If 785 * <code>FOR UPDATE</code> is omitted, the positioned updates may fail. 786 * 787 * <P>The JDBC API supports this SQL feature by providing the name of the 788 * SQL cursor used by a <code>ResultSet</code> object. 789 * The current row of a <code>ResultSet</code> object 790 * is also the current row of this SQL cursor. 791 * 792 * <P><B>Note:</B> If positioned update is not supported, a 793 * <code>SQLException</code> is thrown. 794 * 795 * @return the SQL name for this <code>ResultSet</code> object's cursor 796 * @exception SQLException if a database access error occurs 797 */ 798 public String getCursorName() throws SQLException { 799 throw new UnsupportedOperationException( 800 "ResultSet.getCursorName() unsupported"); 801 } 802 803 /*** 804 * Retrieves the number, types and properties of 805 * this <code>ResultSet</code> object's columns. 806 * 807 * @return the description of this <code>ResultSet</code> object's columns 808 * @exception SQLException if a database access error occurs 809 */ 810 public ResultSetMetaData getMetaData() throws SQLException { 811 if (resultSetMetaData == null) { 812 resultSetMetaData = new XmlResultSetMetaData(tableName, columnNames); 813 } 814 return resultSetMetaData; 815 816 } 817 818 /*** 819 * <p>Gets the value of the designated column in the current row 820 * of this <code>ResultSet</code> object as 821 * an <code>Object</code> in the Java programming language. 822 * 823 * <p>This method will return the value of the given column as a 824 * Java object. The type of the Java object will be the default 825 * Java object type corresponding to the column's SQL type, 826 * following the mapping for built-in types specified in the JDBC 827 * specification. If the value is an SQL <code>NULL</code>, 828 * the driver returns a Java <code>null</code>. 829 * 830 * <p>This method may also be used to read datatabase-specific 831 * abstract data types. 832 * 833 * In the JDBC 2.0 API, the behavior of method 834 * <code>getObject</code> is extended to materialize 835 * data of SQL user-defined types. When a column contains 836 * a structured or distinct value, the behavior of this method is as 837 * if it were a call to: <code>getObject(columnIndex, 838 * this.getStatement().getConnection().getTypeMap())</code>. 839 * 840 * @param columnIndex the first column is 1, the second is 2, ... 841 * @return a <code>java.lang.Object</code> holding the column value 842 * @exception SQLException if a database access error occurs 843 */ 844 public Object getObject(int columnIndex) throws SQLException { 845 // throw new UnsupportedOperationException( 846 // "ResultSet.getObject(int) unsupported"); 847 return getString(columnIndex); 848 } 849 /*** 850 * <p>Gets the value of the designated column in the current row 851 * of this <code>ResultSet</code> object as 852 * an <code>Object</code> in the Java programming language. 853 * 854 * <p>This method will return the value of the given column as a 855 * Java object. The type of the Java object will be the default 856 * Java object type corresponding to the column's SQL type, 857 * following the mapping for built-in types specified in the JDBC 858 * specification. If the value is an SQL <code>NULL</code>, 859 * the driver returns a Java <code>null</code>. 860 * <P> 861 * This method may also be used to read datatabase-specific 862 * abstract data types. 863 * <P> 864 * In the JDBC 2.0 API, the behavior of the method 865 * <code>getObject</code> is extended to materialize 866 * data of SQL user-defined types. When a column contains 867 * a structured or distinct value, the behavior of this method is as 868 * if it were a call to: <code>getObject(columnIndex, 869 * this.getStatement().getConnection().getTypeMap())</code>. 870 * 871 * @param columnName the SQL name of the column 872 * @return a <code>java.lang.Object</code> holding the column value 873 * @exception SQLException if a database access error occurs 874 */ 875 public Object getObject(String columnName) throws SQLException { 876 // throw new UnsupportedOperationException( 877 // "ResultSet.getObject(String) unsupported"); 878 return getString(columnName); 879 } 880 881 /*** 882 * Maps the given <code>ResultSet</code> column name to its 883 * <code>ResultSet</code> column index. 884 * 885 * @param columnName the name of the column 886 * @return the column index of the given column name 887 * @exception SQLException if the <code>ResultSet</code> object does 888 * not contain <code>columnName</code> or a database access error occurs 889 */ 890 public int findColumn(String columnName) throws SQLException { 891 throw new UnsupportedOperationException( 892 "ResultSet.findColumn(String) unsupported"); 893 } 894 895 //--------------------------JDBC 2.0----------------------------------- 896 897 //--------------------------------------------------------------------- 898 // Getters and Setters 899 //--------------------------------------------------------------------- 900 901 /*** 902 * Retrieves the value of the designated column in the current row 903 * of this <code>ResultSet</code> object as a 904 * <code>java.io.Reader</code> object. 905 * 906 * @param columnIndex the first column is 1, the second is 2, ... 907 * @return a <code>java.io.Reader</code> object that contains the column 908 * value; if the value is SQL <code>NULL</code>, the value returned is 909 * <code>null</code> in the Java programming language. 910 * @exception SQLException if a database access error occurs 911 */ 912 public Reader getCharacterStream(int columnIndex) throws SQLException { 913 String str = getString(columnIndex); 914 return (str == null) ? null : new StringReader(str); 915 } 916 917 /*** 918 * Retrieves the value of the designated column in the current row 919 * of this <code>ResultSet</code> object as a 920 * <code>java.io.Reader</code> object. 921 * 922 * @param columnName the name of the column 923 * @return a <code>java.io.Reader</code> object that contains the column 924 * value; if the value is SQL <code>NULL</code>, the value returned is 925 * <code>null</code> in the Java programming language 926 * @exception SQLException if a database access error occurs 927 */ 928 public Reader getCharacterStream(String columnName) throws SQLException { 929 String str = getString(columnName); 930 return (str == null) ? null : new StringReader(str); 931 } 932 933 /*** 934 * Retrieves the value of the designated column in the current row 935 * of this <code>ResultSet</code> object as a 936 * <code>java.math.BigDecimal</code> with full precision. 937 * 938 * @param columnIndex the first column is 1, the second is 2, ... 939 * @return the column value (full precision); 940 * if the value is SQL <code>NULL</code>, the value returned is 941 * <code>null</code> in the Java programming language. 942 * @exception SQLException if a database access error occurs 943 */ 944 public BigDecimal getBigDecimal(int columnIndex) throws SQLException { 945 BigDecimal retval = null; 946 String str = getString(columnIndex); 947 if(str != null) { 948 try { 949 retval = new BigDecimal(str); 950 } 951 catch (NumberFormatException e) { 952 throw new SQLException("Could not convert '" + str + "' to " + 953 "a java.math.BigDecimal object"); 954 } 955 } 956 return retval; 957 } 958 959 /*** 960 * Retrieves the value of the designated column in the current row 961 * of this <code>ResultSet</code> object as a 962 * <code>java.math.BigDecimal</code> with full precision. 963 * 964 * @param columnName the column name 965 * @return the column value (full precision); 966 * if the value is SQL <code>NULL</code>, the value returned is 967 * <code>null</code> in the Java programming language. 968 * @exception SQLException if a database access error occurs 969 */ 970 public BigDecimal getBigDecimal(String columnName) throws SQLException { 971 BigDecimal retval = null; 972 String str = getString(columnName); 973 if(str != null) { 974 try { 975 retval = new BigDecimal(str); 976 } 977 catch (NumberFormatException e) { 978 throw new SQLException("Could not convert '" + str + "' to " + 979 "a java.math.BigDecimal object"); 980 } 981 } 982 return retval; 983 } 984 985 //--------------------------------------------------------------------- 986 // Traversal/Positioning 987 //--------------------------------------------------------------------- 988 989 /*** 990 * Retrieves whether the cursor is before the first row in 991 * this <code>ResultSet</code> object. 992 * 993 * @return <code>true</code> if the cursor is before the first row; 994 * <code>false</code> if the cursor is at any other position or the 995 * result set contains no rows 996 * @exception SQLException if a database access error occurs 997 */ 998 public boolean isBeforeFirst() throws SQLException { 999 throw new UnsupportedOperationException( 1000 "ResultSet.isBeforeFirst() unsupported"); 1001 } 1002 1003 /*** 1004 * Retrieves whether the cursor is after the last row in 1005 * this <code>ResultSet</code> object. 1006 * 1007 * @return <code>true</code> if the cursor is after the last row; 1008 * <code>false</code> if the cursor is at any other position or the 1009 * result set contains no rows 1010 * @exception SQLException if a database access error occurs 1011 */ 1012 public boolean isAfterLast() throws SQLException { 1013 throw new UnsupportedOperationException( 1014 "ResultSet.isAfterLast() unsupported"); 1015 } 1016 1017 /*** 1018 * Retrieves whether the cursor is on the first row of 1019 * this <code>ResultSet</code> object. 1020 * 1021 * @return <code>true</code> if the cursor is on the first row; 1022 * <code>false</code> otherwise 1023 * @exception SQLException if a database access error occurs 1024 */ 1025 public boolean isFirst() throws SQLException { 1026 throw new UnsupportedOperationException( 1027 "ResultSet.isFirst() unsupported"); 1028 } 1029 1030 /*** 1031 * Retrieves whether the cursor is on the last row of 1032 * this <code>ResultSet</code> object. 1033 * Note: Calling the method <code>isLast</code> may be expensive 1034 * because the JDBC driver 1035 * might need to fetch ahead one row in order to determine 1036 * whether the current row is the last row in the result set. 1037 * 1038 * @return <code>true</code> if the cursor is on the last row; 1039 * <code>false</code> otherwise 1040 * @exception SQLException if a database access error occurs 1041 */ 1042 public boolean isLast() throws SQLException { 1043 throw new UnsupportedOperationException( 1044 "ResultSet.isLast() unsupported"); 1045 } 1046 1047 /*** 1048 * Moves the cursor to the front of 1049 * this <code>ResultSet</code> object, just before the 1050 * first row. This method has no effect if the result set contains no rows. 1051 * 1052 * @exception SQLException if a database access error 1053 * occurs or the result set type is <code>TYPE_FORWARD_ONLY</code> 1054 */ 1055 public void beforeFirst() throws SQLException { 1056 throw new UnsupportedOperationException( 1057 "ResultSet.beforeFirst() unsupported"); 1058 } 1059 1060 /*** 1061 * Moves the cursor to the end of 1062 * this <code>ResultSet</code> object, just after the 1063 * last row. This method has no effect if the result set contains no rows. 1064 * @exception SQLException if a database access error 1065 * occurs or the result set type is <code>TYPE_FORWARD_ONLY</code> 1066 */ 1067 public void afterLast() throws SQLException { 1068 throw new UnsupportedOperationException( 1069 "ResultSet.afterLast() unsupported"); 1070 } 1071 1072 /*** 1073 * Moves the cursor to the first row in 1074 * this <code>ResultSet</code> object. 1075 * 1076 * @return <code>true</code> if the cursor is on a valid row; 1077 * <code>false</code> if there are no rows in the result set 1078 * @exception SQLException if a database access error 1079 * occurs or the result set type is <code>TYPE_FORWARD_ONLY</code> 1080 */ 1081 public boolean first() throws SQLException { 1082 throw new UnsupportedOperationException( 1083 "ResultSet.first() unsupported"); 1084 } 1085 1086 /*** 1087 * Moves the cursor to the last row in 1088 * this <code>ResultSet</code> object. 1089 * 1090 * @return <code>true</code> if the cursor is on a valid row; 1091 * <code>false</code> if there are no rows in the result set 1092 * @exception SQLException if a database access error 1093 * occurs or the result set type is <code>TYPE_FORWARD_ONLY</code> 1094 */ 1095 public boolean last() throws SQLException { 1096 throw new UnsupportedOperationException("ResultSet.last() unsupported"); 1097 } 1098 1099 /*** 1100 * Retrieves the current row number. The first row is number 1, the 1101 * second number 2, and so on. 1102 * 1103 * @return the current row number; <code>0</code> if there is no current row 1104 * @exception SQLException if a database access error occurs 1105 */ 1106 public int getRow() throws SQLException { 1107 throw new UnsupportedOperationException( 1108 "ResultSet.getRow() unsupported"); 1109 } 1110 1111 /*** 1112 * Moves the cursor to the given row number in 1113 * this <code>ResultSet</code> object. 1114 * 1115 * <p>If the row number is positive, the cursor moves to 1116 * the given row number with respect to the 1117 * beginning of the result set. The first row is row 1, the second 1118 * is row 2, and so on. 1119 * 1120 * <p>If the given row number is negative, the cursor moves to 1121 * an absolute row position with respect to 1122 * the end of the result set. For example, calling the method 1123 * <code>absolute(-1)</code> positions the 1124 * cursor on the last row; calling the method <code>absolute(-2)</code> 1125 * moves the cursor to the next-to-last row, and so on. 1126 * 1127 * <p>An attempt to position the cursor beyond the first/last row in 1128 * the result set leaves the cursor before the first row or after 1129 * the last row. 1130 * 1131 * <p><B>Note:</B> Calling <code>absolute(1)</code> is the same 1132 * as calling <code>first()</code>. Calling <code>absolute(-1)</code> 1133 * is the same as calling <code>last()</code>. 1134 * 1135 * @param row the number of the row to which the cursor should move. 1136 * A positive number indicates the row number counting from the 1137 * beginning of the result set; a negative number indicates the 1138 * row number counting from the end of the result set 1139 * @return <code>true</code> if the cursor is on the result set; 1140 * <code>false</code> otherwise 1141 * @exception SQLException if a database access error 1142 * occurs, or the result set type is <code>TYPE_FORWARD_ONLY</code> 1143 */ 1144 public boolean absolute(int row) throws SQLException { 1145 throw new UnsupportedOperationException( 1146 "ResultSet.absolute() unsupported"); 1147 } 1148 1149 /*** 1150 * Moves the cursor a relative number of rows, either positive or negative. 1151 * Attempting to move beyond the first/last row in the 1152 * result set positions the cursor before/after the 1153 * the first/last row. Calling <code>relative(0)</code> is valid, but does 1154 * not change the cursor position. 1155 * 1156 * <p>Note: Calling the method <code>relative(1)</code> 1157 * is identical to calling the method <code>next()</code> and 1158 * calling the method <code>relative(-1)</code> is identical 1159 * to calling the method <code>previous()</code>. 1160 * 1161 * @param rows an <code>int</code> specifying the number of rows to 1162 * move from the current row; a positive number moves the cursor 1163 * forward; a negative number moves the cursor backward 1164 * @return <code>true</code> if the cursor is on a row; 1165 * <code>false</code> otherwise 1166 * @exception SQLException if a database access error occurs, 1167 * there is no current row, or the result set type is 1168 * <code>TYPE_FORWARD_ONLY</code> 1169 */ 1170 public boolean relative(int rows) throws SQLException { 1171 throw new UnsupportedOperationException( 1172 "ResultSet.relative() unsupported"); 1173 } 1174 1175 /*** 1176 * Moves the cursor to the previous row in this 1177 * <code>ResultSet</code> object. 1178 * 1179 * @return <code>true</code> if the cursor is on a valid row; 1180 * <code>false</code> if it is off the result set 1181 * @exception SQLException if a database access error 1182 * occurs or the result set type is <code>TYPE_FORWARD_ONLY</code> 1183 */ 1184 public boolean previous() throws SQLException { 1185 throw new UnsupportedOperationException( 1186 "ResultSet.previous() unsupported"); 1187 } 1188 1189 //--------------------------------------------------------------------- 1190 // Properties 1191 //--------------------------------------------------------------------- 1192 1193 /*** 1194 * Gives a hint as to the direction in which the rows in this 1195 * <code>ResultSet</code> object will be processed. The initial value is 1196 * determined by the <code>Statement</code> object that produced this 1197 * <code>ResultSet</code> object. The fetch direction may be changed at 1198 * any time. 1199 * 1200 * @param direction an <code>int</code> specifying the suggested 1201 * fetch direction; one of <code>ResultSet.FETCH_FORWARD</code>, 1202 * <code>ResultSet.FETCH_REVERSE</code>, or 1203 * <code>ResultSet.FETCH_UNKNOWN</code> 1204 * @exception SQLException if a database access error occurs or 1205 * the result set type is <code>TYPE_FORWARD_ONLY</code> 1206 * and the fetch direction is not <code>FETCH_FORWARD</code> 1207 */ 1208 public void setFetchDirection(int direction) throws SQLException { 1209 throw new UnsupportedOperationException( 1210 "ResultSet.setFetchDirection(int) unsupported"); 1211 } 1212 1213 /*** 1214 * Retrieves the fetch direction for this 1215 * <code>ResultSet</code> object. 1216 * 1217 * @return the current fetch direction for this <code>ResultSet</code> 1218 * object 1219 * @exception SQLException if a database access error occurs 1220 * @see #setFetchDirection 1221 */ 1222 public int getFetchDirection() throws SQLException { 1223 throw new UnsupportedOperationException( 1224 "ResultSet.getFetchDirection() unsupported"); 1225 } 1226 1227 /*** 1228 * Gives the JDBC driver a hint as to the number of rows that should 1229 * be fetched from the database when more rows are needed for this 1230 * <code>ResultSet</code> object. If the fetch size specified is zero, 1231 * the JDBC driver ignores the value and is free to make its own best 1232 * guess as to what the fetch size should be. The default value is set 1233 * by the <code>Statement</code> object that created the result set. 1234 * The fetch size may be changed at any time. 1235 * 1236 * @param rows the number of rows to fetch 1237 * @exception SQLException if a database access error occurs or the 1238 * condition <code>0 <= rows <= this.getMaxRows()</code> is not satisfied 1239 */ 1240 public void setFetchSize(int rows) throws SQLException { 1241 throw new UnsupportedOperationException( 1242 "ResultSet.setFetchSize(int) unsupported"); 1243 } 1244 1245 /*** 1246 * Retrieves the fetch size for this 1247 * <code>ResultSet</code> object. 1248 * 1249 * @return the current fetch size for this <code>ResultSet</code> object 1250 * @exception SQLException if a database access error occurs 1251 * @see #setFetchSize 1252 */ 1253 public int getFetchSize() throws SQLException { 1254 throw new UnsupportedOperationException( 1255 "ResultSet.getFetchSize() unsupported"); 1256 } 1257 1258 /*** 1259 * Retrieves the type of this <code>ResultSet</code> object. 1260 * The type is determined by the <code>Statement</code> object 1261 * that created the result set. 1262 * 1263 * @return <code>ResultSet.TYPE_FORWARD_ONLY</code>, 1264 * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, 1265 * or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code> 1266 * @exception SQLException if a database access error occurs 1267 */ 1268 public int getType() throws SQLException { 1269 throw new UnsupportedOperationException( 1270 "ResultSet.getType() unsupported"); 1271 } 1272 1273 /*** 1274 * Retrieves the concurrency mode of this <code>ResultSet</code> object. 1275 * The concurrency used is determined by the 1276 * <code>Statement</code> object that created the result set. 1277 * 1278 * @return the concurrency type, either 1279 * <code>ResultSet.CONCUR_READ_ONLY</code> 1280 * or <code>ResultSet.CONCUR_UPDATABLE</code> 1281 * @exception SQLException if a database access error occurs 1282 */ 1283 public int getConcurrency() throws SQLException { 1284 return CONCUR_READ_ONLY; 1285 } 1286 1287 //--------------------------------------------------------------------- 1288 // Updates 1289 //--------------------------------------------------------------------- 1290 1291 /*** 1292 * Retrieves whether the current row has been updated. The value returned 1293 * depends on whether or not the result set can detect updates. 1294 * 1295 * @return <code>true</code> if both (1) the row has been visibly updated 1296 * by the owner or another and (2) updates are detected 1297 * @exception SQLException if a database access error occurs 1298 * @see DatabaseMetaData#updatesAreDetected 1299 */ 1300 public boolean rowUpdated() throws SQLException { 1301 throw new UnsupportedOperationException( 1302 "ResultSet.rowUpdated() unsupported"); 1303 } 1304 1305 /*** 1306 * Retrieves whether the current row has had an insertion. 1307 * The value returned depends on whether or not this 1308 * <code>ResultSet</code> object can detect visible inserts. 1309 * 1310 * @return <code>true</code> if a row has had an insertion 1311 * and insertions are detected; <code>false</code> otherwise 1312 * @exception SQLException if a database access error occurs 1313 * 1314 * @see DatabaseMetaData#insertsAreDetected 1315 */ 1316 public boolean rowInserted() throws SQLException { 1317 throw new UnsupportedOperationException( 1318 "ResultSet.rowInserted() unsupported"); 1319 } 1320 1321 /*** 1322 * Retrieves whether a row has been deleted. A deleted row may leave 1323 * a visible "hole" in a result set. This method can be used to 1324 * detect holes in a result set. The value returned depends on whether 1325 * or not this <code>ResultSet</code> object can detect deletions. 1326 * 1327 * @return <code>true</code> if a row was deleted and deletions are 1328 * detected; <code>false</code> otherwise 1329 * @exception SQLException if a database access error occurs 1330 * 1331 * @see DatabaseMetaData#deletesAreDetected 1332 */ 1333 public boolean rowDeleted() throws SQLException { 1334 throw new UnsupportedOperationException( 1335 "ResultSet.rowDeleted() unsupported"); 1336 } 1337 1338 /*** 1339 * Gives a nullable column a null value. 1340 * 1341 * The updater methods are used to update column values in the 1342 * current row or the insert row. The updater methods do not 1343 * update the underlying database; instead the <code>updateRow</code> 1344 * or <code>insertRow</code> methods are called to update the database. 1345 * 1346 * @param columnIndex the first column is 1, the second is 2, ... 1347 * @exception SQLException if a database access error occurs 1348 */ 1349 public void updateNull(int columnIndex) throws SQLException { 1350 throw new UnsupportedOperationException( 1351 "ResultSet.updateNull() unsupported"); 1352 } 1353 1354 /*** 1355 * Updates the designated column with a <code>boolean</code> value. 1356 * The updater methods are used to update column values in the 1357 * current row or the insert row. The updater methods do not 1358 * update the underlying database; instead the <code>updateRow</code> or 1359 * <code>insertRow</code> methods are called to update the database. 1360 * 1361 * @param columnIndex the first column is 1, the second is 2, ... 1362 * @param x the new column value 1363 * @exception SQLException if a database access error occurs 1364 */ 1365 public void updateBoolean(int columnIndex, boolean x) throws SQLException { 1366 throw new UnsupportedOperationException( 1367 "ResultSet.updateBoolean() unsupported"); 1368 } 1369 1370 /*** 1371 * Updates the designated column with a <code>byte</code> value. 1372 * The updater methods are used to update column values in the 1373 * current row or the insert row. The updater methods do not 1374 * update the underlying database; instead the <code>updateRow</code> or 1375 * <code>insertRow</code> methods are called to update the database. 1376 * 1377 * 1378 * @param columnIndex the first column is 1, the second is 2, ... 1379 * @param x the new column value 1380 * @exception SQLException if a database access error occurs 1381 */ 1382 public void updateByte(int columnIndex, byte x) throws SQLException { 1383 throw new UnsupportedOperationException( 1384 "ResultSet.updateByte() unsupported"); 1385 } 1386 1387 /*** 1388 * Updates the designated column with a <code>short</code> value. 1389 * The updater methods are used to update column values in the 1390 * current row or the insert row. The updater methods do not 1391 * update the underlying database; instead the <code>updateRow</code> or 1392 * <code>insertRow</code> methods are called to update the database. 1393 * 1394 * @param columnIndex the first column is 1, the second is 2, ... 1395 * @param x the new column value 1396 * @exception SQLException if a database access error occurs 1397 */ 1398 public void updateShort(int columnIndex, short x) throws SQLException { 1399 throw new UnsupportedOperationException( 1400 "ResultSet.updateShort() unsupported"); 1401 } 1402 1403 /*** 1404 * Updates the designated column with an <code>int</code> value. 1405 * The updater methods are used to update column values in the 1406 * current row or the insert row. The updater methods do not 1407 * update the underlying database; instead the <code>updateRow</code> or 1408 * <code>insertRow</code> methods are called to update the database. 1409 * 1410 * @param columnIndex the first column is 1, the second is 2, ... 1411 * @param x the new column value 1412 * @exception SQLException if a database access error occurs 1413 */ 1414 public void updateInt(int columnIndex, int x) throws SQLException { 1415 throw new UnsupportedOperationException( 1416 "ResultSet.updateInt() unsupported"); 1417 } 1418 1419 /*** 1420 * Updates the designated column with a <code>long</code> value. 1421 * The updater methods are used to update column values in the 1422 * current row or the insert row. The updater methods do not 1423 * update the underlying database; instead the <code>updateRow</code> or 1424 * <code>insertRow</code> methods are called to update the database. 1425 * 1426 * @param columnIndex the first column is 1, the second is 2, ... 1427 * @param x the new column value 1428 * @exception SQLException if a database access error occurs 1429 */ 1430 public void updateLong(int columnIndex, long x) throws SQLException { 1431 throw new UnsupportedOperationException( 1432 "ResultSet.updateLong(int, long) unsupported"); 1433 } 1434 1435 /*** 1436 * Updates the designated column with a <code>float</code> value. 1437 * The updater methods are used to update column values in the 1438 * current row or the insert row. The updater methods do not 1439 * update the underlying database; instead the <code>updateRow</code> or 1440 * <code>insertRow</code> methods are called to update the database. 1441 * 1442 * @param columnIndex the first column is 1, the second is 2, ... 1443 * @param x the new column value 1444 * @exception SQLException if a database access error occurs 1445 */ 1446 public void updateFloat(int columnIndex, float x) throws SQLException { 1447 throw new UnsupportedOperationException( 1448 "ResultSet.updateFloat(int, float) unsupported"); 1449 } 1450 1451 /*** 1452 * Updates the designated column with a <code>double</code> value. 1453 * The updater methods are used to update column values in the 1454 * current row or the insert row. The updater methods do not 1455 * update the underlying database; instead the <code>updateRow</code> or 1456 * <code>insertRow</code> methods are called to update the database. 1457 * 1458 * @param columnIndex the first column is 1, the second is 2, ... 1459 * @param x the new column value 1460 * @exception SQLException if a database access error occurs 1461 */ 1462 public void updateDouble(int columnIndex, double x) throws SQLException { 1463 throw new UnsupportedOperationException( 1464 "ResultSet.updateDouble(int, double) unsupported"); 1465 } 1466 1467 /*** 1468 * Updates the designated column with a <code>java.math.BigDecimal</code> 1469 * value. 1470 * The updater methods are used to update column values in the 1471 * current row or the insert row. The updater methods do not 1472 * update the underlying database; instead the <code>updateRow</code> or 1473 * <code>insertRow</code> methods are called to update the database. 1474 * 1475 * @param columnIndex the first column is 1, the second is 2, ... 1476 * @param x the new column value 1477 * @exception SQLException if a database access error occurs 1478 */ 1479 public void updateBigDecimal(int columnIndex, BigDecimal x) 1480 throws SQLException { 1481 throw new UnsupportedOperationException( 1482 "ResultSet.updateBigDecimal(int, BigDecimal) unsupported"); 1483 } 1484 1485 /*** 1486 * Updates the designated column with a <code>String</code> value. 1487 * The updater methods are used to update column values in the 1488 * current row or the insert row. The updater methods do not 1489 * update the underlying database; instead the <code>updateRow</code> or 1490 * <code>insertRow</code> methods are called to update the database. 1491 * 1492 * @param columnIndex the first column is 1, the second is 2, ... 1493 * @param x the new column value 1494 * @exception SQLException if a database access error occurs 1495 */ 1496 public void updateString(int columnIndex, String x) throws SQLException { 1497 throw new UnsupportedOperationException( 1498 "ResultSet.updateString(int, String) unsupported"); 1499 } 1500 1501 /*** 1502 * Updates the designated column with a <code>byte</code> array value. 1503 * The updater methods are used to update column values in the 1504 * current row or the insert row. The updater methods do not 1505 * update the underlying database; instead the <code>updateRow</code> or 1506 * <code>insertRow</code> methods are called to update the database. 1507 * 1508 * @param columnIndex the first column is 1, the second is 2, ... 1509 * @param x the new column value 1510 * @exception SQLException if a database access error occurs 1511 */ 1512 public void updateBytes(int columnIndex, byte[] x) throws SQLException { 1513 throw new UnsupportedOperationException( 1514 "ResultSet.updateBytes(int, byte[]) unsupported"); 1515 } 1516 1517 /*** 1518 * Updates the designated column with a <code>java.sql.Date</code> value. 1519 * The updater methods are used to update column values in the 1520 * current row or the insert row. The updater methods do not 1521 * update the underlying database; instead the <code>updateRow</code> or 1522 * <code>insertRow</code> methods are called to update the database. 1523 * 1524 * @param columnIndex the first column is 1, the second is 2, ... 1525 * @param x the new column value 1526 * @exception SQLException if a database access error occurs 1527 */ 1528 public void updateDate(int columnIndex, Date x) throws SQLException { 1529 throw new UnsupportedOperationException( 1530 "ResultSet.updateDate(int, Date) unsupported"); 1531 } 1532 1533 /*** 1534 * Updates the designated column with a <code>java.sql.Time</code> value. 1535 * The updater methods are used to update column values in the 1536 * current row or the insert row. The updater methods do not 1537 * update the underlying database; instead the <code>updateRow</code> or 1538 * <code>insertRow</code> methods are called to update the database. 1539 * 1540 * @param columnIndex the first column is 1, the second is 2, ... 1541 * @param x the new column value 1542 * @exception SQLException if a database access error occurs 1543 */ 1544 public void updateTime(int columnIndex, Time x) throws SQLException { 1545 throw new UnsupportedOperationException( 1546 "ResultSet.updateTime(int, Time) unsupported"); 1547 } 1548 1549 /*** 1550 * Updates the designated column with a <code>java.sql.Timestamp</code> 1551 * value. 1552 * The updater methods are used to update column values in the 1553 * current row or the insert row. The updater methods do not 1554 * update the underlying database; instead the <code>updateRow</code> or 1555 * <code>insertRow</code> methods are called to update the database. 1556 * 1557 * @param columnIndex the first column is 1, the second is 2, ... 1558 * @param x the new column value 1559 * @exception SQLException if a database access error occurs 1560 */ 1561 public void updateTimestamp(int columnIndex, Timestamp x) 1562 throws SQLException { 1563 throw new UnsupportedOperationException( 1564 "ResultSet.updateTimestamp(int, Timestamp) unsupported"); 1565 } 1566 1567 /*** 1568 * Updates the designated column with an ascii stream value. 1569 * The updater methods are used to update column values in the 1570 * current row or the insert row. The updater methods do not 1571 * update the underlying database; instead the <code>updateRow</code> or 1572 * <code>insertRow</code> methods are called to update the database. 1573 * 1574 * @param columnIndex the first column is 1, the second is 2, ... 1575 * @param x the new column value 1576 * @param length the length of the stream 1577 * @exception SQLException if a database access error occurs 1578 */ 1579 public void updateAsciiStream(int columnIndex, InputStream x, int length) 1580 throws SQLException { 1581 throw new UnsupportedOperationException("ResultSet.updateAsciiStream " + 1582 "(int, InputStream, int) unsupported"); 1583 } 1584 1585 /*** 1586 * Updates the designated column with a binary stream value. 1587 * The updater methods are used to update column values in the 1588 * current row or the insert row. The updater methods do not 1589 * update the underlying database; instead the <code>updateRow</code> or 1590 * <code>insertRow</code> methods are called to update the database. 1591 * 1592 * @param columnIndex the first column is 1, the second is 2, ... 1593 * @param x the new column value 1594 * @param length the length of the stream 1595 * @exception SQLException if a database access error occurs 1596 */ 1597 public void updateBinaryStream(int columnIndex, InputStream x, int length) 1598 throws SQLException { 1599 throw new UnsupportedOperationException("ResultSet.updateBinaryStream" + 1600 "(int, InputStream, int) unsupported"); 1601 } 1602 1603 /*** 1604 * Updates the designated column with a character stream value. 1605 * The updater methods are used to update column values in the 1606 * current row or the insert row. The updater methods do not 1607 * update the underlying database; instead the <code>updateRow</code> or 1608 * <code>insertRow</code> methods are called to update the database. 1609 * 1610 * @param columnIndex the first column is 1, the second is 2, ... 1611 * @param x the new column value 1612 * @param length the length of the stream 1613 * @exception SQLException if a database access error occurs 1614 */ 1615 public void updateCharacterStream(int columnIndex, Reader x, int length) 1616 throws SQLException { 1617 throw new UnsupportedOperationException("ResultSet.updateCharacterStr" + 1618 "eam(int, Reader, int) unsupported"); 1619 } 1620 1621 /*** 1622 * Updates the designated column with an <code>Object</code> value. 1623 * The updater methods are used to update column values in the 1624 * current row or the insert row. The updater methods do not 1625 * update the underlying database; instead the <code>updateRow</code> or 1626 * <code>insertRow</code> methods are called to update the database. 1627 * 1628 * @param columnIndex the first column is 1, the second is 2, ... 1629 * @param x the new column value 1630 * @param scale for <code>java.sql.Types.DECIMA</code> 1631 * or <code>java.sql.Types.NUMERIC</code> types, 1632 * this is the number of digits after the decimal point. For all other 1633 * types this value will be ignored. 1634 * @exception SQLException if a database access error occurs 1635 */ 1636 public void updateObject(int columnIndex, Object x, int scale) 1637 throws SQLException { 1638 throw new UnsupportedOperationException( 1639 "ResultSet.udpateObject(int, Object) unsupported"); 1640 } 1641 1642 /*** 1643 * Updates the designated column with an <code>Object</code> value. 1644 * The updater methods are used to update column values in the 1645 * current row or the insert row. The updater methods do not 1646 * update the underlying database; instead the <code>updateRow</code> or 1647 * <code>insertRow</code> methods are called to update the database. 1648 * 1649 * @param columnIndex the first column is 1, the second is 2, ... 1650 * @param x the new column value 1651 * @exception SQLException if a database access error occurs 1652 */ 1653 public void updateObject(int columnIndex, Object x) throws SQLException { 1654 throw new UnsupportedOperationException( 1655 "ResultSet.updateObject(int, Object, int) unsupported"); 1656 } 1657 1658 /*** 1659 * Updates the designated column with a <code>null</code> value. 1660 * The updater methods are used to update column values in the 1661 * current row or the insert row. The updater methods do not 1662 * update the underlying database; instead the <code>updateRow</code> or 1663 * <code>insertRow</code> methods are called to update the database. 1664 * 1665 * @param columnName the name of the column 1666 * @exception SQLException if a database access error occurs 1667 */ 1668 public void updateNull(String columnName) throws SQLException { 1669 throw new UnsupportedOperationException( 1670 "ResultSet.updateNull(String) unsupported"); 1671 } 1672 1673 /*** 1674 * Updates the designated column with a <code>boolean</code> value. 1675 * The updater methods are used to update column values in the 1676 * current row or the insert row. The updater methods do not 1677 * update the underlying database; instead the <code>updateRow</code> or 1678 * <code>insertRow</code> methods are called to update the database. 1679 * 1680 * @param columnName the name of the column 1681 * @param x the new column value 1682 * @exception SQLException if a database access error occurs 1683 */ 1684 public void updateBoolean(String columnName, boolean x) 1685 throws SQLException { 1686 throw new UnsupportedOperationException( 1687 "ResultSet.updateBoolean(String, boolean) unsupported"); 1688 } 1689 1690 /*** 1691 * Updates the designated column with a <code>byte</code> value. 1692 * The updater methods are used to update column values in the 1693 * current row or the insert row. The updater methods do not 1694 * update the underlying database; instead the <code>updateRow</code> or 1695 * <code>insertRow</code> methods are called to update the database. 1696 * 1697 * @param columnName the name of the column 1698 * @param x the new column value 1699 * @exception SQLException if a database access error occurs 1700 */ 1701 public void updateByte(String columnName, byte x) throws SQLException { 1702 throw new UnsupportedOperationException( 1703 "ResultSet.updateByte(String, byte) unsupported"); 1704 } 1705 1706 /*** 1707 * Updates the designated column with a <code>short</code> value. 1708 * The updater methods are used to update column values in the 1709 * current row or the insert row. The updater methods do not 1710 * update the underlying database; instead the <code>updateRow</code> or 1711 * <code>insertRow</code> methods are called to update the database. 1712 * 1713 * @param columnName the name of the column 1714 * @param x the new column value 1715 * @exception SQLException if a database access error occurs 1716 */ 1717 public void updateShort(String columnName, short x) throws SQLException { 1718 throw new UnsupportedOperationException( 1719 "ResultSet.updateShort(String, short) unsupported"); 1720 } 1721 1722 /*** 1723 * Updates the designated column with an <code>int</code> value. 1724 * The updater methods are used to update column values in the 1725 * current row or the insert row. The updater methods do not 1726 * update the underlying database; instead the <code>updateRow</code> or 1727 * <code>insertRow</code> methods are called to update the database. 1728 * 1729 * @param columnName the name of the column 1730 * @param x the new column value 1731 * @exception SQLException if a database access error occurs 1732 */ 1733 public void updateInt(String columnName, int x) throws SQLException { 1734 throw new UnsupportedOperationException( 1735 "ResultSet.updateInt(String, int) unsupported"); 1736 } 1737 1738 /*** 1739 * Updates the designated column with a <code>long</code> value. 1740 * The updater methods are used to update column values in the 1741 * current row or the insert row. The updater methods do not 1742 * update the underlying database; instead the <code>updateRow</code> or 1743 * <code>insertRow</code> methods are called to update the database. 1744 * 1745 * @param columnName the name of the column 1746 * @param x the new column value 1747 * @exception SQLException if a database access error occurs 1748 */ 1749 public void updateLong(String columnName, long x) throws SQLException { 1750 throw new UnsupportedOperationException( 1751 "ResultSet.updateLong(String, long) unsupported"); 1752 } 1753 1754 /*** 1755 * Updates the designated column with a <code>float </code> value. 1756 * The updater methods are used to update column values in the 1757 * current row or the insert row. The updater methods do not 1758 * update the underlying database; instead the <code>updateRow</code> or 1759 * <code>insertRow</code> methods are called to update the database. 1760 * 1761 * @param columnName the name of the column 1762 * @param x the new column value 1763 * @exception SQLException if a database access error occurs 1764 */ 1765 public void updateFloat(String columnName, float x) throws SQLException { 1766 throw new UnsupportedOperationException( 1767 "ResultSet.updateFloat(String, float) unsupported"); 1768 } 1769 1770 /*** 1771 * Updates the designated column with a <code>double</code> value. 1772 * The updater methods are used to update column values in the 1773 * current row or the insert row. The updater methods do not 1774 * update the underlying database; instead the <code>updateRow</code> or 1775 * <code>insertRow</code> methods are called to update the database. 1776 * 1777 * @param columnName the name of the column 1778 * @param x the new column value 1779 * @exception SQLException if a database access error occurs 1780 */ 1781 public void updateDouble(String columnName, double x) throws SQLException { 1782 throw new UnsupportedOperationException( 1783 "ResultSet.updateDouble(String, double) unsupported"); 1784 } 1785 1786 /*** 1787 * Updates the designated column with a <code>java.sql.BigDecimal</code> 1788 * value. 1789 * The updater methods are used to update column values in the 1790 * current row or the insert row. The updater methods do not 1791 * update the underlying database; instead the <code>updateRow</code> or 1792 * <code>insertRow</code> methods are called to update the database. 1793 * 1794 * @param columnName the name of the column 1795 * @param x the new column value 1796 * @exception SQLException if a database access error occurs 1797 */ 1798 public void updateBigDecimal(String columnName, BigDecimal x) 1799 throws SQLException { 1800 throw new UnsupportedOperationException( 1801 "ResultSet.updateBigDecimal(String, BigDecimal) unsupported"); 1802 } 1803 1804 /*** 1805 * Updates the designated column with a <code>String</code> value. 1806 * The updater methods are used to update column values in the 1807 * current row or the insert row. The updater methods do not 1808 * update the underlying database; instead the <code>updateRow</code> or 1809 * <code>insertRow</code> methods are called to update the database. 1810 * 1811 * @param columnName the name of the column 1812 * @param x the new column value 1813 * @exception SQLException if a database access error occurs 1814 */ 1815 public void updateString(String columnName, String x) throws SQLException { 1816 throw new UnsupportedOperationException( 1817 "ResultSet.updateString(String, String) unsupported"); 1818 } 1819 1820 /*** 1821 * Updates the designated column with a byte array value. 1822 * 1823 * The updater methods are used to update column values in the 1824 * current row or the insert row. The updater methods do not 1825 * update the underlying database; instead the <code>updateRow</code> 1826 * or <code>insertRow</code> methods are called to update the database. 1827 * 1828 * @param columnName the name of the column 1829 * @param x the new column value 1830 * @exception SQLException if a database access error occurs 1831 */ 1832 public void updateBytes(String columnName, byte[] x) throws SQLException { 1833 throw new UnsupportedOperationException( 1834 "ResultSet.updateBytes(String, byte[]) unsupported"); 1835 } 1836 1837 /*** 1838 * Updates the designated column with a <code>java.sql.Date</code> value. 1839 * The updater methods are used to update column values in the 1840 * current row or the insert row. The updater methods do not 1841 * update the underlying database; instead the <code>updateRow</code> or 1842 * <code>insertRow</code> methods are called to update the database. 1843 * 1844 * @param columnName the name of the column 1845 * @param x the new column value 1846 * @exception SQLException if a database access error occurs 1847 */ 1848 public void updateDate(String columnName, Date x) throws SQLException { 1849 throw new UnsupportedOperationException( 1850 "ResultSet.updateDate(String, Date) unsupported"); 1851 } 1852 1853 /*** 1854 * Updates the designated column with a <code>java.sql.Time</code> value. 1855 * The updater methods are used to update column values in the 1856 * current row or the insert row. The updater methods do not 1857 * update the underlying database; instead the <code>updateRow</code> or 1858 * <code>insertRow</code> methods are called to update the database. 1859 * 1860 * @param columnName the name of the column 1861 * @param x the new column value 1862 * @exception SQLException if a database access error occurs 1863 */ 1864 public void updateTime(String columnName, Time x) throws SQLException { 1865 throw new UnsupportedOperationException( 1866 "ResultSet.updateTime(String, Time) unsupported"); 1867 } 1868 1869 /*** 1870 * Updates the designated column with a <code>java.sql.Timestamp</code> 1871 * value. 1872 * The updater methods are used to update column values in the 1873 * current row or the insert row. The updater methods do not 1874 * update the underlying database; instead the <code>updateRow</code> or 1875 * <code>insertRow</code> methods are called to update the database. 1876 * 1877 * @param columnName the name of the column 1878 * @param x the new column value 1879 * @exception SQLException if a database access error occurs 1880 */ 1881 public void updateTimestamp(String columnName, Timestamp x) 1882 throws SQLException { 1883 throw new UnsupportedOperationException( 1884 "ResultSet.updateTimestamp(String, Timestamp) unsupported"); 1885 } 1886 1887 /*** 1888 * Updates the designated column with an ascii stream value. 1889 * The updater methods are used to update column values in the 1890 * current row or the insert row. The updater methods do not 1891 * update the underlying database; instead the <code>updateRow</code> or 1892 * <code>insertRow</code> methods are called to update the database. 1893 * 1894 * @param columnName the name of the column 1895 * @param x the new column value 1896 * @param length the length of the stream 1897 * @exception SQLException if a database access error occurs 1898 */ 1899 public void updateAsciiStream(String columnName, InputStream x, int length) 1900 throws SQLException { 1901 throw new UnsupportedOperationException("ResultSet.updateAsciiStream" + 1902 "(String, InputStream, int) unsupported"); 1903 } 1904 1905 /*** 1906 * Updates the designated column with a binary stream value. 1907 * The updater methods are used to update column values in the 1908 * current row or the insert row. The updater methods do not 1909 * update the underlying database; instead the <code>updateRow</code> or 1910 * <code>insertRow</code> methods are called to update the database. 1911 * 1912 * @param columnName the name of the column 1913 * @param x the new column value 1914 * @param length the length of the stream 1915 * @exception SQLException if a database access error occurs 1916 */ 1917 public void updateBinaryStream(String columnName, InputStream x, int length) 1918 throws SQLException { 1919 throw new UnsupportedOperationException("ResultSet.updateBinaryStream" + 1920 "(String, InputStream, int) unsupported"); 1921 } 1922 1923 /*** 1924 * Updates the designated column with a character stream value. 1925 * The updater methods are used to update column values in the 1926 * current row or the insert row. The updater methods do not 1927 * update the underlying database; instead the <code>updateRow</code> or 1928 * <code>insertRow</code> methods are called to update the database. 1929 * 1930 * @param columnName the name of the column 1931 * @param reader the <code>java.io.Reader</code> object containing 1932 * the new column value 1933 * @param length the length of the stream 1934 * @exception SQLException if a database access error occurs 1935 */ 1936 public void updateCharacterStream(String columnName, Reader reader, 1937 int length) throws SQLException { 1938 throw new UnsupportedOperationException("ResultSet.updateCharacterStr" + 1939 "eam(String, Reader, int) unsupported"); 1940 } 1941 1942 /*** 1943 * Updates the designated column with an <code>Object</code> value. 1944 * The updater methods are used to update column values in the 1945 * current row or the insert row. The updater methods do not 1946 * update the underlying database; instead the <code>updateRow</code> or 1947 * <code>insertRow</code> methods are called to update the database. 1948 * 1949 * @param columnName the name of the column 1950 * @param x the new column value 1951 * @param scale for <code>java.sql.Types.DECIMAL</code> 1952 * or <code>java.sql.Types.NUMERIC</code> types, 1953 * this is the number of digits after the decimal point. For all other 1954 * types this value will be ignored. 1955 * @exception SQLException if a database access error occurs 1956 */ 1957 public void updateObject(String columnName, Object x, int scale) 1958 throws SQLException { 1959 throw new UnsupportedOperationException( 1960 "ResultSet.updateObject(String, Object, int) unsupported"); 1961 } 1962 1963 /*** 1964 * Updates the designated column with an <code>Object</code> value. 1965 * The updater methods are used to update column values in the 1966 * current row or the insert row. The updater methods do not 1967 * update the underlying database; instead the <code>updateRow</code> or 1968 * <code>insertRow</code> methods are called to update the database. 1969 * 1970 * @param columnName the name of the column 1971 * @param x the new column value 1972 * @exception SQLException if a database access error occurs 1973 */ 1974 public void updateObject(String columnName, Object x) throws SQLException { 1975 throw new UnsupportedOperationException( 1976 "ResultSet.updateObject(String, Object) unsupported"); 1977 } 1978 1979 /*** 1980 * Inserts the contents of the insert row into this 1981 * <code>ResultSet</code> object and into the database. 1982 * The cursor must be on the insert row when this method is called. 1983 * 1984 * @exception SQLException if a database access error occurs, 1985 * if this method is called when the cursor is not on the insert row, 1986 * or if not all of non-nullable columns in 1987 * the insert row have been given a value 1988 */ 1989 public void insertRow() throws SQLException { 1990 throw new UnsupportedOperationException( 1991 "ResultSet.insertRow() unsupported"); 1992 } 1993 1994 /*** 1995 * Updates the underlying database with the new contents of the 1996 * current row of this <code>ResultSet</code> object. 1997 * This method cannot be called when the cursor is on the insert row. 1998 * 1999 * @exception SQLException if a database access error occurs or 2000 * if this method is called when the cursor is on the insert row 2001 */ 2002 public void updateRow() throws SQLException { 2003 throw new UnsupportedOperationException( 2004 "ResultSet.updateRow() unsupported"); 2005 } 2006 2007 /*** 2008 * Deletes the current row from this <code>ResultSet</code> object 2009 * and from the underlying database. This method cannot be called when 2010 * the cursor is on the insert row. 2011 * 2012 * @exception SQLException if a database access error occurs 2013 * or if this method is called when the cursor is on the insert row 2014 */ 2015 public void deleteRow() throws SQLException { 2016 throw new UnsupportedOperationException( 2017 "ResultSet.deleteRow() unsupported"); 2018 } 2019 2020 /*** 2021 * Refreshes the current row with its most recent value in 2022 * the database. This method cannot be called when 2023 * the cursor is on the insert row. 2024 * 2025 * <P>The <code>refreshRow</code> method provides a way for an 2026 * application to 2027 * explicitly tell the JDBC driver to refetch a row(s) from the 2028 * database. An application may want to call <code>refreshRow</code> when 2029 * caching or prefetching is being done by the JDBC driver to 2030 * fetch the latest value of a row from the database. The JDBC driver 2031 * may actually refresh multiple rows at once if the fetch size is 2032 * greater than one. 2033 * 2034 * <P> All values are refetched subject to the transaction isolation 2035 * level and cursor sensitivity. If <code>refreshRow</code> is called after 2036 * calling an updater method, but before calling 2037 * the method <code>updateRow</code>, then the 2038 * updates made to the row are lost. Calling the method 2039 * <code>refreshRow</code> frequently will likely slow performance. 2040 * 2041 * @exception SQLException if a database access error 2042 * occurs or if this method is called when the cursor is on the insert row 2043 */ 2044 public void refreshRow() throws SQLException { 2045 throw new UnsupportedOperationException( 2046 "ResultSet.refreshRow() unsupported"); 2047 } 2048 2049 /*** 2050 * Cancels the updates made to the current row in this 2051 * <code>ResultSet</code> object. 2052 * This method may be called after calling an 2053 * updater method(s) and before calling 2054 * the method <code>updateRow</code> to roll back 2055 * the updates made to a row. If no updates have been made or 2056 * <code>updateRow</code> has already been called, this method has no 2057 * effect. 2058 * 2059 * @exception SQLException if a database access error 2060 * occurs or if this method is called when the cursor is 2061 * on the insert row 2062 */ 2063 public void cancelRowUpdates() throws SQLException { 2064 throw new UnsupportedOperationException( 2065 "ResultSet.cancelRowUpdates() unsupported"); 2066 } 2067 2068 /*** 2069 * Moves the cursor to the insert row. The current cursor position is 2070 * remembered while the cursor is positioned on the insert row. 2071 * 2072 * The insert row is a special row associated with an updatable 2073 * result set. It is essentially a buffer where a new row may 2074 * be constructed by calling the updater methods prior to 2075 * inserting the row into the result set. 2076 * 2077 * Only the updater, getter, 2078 * and <code>insertRow</code> methods may be 2079 * called when the cursor is on the insert row. All of the columns in 2080 * a result set must be given a value each time this method is 2081 * called before calling <code>insertRow</code>. 2082 * An updater method must be called before a 2083 * getter method can be called on a column value. 2084 * 2085 * @exception SQLException if a database access error occurs 2086 * or the result set is not updatable 2087 */ 2088 public void moveToInsertRow() throws SQLException { 2089 throw new UnsupportedOperationException( 2090 "ResultSet.moveToInsertRow() unsupported"); 2091 } 2092 2093 /*** 2094 * Moves the cursor to the remembered cursor position, usually the 2095 * current row. This method has no effect if the cursor is not on 2096 * the insert row. 2097 * 2098 * @exception SQLException if a database access error occurs 2099 * or the result set is not updatable 2100 */ 2101 public void moveToCurrentRow() throws SQLException { 2102 throw new UnsupportedOperationException( 2103 "ResultSet.moveToeCurrentRow() unsupported"); 2104 } 2105 2106 /*** 2107 * Retrieves the <code>Statement</code> object that produced this 2108 * <code>ResultSet</code> object. 2109 * If the result set was generated some other way, such as by a 2110 * <code>DatabaseMetaData</code> method, this method returns 2111 * <code>null</code>. 2112 * 2113 * @return the <code>Statment</code> object that produced 2114 * this <code>ResultSet</code> object or <code>null</code> 2115 * if the result set was produced some other way 2116 * @exception SQLException if a database access error occurs 2117 */ 2118 public Statement getStatement() throws SQLException { 2119 return statement; 2120 } 2121 2122 /*** 2123 * Retrieves the value of the designated column in the current row 2124 * of this <code>ResultSet</code> object as an <code>Object</code> 2125 * in the Java programming language. 2126 * If the value is an SQL <code>NULL</code>, 2127 * the driver returns a Java <code>null</code>. 2128 * This method uses the given <code>Map</code> object 2129 * for the custom mapping of the 2130 * SQL structured or distinct type that is being retrieved. 2131 * 2132 * @param i the first column is 1, the second is 2, ... 2133 * @param map a <code>java.util.Map</code> object that contains the mapping 2134 * from SQL type names to classes in the Java programming language 2135 * @return an <code>Object</code> in the Java programming language 2136 * representing the SQL value 2137 * @exception SQLException if a database access error occurs 2138 */ 2139 public Object getObject(int i, Map map) throws SQLException { 2140 throw new UnsupportedOperationException( 2141 "ResultSet.getObject(int, Map) unsupported"); 2142 } 2143 2144 /*** 2145 * Retrieves the value of the designated column in the current row 2146 * of this <code>ResultSet</code> object as a <code>Ref</code> object 2147 * in the Java programming language. 2148 * 2149 * @param i the first column is 1, the second is 2, ... 2150 * @return a <code>Ref</code> object representing an SQL <code>REF</code> 2151 * value 2152 * @exception SQLException if a database access error occurs 2153 */ 2154 public Ref getRef(int i) throws SQLException { 2155 throw new UnsupportedOperationException( 2156 "ResultSet.getRef(int) unsupported"); 2157 } 2158 2159 /*** 2160 * Retrieves the value of the designated column in the current row 2161 * of this <code>ResultSet</code> object as a <code>Blob</code> object 2162 * in the Java programming language. 2163 * 2164 * @param i the first column is 1, the second is 2, ... 2165 * @return a <code>Blob</code> object representing the SQL 2166 * <code>BLOB</code> value in the specified column 2167 * @exception SQLException if a database access error occurs 2168 */ 2169 public Blob getBlob(int i) throws SQLException { 2170 throw new UnsupportedOperationException( 2171 "ResultSet.getBlob(int) unsupported"); 2172 } 2173 2174 /*** 2175 * Retrieves the value of the designated column in the current row 2176 * of this <code>ResultSet</code> object as a <code>Clob</code> object 2177 * in the Java programming language. 2178 * 2179 * @param i the first column is 1, the second is 2, ... 2180 * @return a <code>Clob</code> object representing the SQL 2181 * <code>CLOB</code> value in the specified column 2182 * @exception SQLException if a database access error occurs 2183 */ 2184 public Clob getClob(int i) throws SQLException { 2185 throw new UnsupportedOperationException( 2186 "ResultSet.getClob(int) unsupported"); 2187 } 2188 2189 /*** 2190 * Retrieves the value of the designated column in the current row 2191 * of this <code>ResultSet</code> object as an <code>Array</code> object 2192 * in the Java programming language. 2193 * 2194 * @param i the first column is 1, the second is 2, ... 2195 * @return an <code>Array</code> object representing the SQL 2196 * <code>ARRAY</code> value in the specified column 2197 * @exception SQLException if a database access error occurs 2198 */ 2199 public Array getArray(int i) throws SQLException { 2200 throw new UnsupportedOperationException( 2201 "ResultSet.getArray(int) unsupported"); 2202 } 2203 2204 /*** 2205 * Retrieves the value of the designated column in the current row 2206 * of this <code>ResultSet</code> object as an <code>Object</code> 2207 * in the Java programming language. 2208 * If the value is an SQL <code>NULL</code>, 2209 * the driver returns a Java <code>null</code>. 2210 * This method uses the specified <code>Map</code> object for 2211 * custom mapping if appropriate. 2212 * 2213 * @param colName the name of the column from which to retrieve the value 2214 * @param map a <code>java.util.Map</code> object that contains the mapping 2215 * from SQL type names to classes in the Java programming language 2216 * @return an <code>Object</code> representing the SQL value in the 2217 * specified column 2218 * @exception SQLException if a database access error occurs 2219 */ 2220 public Object getObject(String colName, Map map) throws SQLException { 2221 throw new UnsupportedOperationException( 2222 "ResultSet.getObject(String, Map) unsupported"); 2223 } 2224 2225 /*** 2226 * Retrieves the value of the designated column in the current row 2227 * of this <code>ResultSet</code> object as a <code>Ref</code> object 2228 * in the Java programming language. 2229 * 2230 * @param colName the column name 2231 * @return a <code>Ref</code> object representing the SQL <code>REF</code> 2232 * value in the specified column 2233 * @exception SQLException if a database access error occurs 2234 */ 2235 public Ref getRef(String colName) throws SQLException { 2236 throw new UnsupportedOperationException( 2237 "ResultSet.getRef(String) unsupported"); 2238 } 2239 2240 /*** 2241 * Retrieves the value of the designated column in the current row 2242 * of this <code>ResultSet</code> object as a <code>Blob</code> object 2243 * in the Java programming language. 2244 * 2245 * @param colName the name of the column from which to retrieve the value 2246 * @return a <code>Blob</code> object representing the SQL <code>BLOB</code> 2247 * value in the specified column 2248 * @exception SQLException if a database access error occurs 2249 */ 2250 public Blob getBlob(String colName) throws SQLException { 2251 throw new UnsupportedOperationException( 2252 "ResultSet.getBlob(String) unsupported"); 2253 } 2254 2255 /*** 2256 * Retrieves the value of the designated column in the current row 2257 * of this <code>ResultSet</code> object as a <code>Clob</code> object 2258 * in the Java programming language. 2259 * 2260 * @param colName the name of the column from which to retrieve the value 2261 * @return a <code>Clob</code> object representing the SQL <code>CLOB</code> 2262 * value in the specified column 2263 * @exception SQLException if a database access error occurs 2264 */ 2265 public Clob getClob(String colName) throws SQLException { 2266 throw new UnsupportedOperationException( 2267 "ResultSet.getClob(String) unsupported"); 2268 } 2269 2270 /*** 2271 * Retrieves the value of the designated column in the current row 2272 * of this <code>ResultSet</code> object as an <code>Array</code> object 2273 * in the Java programming language. 2274 * 2275 * @param colName the name of the column from which to retrieve the value 2276 * @return an <code>Array</code> object representing the SQL 2277 * <code>ARRAY</code> value in the specified column 2278 * @exception SQLException if a database access error occurs 2279 */ 2280 public Array getArray(String colName) throws SQLException { 2281 throw new UnsupportedOperationException( 2282 "ResultSet.getArray(String) unsupported"); 2283 } 2284 2285 /*** 2286 * Retrieves the value of the designated column in the current row 2287 * of this <code>ResultSet</code> object as a <code>java.sql.Date</code> 2288 * object in the Java programming language. 2289 * This method uses the given calendar to construct an appropriate 2290 * millisecond value for the date if the underlying database does not store 2291 * timezone information. 2292 * 2293 * @param columnIndex the first column is 1, the second is 2, ... 2294 * @param cal the <code>java.util.Calendar</code> object 2295 * to use in constructing the date 2296 * @return the column value as a <code>java.sql.Date</code> object; 2297 * if the value is SQL <code>NULL</code>, 2298 * the value returned is <code>null</code> in the Java programming language 2299 * @exception SQLException if a database access error occurs 2300 */ 2301 public Date getDate(int columnIndex, Calendar cal) throws SQLException { 2302 throw new UnsupportedOperationException( 2303 "ResultSet.getDate(int, Calendar) unsupported"); 2304 } 2305 2306 /*** 2307 * Retrieves the value of the designated column in the current row 2308 * of this <code>ResultSet</code> object as a <code>java.sql.Date</code> 2309 * object in the Java programming language. 2310 * This method uses the given calendar to construct an appropriate 2311 * millisecond value for the date if the underlying database does not store 2312 * timezone information. 2313 * 2314 * @param columnName the SQL name of the column from which to retrieve the 2315 * value 2316 * @param cal the <code>java.util.Calendar</code> object 2317 * to use in constructing the date 2318 * @return the column value as a <code>java.sql.Date</code> object; 2319 * if the value is SQL <code>NULL</code>, 2320 * the value returned is <code>null</code> in the Java programming language 2321 * @exception SQLException if a database access error occurs 2322 */ 2323 public Date getDate(String columnName, Calendar cal) throws SQLException { 2324 throw new UnsupportedOperationException( 2325 "ResultSet.getDate(String, Calendar) unsupported"); 2326 } 2327 2328 /*** 2329 * Retrieves the value of the designated column in the current row 2330 * of this <code>ResultSet</code> object as a <code>java.sql.Time</code> 2331 * object in the Java programming language. 2332 * This method uses the given calendar to construct an appropriate 2333 * millisecond value for the time if the underlying database does not store 2334 * timezone information. 2335 * 2336 * @param columnIndex the first column is 1, the second is 2, ... 2337 * @param cal the <code>java.util.Calendar</code> object 2338 * to use in constructing the time 2339 * @return the column value as a <code>java.sql.Time</code> object; 2340 * if the value is SQL <code>NULL</code>, 2341 * the value returned is <code>null</code> in the Java programming language 2342 * @exception SQLException if a database access error occurs 2343 */ 2344 public Time getTime(int columnIndex, Calendar cal) throws SQLException { 2345 throw new UnsupportedOperationException( 2346 "ResultSet.getTime(int, Calendar) unsupported"); 2347 } 2348 2349 /*** 2350 * Retrieves the value of the designated column in the current row 2351 * of this <code>ResultSet</code> object as a <code>java.sql.Time</code> 2352 * object in the Java programming language. 2353 * This method uses the given calendar to construct an appropriate 2354 * millisecond value for the time if the underlying database does not store 2355 * timezone information. 2356 * 2357 * @param columnName the SQL name of the column 2358 * @param cal the <code>java.util.Calendar</code> object 2359 * to use in constructing the time 2360 * @return the column value as a <code>java.sql.Time</code> object; 2361 * if the value is SQL <code>NULL</code>, 2362 * the value returned is <code>null</code> in the Java programming language 2363 * @exception SQLException if a database access error occurs 2364 */ 2365 public Time getTime(String columnName, Calendar cal) throws SQLException { 2366 throw new UnsupportedOperationException( 2367 "ResultSet.getTime(String, Calendar) unsupported"); 2368 } 2369 2370 /*** 2371 * Retrieves the value of the designated column in the current row 2372 * of this <code>ResultSet</code> object as a 2373 * <code>java.sql.Timestamp</code> object in the Java programming language. 2374 * This method uses the given calendar to construct an appropriate 2375 * millisecond value for the timestamp if the underlying database does not 2376 * store timezone information. 2377 * 2378 * @param columnIndex the first column is 1, the second is 2, ... 2379 * @param cal the <code>java.util.Calendar</code> object 2380 * to use in constructing the timestamp 2381 * @return the column value as a <code>java.sql.Timestamp</code> object; 2382 * if the value is SQL <code>NULL</code>, 2383 * the value returned is <code>null</code> in the Java programming language 2384 * @exception SQLException if a database access error occurs 2385 */ 2386 public Timestamp getTimestamp(int columnIndex, Calendar cal) 2387 throws SQLException { 2388 throw new UnsupportedOperationException( 2389 "ResultSet.getTimestamp(int, Calendar) unsupported"); 2390 } 2391 2392 /*** 2393 * Retrieves the value of the designated column in the current row 2394 * of this <code>ResultSet</code> object as a <code>java.sql.Time</code> 2395 * object in the Java programming language. 2396 * This method uses the given calendar to construct an appropriate 2397 * millisecond value for the time if the underlying database does not store 2398 * timezone information. 2399 * 2400 * @param columnName the SQL name of the column 2401 * @param cal the <code>java.util.Calendar</code> object 2402 * to use in constructing the time 2403 * @return the column value as a <code>java.sql.Time</code> object; 2404 * if the value is SQL <code>NULL</code>, 2405 * the value returned is <code>null</code> in the Java programming language 2406 * @exception SQLException if a database access error occurs 2407 */ 2408 public Timestamp getTimestamp(String columnName, Calendar cal) 2409 throws SQLException { 2410 throw new UnsupportedOperationException( 2411 "ResultSet.getTimestamp(String, Calendar) unsupported"); 2412 } 2413 2414 2415 2416 //--------------------------------------------------------------------- 2417 // JDBC 3.0 2418 //--------------------------------------------------------------------- 2419 2420 public URL getURL(int columnIndex) throws SQLException { 2421 throw new UnsupportedOperationException("ResultSet.getURL(int) unsupported"); 2422 } 2423 2424 public URL getURL(String columnName) throws SQLException { 2425 throw new UnsupportedOperationException("ResultSet.getURL(String) unsupported"); 2426 } 2427 2428 public void updateRef(int columnIndex, Ref x) throws SQLException { 2429 throw new UnsupportedOperationException("ResultSet.updateRef(int,java.sql.Ref) unsupported"); 2430 } 2431 2432 public void updateRef(String columnName, Ref x) throws SQLException { 2433 throw new UnsupportedOperationException("ResultSet.updateRef(String,java.sql.Ref) unsupported"); 2434 } 2435 2436 public void updateBlob(int columnIndex, Blob x) throws SQLException { 2437 throw new UnsupportedOperationException("ResultSet.updateBlob(int,java.sql.Blob) unsupported"); 2438 } 2439 2440 public void updateBlob(String columnName, Blob x) throws SQLException { 2441 throw new UnsupportedOperationException("ResultSet.updateBlob(String,java.sql.Blob) unsupported"); 2442 } 2443 2444 public void updateClob(int columnIndex, Clob x) throws SQLException { 2445 throw new UnsupportedOperationException("ResultSet.updateClob(int,java.sql.Clob) unsupported"); 2446 } 2447 2448 public void updateClob(String columnName, Clob x) throws SQLException { 2449 throw new UnsupportedOperationException("ResultSet.updateClob(String,java.sql.Clob) unsupported"); 2450 } 2451 2452 public void updateArray(int columnIndex, Array x) throws SQLException { 2453 throw new UnsupportedOperationException("ResultSet.updateArray(int,java.sql.Array) unsupported"); 2454 } 2455 2456 public void updateArray(String columnName, Array x) throws SQLException { 2457 throw new UnsupportedOperationException("ResultSet.updateArray(String,java.sql.Array) unsupported"); 2458 } 2459 2460 ///////////////////////////////////////////////// 2461 2462 }

This page was automatically generated by Maven