View Javadoc
1 /* 2 QueryJ 3 4 Copyright (C) 2002 Jose San Leandro Armend?riz 5 jsanleandro@yahoo.es 6 chousz@yahoo.com 7 8 This library is free software; you can redistribute it and/or 9 modify it under the terms of the GNU General Public 10 License as published by the Free Software Foundation; either 11 version 2.1 of the License, or (at your option) any later version. 12 13 This library is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 General Public License for more details. 17 18 You should have received a copy of the GNU General Public 19 License along with this library; if not, write to the Free Software 20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 22 Thanks to ACM S.L. for distributing this library under the GPL license. 23 Contact info: jsanleandro@yahoo.es 24 Postal Address: c/Playa de Lagoa, 1 25 Urb. Valdecaba?as 26 Boadilla del monte 27 28660 Madrid 28 Spain 29 30 ****************************************************************************** 31 * 32 * Filename: $RCSfile: QueryResultSet.java,v $ 33 * 34 * Author: Jose San Leandro Armend?riz 35 * 36 * Description: Standard SQL query. 37 * 38 * Last modified by: $Author: chous $ at $Date: 2003/08/29 08:14:59 $ 39 * 40 * File version: $Revision: 1.1 $ 41 * 42 * Project version: $Name: $ 43 * 44 * $Id: QueryResultSet.java,v 1.1 2003/08/29 08:14:59 chous Exp $ 45 * 46 */ 47 package org.acmsl.queryj; 48 49 /* 50 * Importing some JDK1.3 classes. 51 */ 52 import java.io.InputStream; 53 import java.io.Reader; 54 import java.math.BigDecimal; 55 import java.net.URL; 56 import java.sql.Array; 57 import java.sql.Blob; 58 import java.sql.Clob; 59 import java.sql.Date; 60 import java.sql.Ref; 61 import java.sql.ResultSet; 62 import java.sql.ResultSetMetaData; 63 import java.sql.SQLException; 64 import java.sql.SQLWarning; 65 import java.sql.Statement; 66 import java.sql.Time; 67 import java.sql.Timestamp; 68 import java.util.Calendar; 69 import java.util.Map; 70 71 /*** 72 * Represents standard SQL queries. 73 * @author <a href="mailto:jsanleandro@yahoo.es" 74 >Jose San Leandro</a> 75 * @version $Revision: 1.1 $ 76 */ 77 public class QueryResultSet 78 implements ResultSet 79 { 80 /*** 81 * The query reference. 82 */ 83 private SelectQuery m__Query; 84 85 /*** 86 * The wrapped result set. 87 */ 88 private ResultSet m__ResultSet; 89 90 /*** 91 * Builds a query result set with given references. 92 * @param query the query. 93 * @param resultSet the wrapped result set. 94 */ 95 public QueryResultSet(SelectQuery query, ResultSet resultSet) 96 { 97 unmodifiableSetQuery(query); 98 unmodifiableSetResultSet(resultSet); 99 } 100 101 /*** 102 * Specifies the query reference. 103 * @param query the query. 104 */ 105 private void unmodifiableSetQuery(SelectQuery query) 106 { 107 m__Query = query; 108 } 109 110 /*** 111 * Specifies the query reference. 112 * @param query the query. 113 */ 114 protected void setQuery(SelectQuery query) 115 { 116 unmodifiableSetQuery(query); 117 } 118 119 /*** 120 * Retrieves the query. 121 * @return such reference. 122 */ 123 protected SelectQuery getQuery() 124 { 125 return m__Query; 126 } 127 128 /*** 129 * Specifies the result set reference. 130 * @param resultSet the result set. 131 */ 132 private void unmodifiableSetResultSet(ResultSet resultSet) 133 { 134 m__ResultSet = resultSet; 135 } 136 137 /*** 138 * Specifies the result set reference. 139 * @param resultSet the result set. 140 */ 141 protected void setResultSet(ResultSet resultSet) 142 { 143 unmodifiableSetResultSet(resultSet); 144 } 145 146 /*** 147 * Retrieves the result set. 148 * @return such reference. 149 */ 150 protected ResultSet getResultSet() 151 { 152 return m__ResultSet; 153 } 154 155 // Implementation of java.sql.ResultSet 156 157 /*** 158 * See ResultSet.getBytes(int) 159 * @see java.sql.ResultSet.getBytes(int) 160 * @param index (Taken from Sun's Javadoc) the first column 161 * is 1, the second is 2, ... 162 * @return (Taken from Sun's Javadoc) the column value; if 163 * the value is SQL NULL, the value returned is null 164 * @exception SQLException if an error occurs. 165 */ 166 public byte[] getBytes(int index) 167 throws SQLException 168 { 169 byte[] result = null; 170 171 ResultSet t_ResultSet = getResultSet(); 172 173 if (t_ResultSet != null) 174 { 175 result = t_ResultSet.getBytes(index); 176 } 177 178 return result; 179 } 180 181 /*** 182 * See ResultSet.getBytes(String) 183 * @see java.sql.ResultSet.getBytes(java.lang.String) 184 * @param columnName (Taken from Sun's Javadoc) the SQL name of 185 * the column. 186 * @return (Taken from Sun's Javadoc) the column value; if 187 * the value is SQL NULL, the value returned is null. 188 * @exception SQLException if an error occurs. 189 */ 190 public byte[] getBytes(String columnName) 191 throws SQLException 192 { 193 byte[] result = null; 194 195 ResultSet t_ResultSet = getResultSet(); 196 197 if (t_ResultSet != null) 198 { 199 result = t_ResultSet.getBytes(columnName); 200 } 201 202 return result; 203 } 204 205 /*** 206 * See ResultSet#next() 207 * @see java.sql.ResultSet#next() 208 * @return (Taken from Sun's Javadoc) <code>true</code> if the 209 * new current row is valid; false if there are no more rows. 210 * @exception SQLException if an error occurs. 211 */ 212 public boolean next() 213 throws SQLException 214 { 215 boolean result = false; 216 217 ResultSet t_ResultSet = getResultSet(); 218 219 if (t_ResultSet != null) 220 { 221 result = t_ResultSet.next(); 222 } 223 224 return result; 225 } 226 227 /*** 228 * See ResultSet#previous() 229 * @see java.sql.ResultSet#previous() 230 * @return (Taken from Sun's Javadoc) <code>true</code> if the 231 * cursor is on a valid row; false if it is off the result set. 232 * @exception SQLException if an error occurs. 233 */ 234 public boolean previous() 235 throws SQLException 236 { 237 boolean result = false; 238 239 ResultSet t_ResultSet = getResultSet(); 240 241 if (t_ResultSet != null) 242 { 243 result = t_ResultSet.previous(); 244 } 245 246 return result; 247 } 248 249 /*** 250 * See ResultSet#getBoolean(int) 251 * @see java.sql.ResultSet#getBoolean(int) 252 * @param index (Taken from Sun's Javadoc) the first column 253 * is 1, the second is 2, ... 254 * @return (Taken from Sun's Javadoc) the column value; if 255 * the value is SQL NULL, the value returned is <code>false</code>. 256 * @exception SQLException if an error occurs. 257 */ 258 public boolean getBoolean(int index) 259 throws SQLException 260 { 261 boolean result = false; 262 263 ResultSet t_ResultSet = getResultSet(); 264 265 if (t_ResultSet != null) 266 { 267 result = t_ResultSet.getBoolean(index); 268 } 269 270 return result; 271 } 272 273 /*** 274 * See ResultSet#getBoolean(String) 275 * @see java.sql.ResultSet#getBoolean(String) 276 * @param columnName (Taken from Sun's Javadoc) the SQL name of 277 * the column. 278 * @return (Taken from Sun's Javadoc) the column value; if 279 * the value is SQL NULL, the value returned is <code>false</code>. 280 * @exception SQLException if an error occurs. 281 */ 282 public boolean getBoolean(String columnName) 283 throws SQLException 284 { 285 boolean result = false; 286 287 ResultSet t_ResultSet = getResultSet(); 288 289 if (t_ResultSet != null) 290 { 291 result = t_ResultSet.getBoolean(columnName); 292 } 293 294 return result; 295 } 296 297 /*** 298 * See ResultSet#getType() 299 * @see java.sql.ResultSet#getType() 300 * @return (Taken from Sun's Javadoc) the column value; if 301 * the value is SQL NULL, the value returned is 0. 302 * @exception SQLException if an error occurs. 303 */ 304 public int getType() 305 throws SQLException 306 { 307 int result = -1; 308 309 ResultSet t_ResultSet = getResultSet(); 310 311 if (t_ResultSet != null) 312 { 313 result = t_ResultSet.getType(); 314 } 315 316 return result; 317 } 318 319 /*** 320 * See ResultSet#getLong(int) 321 * @see java.sql.ResultSet#getLong(int) 322 * @param index (Taken from Sun's Javadoc) the first column 323 * is 1, the second is 2, ... 324 * @return (Taken from Sun's Javadoc) the column value; if 325 * the value is SQL NULL, the value returned is 0. 326 * @exception SQLException if an error occurs. 327 */ 328 public long getLong(int index) 329 throws SQLException 330 { 331 long result = 0; 332 333 ResultSet t_ResultSet = getResultSet(); 334 335 if (t_ResultSet != null) 336 { 337 result = t_ResultSet.getLong(index); 338 } 339 340 return result; 341 } 342 343 /*** 344 * See ResultSet#getLong(String) 345 * @see java.sql.ResultSet#getLong(String) 346 * @param columnName (Taken from Sun's Javadoc) the SQL name of 347 * the column. 348 * @return (Taken from Sun's Javadoc) the column value; if 349 * the value is SQL NULL, the value returned is 0. 350 * @exception SQLException if an error occurs. 351 */ 352 public long getLong(String columnName) 353 throws SQLException 354 { 355 long result = 0; 356 357 ResultSet t_ResultSet = getResultSet(); 358 359 if (t_ResultSet != null) 360 { 361 result = t_ResultSet.getLong(columnName); 362 } 363 364 return result; 365 } 366 367 /*** 368 * See ResultSet#getObject(int) 369 * @see java.sql.ResultSet#getObject(int) 370 * @param index (Taken from Sun's Javadoc) the first column 371 * is 1, the second is 2, ... 372 * @return (Taken from Sun's Javadoc) the column value; if 373 * the value is SQL NULL, the value returned is null. 374 * @exception SQLException if an error occurs. 375 */ 376 public Object getObject(int index) 377 throws SQLException 378 { 379 Object result = null; 380 381 ResultSet t_ResultSet = getResultSet(); 382 383 if (t_ResultSet != null) 384 { 385 result = t_ResultSet.getObject(index); 386 } 387 388 return result; 389 } 390 391 /*** 392 * See ResultSet#getObject(String) 393 * @see java.sql.ResultSet#getObject(String) 394 * @param columnName (Taken from Sun's Javadoc) the SQL name of 395 * the column. 396 * @exception SQLException if an error occurs. 397 */ 398 public Object getObject(String columnName) 399 throws SQLException 400 { 401 Object result = null; 402 403 ResultSet t_ResultSet = getResultSet(); 404 405 if (t_ResultSet != null) 406 { 407 result = t_ResultSet.getObject(columnName); 408 } 409 410 return result; 411 } 412 413 /*** 414 * See ResultSet#getObject(int,Map) 415 * @see java.sql.ResultSet#getObject(int,java.util.Map) 416 * @param index (Taken from Sun's Javadoc) the first column 417 * is 1, the second is 2, ... 418 * @param map (Taken from Sun's Javadoc) a java.util.Map object that 419 * contains the mapping from SQL type names to classes in the Java 420 * programming language. 421 * @return (Taken from Sun's Javadoc) the column value; if 422 * the value is SQL NULL, the value returned is null. 423 * @exception SQLException if an error occurs. 424 */ 425 public Object getObject(int index, Map map) 426 throws SQLException 427 { 428 Object result = null; 429 430 ResultSet t_ResultSet = getResultSet(); 431 432 if (t_ResultSet != null) 433 { 434 result = t_ResultSet.getObject(index, map); 435 } 436 437 return result; 438 } 439 440 /*** 441 * See ResultSet#getObject(String,Map) 442 * @see java.sql.ResultSet#getObject(java.lang.String,java.util.Map) 443 * @param columnName (Taken from Sun's Javadoc) the SQL name of 444 * the column. 445 * @param map (Taken from Sun's Javadoc) a java.util.Map object that 446 * contains the mapping from SQL type names to classes in the Java 447 * programming language. 448 * @return (Taken from Sun's Javadoc) the column value; if 449 * the value is SQL NULL, the value returned is null. 450 * @exception SQLException if an error occurs. 451 */ 452 public Object getObject(String columnName, Map map) 453 throws SQLException 454 { 455 Object result = null; 456 457 ResultSet t_ResultSet = getResultSet(); 458 459 if (t_ResultSet != null) 460 { 461 result = t_ResultSet.getObject(columnName, map); 462 } 463 464 return result; 465 } 466 467 /*** 468 * See ResultSet#close() 469 * @see java.sql.ResultSet#close() 470 * @exception SQLException if an error occurs. 471 */ 472 public void close() 473 throws SQLException 474 { 475 ResultSet t_ResultSet = getResultSet(); 476 477 if (t_ResultSet != null) 478 { 479 t_ResultSet.close(); 480 } 481 } 482 483 /*** 484 * See ResultSet#getRef(int) 485 * @see java.sql.ResultSet#getRef(int) 486 * @param index (Taken from Sun's Javadoc) the first column 487 * is 1, the second is 2, ... 488 * @return (Taken from Sun's Javadoc) the column value; if 489 * the value is SQL NULL, the value returned is null. 490 * @exception SQLException if an error occurs. 491 */ 492 public Ref getRef(int index) 493 throws SQLException 494 { 495 Ref result = null; 496 497 ResultSet t_ResultSet = getResultSet(); 498 499 if (t_ResultSet != null) 500 { 501 result = t_ResultSet.getRef(index); 502 } 503 504 return result; 505 } 506 507 /*** 508 * See ResultSet#getRef(String) 509 * @see java.sql.ResultSet#getRef(java.lang.String) 510 * @param columnName (Taken from Sun's Javadoc) the SQL name of 511 * the column. 512 * @return (Taken from Sun's Javadoc) the column value; if 513 * the value is SQL NULL, the value returned is null. 514 * @exception SQLException if an error occurs. 515 */ 516 public Ref getRef(String columnName) 517 throws SQLException 518 { 519 Ref result = null; 520 521 ResultSet t_ResultSet = getResultSet(); 522 523 if (t_ResultSet != null) 524 { 525 result = t_ResultSet.getRef(columnName); 526 } 527 528 return result; 529 } 530 531 /*** 532 * See ResultSet#getTime(int) 533 * @see java.sql.ResultSet#getTime(int) 534 * @param index (Taken from Sun's Javadoc) the first column 535 * is 1, the second is 2, ... 536 * @return (Taken from Sun's Javadoc) the column value; if 537 * the value is SQL NULL, the value returned is null. 538 * @exception SQLException if an error occurs. 539 */ 540 public Time getTime(int index) 541 throws SQLException 542 { 543 Time result = null; 544 545 ResultSet t_ResultSet = getResultSet(); 546 547 if (t_ResultSet != null) 548 { 549 result = t_ResultSet.getTime(index); 550 } 551 552 return result; 553 } 554 555 /*** 556 * See ResultSet#getTime(String) 557 * @see java.sql.ResultSet#getTime(java.lang.String) 558 * @param columnName (Taken from Sun's Javadoc) the SQL name of 559 * the column. 560 * @return (Taken from Sun's Javadoc) the column value; if 561 * the value is SQL NULL, the value returned is null. 562 * @exception SQLException if an error occurs. 563 */ 564 public Time getTime(String columnName) 565 throws SQLException 566 { 567 Time result = null; 568 569 ResultSet t_ResultSet = getResultSet(); 570 571 if (t_ResultSet != null) 572 { 573 result = t_ResultSet.getTime(columnName); 574 } 575 576 return result; 577 } 578 579 /*** 580 * See ResultSet#getTime(int,Calendar) 581 * @see java.sql.ResultSet#getTime(int,java.util.Calendar) 582 * @param index (Taken from Sun's Javadoc) the first column 583 * is 1, the second is 2, ... 584 * @param calendar (Taken from Sun's Javadoc) the java.util.Calendar 585 * object to use in constructing the time. 586 * @return (Taken from Sun's Javadoc) the column value; if 587 * the value is SQL NULL, the value returned is null. 588 * @exception SQLException if an error occurs. 589 */ 590 public Time getTime(int index, Calendar calendar) 591 throws SQLException 592 { 593 Time result = null; 594 595 ResultSet t_ResultSet = getResultSet(); 596 597 if (t_ResultSet != null) 598 { 599 result = t_ResultSet.getTime(index, calendar); 600 } 601 602 return result; 603 } 604 605 /*** 606 * See ResultSet#getTime(String,Calendar) 607 * @see java.sql.ResultSet#getTime(java.lang.String,java.util.Calendar) 608 * @param columnName (Taken from Sun's Javadoc) the SQL name of 609 * the column. 610 * @param calendar (Taken from Sun's Javadoc) the java.util.Calendar 611 * object to use in constructing the time. 612 * @return (Taken from Sun's Javadoc) the column value; if 613 * the value is SQL NULL, the value returned is null. 614 * @exception SQLException if an error occurs. 615 */ 616 public Time getTime(String columnName, Calendar calendar) 617 throws SQLException 618 { 619 Time result = null; 620 621 ResultSet t_ResultSet = getResultSet(); 622 623 if (t_ResultSet != null) 624 { 625 result = t_ResultSet.getTime(columnName, calendar); 626 } 627 628 return result; 629 } 630 631 632 /*** 633 * See ResultSet#getDate(int) 634 * @see java.sql.ResultSet#getDate(int) 635 * @param index (Taken from Sun's Javadoc) the first column 636 * is 1, the second is 2, ... 637 * @return (Taken from Sun's Javadoc) the column value; if 638 * the value is SQL NULL, the value returned is null. 639 * @exception SQLException if an error occurs. 640 */ 641 public Date getDate(int index) 642 throws SQLException 643 { 644 Date result = null; 645 646 ResultSet t_ResultSet = getResultSet(); 647 648 if (t_ResultSet != null) 649 { 650 result = t_ResultSet.getDate(index); 651 } 652 653 return result; 654 } 655 656 /*** 657 * See ResultSet#getDate(String) 658 * @see java.sql.ResultSet#getDate(java.lang.String) 659 * @param columnName (Taken from Sun's Javadoc) the SQL name of 660 * the column. 661 * @exception SQLException if an error occurs. 662 */ 663 public Date getDate(String columnName) 664 throws SQLException 665 { 666 Date result = null; 667 668 ResultSet t_ResultSet = getResultSet(); 669 670 if (t_ResultSet != null) 671 { 672 result = t_ResultSet.getDate(columnName); 673 } 674 675 return result; 676 } 677 678 /*** 679 * See ResultSet#getDate(int,Calendar) 680 * @see java.sql.ResultSet#getDate(int,java.util.Calendar) 681 * @param index (Taken from Sun's Javadoc) the first column 682 * is 1, the second is 2, ... 683 * @param calendar (Taken from Sun's Javadoc) the java.util.Calendar 684 * object to use in constructing the time. 685 * @return (Taken from Sun's Javadoc) the column value; if 686 * the value is SQL NULL, the value returned is null. 687 * @exception SQLException if an error occurs. 688 */ 689 public Date getDate(int index, Calendar calendar) 690 throws SQLException 691 { 692 Date result = null; 693 694 ResultSet t_ResultSet = getResultSet(); 695 696 if (t_ResultSet != null) 697 { 698 result = t_ResultSet.getDate(index, calendar); 699 } 700 701 return result; 702 } 703 704 /*** 705 * See ResultSet#getDate(String,Calendar) 706 * @see java.sql.ResultSet#getDate(java.lang.String,java.util.Calendar) 707 * @param columnName (Taken from Sun's Javadoc) the SQL name of 708 * the column. 709 * @param calendar (Taken from Sun's Javadoc) the java.util.Calendar 710 * object to use in constructing the time. 711 * @return (Taken from Sun's Javadoc) the column value; if 712 * the value is SQL NULL, the value returned is null. 713 * @exception SQLException if an error occurs. 714 */ 715 public Date getDate(String columnName, Calendar calendar) 716 throws SQLException 717 { 718 Date result = null; 719 720 ResultSet t_ResultSet = getResultSet(); 721 722 if (t_ResultSet != null) 723 { 724 result = t_ResultSet.getDate(columnName, calendar); 725 } 726 727 return result; 728 } 729 730 /*** 731 * See ResultSet#first() 732 * @see java.sql.ResultSet#first() 733 * @return (Taken from Sun's Javadoc) 734 * @exception SQLException if an error occurs. 735 */ 736 public boolean first() 737 throws SQLException 738 { 739 boolean result = false; 740 741 ResultSet t_ResultSet = getResultSet(); 742 743 if (t_ResultSet != null) 744 { 745 result = t_ResultSet.first(); 746 } 747 748 return result; 749 } 750 751 /*** 752 * See ResultSet#getByte(int) 753 * @see java.sql.ResultSet#getByte(int) 754 * @param index (Taken from Sun's Javadoc) the first column 755 * is 1, the second is 2, ... 756 * @return (Taken from Sun's Javadoc) the column value; if 757 * the value is SQL NULL, the value returned is 0. 758 * @exception SQLException if an error occurs. 759 */ 760 public byte getByte(int index) 761 throws SQLException 762 { 763 byte result = 0; 764 765 ResultSet t_ResultSet = getResultSet(); 766 767 if (t_ResultSet != null) 768 { 769 result = t_ResultSet.getByte(index); 770 } 771 772 return result; 773 } 774 775 /*** 776 * See ResultSet#getByte(String) 777 * @see java.sql.ResultSet#getByte(String) 778 * @param columnName (Taken from Sun's Javadoc) the SQL name of 779 * the column. 780 * @exception SQLException if an error occurs. 781 */ 782 public byte getByte(String columnName) 783 throws SQLException 784 { 785 byte result = 0; 786 787 ResultSet t_ResultSet = getResultSet(); 788 789 if (t_ResultSet != null) 790 { 791 result = t_ResultSet.getByte(columnName); 792 } 793 794 return result; 795 } 796 797 /*** 798 * See ResultSet#getShort(int) 799 * @see java.sql.ResultSet#getShort(int) 800 * @param index (Taken from Sun's Javadoc) the first column 801 * is 1, the second is 2, ... 802 * @return (Taken from Sun's Javadoc) the column value; if 803 * the value is SQL NULL, the value returned is 0. 804 * @exception SQLException if an error occurs. 805 */ 806 public short getShort(int index) 807 throws SQLException 808 { 809 short result = 0; 810 811 ResultSet t_ResultSet = getResultSet(); 812 813 if (t_ResultSet != null) 814 { 815 result = t_ResultSet.getShort(index); 816 } 817 818 return result; 819 } 820 821 /*** 822 * See ResultSet#getShort(String) 823 * @see java.sql.ResultSet#getShort(java.lang.String) 824 * @param columnName (Taken from Sun's Javadoc) the SQL name of 825 * the column. 826 * @exception SQLException if an error occurs. 827 */ 828 public short getShort(String columnName) 829 throws SQLException 830 { 831 short result = 0; 832 833 ResultSet t_ResultSet = getResultSet(); 834 835 if (t_ResultSet != null) 836 { 837 result = t_ResultSet.getShort(columnName); 838 } 839 840 return result; 841 } 842 843 /*** 844 * See ResultSet#getInt(int) 845 * @see java.sql.ResultSet#getInt(int) 846 * @param index (Taken from Sun's Javadoc) the first column 847 * is 1, the second is 2, ... 848 * @return (Taken from Sun's Javadoc) the column value; if 849 * the value is SQL NULL, the value returned is 0. 850 * @exception SQLException if an error occurs. 851 */ 852 public int getInt(int index) 853 throws SQLException 854 { 855 int result = 0; 856 857 ResultSet t_ResultSet = getResultSet(); 858 859 if (t_ResultSet != null) 860 { 861 result = t_ResultSet.getInt(index); 862 } 863 864 return result; 865 } 866 867 /*** 868 * See ResultSet#getInt(String) 869 * @see java.sql.ResultSet#getInt(java.lang.String) 870 * @param columnName (Taken from Sun's Javadoc) the SQL name of 871 * the column. 872 * @exception SQLException if an error occurs. 873 */ 874 public int getInt(String columnName) 875 throws SQLException 876 { 877 int result = 0; 878 879 ResultSet t_ResultSet = getResultSet(); 880 881 if (t_ResultSet != null) 882 { 883 result = t_ResultSet.getInt(columnName); 884 } 885 886 return result; 887 } 888 889 /*** 890 * See ResultSet#getFloat(int) 891 * @see java.sql.ResultSet#getFloat(int) 892 * @param index (Taken from Sun's Javadoc) the first column 893 * is 1, the second is 2, ... 894 * @return (Taken from Sun's Javadoc) the column value; if 895 * the value is SQL NULL, the value returned is 0. 896 * @exception SQLException if an error occurs. 897 */ 898 public float getFloat(int index) 899 throws SQLException 900 { 901 float result = 0; 902 903 ResultSet t_ResultSet = getResultSet(); 904 905 if (t_ResultSet != null) 906 { 907 result = t_ResultSet.getFloat(index); 908 } 909 910 return result; 911 } 912 913 /*** 914 * See ResultSet#getFloat(String) 915 * @see java.sql.ResultSet#getFloat(java.lang.String) 916 * @param columnName (Taken from Sun's Javadoc) the SQL name of 917 * the column. 918 * @exception SQLException if an error occurs. 919 */ 920 public float getFloat(String columnName) 921 throws SQLException 922 { 923 float result = 0; 924 925 ResultSet t_ResultSet = getResultSet(); 926 927 if (t_ResultSet != null) 928 { 929 result = t_ResultSet.getFloat(columnName); 930 } 931 932 return result; 933 } 934 935 /*** 936 * See ResultSet#getDouble(int) 937 * @see java.sql.ResultSet#getDouble(int) 938 * @param index (Taken from Sun's Javadoc) the first column 939 * is 1, the second is 2, ... 940 * @return (Taken from Sun's Javadoc) the column value; if 941 * the value is SQL NULL, the value returned is 0. 942 * @exception SQLException if an error occurs. 943 */ 944 public double getDouble(int index) 945 throws SQLException 946 { 947 double result = 0; 948 949 ResultSet t_ResultSet = getResultSet(); 950 951 if (t_ResultSet != null) 952 { 953 result = t_ResultSet.getDouble(index); 954 } 955 956 return result; 957 } 958 959 /*** 960 * See ResultSet#getDouble(String) 961 * @see java.sql.ResultSet#getDouble(java.lang.String) 962 * @param columnName (Taken from Sun's Javadoc) the SQL name of 963 * the column. 964 * @return (Taken from Sun's Javadoc) the column value; if 965 * the value is SQL NULL, the value returned is 0. 966 * @exception SQLException if an error occurs. 967 */ 968 public double getDouble(String columnName) 969 throws SQLException 970 { 971 double result = 0; 972 973 ResultSet t_ResultSet = getResultSet(); 974 975 if (t_ResultSet != null) 976 { 977 result = t_ResultSet.getDouble(columnName); 978 } 979 980 return result; 981 } 982 983 /*** 984 * See ResultSet#getMetaData() 985 * @see java.sql.ResultSet#getMetaData() 986 * @return (Taken from Sun's Javadoc) the description of a ResultSet 987 * object's columns or null if the driver cannot return a 988 * ResultSetMetaData object. 989 * @exception SQLException if an error occurs. 990 */ 991 public ResultSetMetaData getMetaData() 992 throws SQLException 993 { 994 ResultSetMetaData result = null; 995 996 ResultSet t_ResultSet = getResultSet(); 997 998 if (t_ResultSet != null) 999 { 1000 result = t_ResultSet.getMetaData(); 1001 } 1002 1003 return result; 1004 } 1005 1006 /*** 1007 * See ResultSet#getWarnings() 1008 * @see java.sql.ResultSet#getWarnings() 1009 * @return (Taken from Sun's Javadoc) the first SQLWarning object 1010 * reported or null if there are none. 1011 * @exception SQLException if an error occurs. 1012 */ 1013 public SQLWarning getWarnings() 1014 throws SQLException 1015 { 1016 SQLWarning result = null; 1017 1018 ResultSet t_ResultSet = getResultSet(); 1019 1020 if (t_ResultSet != null) 1021 { 1022 result = t_ResultSet.getWarnings(); 1023 } 1024 1025 return result; 1026 } 1027 1028 /*** 1029 * See ResultSet#clearWarnings() 1030 * @see java.sql.ResultSet#clearWarnings() 1031 * @exception SQLException if an error occurs. 1032 */ 1033 public void clearWarnings() 1034 throws SQLException 1035 { 1036 ResultSet t_ResultSet = getResultSet(); 1037 1038 if (t_ResultSet != null) 1039 { 1040 t_ResultSet.clearWarnings(); 1041 } 1042 } 1043 1044 /*** 1045 * See ResultSet#setFetchDirection(int) 1046 * @see java.sql.ResultSet#setFetchDirection(int) 1047 * @param direction (Taken from Sun's Javadoc) an integer specifying the 1048 * suggested fetch direction; one of ResultSet.FETCH_FORWARD, 1049 * ResultSet.FETCH_REVERSE, or ResultSet.FETCH_UNKNOWN. 1050 * @exception SQLException if an error occurs. 1051 */ 1052 public void setFetchDirection(int direction) 1053 throws SQLException 1054 { 1055 ResultSet t_ResultSet = getResultSet(); 1056 1057 if (t_ResultSet != null) 1058 { 1059 t_ResultSet.setFetchDirection(direction); 1060 } 1061 } 1062 1063 /*** 1064 * See ResultSet#getFetchDirection() 1065 * @see java.sql.ResultSet#getFetchDirection() 1066 * @return (Taken from Sun's Javadoc) the current fetch direction for 1067 * this ResultSet object. 1068 * @exception SQLException if an error occurs. 1069 */ 1070 public int getFetchDirection() 1071 throws SQLException 1072 { 1073 int result = -1; 1074 1075 ResultSet t_ResultSet = getResultSet(); 1076 1077 if (t_ResultSet != null) 1078 { 1079 result = t_ResultSet.getFetchDirection(); 1080 } 1081 1082 return result; 1083 } 1084 1085 /*** 1086 * See ResultSet#setFetchSize(int) 1087 * @see java.sql.ResultSet#setFetchSize(int) 1088 * @param size (Taken from Sun's Javadoc) the number of rows to fetch. 1089 * @exception SQLException if an error occurs. 1090 */ 1091 public void setFetchSize(int size) 1092 throws SQLException 1093 { 1094 ResultSet t_ResultSet = getResultSet(); 1095 1096 if (t_ResultSet != null) 1097 { 1098 t_ResultSet.setFetchSize(size); 1099 } 1100 } 1101 1102 /*** 1103 * See ResultSet#getFetchSize() 1104 * @see java.sql.ResultSet#getFetchSize() 1105 * @return (Taken from Sun's Javadoc) the current fetch size for this 1106 * ResultSet object. 1107 * @exception SQLException if an error occurs. 1108 */ 1109 public int getFetchSize() 1110 throws SQLException 1111 { 1112 int result = -1; 1113 1114 ResultSet t_ResultSet = getResultSet(); 1115 1116 if (t_ResultSet != null) 1117 { 1118 result = t_ResultSet.getFetchSize(); 1119 } 1120 1121 return result; 1122 } 1123 1124 /*** 1125 * See ResultSet#getString(int) 1126 * @see java.sql.ResultSet#getString(int) 1127 * @param index (Taken from Sun's Javadoc) the first column 1128 * is 1, the second is 2, ... 1129 * @return (Taken from Sun's Javadoc) the column value; if 1130 * the value is SQL NULL, the value returned is null. 1131 * @exception SQLException if an error occurs. 1132 */ 1133 public String getString(int index) 1134 throws SQLException 1135 { 1136 String result = null; 1137 1138 ResultSet t_ResultSet = getResultSet(); 1139 1140 if (t_ResultSet != null) 1141 { 1142 result = t_ResultSet.getString(index); 1143 } 1144 1145 return result; 1146 } 1147 1148 /*** 1149 * See ResultSet#getString(String) 1150 * @see java.sql.ResultSet#getString(java.lang.String) 1151 * @param columnName (Taken from Sun's Javadoc) the SQL name of 1152 * the column. 1153 * @exception SQLException if an error occurs. 1154 */ 1155 public String getString(String columnName) 1156 throws SQLException 1157 { 1158 String result = null; 1159 1160 ResultSet t_ResultSet = getResultSet(); 1161 1162 if (t_ResultSet != null) 1163 { 1164 result = t_ResultSet.getString(columnName); 1165 } 1166 1167 return result; 1168 } 1169 1170 /*** 1171 * See ResultSet#getArray(int) 1172 * @see java.sql.ResultSet#getArray(int) 1173 * @param index (Taken from Sun's Javadoc) the first column 1174 * is 1, the second is 2, ... 1175 * @return (Taken from Sun's Javadoc) the column value; if 1176 * the value is SQL NULL, the value returned is null. 1177 * @exception SQLException if an error occurs. 1178 */ 1179 public Array getArray(int index) 1180 throws SQLException 1181 { 1182 Array result = null; 1183 1184 ResultSet t_ResultSet = getResultSet(); 1185 1186 if (t_ResultSet != null) 1187 { 1188 result = t_ResultSet.getArray(index); 1189 } 1190 1191 return result; 1192 } 1193 1194 /*** 1195 * See ResultSet#getArray(String) 1196 * @see java.sql.ResultSet#getArray(java.lang.String) 1197 * @param columnName (Taken from Sun's Javadoc) the SQL name of 1198 * the column. 1199 * @exception SQLException if an error occurs. 1200 */ 1201 public Array getArray(String columnName) 1202 throws SQLException 1203 { 1204 Array result = null; 1205 1206 ResultSet t_ResultSet = getResultSet(); 1207 1208 if (t_ResultSet != null) 1209 { 1210 result = t_ResultSet.getArray(columnName); 1211 } 1212 1213 return result; 1214 } 1215 1216 /*** 1217 * See ResultSet#getAsciiStream(int) 1218 * @see java.sql.ResultSet#getAsciiStream(int) 1219 * @param index (Taken from Sun's Javadoc) the first column 1220 * is 1, the second is 2, ... 1221 * @return (Taken from Sun's Javadoc) the column value; if 1222 * the value is SQL NULL, the value returned is null. 1223 * @exception SQLException if an error occurs. 1224 */ 1225 public InputStream getAsciiStream(int index) 1226 throws SQLException 1227 { 1228 InputStream result = null; 1229 1230 ResultSet t_ResultSet = getResultSet(); 1231 1232 if (t_ResultSet != null) 1233 { 1234 result = t_ResultSet.getAsciiStream(index); 1235 } 1236 1237 return result; 1238 } 1239 1240 /*** 1241 * See ResultSet#getAsciiStream(String) 1242 * @see java.sql.ResultSet#getAsciiStream(String) 1243 * @param columnName (Taken from Sun's Javadoc) the SQL name of 1244 * the column. 1245 * @exception SQLException if an error occurs. 1246 */ 1247 public InputStream getAsciiStream(String columnName) 1248 throws SQLException 1249 { 1250 InputStream result = null; 1251 1252 ResultSet t_ResultSet = getResultSet(); 1253 1254 if (t_ResultSet != null) 1255 { 1256 result = t_ResultSet.getAsciiStream(columnName); 1257 } 1258 1259 return result; 1260 } 1261 1262 /*** 1263 * See ResultSet#getBigDecimal(int,int) 1264 * @see java.sql.ResultSet#getBigDecimal(int,int) 1265 * @param index (Taken from Sun's Javadoc) the first column 1266 * is 1, the second is 2, ... 1267 * @param scale (Taken from Sun's Javadoc) the number of digits to the 1268 * right of the decimal point. 1269 * @return (Taken from Sun's Javadoc) the column value; if 1270 * the value is SQL NULL, the value returned is null. 1271 * @exception SQLException if an error occurs. 1272 */ 1273 public BigDecimal getBigDecimal(int index, int scale) 1274 throws SQLException 1275 { 1276 BigDecimal result = null; 1277 1278 ResultSet t_ResultSet = getResultSet(); 1279 1280 if (t_ResultSet != null) 1281 { 1282 result = t_ResultSet.getBigDecimal(index, scale); 1283 } 1284 1285 return result; 1286 } 1287 1288 /*** 1289 * See ResultSet#getBigDecimal(String,int) 1290 * @see java.sql.ResultSet#getBigDecimal(java.lang.String,int) 1291 * @param columnName (Taken from Sun's Javadoc) the SQL name of 1292 * the column. 1293 * @param scale (Taken from Sun's Javadoc) the number of digits to the 1294 * right of the decimal point. 1295 * @exception SQLException if an error occurs. 1296 */ 1297 public BigDecimal getBigDecimal(String columnName, int scale) 1298 throws SQLException 1299 { 1300 BigDecimal result = null; 1301 1302 ResultSet t_ResultSet = getResultSet(); 1303 1304 if (t_ResultSet != null) 1305 { 1306 result = t_ResultSet.getBigDecimal(columnName, scale); 1307 } 1308 1309 return result; 1310 } 1311 1312 /*** 1313 * See ResultSet#getBigDecimal(int) 1314 * @see java.sql.ResultSet#getBigDecimal(int) 1315 * @param index (Taken from Sun's Javadoc) the first column 1316 * is 1, the second is 2, ... 1317 * @return (Taken from Sun's Javadoc) the column value; if 1318 * the value is SQL NULL, the value returned is null. 1319 * @exception SQLException if an error occurs. 1320 */ 1321 public BigDecimal getBigDecimal(int index) 1322 throws SQLException 1323 { 1324 BigDecimal result = null; 1325 1326 ResultSet t_ResultSet = getResultSet(); 1327 1328 if (t_ResultSet != null) 1329 { 1330 result = t_ResultSet.getBigDecimal(index); 1331 } 1332 1333 return result; 1334 } 1335 1336 /*** 1337 * See ResultSet#getBigDecimal(String) 1338 * @see java.sql.ResultSet#getBigDecimal(java.lang.String) 1339 * @param columnName (Taken from Sun's Javadoc) the SQL name of 1340 * the column. 1341 * @exception SQLException if an error occurs. 1342 */ 1343 public BigDecimal getBigDecimal(String columnName) 1344 throws SQLException 1345 { 1346 BigDecimal result = null; 1347 1348 ResultSet t_ResultSet = getResultSet(); 1349 1350 if (t_ResultSet != null) 1351 { 1352 result = t_ResultSet.getBigDecimal(columnName); 1353 } 1354 1355 return result; 1356 } 1357 1358 /*** 1359 * See ResultSet#getBinaryStream(int) 1360 * @see java.sql.ResultSet#getBinaryStream(int) 1361 * @param index (Taken from Sun's Javadoc) the first column 1362 * is 1, the second is 2, ... 1363 * @return (Taken from Sun's Javadoc) the column value; if 1364 * the value is SQL NULL, the value returned is null. 1365 * @exception SQLException if an error occurs. 1366 */ 1367 public InputStream getBinaryStream(int index) 1368 throws SQLException 1369 { 1370 InputStream result = null; 1371 1372 ResultSet t_ResultSet = getResultSet(); 1373 1374 if (t_ResultSet != null) 1375 { 1376 result = t_ResultSet.getBinaryStream(index); 1377 } 1378 1379 return result; 1380 } 1381 1382 /*** 1383 * See ResultSet#getBinaryStream(String) 1384 * @see java.sql.ResultSet#getBinaryStream(java.lang.Stream) 1385 * @param columnName (Taken from Sun's Javadoc) the SQL name of 1386 * the column. 1387 * @exception SQLException if an error occurs. 1388 */ 1389 public InputStream getBinaryStream(String columnName) 1390 throws SQLException 1391 { 1392 InputStream result = null; 1393 1394 ResultSet t_ResultSet = getResultSet(); 1395 1396 if (t_ResultSet != null) 1397 { 1398 result = t_ResultSet.getBinaryStream(columnName); 1399 } 1400 1401 return result; 1402 } 1403 1404 /*** 1405 * See ResultSet#getBlob(int) 1406 * @see java.sql.ResultSet#getBlob(int) 1407 * @param index (Taken from Sun's Javadoc) the first column 1408 * is 1, the second is 2, ... 1409 * @return (Taken from Sun's Javadoc) the column value; if 1410 * the value is SQL NULL, the value returned is null. 1411 * @exception SQLException if an error occurs. 1412 */ 1413 public Blob getBlob(int index) 1414 throws SQLException 1415 { 1416 Blob result = null; 1417 1418 ResultSet t_ResultSet = getResultSet(); 1419 1420 if (t_ResultSet != null) 1421 { 1422 result = t_ResultSet.getBlob(index); 1423 } 1424 1425 return result; 1426 } 1427 1428 /*** 1429 * See ResultSet#getBlob(String) 1430 * @see java.sql.ResultSet#getBlob(String) 1431 * @param columnName (Taken from Sun's Javadoc) the SQL name of 1432 * the column. 1433 * @return (Taken from Sun's Javadoc) the column value; if 1434 * the value is SQL NULL, the value returned is null. 1435 * @exception SQLException if an error occurs. 1436 */ 1437 public Blob getBlob(String columnName) 1438 throws SQLException 1439 { 1440 Blob result = null; 1441 1442 ResultSet t_ResultSet = getResultSet(); 1443 1444 if (t_ResultSet != null) 1445 { 1446 result = t_ResultSet.getBlob(columnName); 1447 } 1448 1449 return result; 1450 } 1451 1452 /*** 1453 * See ResultSet#getClob(int) 1454 * @see java.sql.ResultSet#getClob(int) 1455 * @param index (Taken from Sun's Javadoc) the first column 1456 * is 1, the second is 2, ... 1457 * @return (Taken from Sun's Javadoc) the column value; if 1458 * the value is SQL NULL, the value returned is null. 1459 * @exception SQLException if an error occurs. 1460 */ 1461 public Clob getClob(int index) 1462 throws SQLException 1463 { 1464 Clob result = null; 1465 1466 ResultSet t_ResultSet = getResultSet(); 1467 1468 if (t_ResultSet != null) 1469 { 1470 result = t_ResultSet.getClob(index); 1471 } 1472 1473 return result; 1474 } 1475 1476 /*** 1477 * See ResultSet#getClob(String) 1478 * @see java.sql.ResultSet#getClob(java.lang.String) 1479 * @param columnName (Taken from Sun's Javadoc) the SQL name of 1480 * the column. 1481 * @return (Taken from Sun's Javadoc) the column value; if 1482 * the value is SQL NULL, the value returned is null. 1483 * @exception SQLException if an error occurs. 1484 */ 1485 public Clob getClob(String columnName) 1486 throws SQLException 1487 { 1488 Clob result = null; 1489 1490 ResultSet t_ResultSet = getResultSet(); 1491 1492 if (t_ResultSet != null) 1493 { 1494 result = t_ResultSet.getClob(columnName); 1495 } 1496 1497 return result; 1498 } 1499 1500 /*** 1501 * See ResultSet#getTimestamp(int) 1502 * @see java.sql.ResultSet#getTimestamp(int) 1503 * @param index (Taken from Sun's Javadoc) the first column 1504 * is 1, the second is 2, ... 1505 * @return (Taken from Sun's Javadoc) the column value; if 1506 * the value is SQL NULL, the value returned is null. 1507 * @exception SQLException if an error occurs. 1508 */ 1509 public Timestamp getTimestamp(int index) 1510 throws SQLException 1511 { 1512 Timestamp result = null; 1513 1514 ResultSet t_ResultSet = getResultSet(); 1515 1516 if (t_ResultSet != null) 1517 { 1518 result = t_ResultSet.getTimestamp(index); 1519 } 1520 1521 return result; 1522 } 1523 1524 /*** 1525 * See ResultSet#getTimestamp(String) 1526 * @see java.sql.ResultSet#getTimestamp(java.lang.String) 1527 * @param columnName (Taken from Sun's Javadoc) the SQL name of 1528 * the column. 1529 * @return (Taken from Sun's Javadoc) the column value; if 1530 * the value is SQL NULL, the value returned is null. 1531 * @exception SQLException if an error occurs. 1532 */ 1533 public Timestamp getTimestamp(String columnName) 1534 throws SQLException 1535 { 1536 Timestamp result = null; 1537 1538 ResultSet t_ResultSet = getResultSet(); 1539 1540 if (t_ResultSet != null) 1541 { 1542 result = t_ResultSet.getTimestamp(columnName); 1543 } 1544 1545 return result; 1546 } 1547 1548 /*** 1549 * See ResultSet#getTimestamp(int,Calendar) 1550 * @see java.sql.ResultSet#getTimestamp(int,java.util.Calendar) 1551 * @param index (Taken from Sun's Javadoc) the first column 1552 * is 1, the second is 2, ... 1553 * @param calendar (Taken from Sun's Javadoc) the java.util.Calendar 1554 * object to use in constructing the time. 1555 * @return (Taken from Sun's Javadoc) the column value; if 1556 * the value is SQL NULL, the value returned is null. 1557 * @exception SQLException if an error occurs. 1558 */ 1559 public Timestamp getTimestamp(int index, Calendar calendar) 1560 throws SQLException 1561 { 1562 Timestamp result = null; 1563 1564 ResultSet t_ResultSet = getResultSet(); 1565 1566 if (t_ResultSet != null) 1567 { 1568 result = t_ResultSet.getTimestamp(index, calendar); 1569 } 1570 1571 return result; 1572 } 1573 1574 /*** 1575 * See ResultSet#getTimestamp(String,Calendar) 1576 * @see java.sql.ResultSet#getTimestamp(java.lang.String,java.util.Calendar) 1577 * @param columnName (Taken from Sun's Javadoc) the SQL name of 1578 * the column. 1579 * @param calendar (Taken from Sun's Javadoc) the java.util.Calendar 1580 * object to use in constructing the time. 1581 * @return (Taken from Sun's Javadoc) the column value; if 1582 * the value is SQL NULL, the value returned is null. 1583 * @exception SQLException if an error occurs. 1584 */ 1585 public Timestamp getTimestamp(String columnName, Calendar calendar) 1586 throws SQLException 1587 { 1588 Timestamp result = null; 1589 1590 ResultSet t_ResultSet = getResultSet(); 1591 1592 if (t_ResultSet != null) 1593 { 1594 result = t_ResultSet.getTimestamp(columnName, calendar); 1595 } 1596 1597 return result; 1598 } 1599 1600 /*** 1601 * See ResultSet#getUnicodeStream(int) 1602 * @see java.sql.ResultSet#getUnicodeStream(int) 1603 * @param index (Taken from Sun's Javadoc) the first column 1604 * is 1, the second is 2, ... 1605 * @return (Taken from Sun's Javadoc) the column value; if 1606 * the value is SQL NULL, the value returned is null. 1607 * @exception SQLException if an error occurs. 1608 */ 1609 public InputStream getUnicodeStream(int index) 1610 throws SQLException 1611 { 1612 InputStream result = null; 1613 1614 ResultSet t_ResultSet = getResultSet(); 1615 1616 if (t_ResultSet != null) 1617 { 1618 result = t_ResultSet.getUnicodeStream(index); 1619 } 1620 1621 return result; 1622 } 1623 1624 /*** 1625 * See ResultSet#getUnicodeStream(String) 1626 * @see java.sql.ResultSet#getUnicodeStream(java.lang.String) 1627 * @param columnName (Taken from Sun's Javadoc) the SQL name of 1628 * the column. 1629 * @exception SQLException if an error occurs. 1630 */ 1631 public InputStream getUnicodeStream(String columnName) 1632 throws SQLException 1633 { 1634 InputStream result = null; 1635 1636 ResultSet t_ResultSet = getResultSet(); 1637 1638 if (t_ResultSet != null) 1639 { 1640 result = t_ResultSet.getUnicodeStream(columnName); 1641 } 1642 1643 return result; 1644 } 1645 1646 /*** 1647 * See ResultSet#wasNull() 1648 * @see java.sql.ResultSet#wasNull() 1649 * @return (Taken from Sun's Javadoc) <code>true</code> if the last 1650 * column value read was SQL NULL and <code>false</code> otherwise. 1651 * @exception SQLException if an error occurs. 1652 */ 1653 public boolean wasNull() 1654 throws SQLException 1655 { 1656 boolean result = false; 1657 1658 ResultSet t_ResultSet = getResultSet(); 1659 1660 if (t_ResultSet != null) 1661 { 1662 result = t_ResultSet.wasNull(); 1663 } 1664 1665 return result; 1666 } 1667 1668 /*** 1669 * See ResultSet#getCharacterStream(int) 1670 * @see java.sql.ResultSet#getCharacterStream(int) 1671 * @param index (Taken from Sun's Javadoc) the first column 1672 * is 1, the second is 2, ... 1673 * @return (Taken from Sun's Javadoc) the column value; if 1674 * the value is SQL NULL, the value returned is null. 1675 * @exception SQLException if an error occurs. 1676 */ 1677 public Reader getCharacterStream(int index) 1678 throws SQLException 1679 { 1680 Reader result = null; 1681 1682 ResultSet t_ResultSet = getResultSet(); 1683 1684 if (t_ResultSet != null) 1685 { 1686 result = t_ResultSet.getCharacterStream(index); 1687 } 1688 1689 return result; 1690 } 1691 1692 /*** 1693 * See ResultSet#getCharacterStream(String) 1694 * @see java.sql.ResultSet#getCharacterStream(java.lang.String) 1695 * @param columnName (Taken from Sun's Javadoc) the SQL name of 1696 * the column. 1697 * @return (Taken from Sun's Javadoc) the column value; if 1698 * the value is SQL NULL, the value returned is null. 1699 * @exception SQLException if an error occurs. 1700 */ 1701 public Reader getCharacterStream(String columnName) 1702 throws SQLException 1703 { 1704 Reader result = null; 1705 1706 ResultSet t_ResultSet = getResultSet(); 1707 1708 if (t_ResultSet != null) 1709 { 1710 result = t_ResultSet.getCharacterStream(columnName); 1711 } 1712 1713 return result; 1714 } 1715 1716 /*** 1717 * See ResultSet#absolute(int) 1718 * @see java.sql.ResultSet#absolute(int) 1719 * @param index (Taken from Sun's Javadoc) the first column 1720 * is 1, the second is 2, ... 1721 * @return (Taken from Sun's Javadoc) <code>true</code> if the cursor 1722 * is on the result set; <code>false</code> otherwise. 1723 * @exception SQLException if an error occurs. 1724 */ 1725 public boolean absolute(int index) 1726 throws SQLException 1727 { 1728 boolean result = false; 1729 1730 ResultSet t_ResultSet = getResultSet(); 1731 1732 if (t_ResultSet != null) 1733 { 1734 result = t_ResultSet.absolute(index); 1735 } 1736 1737 return result; 1738 } 1739 1740 /*** 1741 * See ResultSet#afterLast() 1742 * @see java.sql.ResultSet#afterLast() 1743 * @exception SQLException if an error occurs. 1744 */ 1745 public void afterLast() 1746 throws SQLException 1747 { 1748 ResultSet t_ResultSet = getResultSet(); 1749 1750 if (t_ResultSet != null) 1751 { 1752 t_ResultSet.afterLast(); 1753 } 1754 } 1755 1756 /*** 1757 * See ResultSet#beforeFirst() 1758 * @see java.sql.ResultSet#beforeFirst() 1759 * @exception SQLException if an error occurs. 1760 */ 1761 public void beforeFirst() 1762 throws SQLException 1763 { 1764 ResultSet t_ResultSet = getResultSet(); 1765 1766 if (t_ResultSet != null) 1767 { 1768 t_ResultSet.beforeFirst(); 1769 } 1770 } 1771 1772 /*** 1773 * See ResultSet#cancelRowUpdates() 1774 * @see java.sql.ResultSet#cancelRowUpdates() 1775 * @exception SQLException if an error occurs. 1776 */ 1777 public void cancelRowUpdates() 1778 throws SQLException 1779 { 1780 ResultSet t_ResultSet = getResultSet(); 1781 1782 if (t_ResultSet != null) 1783 { 1784 t_ResultSet.cancelRowUpdates(); 1785 } 1786 } 1787 1788 /*** 1789 * See ResultSet#deleteRow() 1790 * @see java.sql.ResultSet#deleteRow() 1791 * @exception SQLException if an error occurs. 1792 */ 1793 public void deleteRow() 1794 throws SQLException 1795 { 1796 ResultSet t_ResultSet = getResultSet(); 1797 1798 if (t_ResultSet != null) 1799 { 1800 t_ResultSet.deleteRow(); 1801 } 1802 } 1803 1804 /*** 1805 * See ResultSet#findColumn(String) 1806 * @see java.sql.ResultSet#findColumn(java.lang.String) 1807 * @param columnName (Taken from Sun's Javadoc) the SQL name of 1808 * the column. 1809 * @return (Taken from Sun's Javadoc) the column index of the 1810 * given column name. 1811 * @exception SQLException if an error occurs. 1812 */ 1813 public int findColumn(String columnName) 1814 throws SQLException 1815 { 1816 int result = -1; 1817 1818 ResultSet t_ResultSet = getResultSet(); 1819 1820 if (t_ResultSet != null) 1821 { 1822 result = t_ResultSet.findColumn(columnName); 1823 } 1824 1825 return result; 1826 } 1827 1828 /*** 1829 * See ResultSet#getConcurrency() 1830 * @see java.sql.ResultSet#getConcurrency() 1831 * @return (Taken from Sun's Javadoc) the concurrency type, either 1832 * ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE. 1833 * @exception SQLException if an error occurs. 1834 */ 1835 public int getConcurrency() 1836 throws SQLException 1837 { 1838 int result = -1; 1839 1840 ResultSet t_ResultSet = getResultSet(); 1841 1842 if (t_ResultSet != null) 1843 { 1844 result = t_ResultSet.getConcurrency(); 1845 } 1846 1847 return result; 1848 } 1849 1850 /*** 1851 * See ResultSet#getCursorName() 1852 * @see java.sql.ResultSet#getCursorName() 1853 * @return (Taken from Sun's Javadoc) the SQL name for this ResultSet 1854 * object's cursor. 1855 * @exception SQLException if an error occurs. 1856 */ 1857 public String getCursorName() 1858 throws SQLException 1859 { 1860 String result = null; 1861 1862 ResultSet t_ResultSet = getResultSet(); 1863 1864 if (t_ResultSet != null) 1865 { 1866 result = t_ResultSet.getCursorName(); 1867 } 1868 1869 return result; 1870 } 1871 1872 /*** 1873 * See ResultSet#getRow() 1874 * @see java.sql.ResultSet#getRow() 1875 * @return (Taken from Sun's Javadoc) the current row number; 1876 * 0 if there is no current row. 1877 * @exception SQLException if an error occurs. 1878 */ 1879 public int getRow() 1880 throws SQLException 1881 { 1882 int result = -1; 1883 1884 ResultSet t_ResultSet = getResultSet(); 1885 1886 if (t_ResultSet != null) 1887 { 1888 result = t_ResultSet.getRow(); 1889 } 1890 1891 return result; 1892 } 1893 1894 /*** 1895 * See ResultSet#getStatement() 1896 * @see java.sql.ResultSet#getStatement() 1897 * @return (Taken from Sun's Javadoc) the Statement object that produced 1898 * this ResultSet object or null if the result set was produced some 1899 * other way. 1900 * @exception SQLException if an error occurs. 1901 */ 1902 public Statement getStatement() 1903 throws SQLException 1904 { 1905 Statement result = getQuery(); 1906 1907 if (result == null) 1908 { 1909 ResultSet t_ResultSet = getResultSet(); 1910 1911 if (t_ResultSet != null) 1912 { 1913 result = t_ResultSet.getStatement(); 1914 } 1915 } 1916 1917 return result; 1918 } 1919 1920 /*** 1921 * See ResultSet#insertRow() 1922 * @see java.sql.ResultSet#insertRow() 1923 * @exception SQLException if an error occurs. 1924 */ 1925 public void insertRow() 1926 throws SQLException 1927 { 1928 ResultSet t_ResultSet = getResultSet(); 1929 1930 if (t_ResultSet != null) 1931 { 1932 t_ResultSet.insertRow(); 1933 } 1934 } 1935 1936 /*** 1937 * See ResultSet#isAfterLast() 1938 * @see java.sql.ResultSet#isAfterLast() 1939 * @return (Taken from Sun's Javadoc) <code>true</code> if the cursor is 1940 * after the last row; <code>false</code> if the cursor is at any other 1941 * position or the result set contains no rows. 1942 * @exception SQLException if an error occurs. 1943 */ 1944 public boolean isAfterLast() 1945 throws SQLException 1946 { 1947 boolean result = false; 1948 1949 ResultSet t_ResultSet = getResultSet(); 1950 1951 if (t_ResultSet != null) 1952 { 1953 result = t_ResultSet.isAfterLast(); 1954 } 1955 1956 return result; 1957 } 1958 1959 /*** 1960 * See ResultSet#isBeforeFirst() 1961 * @see java.sql.ResultSet#isBeforeFirst() 1962 * @return (Taken from Sun's Javadoc) <code>true</code> if the cursor is 1963 * before the first row; <code>false</code> if the cursor is at any other 1964 * position or the result set contains no rows. 1965 * @exception SQLException if an error occurs. 1966 */ 1967 public boolean isBeforeFirst() 1968 throws SQLException 1969 { 1970 boolean result = false; 1971 1972 ResultSet t_ResultSet = getResultSet(); 1973 1974 if (t_ResultSet != null) 1975 { 1976 result = t_ResultSet.isBeforeFirst(); 1977 } 1978 1979 return result; 1980 } 1981 1982 /*** 1983 * See ResultSet#isFirst() 1984 * @see java.sql.ResultSet#isFirst() 1985 * @return (Taken from Sun's Javadoc) <code>true</code> if the cursor is 1986 * on the first row; <code>false</code> otherwise. 1987 * @exception SQLException if an error occurs. 1988 */ 1989 public boolean isFirst() 1990 throws SQLException 1991 { 1992 boolean result = false; 1993 1994 ResultSet t_ResultSet = getResultSet(); 1995 1996 if (t_ResultSet != null) 1997 { 1998 result = t_ResultSet.isFirst(); 1999 } 2000 2001 return result; 2002 } 2003 2004 /*** 2005 * See ResultSet#isLast() 2006 * @see java.sql.ResultSet#isLast() 2007 * @return (Taken from Sun's Javadoc) <code>true</code> if the cursor is 2008 * on the last row; <code>false</code> otherwise. 2009 * @exception SQLException if an error occurs. 2010 */ 2011 public boolean isLast() 2012 throws SQLException 2013 { 2014 boolean result = false; 2015 2016 ResultSet t_ResultSet = getResultSet(); 2017 2018 if (t_ResultSet != null) 2019 { 2020 result = t_ResultSet.isLast(); 2021 } 2022 2023 return result; 2024 } 2025 2026 /*** 2027 * See ResultSet#last() 2028 * @see java.sql.ResultSet#last() 2029 * @return (Taken from Sun's Javadoc) <code>true</code> if the cursor is 2030 * on a valid row; <code>false</code> if there are no rows in the result 2031 * set. 2032 * @exception SQLException if an error occurs. 2033 */ 2034 public boolean last() 2035 throws SQLException 2036 { 2037 boolean result = false; 2038 2039 ResultSet t_ResultSet = getResultSet(); 2040 2041 if (t_ResultSet != null) 2042 { 2043 result = t_ResultSet.last(); 2044 } 2045 2046 return result; 2047 } 2048 2049 /*** 2050 * See ResultSet#moveToCurrentRow() 2051 * @see java.sql.ResultSet#moveToCurrentRow() 2052 * @exception SQLException if an error occurs. 2053 */ 2054 public void moveToCurrentRow() 2055 throws SQLException 2056 { 2057 ResultSet t_ResultSet = getResultSet(); 2058 2059 if (t_ResultSet != null) 2060 { 2061 t_ResultSet.moveToCurrentRow(); 2062 } 2063 } 2064 2065 /*** 2066 * See ResultSet#moveToInsertRow() 2067 * @see java.sql.ResultSet#moveToInsertRow() 2068 * @exception SQLException if an error occurs. 2069 */ 2070 public void moveToInsertRow() 2071 throws SQLException 2072 { 2073 ResultSet t_ResultSet = getResultSet(); 2074 2075 if (t_ResultSet != null) 2076 { 2077 t_ResultSet.moveToInsertRow(); 2078 } 2079 } 2080 2081 /*** 2082 * See ResultSet#refreshRow() 2083 * @see java.sql.ResultSet#refreshRow() 2084 * @exception SQLException if an error occurs. 2085 */ 2086 public void refreshRow() 2087 throws SQLException 2088 { 2089 ResultSet t_ResultSet = getResultSet(); 2090 2091 if (t_ResultSet != null) 2092 { 2093 t_ResultSet.refreshRow(); 2094 } 2095 } 2096 2097 /*** 2098 * See ResultSet#relative(int) 2099 * @see java.sql.ResultSet#relative(int) 2100 * @param index (Taken from Sun's Javadoc) the first column 2101 * is 1, the second is 2, ... 2102 * @return (Taken from Sun's Javadoc) <code>true</code> if the cursor is 2103 * on a row; <code>false</code> otherwise. 2104 * @exception SQLException if an error occurs. 2105 */ 2106 public boolean relative(int index) 2107 throws SQLException 2108 { 2109 boolean result = false; 2110 2111 ResultSet t_ResultSet = getResultSet(); 2112 2113 if (t_ResultSet != null) 2114 { 2115 result = t_ResultSet.relative(index); 2116 } 2117 2118 return result; 2119 } 2120 2121 /*** 2122 * See ResultSet#rowDeleted() 2123 * @see java.sql.ResultSet#rowDeleted() 2124 * @return (Taken from Sun's Javadoc) <code>true</code> if a row was 2125 * deleted and deletions are detected; <code>false</code> otherwise. 2126 * @exception SQLException if an error occurs. 2127 */ 2128 public boolean rowDeleted() 2129 throws SQLException 2130 { 2131 boolean result = false; 2132 2133 ResultSet t_ResultSet = getResultSet(); 2134 2135 if (t_ResultSet != null) 2136 { 2137 result = t_ResultSet.rowDeleted(); 2138 } 2139 2140 return result; 2141 } 2142 2143 /*** 2144 * See ResultSet#rowInserted() 2145 * @see java.sql.ResultSet#rowInserted() 2146 * @return (Taken from Sun's Javadoc) <code>true</code> if a row has had 2147 * an insertion and insertions are detected; <code>false</code> otherwise. 2148 * @exception SQLException if an error occurs. 2149 */ 2150 public boolean rowInserted() 2151 throws SQLException 2152 { 2153 boolean result = false; 2154 2155 ResultSet t_ResultSet = getResultSet(); 2156 2157 if (t_ResultSet != null) 2158 { 2159 result = t_ResultSet.rowInserted(); 2160 } 2161 2162 return result; 2163 } 2164 2165 /*** 2166 * See ResultSet#rowUpdated() 2167 * @see java.sql.ResultSet#rowUpdated() 2168 * @return (Taken from Sun's Javadoc) <code>true</code> if both (1) the 2169 * row has been visibly updated by the owner or another and (2) updates 2170 * are detected. 2171 * @exception SQLException if an error occurs. 2172 */ 2173 public boolean rowUpdated() 2174 throws SQLException 2175 { 2176 boolean result = false; 2177 2178 ResultSet t_ResultSet = getResultSet(); 2179 2180 if (t_ResultSet != null) 2181 { 2182 result = t_ResultSet.rowUpdated(); 2183 } 2184 2185 return result; 2186 } 2187 2188 /*** 2189 * See ResultSet#updateAsciiStream(int,InputStream,int) 2190 * @see java.sql.ResultSet#updateAsciiStream(int,java.io.InputStream,int) 2191 * @param index (Taken from Sun's Javadoc) the first column 2192 * is 1, the second is 2, ... 2193 * @param value (Taken from Sun's Javadoc) the new column value. 2194 * @param length (Taken from Sun's Javadoc) the length of the stream. 2195 * @exception SQLException if an error occurs. 2196 */ 2197 public void updateAsciiStream( 2198 int index, 2199 InputStream value, 2200 int length) 2201 throws SQLException 2202 { 2203 ResultSet t_ResultSet = getResultSet(); 2204 2205 if (t_ResultSet != null) 2206 { 2207 t_ResultSet.updateAsciiStream(index, value, length); 2208 } 2209 } 2210 2211 /*** 2212 * See ResultSet#updateAsciiStream(String,InputStream,int) 2213 * @see java.sql.ResultSet#updateAsciiStream(java.lang.String,java.io.InputStream,int) 2214 * @param columnName (Taken from Sun's Javadoc) the SQL name of 2215 * the column. 2216 * @param value (Taken from Sun's Javadoc) the new column value. 2217 * @param length (Taken from Sun's Javadoc) the length of the stream. 2218 * @exception SQLException if an error occurs. 2219 */ 2220 public void updateAsciiStream( 2221 String columnName, 2222 InputStream value, 2223 int length) 2224 throws SQLException 2225 { 2226 ResultSet t_ResultSet = getResultSet(); 2227 2228 if (t_ResultSet != null) 2229 { 2230 t_ResultSet.updateAsciiStream(columnName, value, length); 2231 } 2232 } 2233 2234 /*** 2235 * See ResultSet#updateBigDecimal(int,BigDecimal) 2236 * @see java.sql.ResultSet#updateBigDecimal(int,java.math.BigDecimal) 2237 * @param index (Taken from Sun's Javadoc) the first column 2238 * is 1, the second is 2, ... 2239 * @param bigDecimal a <code>BigDecimal</code> value 2240 * @exception SQLException if an error occurs. 2241 */ 2242 public void updateBigDecimal(int index, BigDecimal value) 2243 throws SQLException 2244 { 2245 ResultSet t_ResultSet = getResultSet(); 2246 2247 if (t_ResultSet != null) 2248 { 2249 t_ResultSet.updateBigDecimal(index, value); 2250 } 2251 } 2252 2253 /*** 2254 * See ResultSet#updateBigDecimal(String,BigDecimal) 2255 * @see java.sql.ResultSet#updateBigDecimal(java.lang.String,java.math.BigDecimal) 2256 * @param columnName (Taken from Sun's Javadoc) the SQL name of 2257 * the column. 2258 * @param bigDecimal a <code>BigDecimal</code> value 2259 * @exception SQLException if an error occurs. 2260 */ 2261 public void updateBigDecimal(String columnName, BigDecimal value) 2262 throws SQLException 2263 { 2264 ResultSet t_ResultSet = getResultSet(); 2265 2266 if (t_ResultSet != null) 2267 { 2268 t_ResultSet.updateBigDecimal(columnName, value); 2269 } 2270 } 2271 2272 /*** 2273 * See ResultSet#updateBinaryStream(int,InputStream,int) 2274 * @see java.sql.ResultSet#updateBinaryStream(int,java.io.InputStream,int) 2275 * @param index (Taken from Sun's Javadoc) the first column 2276 * is 1, the second is 2, ... 2277 * @param value (Taken from Sun's Javadoc) the new column value. 2278 * @param length (Taken from Sun's Javadoc) the length of the stream. 2279 * @exception SQLException if an error occurs. 2280 */ 2281 public void updateBinaryStream( 2282 int index, 2283 InputStream value, 2284 int length) 2285 throws SQLException 2286 { 2287 ResultSet t_ResultSet = getResultSet(); 2288 2289 if (t_ResultSet != null) 2290 { 2291 t_ResultSet.updateBinaryStream(index, value, length); 2292 } 2293 } 2294 2295 /*** 2296 * See ResultSet#updateBinaryStream(String,InputStream,int) 2297 * @see java.sql.ResultSet#updateBinrayStream(java.lang.String,java.io.InputStream,int) 2298 * @param columnName (Taken from Sun's Javadoc) the SQL name of 2299 * the column. 2300 * @param value (Taken from Sun's Javadoc) the new column value. 2301 * @param length (Taken from Sun's Javadoc) the length of the stream. 2302 * @exception SQLException if an error occurs. 2303 */ 2304 public void updateBinaryStream( 2305 String columnName, 2306 InputStream value, 2307 int length) 2308 throws SQLException 2309 { 2310 ResultSet t_ResultSet = getResultSet(); 2311 2312 if (t_ResultSet != null) 2313 { 2314 t_ResultSet.updateBinaryStream(columnName, value, length); 2315 } 2316 } 2317 2318 /*** 2319 * See ResultSet#updateBoolean(int,boolean) 2320 * @see java.sql.ResultSet#updateBoolean(int,boolean) 2321 * @param index (Taken from Sun's Javadoc) the first column 2322 * is 1, the second is 2, ... 2323 * @param value (Taken from Sun's Javadoc) the new column value. 2324 * @exception SQLException if an error occurs. 2325 */ 2326 public void updateBoolean(int index, boolean value) 2327 throws SQLException 2328 { 2329 ResultSet t_ResultSet = getResultSet(); 2330 2331 if (t_ResultSet != null) 2332 { 2333 t_ResultSet.updateBoolean(index, value); 2334 } 2335 } 2336 2337 /*** 2338 * See ResultSet#updateBoolean(String,boolean) 2339 * @see java.sql.ResultSet#updateBoolean(java.lang.String,boolean) 2340 * @param columnName (Taken from Sun's Javadoc) the SQL name of 2341 * the column. 2342 * @param value (Taken from Sun's Javadoc) the new column value. 2343 * @exception SQLException if an error occurs. 2344 */ 2345 public void updateBoolean(String columnName, boolean value) 2346 throws SQLException 2347 { 2348 ResultSet t_ResultSet = getResultSet(); 2349 2350 if (t_ResultSet != null) 2351 { 2352 t_ResultSet.updateBoolean(columnName, value); 2353 } 2354 } 2355 2356 /*** 2357 * See ResultSet#updateByte(int,byte) 2358 * @see java.sql.ResultSet#updateByte(int,byte) 2359 * @param index (Taken from Sun's Javadoc) the first column 2360 * is 1, the second is 2, ... 2361 * @param value (Taken from Sun's Javadoc) the new column value. 2362 * @exception SQLException if an error occurs. 2363 */ 2364 public void updateByte(int index, byte value) 2365 throws SQLException 2366 { 2367 ResultSet t_ResultSet = getResultSet(); 2368 2369 if (t_ResultSet != null) 2370 { 2371 t_ResultSet.updateByte(index, value); 2372 } 2373 } 2374 2375 /*** 2376 * See ResultSet#updateByte(String,byte) 2377 * @see java.sql.ResultSet#updateByte(java.lang.String,byte) 2378 * @param columnName (Taken from Sun's Javadoc) the SQL name of 2379 * the column. 2380 * @param value (Taken from Sun's Javadoc) the new column value. 2381 * @exception SQLException if an error occurs. 2382 */ 2383 public void updateByte(String columnName, byte value) 2384 throws SQLException 2385 { 2386 ResultSet t_ResultSet = getResultSet(); 2387 2388 if (t_ResultSet != null) 2389 { 2390 t_ResultSet.updateByte(columnName, value); 2391 } 2392 } 2393 2394 /*** 2395 * See ResultSet#updateBytes(int,byte[]) 2396 * @see java.sql.ResultSet#updateBytes(int,byte[]) 2397 * @param index (Taken from Sun's Javadoc) the first column 2398 * is 1, the second is 2, ... 2399 * @param value (Taken from Sun's Javadoc) the new column value. 2400 * @exception SQLException if an error occurs. 2401 */ 2402 public void updateBytes(int index, byte[] value) 2403 throws SQLException 2404 { 2405 ResultSet t_ResultSet = getResultSet(); 2406 2407 if (t_ResultSet != null) 2408 { 2409 t_ResultSet.updateBytes(index, value); 2410 } 2411 } 2412 2413 /*** 2414 * See ResultSet#updateBytes(String,byte[]) 2415 * @see java.sql.ResultSet#updateBytes(java.lang.String,byte[]) 2416 * @param columnName (Taken from Sun's Javadoc) the SQL name of 2417 * the column. 2418 * @param value (Taken from Sun's Javadoc) the new column value. 2419 * @exception SQLException if an error occurs. 2420 */ 2421 public void updateBytes(String columnName, byte[] value) 2422 throws SQLException 2423 { 2424 ResultSet t_ResultSet = getResultSet(); 2425 2426 if (t_ResultSet != null) 2427 { 2428 t_ResultSet.updateBytes(columnName, value); 2429 } 2430 } 2431 2432 /*** 2433 * See ResultSet#updateCharacterStream(int,Reader,int) 2434 * @see java.sql.ResultSet#updateCharacterStream(int,java.io.Reader,int) 2435 * @param index (Taken from Sun's Javadoc) the first column 2436 * is 1, the second is 2, ... 2437 * @param value (Taken from Sun's Javadoc) the new column value. 2438 * @param length (Taken from Sun's Javadoc) the length of the stream. 2439 * @exception SQLException if an error occurs. 2440 */ 2441 public void updateCharacterStream(int index, Reader value, int length) 2442 throws SQLException 2443 { 2444 ResultSet t_ResultSet = getResultSet(); 2445 2446 if (t_ResultSet != null) 2447 { 2448 t_ResultSet.updateCharacterStream(index, value, length); 2449 } 2450 } 2451 2452 /*** 2453 * See ResultSet#updateCharacterStream(String,Reader,int) 2454 * @see java.sql.ResultSet#updateCharacterStream(java.lang.String,java.io.Reader,int) 2455 * @param columnName (Taken from Sun's Javadoc) the SQL name of 2456 * the column. 2457 * @param value (Taken from Sun's Javadoc) the new column value. 2458 * @param length (Taken from Sun's Javadoc) the length of the stream. 2459 * @exception SQLException if an error occurs. 2460 */ 2461 public void updateCharacterStream( 2462 String columnName, 2463 Reader value, 2464 int length) 2465 throws SQLException 2466 { 2467 ResultSet t_ResultSet = getResultSet(); 2468 2469 if (t_ResultSet != null) 2470 { 2471 t_ResultSet.updateCharacterStream(columnName, value, length); 2472 } 2473 } 2474 2475 /*** 2476 * See ResultSet#updateDate(int,Date) 2477 * @see java.sql.ResultSet#updateDate(int,java.sql.Date) 2478 * @param index (Taken from Sun's Javadoc) the first column 2479 * is 1, the second is 2, ... 2480 * @param value (Taken from Sun's Javadoc) the new column value. 2481 * @exception SQLException if an error occurs. 2482 */ 2483 public void updateDate(int index, Date value) 2484 throws SQLException 2485 { 2486 ResultSet t_ResultSet = getResultSet(); 2487 2488 if (t_ResultSet != null) 2489 { 2490 t_ResultSet.updateDate(index, value); 2491 } 2492 } 2493 2494 /*** 2495 * See ResultSet#updateDate(String,Date) 2496 * @see java.sql.ResultSet#updateDate(java.lang.String,java.sql.Date) 2497 * @param columnName (Taken from Sun's Javadoc) the SQL name of 2498 * the column. 2499 * @param value (Taken from Sun's Javadoc) the new column value. 2500 * @exception SQLException if an error occurs. 2501 */ 2502 public void updateDate(String columnName, Date value) 2503 throws SQLException 2504 { 2505 ResultSet t_ResultSet = getResultSet(); 2506 2507 if (t_ResultSet != null) 2508 { 2509 t_ResultSet.updateDate(columnName, value); 2510 } 2511 } 2512 2513 /*** 2514 * See ResultSet#updateDouble(int,double) 2515 * @see java.sql.ResultSet#updateDouble(int,double) 2516 * @param index (Taken from Sun's Javadoc) the first column 2517 * is 1, the second is 2, ... 2518 * @param value (Taken from Sun's Javadoc) the new column value. 2519 * @exception SQLException if an error occurs. 2520 */ 2521 public void updateDouble(int index, double value) 2522 throws SQLException 2523 { 2524 ResultSet t_ResultSet = getResultSet(); 2525 2526 if (t_ResultSet != null) 2527 { 2528 t_ResultSet.updateDouble(index, value); 2529 } 2530 } 2531 2532 /*** 2533 * See ResultSet#updateDouble(String,double) 2534 * @see java.sql.ResultSet#updateDouble(String,double) 2535 * @param columnName (Taken from Sun's Javadoc) the SQL name of 2536 * the column. 2537 * @param value (Taken from Sun's Javadoc) the new column value. 2538 * @exception SQLException if an error occurs. 2539 */ 2540 public void updateDouble(String columnName, double value) 2541 throws SQLException 2542 { 2543 ResultSet t_ResultSet = getResultSet(); 2544 2545 if (t_ResultSet != null) 2546 { 2547 t_ResultSet.updateDouble(columnName, value); 2548 } 2549 } 2550 2551 /*** 2552 * See ResultSet#updateFloat(int,float) 2553 * @see java.sql.ResultSet#updateFloat(int,float) 2554 * @param index (Taken from Sun's Javadoc) the first column 2555 * is 1, the second is 2, ... 2556 * @param value (Taken from Sun's Javadoc) the new column value. 2557 * @exception SQLException if an error occurs. 2558 */ 2559 public void updateFloat(int index, float value) 2560 throws SQLException 2561 { 2562 ResultSet t_ResultSet = getResultSet(); 2563 2564 if (t_ResultSet != null) 2565 { 2566 t_ResultSet.updateFloat(index, value); 2567 } 2568 } 2569 2570 /*** 2571 * See ResultSet#updateFloat(String,float) 2572 * @see java.sql.ResultSet#updateFloat(String,float) 2573 * @param columnName (Taken from Sun's Javadoc) the SQL name of 2574 * the column. 2575 * @param value (Taken from Sun's Javadoc) the new column value. 2576 * @exception SQLException if an error occurs 2577 */ 2578 public void updateFloat(String columnName, float value) 2579 throws SQLException 2580 { 2581 ResultSet t_ResultSet = getResultSet(); 2582 2583 if (t_ResultSet != null) 2584 { 2585 t_ResultSet.updateFloat(columnName, value); 2586 } 2587 } 2588 2589 /*** 2590 * See ResultSet#updateInt(int,int) 2591 * @see java.sql.ResultSet#updateInt(int,int) 2592 * @param index (Taken from Sun's Javadoc) the first column 2593 * is 1, the second is 2, ... 2594 * @param value (Taken from Sun's Javadoc) the new column value. 2595 * @exception SQLException if an error occurs. 2596 */ 2597 public void updateInt(int index, int value) 2598 throws SQLException 2599 { 2600 ResultSet t_ResultSet = getResultSet(); 2601 2602 if (t_ResultSet != null) 2603 { 2604 t_ResultSet.updateInt(index, value); 2605 } 2606 } 2607 2608 /*** 2609 * See ResultSet#updateInt(String,int) 2610 * @see java.sql.ResultSet#updateInt(java.lang.String,int) 2611 * @param columnName (Taken from Sun's Javadoc) the SQL name of 2612 * the column. 2613 * @param value (Taken from Sun's Javadoc) the new column value. 2614 * @exception SQLException if an error occurs. 2615 */ 2616 public void updateInt(String columnName, int value) 2617 throws SQLException 2618 { 2619 ResultSet t_ResultSet = getResultSet(); 2620 2621 if (t_ResultSet != null) 2622 { 2623 t_ResultSet.updateInt(columnName, value); 2624 } 2625 } 2626 2627 /*** 2628 * See ResultSet#updateLong(int,long) 2629 * @see java.sql.ResultSet#updateLong(int,long) 2630 * @param index (Taken from Sun's Javadoc) the first column 2631 * is 1, the second is 2, ... 2632 * @param value (Taken from Sun's Javadoc) the new column value. 2633 * @exception SQLException if an error occurs. 2634 */ 2635 public void updateLong(int index, long value) 2636 throws SQLException 2637 { 2638 ResultSet t_ResultSet = getResultSet(); 2639 2640 if (t_ResultSet != null) 2641 { 2642 t_ResultSet.updateLong(index, value); 2643 } 2644 } 2645 2646 /*** 2647 * See ResultSet#updateLong(String,long) 2648 * @see java.sql.ResultSet#updateLong(java.lang.String,long) 2649 * @param columnName (Taken from Sun's Javadoc) the SQL name of 2650 * the column. 2651 * @param value (Taken from Sun's Javadoc) the new column value. 2652 * @exception SQLException if an error occurs 2653 */ 2654 public void updateLong(String columnName, long value) 2655 throws SQLException 2656 { 2657 ResultSet t_ResultSet = getResultSet(); 2658 2659 if (t_ResultSet != null) 2660 { 2661 t_ResultSet.updateLong(columnName, value); 2662 } 2663 } 2664 2665 /*** 2666 * See ResultSet#updateNull(int) 2667 * @see java.sql.ResultSet#updateNull(int) 2668 * @param index (Taken from Sun's Javadoc) the first column 2669 * is 1, the second is 2, ... 2670 * 2671 * @exception SQLException if an error occurs. 2672 */ 2673 public void updateNull(int index) 2674 throws SQLException 2675 { 2676 ResultSet t_ResultSet = getResultSet(); 2677 2678 if (t_ResultSet != null) 2679 { 2680 t_ResultSet.updateNull(index); 2681 } 2682 } 2683 2684 /*** 2685 * See ResultSet#updateNull(String) 2686 * @see java.sql.ResultSet#updateNull(java.lang.String) 2687 * @param columnName (Taken from Sun's Javadoc) the SQL name of 2688 * the column. 2689 * @exception SQLException if an error occurs. 2690 */ 2691 public void updateNull(String columnName) 2692 throws SQLException 2693 { 2694 ResultSet t_ResultSet = getResultSet(); 2695 2696 if (t_ResultSet != null) 2697 { 2698 t_ResultSet.updateNull(columnName); 2699 } 2700 } 2701 2702 /*** 2703 * See ResultSet#updateObject(int,Object,int) 2704 * @see java.sql.ResultSet#updateObject(int,java.lang.Object,int) 2705 * @param index (Taken from Sun's Javadoc) the first column 2706 * is 1, the second is 2, ... 2707 * @param value (Taken from Sun's Javadoc) the new column value. 2708 * @param scale (Taken from Sun's Javadoc) for java.sql.Types.DECIMA 2709 * or java.sql.Types.NUMERIC types, this is the number of digits after 2710 * the decimal point. For all other types this value will be ignored. 2711 * @exception SQLException if an error occurs. 2712 */ 2713 public void updateObject(int index, Object value, int scale) 2714 throws SQLException 2715 { 2716 ResultSet t_ResultSet = getResultSet(); 2717 2718 if (t_ResultSet != null) 2719 { 2720 t_ResultSet.updateObject(index, value, scale); 2721 } 2722 } 2723 2724 /*** 2725 * See ResultSet#updateObject(int,Object) 2726 * @see java.sql.ResultSet#updateObject(int,java.lang.Object) 2727 * @param index (Taken from Sun's Javadoc) the first column 2728 * is 1, the second is 2, ... 2729 * @param value (Taken from Sun's Javadoc) the new column value. 2730 * @exception SQLException if an error occurs. 2731 */ 2732 public void updateObject(int index, Object value) 2733 throws SQLException 2734 { 2735 ResultSet t_ResultSet = getResultSet(); 2736 2737 if (t_ResultSet != null) 2738 { 2739 t_ResultSet.updateObject(index, value); 2740 } 2741 } 2742 2743 /*** 2744 * See ResultSet#updateObject(String,Object,int) 2745 * @see java.sql.ResultSet#updateObject(java.lang.String,java.lang.Object,int) 2746 * @param columnName (Taken from Sun's Javadoc) the SQL name of 2747 * the column. 2748 * @param value (Taken from Sun's Javadoc) the new column value. 2749 * @param scale (Taken from Sun's Javadoc) for java.sql.Types.DECIMA 2750 * or java.sql.Types.NUMERIC types, this is the number of digits after 2751 * the decimal point. For all other types this value will be ignored. 2752 * @exception SQLException if an error occurs. 2753 */ 2754 public void updateObject(String columnName, Object value, int scale) 2755 throws SQLException 2756 { 2757 ResultSet t_ResultSet = getResultSet(); 2758 2759 if (t_ResultSet != null) 2760 { 2761 t_ResultSet.updateObject(columnName, value, scale); 2762 } 2763 } 2764 2765 /*** 2766 * See ResultSet#updateObject(String,Object) 2767 * @see java.sql.ResultSet#updateObject(java.lang.String,java.lang.Object) 2768 * @param columnName (Taken from Sun's Javadoc) the SQL name of 2769 * the column. 2770 * @param value (Taken from Sun's Javadoc) the new column value. 2771 * @exception SQLException if an error occurs. 2772 */ 2773 public void updateObject(String columnName, Object value) 2774 throws SQLException 2775 { 2776 ResultSet t_ResultSet = getResultSet(); 2777 2778 if (t_ResultSet != null) 2779 { 2780 t_ResultSet.updateObject(columnName, value); 2781 } 2782 } 2783 2784 /*** 2785 * See ResultSet#updateRow() 2786 * @see java.sql.ResultSet#updateRow() 2787 * @exception SQLException if an error occurs. 2788 */ 2789 public void updateRow() 2790 throws SQLException 2791 { 2792 ResultSet t_ResultSet = getResultSet(); 2793 2794 if (t_ResultSet != null) 2795 { 2796 t_ResultSet.updateRow(); 2797 } 2798 } 2799 2800 /*** 2801 * See ResultSet#updateShort(int,short) 2802 * @see java.sql.ResultSet#updateShort(int,short) 2803 * @param index (Taken from Sun's Javadoc) the first column 2804 * is 1, the second is 2, ... 2805 * @param value (Taken from Sun's Javadoc) the new column value. 2806 * @exception SQLException if an error occurs. 2807 */ 2808 public void updateShort(int index, short value) 2809 throws SQLException 2810 { 2811 ResultSet t_ResultSet = getResultSet(); 2812 2813 if (t_ResultSet != null) 2814 { 2815 t_ResultSet.updateShort(index, value); 2816 } 2817 } 2818 2819 /*** 2820 * See ResultSet#updateShort(String,short) 2821 * @see java.sql.ResultSet#updateShort(java.lang.String,short) 2822 * @param columnName (Taken from Sun's Javadoc) the SQL name of 2823 * the column. 2824 * @param value (Taken from Sun's Javadoc) the new column value. 2825 * @exception SQLException if an error occurs. 2826 */ 2827 public void updateShort(String columnName, short value) 2828 throws SQLException 2829 { 2830 ResultSet t_ResultSet = getResultSet(); 2831 2832 if (t_ResultSet != null) 2833 { 2834 t_ResultSet.updateShort(columnName, value); 2835 } 2836 } 2837 2838 /*** 2839 * See ResultSet#updateString(int,String) 2840 * @see java.sql.ResultSet#updateString(int,java.lang.String) 2841 * @param index (Taken from Sun's Javadoc) the first column 2842 * is 1, the second is 2, ... 2843 * @param value (Taken from Sun's Javadoc) the new column value. 2844 * @exception SQLException if an error occurs. 2845 */ 2846 public void updateString(int index, String value) 2847 throws SQLException 2848 { 2849 ResultSet t_ResultSet = getResultSet(); 2850 2851 if (t_ResultSet != null) 2852 { 2853 t_ResultSet.updateString(index, value); 2854 } 2855 } 2856 2857 /*** 2858 * See ResultSet#updateString(String,String) 2859 * @see java.sql.ResultSet#updateString(java.lang.String,java.lang.String) 2860 * @param columnName (Taken from Sun's Javadoc) the SQL name of 2861 * the column. 2862 * @param value (Taken from Sun's Javadoc) the new column value. 2863 * @exception SQLException if an error occurs. 2864 */ 2865 public void updateString(String columnName, String value) 2866 throws SQLException 2867 { 2868 ResultSet t_ResultSet = getResultSet(); 2869 2870 if (t_ResultSet != null) 2871 { 2872 t_ResultSet.updateString(columnName, value); 2873 } 2874 } 2875 2876 /*** 2877 * See ResultSet#updateTime(int,Time) 2878 * @see java.sql.ResultSet#updateTime(int,java.sql.Time) 2879 * @param index (Taken from Sun's Javadoc) the first column 2880 * is 1, the second is 2, ... 2881 * @param value (Taken from Sun's Javadoc) the new column value. 2882 * @exception SQLException if an error occurs. 2883 */ 2884 public void updateTime(int index, Time value) 2885 throws SQLException 2886 { 2887 ResultSet t_ResultSet = getResultSet(); 2888 2889 if (t_ResultSet != null) 2890 { 2891 t_ResultSet.updateTime(index, value); 2892 } 2893 } 2894 2895 /*** 2896 * See ResultSet#updateTime(String,Time) 2897 * @see java.sql.ResultSet#updateTime(java.lang.String,java.sql.Time) 2898 * @param columnName (Taken from Sun's Javadoc) the SQL name of 2899 * the column. 2900 * @param value (Taken from Sun's Javadoc) the new column value. 2901 * @exception SQLException if an error occurs. 2902 */ 2903 public void updateTime(String columnName, Time value) 2904 throws SQLException 2905 { 2906 ResultSet t_ResultSet = getResultSet(); 2907 2908 if (t_ResultSet != null) 2909 { 2910 t_ResultSet.updateTime(columnName, value); 2911 } 2912 } 2913 2914 /*** 2915 * See ResultSet#updateTimestamp(int,Timestamp) 2916 * @see java.sql.ResultSet#updateTimestamp(int,java.sql.Timestamp) 2917 * @param index (Taken from Sun's Javadoc) the first column 2918 * is 1, the second is 2, ... 2919 * @param value (Taken from Sun's Javadoc) the new column value. 2920 * @exception SQLException if an error occurs. 2921 */ 2922 public void updateTimestamp(int index, Timestamp value) 2923 throws SQLException 2924 { 2925 ResultSet t_ResultSet = getResultSet(); 2926 2927 if (t_ResultSet != null) 2928 { 2929 t_ResultSet.updateTimestamp(index, value); 2930 } 2931 } 2932 2933 /*** 2934 * See ResultSet#updateTimestamp(String,Timestamp) 2935 * @see java.sql.ResultSet#updateTimestamp(java.lang.String,java.sql.Timestamp) 2936 * @param columnName (Taken from Sun's Javadoc) the SQL name of 2937 * the column. 2938 * @param value (Taken from Sun's Javadoc) the new column value. 2939 * @exception SQLException if an error occurs. 2940 */ 2941 public void updateTimestamp(String columnName, Timestamp value) 2942 throws SQLException 2943 { 2944 ResultSet t_ResultSet = getResultSet(); 2945 2946 if (t_ResultSet != null) 2947 { 2948 t_ResultSet.updateTimestamp(columnName, value); 2949 } 2950 } 2951 2952 // New methods from JDK 1.4 // 2953 2954 /*** 2955 * See ResultSet#getURL(int) 2956 * @see java.sql.ResultSet#getURL(int) 2957 * @param columnIndex (Taken from Sun's Javadoc) the index of the column 2958 * 1 is the first, 2 is the second,... 2959 * @return (Taken from Sun's Javadoc) the column value as a java.net.URL 2960 * object; if the value is SQL NULL, the value returned is null in the 2961 * Java programming language. 2962 * @exception SQLException if an error occurs. 2963 */ 2964 public URL getURL(int columnIndex) 2965 throws SQLException 2966 { 2967 URL result = null; 2968 2969 ResultSet t_ResultSet = getResultSet(); 2970 2971 if (t_ResultSet != null) 2972 { 2973 result = t_ResultSet.getURL(columnIndex); 2974 } 2975 2976 return result; 2977 } 2978 2979 /*** 2980 * See ResultSet#getURL(String) 2981 * @see java.sql.ResultSet#getURL(java.lang.String) 2982 * @param columnName (Taken from Sun's Javadoc) the SQL name of the column. 2983 * @return (Taken from Sun's Javadoc) the column value as a java.net.URL 2984 * object; if the value is SQL NULL, the value returned is null in the 2985 * Java programming language. 2986 * @exception SQLException if an error occurs. 2987 */ 2988 public URL getURL(String columnName) 2989 throws SQLException 2990 { 2991 URL result = null; 2992 2993 ResultSet t_ResultSet = getResultSet(); 2994 2995 if (t_ResultSet != null) 2996 { 2997 result = t_ResultSet.getURL(columnName); 2998 } 2999 3000 return result; 3001 } 3002 3003 /*** 3004 * See ResultSet#updateRef(int,Ref) 3005 * @see java.sql.ResultSet#updateRef(int,java.sql.Ref) 3006 * @param columnIndex (Taken from Sun's Javadoc) the index of the column 3007 * 1 is the first, 2 is the second,... 3008 * @param value (Taken from Sun's Javadoc) the new column value. 3009 * @exception SQLException if an error occurs. 3010 */ 3011 public void updateRef(int columnIndex, Ref value) 3012 throws SQLException 3013 { 3014 ResultSet t_ResultSet = getResultSet(); 3015 3016 if (t_ResultSet != null) 3017 { 3018 t_ResultSet.updateRef(columnIndex, value); 3019 } 3020 } 3021 3022 /*** 3023 * See ResultSet#updateRef(String,Ref) 3024 * @see java.sql.ResultSet#updateRef(java.lang.String,java.sql.Ref) 3025 * @param columnName (Taken from Sun's Javadoc) the SQL name of the column. 3026 * @param value (Taken from Sun's Javadoc) the new column value. 3027 * @exception SQLException if an error occurs. 3028 */ 3029 public void updateRef(String columnName, Ref value) 3030 throws SQLException 3031 { 3032 ResultSet t_ResultSet = getResultSet(); 3033 3034 if (t_ResultSet != null) 3035 { 3036 t_ResultSet.updateRef(columnName, value); 3037 } 3038 } 3039 3040 /*** 3041 * See ResultSet#updateBlob(int,Blob) 3042 * @see java.sql.ResultSet#updateBlob(int,java.sql.Blob) 3043 * @param columnIndex (Taken from Sun's Javadoc) the index of the column 3044 * 1 is the first, 2 is the second,... 3045 * @param value (Taken from Sun's Javadoc) the new column value. 3046 * @exception SQLException if an error occurs. 3047 */ 3048 public void updateBlob(int columnIndex, Blob value) 3049 throws SQLException 3050 { 3051 ResultSet t_ResultSet = getResultSet(); 3052 3053 if (t_ResultSet != null) 3054 { 3055 t_ResultSet.updateBlob(columnIndex, value); 3056 } 3057 } 3058 3059 /*** 3060 * See ResultSet#updateBlob(String,Blob) 3061 * @see java.sql.ResultSet#updateBlob(java.lang.String,java.sql.Blob) 3062 * @param columnName (Taken from Sun's Javadoc) the SQL name of the column. 3063 * @param value (Taken from Sun's Javadoc) the new column value. 3064 * @exception SQLException if an error occurs. 3065 */ 3066 public void updateBlob(String columnName, Blob value) 3067 throws SQLException 3068 { 3069 ResultSet t_ResultSet = getResultSet(); 3070 3071 if (t_ResultSet != null) 3072 { 3073 t_ResultSet.updateBlob(columnName, value); 3074 } 3075 } 3076 3077 3078 /*** 3079 * See ResultSet#updateClob(int,Clob) 3080 * @see java.sql.ResultSet#updateClob(int,java.sql.Clob) 3081 * @param columnIndex (Taken from Sun's Javadoc) the index of the column 3082 * 1 is the first, 2 is the second,... 3083 * @param value (Taken from Sun's Javadoc) the new column value. 3084 * @exception SQLException if an error occurs. 3085 */ 3086 public void updateClob(int columnIndex, Clob value) 3087 throws SQLException 3088 { 3089 ResultSet t_ResultSet = getResultSet(); 3090 3091 if (t_ResultSet != null) 3092 { 3093 t_ResultSet.updateClob(columnIndex, value); 3094 } 3095 } 3096 3097 /*** 3098 * See ResultSet#updateClob(String,Clob) 3099 * @see java.sql.ResultSet#updateClob(java.lang.String,java.sql.Clob) 3100 * @param columnName (Taken from Sun's Javadoc) the SQL name of the column. 3101 * @param value (Taken from Sun's Javadoc) the new column value. 3102 * @exception SQLException if an error occurs. 3103 */ 3104 public void updateClob(String columnName, Clob value) 3105 throws SQLException 3106 { 3107 ResultSet t_ResultSet = getResultSet(); 3108 3109 if (t_ResultSet != null) 3110 { 3111 t_ResultSet.updateClob(columnName, value); 3112 } 3113 } 3114 3115 3116 /*** 3117 * See ResultSet#updateArray(int,Array) 3118 * @see java.sql.ResultSet#updateArray(int,java.sql.Array) 3119 * @param columnIndex (Taken from Sun's Javadoc) the index of the column 3120 * 1 is the first, 2 is the second,... 3121 * @param value (Taken from Sun's Javadoc) the new column value. 3122 * @exception SQLException if an error occurs. 3123 */ 3124 public void updateArray(int columnIndex, Array value) 3125 throws SQLException 3126 { 3127 ResultSet t_ResultSet = getResultSet(); 3128 3129 if (t_ResultSet != null) 3130 { 3131 t_ResultSet.updateArray(columnIndex, value); 3132 } 3133 } 3134 3135 /*** 3136 * See ResultSet#updateArray(String,Array) 3137 * @see java.sql.ResultSet#updateArray(java.lang.String,java.sql.Array) 3138 * @param columnName (Taken from Sun's Javadoc) the SQL name of the column. 3139 * @param value (Taken from Sun's Javadoc) the new column value. 3140 * @exception SQLException if an error occurs. 3141 */ 3142 public void updateArray(String columnName, Array value) 3143 throws SQLException 3144 { 3145 ResultSet t_ResultSet = getResultSet(); 3146 3147 if (t_ResultSet != null) 3148 { 3149 t_ResultSet.updateArray(columnName, value); 3150 } 3151 } 3152 3153 // Helper ResultSet methods // 3154 3155 /*** 3156 * Retrieves a byte array value using the field reference. 3157 * @param field the field. 3158 * @return (Taken from Sun's Javadoc) the column value; if 3159 * the value is SQL NULL, the value returned is null. 3160 * @exception SQLException if an error occurs. 3161 */ 3162 public byte[] getBytes(Field field) 3163 throws SQLException 3164 { 3165 byte[] result = null; 3166 3167 SelectQuery t_Query = getQuery(); 3168 3169 if (t_Query != null) 3170 { 3171 int t_iFieldIndex = t_Query.getFieldIndex(field); 3172 3173 ResultSet t_ResultSet = getResultSet(); 3174 3175 if (t_ResultSet != null) 3176 { 3177 result = t_ResultSet.getBytes(t_iFieldIndex); 3178 } 3179 } 3180 3181 return result; 3182 } 3183 3184 /*** 3185 * Retrieves a boolean value using the field reference. 3186 * @param field the field. 3187 * @return (Taken from Sun's Javadoc) the column value; if 3188 * the value is SQL NULL, the value returned is <code>false</code>. 3189 * @exception SQLException if an error occurs. 3190 */ 3191 public boolean getBoolean(Field field) 3192 throws SQLException 3193 { 3194 boolean result = false; 3195 3196 SelectQuery t_Query = getQuery(); 3197 3198 if (t_Query != null) 3199 { 3200 int t_iFieldIndex = t_Query.getFieldIndex(field); 3201 3202 ResultSet t_ResultSet = getResultSet(); 3203 3204 if (t_ResultSet != null) 3205 { 3206 result = t_ResultSet.getBoolean(t_iFieldIndex); 3207 } 3208 } 3209 3210 return result; 3211 } 3212 3213 /*** 3214 * Retrieves a boolean value using the field reference. 3215 * @param field the field. 3216 * @return (Taken from Sun's Javadoc) the column value; if 3217 * the value is SQL NULL, the value returned is 0. 3218 * @exception SQLException if an error occurs. 3219 */ 3220 public long getLong(Field field) 3221 throws SQLException 3222 { 3223 long result = 0; 3224 3225 SelectQuery t_Query = getQuery(); 3226 3227 if (t_Query != null) 3228 { 3229 int t_iFieldIndex = t_Query.getFieldIndex(field); 3230 3231 ResultSet t_ResultSet = getResultSet(); 3232 3233 if (t_ResultSet != null) 3234 { 3235 result = t_ResultSet.getLong(t_iFieldIndex); 3236 } 3237 } 3238 3239 return result; 3240 } 3241 3242 /*** 3243 * Retrieves an object value using the field reference. 3244 * @param field the field. 3245 * @exception SQLException if an error occurs. 3246 */ 3247 public Object getObject(Field field) 3248 throws SQLException 3249 { 3250 Object result = null; 3251 3252 SelectQuery t_Query = getQuery(); 3253 3254 if (t_Query != null) 3255 { 3256 int t_iFieldIndex = t_Query.getFieldIndex(field); 3257 3258 ResultSet t_ResultSet = getResultSet(); 3259 3260 if (t_ResultSet != null) 3261 { 3262 result = t_ResultSet.getObject(t_iFieldIndex); 3263 } 3264 } 3265 3266 return result; 3267 } 3268 3269 /*** 3270 * Retrieves an object value using the field reference. 3271 * @param field the field. 3272 * @param map (Taken from Sun's Javadoc) a java.util.Map object that 3273 * contains the mapping from SQL type names to classes in the Java 3274 * programming language. 3275 * @return (Taken from Sun's Javadoc) the column value; if 3276 * the value is SQL NULL, the value returned is null. 3277 * @exception SQLException if an error occurs. 3278 */ 3279 public Object getObject(Field field, Map map) 3280 throws SQLException 3281 { 3282 Object result = null; 3283 3284 SelectQuery t_Query = getQuery(); 3285 3286 if (t_Query != null) 3287 { 3288 int t_iFieldIndex = t_Query.getFieldIndex(field); 3289 3290 ResultSet t_ResultSet = getResultSet(); 3291 3292 if (t_ResultSet != null) 3293 { 3294 result = t_ResultSet.getObject(t_iFieldIndex, map); 3295 } 3296 } 3297 3298 return result; 3299 } 3300 3301 /*** 3302 * Retrieves a Ref value using the field reference. 3303 * @param field the field. 3304 * @return (Taken from Sun's Javadoc) the column value; if 3305 * the value is SQL NULL, the value returned is null. 3306 * @exception SQLException if an error occurs. 3307 */ 3308 public Ref getRef(Field field) 3309 throws SQLException 3310 { 3311 Ref result = null; 3312 3313 SelectQuery t_Query = getQuery(); 3314 3315 if (t_Query != null) 3316 { 3317 int t_iFieldIndex = t_Query.getFieldIndex(field); 3318 3319 ResultSet t_ResultSet = getResultSet(); 3320 3321 if (t_ResultSet != null) 3322 { 3323 result = t_ResultSet.getRef(t_iFieldIndex); 3324 } 3325 } 3326 3327 return result; 3328 } 3329 3330 /*** 3331 * Retrieves a Time value using the field reference. 3332 * @param field the field. 3333 * @return (Taken from Sun's Javadoc) the column value; if 3334 * the value is SQL NULL, the value returned is null. 3335 * @exception SQLException if an error occurs. 3336 */ 3337 public Time getTime(Field field) 3338 throws SQLException 3339 { 3340 Time result = null; 3341 3342 SelectQuery t_Query = getQuery(); 3343 3344 if (t_Query != null) 3345 { 3346 int t_iFieldIndex = t_Query.getFieldIndex(field); 3347 3348 ResultSet t_ResultSet = getResultSet(); 3349 3350 if (t_ResultSet != null) 3351 { 3352 result = t_ResultSet.getTime(t_iFieldIndex); 3353 } 3354 } 3355 3356 return result; 3357 } 3358 3359 /*** 3360 * Retrieves a Time value using the field reference. 3361 * @param field the field. 3362 * @param calendar (Taken from Sun's Javadoc) the java.util.Calendar 3363 * object to use in constructing the time. 3364 * @return (Taken from Sun's Javadoc) the column value; if 3365 * the value is SQL NULL, the value returned is null. 3366 * @exception SQLException if an error occurs. 3367 */ 3368 public Time getTime(Field field, Calendar calendar) 3369 throws SQLException 3370 { 3371 Time result = null; 3372 3373 SelectQuery t_Query = getQuery(); 3374 3375 if (t_Query != null) 3376 { 3377 int t_iFieldIndex = t_Query.getFieldIndex(field); 3378 3379 ResultSet t_ResultSet = getResultSet(); 3380 3381 if (t_ResultSet != null) 3382 { 3383 result = t_ResultSet.getTime(t_iFieldIndex, calendar); 3384 } 3385 } 3386 3387 return result; 3388 } 3389 3390 /*** 3391 * Retrieves a Date value using the field reference. 3392 * @param field the field. 3393 * @exception SQLException if an error occurs. 3394 */ 3395 public Date getDate(Field field) 3396 throws SQLException 3397 { 3398 Date result = null; 3399 3400 SelectQuery t_Query = getQuery(); 3401 3402 if (t_Query != null) 3403 { 3404 int t_iFieldIndex = t_Query.getFieldIndex(field); 3405 3406 ResultSet t_ResultSet = getResultSet(); 3407 3408 if (t_ResultSet != null) 3409 { 3410 result = t_ResultSet.getDate(t_iFieldIndex); 3411 } 3412 } 3413 3414 return result; 3415 } 3416 3417 /*** 3418 * Retrieves a Date value using the field reference. 3419 * @param field the field. 3420 * @param calendar (Taken from Sun's Javadoc) the java.util.Calendar 3421 * object to use in constructing the time. 3422 * @return (Taken from Sun's Javadoc) the column value; if 3423 * the value is SQL NULL, the value returned is null. 3424 * @exception SQLException if an error occurs. 3425 */ 3426 public Date getDate(Field field, Calendar calendar) 3427 throws SQLException 3428 { 3429 Date result = null; 3430 3431 SelectQuery t_Query = getQuery(); 3432 3433 if (t_Query != null) 3434 { 3435 int t_iFieldIndex = t_Query.getFieldIndex(field); 3436 3437 ResultSet t_ResultSet = getResultSet(); 3438 3439 if (t_ResultSet != null) 3440 { 3441 result = t_ResultSet.getDate(t_iFieldIndex, calendar); 3442 } 3443 } 3444 3445 return result; 3446 } 3447 3448 /*** 3449 * Retrieves a byte value using the field reference. 3450 * @param field the field. 3451 * @exception SQLException if an error occurs. 3452 */ 3453 public byte getByte(Field field) 3454 throws SQLException 3455 { 3456 byte result = 0; 3457 3458 SelectQuery t_Query = getQuery(); 3459 3460 if (t_Query != null) 3461 { 3462 int t_iFieldIndex = t_Query.getFieldIndex(field); 3463 3464 ResultSet t_ResultSet = getResultSet(); 3465 3466 if (t_ResultSet != null) 3467 { 3468 result = t_ResultSet.getByte(t_iFieldIndex); 3469 } 3470 } 3471 3472 return result; 3473 } 3474 3475 /*** 3476 * Retrieves a short value using the field reference. 3477 * @param field the field. 3478 * @exception SQLException if an error occurs. 3479 */ 3480 public short getShort(Field field) 3481 throws SQLException 3482 { 3483 short result = 0; 3484 3485 SelectQuery t_Query = getQuery(); 3486 3487 if (t_Query != null) 3488 { 3489 int t_iFieldIndex = t_Query.getFieldIndex(field); 3490 3491 ResultSet t_ResultSet = getResultSet(); 3492 3493 if (t_ResultSet != null) 3494 { 3495 result = t_ResultSet.getShort(t_iFieldIndex); 3496 } 3497 } 3498 3499 return result; 3500 } 3501 3502 /*** 3503 * Retrieves an integer value using the field reference. 3504 * @param field the field. 3505 * @exception SQLException if an error occurs. 3506 */ 3507 public int getInt(Field field) 3508 throws SQLException 3509 { 3510 int result = 0; 3511 3512 SelectQuery t_Query = getQuery(); 3513 3514 if (t_Query != null) 3515 { 3516 int t_iFieldIndex = t_Query.getFieldIndex(field); 3517 3518 ResultSet t_ResultSet = getResultSet(); 3519 3520 if (t_ResultSet != null) 3521 { 3522 result = t_ResultSet.getInt(t_iFieldIndex); 3523 } 3524 } 3525 3526 return result; 3527 } 3528 3529 /*** 3530 * Retrieves a float value using the field reference. 3531 * @param field the field. 3532 * @exception SQLException if an error occurs. 3533 */ 3534 public float getFloat(Field field) 3535 throws SQLException 3536 { 3537 float result = 0; 3538 3539 SelectQuery t_Query = getQuery(); 3540 3541 if (t_Query != null) 3542 { 3543 int t_iFieldIndex = t_Query.getFieldIndex(field); 3544 3545 ResultSet t_ResultSet = getResultSet(); 3546 3547 if (t_ResultSet != null) 3548 { 3549 result = t_ResultSet.getFloat(t_iFieldIndex); 3550 } 3551 } 3552 3553 return result; 3554 } 3555 3556 /*** 3557 * Retrieves a double value using the field reference. 3558 * @param field the field. 3559 * @return (Taken from Sun's Javadoc) the column value; if 3560 * the value is SQL NULL, the value returned is 0. 3561 * @exception SQLException if an error occurs. 3562 */ 3563 public double getDouble(Field field) 3564 throws SQLException 3565 { 3566 double result = 0; 3567 3568 SelectQuery t_Query = getQuery(); 3569 3570 if (t_Query != null) 3571 { 3572 int t_iFieldIndex = t_Query.getFieldIndex(field); 3573 3574 ResultSet t_ResultSet = getResultSet(); 3575 3576 if (t_ResultSet != null) 3577 { 3578 result = t_ResultSet.getDouble(t_iFieldIndex); 3579 } 3580 } 3581 3582 return result; 3583 } 3584 3585 /*** 3586 * Retrieves a text value using the field reference. 3587 * @param field the field. 3588 * @exception SQLException if an error occurs. 3589 */ 3590 public String getString(Field field) 3591 throws SQLException 3592 { 3593 String result = null; 3594 3595 SelectQuery t_Query = getQuery(); 3596 3597 if (t_Query != null) 3598 { 3599 int t_iFieldIndex = t_Query.getFieldIndex(field); 3600 3601 ResultSet t_ResultSet = getResultSet(); 3602 3603 if (t_ResultSet != null) 3604 { 3605 result = t_ResultSet.getString(t_iFieldIndex); 3606 } 3607 } 3608 3609 return result; 3610 } 3611 3612 /*** 3613 * Retrieves an array value using the field reference. 3614 * @param field the field. 3615 * @exception SQLException if an error occurs. 3616 */ 3617 public Array getArray(Field field) 3618 throws SQLException 3619 { 3620 Array result = null; 3621 3622 SelectQuery t_Query = getQuery(); 3623 3624 if (t_Query != null) 3625 { 3626 int t_iFieldIndex = t_Query.getFieldIndex(field); 3627 3628 ResultSet t_ResultSet = getResultSet(); 3629 3630 if (t_ResultSet != null) 3631 { 3632 result = t_ResultSet.getArray(t_iFieldIndex); 3633 } 3634 } 3635 3636 return result; 3637 } 3638 3639 /*** 3640 * Retrieves an ASCII stream using the field reference. 3641 * @param field the field. 3642 * @exception SQLException if an error occurs. 3643 */ 3644 public InputStream getAsciiStream(Field field) 3645 throws SQLException 3646 { 3647 InputStream result = null; 3648 3649 SelectQuery t_Query = getQuery(); 3650 3651 if (t_Query != null) 3652 { 3653 int t_iFieldIndex = t_Query.getFieldIndex(field); 3654 3655 ResultSet t_ResultSet = getResultSet(); 3656 3657 if (t_ResultSet != null) 3658 { 3659 result = t_ResultSet.getAsciiStream(t_iFieldIndex); 3660 } 3661 } 3662 3663 return result; 3664 } 3665 3666 /*** 3667 * Retrieves a BigDecimal value using the field reference. 3668 * @param field the field. 3669 * @param scale (Taken from Sun's Javadoc) the number of digits to the 3670 * right of the decimal point. 3671 * @exception SQLException if an error occurs. 3672 */ 3673 public BigDecimal getBigDecimal(Field field, int scale) 3674 throws SQLException 3675 { 3676 BigDecimal result = null; 3677 3678 SelectQuery t_Query = getQuery(); 3679 3680 if (t_Query != null) 3681 { 3682 int t_iFieldIndex = t_Query.getFieldIndex(field); 3683 3684 ResultSet t_ResultSet = getResultSet(); 3685 3686 if (t_ResultSet != null) 3687 { 3688 result = t_ResultSet.getBigDecimal(t_iFieldIndex, scale); 3689 } 3690 } 3691 3692 return result; 3693 } 3694 3695 /*** 3696 * Retrieves a BigDecimal value using the field reference. 3697 * @param field the field. 3698 * @exception SQLException if an error occurs. 3699 */ 3700 public BigDecimal getBigDecimal(Field field) 3701 throws SQLException 3702 { 3703 BigDecimal result = null; 3704 3705 SelectQuery t_Query = getQuery(); 3706 3707 if (t_Query != null) 3708 { 3709 int t_iFieldIndex = t_Query.getFieldIndex(field); 3710 3711 ResultSet t_ResultSet = getResultSet(); 3712 3713 if (t_ResultSet != null) 3714 { 3715 result = t_ResultSet.getBigDecimal(t_iFieldIndex); 3716 } 3717 } 3718 3719 return result; 3720 } 3721 3722 /*** 3723 * Retrieves a binary stream using the field reference. 3724 * @param field the field. 3725 * @exception SQLException if an error occurs. 3726 */ 3727 public InputStream getBinaryStream(Field field) 3728 throws SQLException 3729 { 3730 InputStream result = null; 3731 3732 SelectQuery t_Query = getQuery(); 3733 3734 if (t_Query != null) 3735 { 3736 int t_iFieldIndex = t_Query.getFieldIndex(field); 3737 3738 ResultSet t_ResultSet = getResultSet(); 3739 3740 if (t_ResultSet != null) 3741 { 3742 result = t_ResultSet.getBinaryStream(t_iFieldIndex); 3743 } 3744 } 3745 3746 return result; 3747 } 3748 3749 /*** 3750 * Retrieves a blob using the field reference. 3751 * @param field the field. 3752 * @return (Taken from Sun's Javadoc) the column value; if 3753 * the value is SQL NULL, the value returned is null. 3754 * @exception SQLException if an error occurs. 3755 */ 3756 public Blob getBlob(Field field) 3757 throws SQLException 3758 { 3759 Blob result = null; 3760 3761 SelectQuery t_Query = getQuery(); 3762 3763 if (t_Query != null) 3764 { 3765 int t_iFieldIndex = t_Query.getFieldIndex(field); 3766 3767 ResultSet t_ResultSet = getResultSet(); 3768 3769 if (t_ResultSet != null) 3770 { 3771 result = t_ResultSet.getBlob(t_iFieldIndex); 3772 } 3773 } 3774 3775 return result; 3776 } 3777 3778 /*** 3779 * Retrieves a clob value using the field reference. 3780 * @param field the field. 3781 * @return (Taken from Sun's Javadoc) the column value; if 3782 * the value is SQL NULL, the value returned is null. 3783 * @exception SQLException if an error occurs. 3784 */ 3785 public Clob getClob(Field field) 3786 throws SQLException 3787 { 3788 Clob result = null; 3789 3790 SelectQuery t_Query = getQuery(); 3791 3792 if (t_Query != null) 3793 { 3794 int t_iFieldIndex = t_Query.getFieldIndex(field); 3795 3796 ResultSet t_ResultSet = getResultSet(); 3797 3798 if (t_ResultSet != null) 3799 { 3800 result = t_ResultSet.getClob(t_iFieldIndex); 3801 } 3802 } 3803 3804 return result; 3805 } 3806 3807 /*** 3808 * Retrieves a timestamp value using the field reference. 3809 * @param field the field. 3810 * @return (Taken from Sun's Javadoc) the column value; if 3811 * the value is SQL NULL, the value returned is null. 3812 * @exception SQLException if an error occurs. 3813 */ 3814 public Timestamp getTimestamp(Field field) 3815 throws SQLException 3816 { 3817 Timestamp result = null; 3818 3819 SelectQuery t_Query = getQuery(); 3820 3821 if (t_Query != null) 3822 { 3823 int t_iFieldIndex = t_Query.getFieldIndex(field); 3824 3825 ResultSet t_ResultSet = getResultSet(); 3826 3827 if (t_ResultSet != null) 3828 { 3829 result = t_ResultSet.getTimestamp(t_iFieldIndex); 3830 } 3831 } 3832 3833 return result; 3834 } 3835 3836 /*** 3837 * Retrieves a timestamp value using the field reference. 3838 * @param field the field. 3839 * @param calendar (Taken from Sun's Javadoc) the java.util.Calendar 3840 * object to use in constructing the time. 3841 * @return (Taken from Sun's Javadoc) the column value; if 3842 * the value is SQL NULL, the value returned is null. 3843 * @exception SQLException if an error occurs. 3844 */ 3845 public Timestamp getTimestamp(Field field, Calendar calendar) 3846 throws SQLException 3847 { 3848 Timestamp result = null; 3849 3850 SelectQuery t_Query = getQuery(); 3851 3852 if (t_Query != null) 3853 { 3854 int t_iFieldIndex = t_Query.getFieldIndex(field); 3855 3856 ResultSet t_ResultSet = getResultSet(); 3857 3858 if (t_ResultSet != null) 3859 { 3860 result = 3861 t_ResultSet.getTimestamp(t_iFieldIndex, calendar); 3862 } 3863 } 3864 3865 return result; 3866 } 3867 3868 /*** 3869 * Retrieves an Unicode stream using the field reference. 3870 * @param field the field. 3871 * @exception SQLException if an error occurs. 3872 */ 3873 public InputStream getUnicodeStream(Field field) 3874 throws SQLException 3875 { 3876 InputStream result = null; 3877 3878 SelectQuery t_Query = getQuery(); 3879 3880 if (t_Query != null) 3881 { 3882 int t_iFieldIndex = t_Query.getFieldIndex(field); 3883 3884 ResultSet t_ResultSet = getResultSet(); 3885 3886 if (t_ResultSet != null) 3887 { 3888 result = t_ResultSet.getUnicodeStream(t_iFieldIndex); 3889 } 3890 } 3891 3892 return result; 3893 } 3894 3895 /*** 3896 * Retrieves a character stream using the field reference. 3897 * @param field the field. 3898 * @return (Taken from Sun's Javadoc) the column value; if 3899 * the value is SQL NULL, the value returned is null. 3900 * @exception SQLException if an error occurs. 3901 */ 3902 public Reader getCharacterStream(Field field) 3903 throws SQLException 3904 { 3905 Reader result = null; 3906 3907 SelectQuery t_Query = getQuery(); 3908 3909 if (t_Query != null) 3910 { 3911 int t_iFieldIndex = t_Query.getFieldIndex(field); 3912 3913 ResultSet t_ResultSet = getResultSet(); 3914 3915 if (t_ResultSet != null) 3916 { 3917 result = t_ResultSet.getCharacterStream(t_iFieldIndex); 3918 } 3919 } 3920 3921 return result; 3922 } 3923 3924 // New methods from JDK 1.4 // 3925 3926 /*** 3927 * Retrieves an URL using the field reference. 3928 * @param field the field. 3929 * @return (Taken from Sun's Javadoc) the column value as a java.net.URL 3930 * object; if the value is SQL NULL, the value returned is null in the 3931 * Java programming language. 3932 * @exception SQLException if an error occurs. 3933 */ 3934 public URL getURL(Field field) 3935 throws SQLException 3936 { 3937 URL result = null; 3938 3939 SelectQuery t_Query = getQuery(); 3940 3941 if (t_Query != null) 3942 { 3943 int t_iFieldIndex = t_Query.getFieldIndex(field); 3944 3945 ResultSet t_ResultSet = getResultSet(); 3946 3947 if (t_ResultSet != null) 3948 { 3949 result = t_ResultSet.getURL(t_iFieldIndex); 3950 } 3951 } 3952 3953 return result; 3954 } 3955 3956 /*** 3957 * Retrieves the column index associated to given field. 3958 * @param field the field. 3959 * @return the column index of the given field. 3960 * @exception SQLException if an error occurs. 3961 */ 3962 public int findColumn(Field field) 3963 throws SQLException 3964 { 3965 int result = -1; 3966 3967 SelectQuery t_Query = getQuery(); 3968 3969 if (t_Query != null) 3970 { 3971 result = t_Query.getFieldIndex(field); 3972 } 3973 3974 return result; 3975 } 3976 3977 /*** 3978 * Updates an ASCII stream column using the field reference. 3979 * @param field the field. 3980 * @param value (Taken from Sun's Javadoc) the new column value. 3981 * @param length (Taken from Sun's Javadoc) the length of the stream. 3982 * @exception SQLException if an error occurs. 3983 */ 3984 public void updateAsciiStream( 3985 Field field, 3986 InputStream value, 3987 int length) 3988 throws SQLException 3989 { 3990 SelectQuery t_Query = getQuery(); 3991 3992 if (t_Query != null) 3993 { 3994 int t_iFieldIndex = t_Query.getFieldIndex(field); 3995 3996 ResultSet t_ResultSet = getResultSet(); 3997 3998 if (t_ResultSet != null) 3999 { 4000 t_ResultSet.updateAsciiStream( 4001 t_iFieldIndex, value, length); 4002 } 4003 } 4004 } 4005 4006 /*** 4007 * See ResultSet#updateBigDecimal(String,BigDecimal) 4008 * @see java.sql.ResultSet#updateBigDecimal(java.lang.String,java.math.BigDecimal) 4009 * @param columnName (Taken from Sun's Javadoc) the SQL name of 4010 * the column. 4011 * @param bigDecimal a <code>BigDecimal</code> value 4012 * @exception SQLException if an error occurs. 4013 */ 4014 public void updateBigDecimal(Field field, BigDecimal value) 4015 throws SQLException 4016 { 4017 SelectQuery t_Query = getQuery(); 4018 4019 if (t_Query != null) 4020 { 4021 int t_iFieldIndex = t_Query.getFieldIndex(field); 4022 4023 ResultSet t_ResultSet = getResultSet(); 4024 4025 if (t_ResultSet != null) 4026 { 4027 t_ResultSet.updateBigDecimal(t_iFieldIndex, value); 4028 } 4029 } 4030 } 4031 4032 /*** 4033 * Updates a binary stream column using the field reference. 4034 * @param field the field. 4035 * @param value (Taken from Sun's Javadoc) the new column value. 4036 * @param length (Taken from Sun's Javadoc) the length of the stream. 4037 * @exception SQLException if an error occurs. 4038 */ 4039 public void updateBinaryStream( 4040 Field field, 4041 InputStream value, 4042 int length) 4043 throws SQLException 4044 { 4045 SelectQuery t_Query = getQuery(); 4046 4047 if (t_Query != null) 4048 { 4049 int t_iFieldIndex = t_Query.getFieldIndex(field); 4050 4051 ResultSet t_ResultSet = getResultSet(); 4052 4053 if (t_ResultSet != null) 4054 { 4055 t_ResultSet.updateBinaryStream( 4056 t_iFieldIndex, value, length); 4057 } 4058 } 4059 } 4060 4061 /*** 4062 * Updates a boolean column using the field reference. 4063 * @param field the field. 4064 * @param value (Taken from Sun's Javadoc) the new column value. 4065 * @exception SQLException if an error occurs. 4066 */ 4067 public void updateBoolean(Field field, boolean value) 4068 throws SQLException 4069 { 4070 SelectQuery t_Query = getQuery(); 4071 4072 if (t_Query != null) 4073 { 4074 int t_iFieldIndex = t_Query.getFieldIndex(field); 4075 4076 ResultSet t_ResultSet = getResultSet(); 4077 4078 if (t_ResultSet != null) 4079 { 4080 t_ResultSet.updateBoolean(t_iFieldIndex, value); 4081 } 4082 } 4083 } 4084 4085 /*** 4086 * Updates a byte column using the field reference. 4087 * @param field the field. 4088 * @param value (Taken from Sun's Javadoc) the new column value. 4089 * @exception SQLException if an error occurs. 4090 */ 4091 public void updateByte(Field field, byte value) 4092 throws SQLException 4093 { 4094 SelectQuery t_Query = getQuery(); 4095 4096 if (t_Query != null) 4097 { 4098 int t_iFieldIndex = t_Query.getFieldIndex(field); 4099 4100 ResultSet t_ResultSet = getResultSet(); 4101 4102 if (t_ResultSet != null) 4103 { 4104 t_ResultSet.updateByte(t_iFieldIndex, value); 4105 } 4106 } 4107 } 4108 4109 /*** 4110 * Updates a byte array column using the field reference. 4111 * @param field the field. 4112 * @param value (Taken from Sun's Javadoc) the new column value. 4113 * @exception SQLException if an error occurs. 4114 */ 4115 public void updateBytes(Field field, byte[] value) 4116 throws SQLException 4117 { 4118 SelectQuery t_Query = getQuery(); 4119 4120 if (t_Query != null) 4121 { 4122 int t_iFieldIndex = t_Query.getFieldIndex(field); 4123 4124 ResultSet t_ResultSet = getResultSet(); 4125 4126 if (t_ResultSet != null) 4127 { 4128 t_ResultSet.updateBytes(t_iFieldIndex, value); 4129 } 4130 } 4131 } 4132 4133 /*** 4134 * Updates a character stream column using the field reference. 4135 * @param field the field. 4136 * @param value (Taken from Sun's Javadoc) the new column value. 4137 * @param length (Taken from Sun's Javadoc) the length of the stream. 4138 * @exception SQLException if an error occurs. 4139 */ 4140 public void updateCharacterStream( 4141 Field field, 4142 Reader value, 4143 int length) 4144 throws SQLException 4145 { 4146 SelectQuery t_Query = getQuery(); 4147 4148 if (t_Query != null) 4149 { 4150 int t_iFieldIndex = t_Query.getFieldIndex(field); 4151 4152 ResultSet t_ResultSet = getResultSet(); 4153 4154 if (t_ResultSet != null) 4155 { 4156 t_ResultSet 4157 .updateCharacterStream(t_iFieldIndex, value, length); 4158 } 4159 } 4160 } 4161 4162 /*** 4163 * Updates a date column using the field reference. 4164 * @param field the field. 4165 * @param value (Taken from Sun's Javadoc) the new column value. 4166 * @exception SQLException if an error occurs. 4167 */ 4168 public void updateDate(Field field, Date value) 4169 throws SQLException 4170 { 4171 SelectQuery t_Query = getQuery(); 4172 4173 if (t_Query != null) 4174 { 4175 int t_iFieldIndex = t_Query.getFieldIndex(field); 4176 4177 ResultSet t_ResultSet = getResultSet(); 4178 4179 if (t_ResultSet != null) 4180 { 4181 t_ResultSet.updateDate(t_iFieldIndex, value); 4182 } 4183 } 4184 } 4185 4186 /*** 4187 * Updates a double column using the field reference. 4188 * @param field the field. 4189 * @param value (Taken from Sun's Javadoc) the new column value. 4190 * @exception SQLException if an error occurs. 4191 */ 4192 public void updateDouble(Field field, double value) 4193 throws SQLException 4194 { 4195 SelectQuery t_Query = getQuery(); 4196 4197 if (t_Query != null) 4198 { 4199 int t_iFieldIndex = t_Query.getFieldIndex(field); 4200 4201 ResultSet t_ResultSet = getResultSet(); 4202 4203 if (t_ResultSet != null) 4204 { 4205 t_ResultSet.updateDouble(t_iFieldIndex, value); 4206 } 4207 } 4208 } 4209 4210 /*** 4211 * Updates a float column using the field reference. 4212 * @param field the field. 4213 * @param value (Taken from Sun's Javadoc) the new column value. 4214 * @exception SQLException if an error occurs 4215 */ 4216 public void updateFloat(Field field, float value) 4217 throws SQLException 4218 { 4219 SelectQuery t_Query = getQuery(); 4220 4221 if (t_Query != null) 4222 { 4223 int t_iFieldIndex = t_Query.getFieldIndex(field); 4224 4225 ResultSet t_ResultSet = getResultSet(); 4226 4227 if (t_ResultSet != null) 4228 { 4229 t_ResultSet.updateFloat(t_iFieldIndex, value); 4230 } 4231 } 4232 } 4233 4234 /*** 4235 * Updates an integer column using the field reference. 4236 * @param field the field. 4237 * @param value (Taken from Sun's Javadoc) the new column value. 4238 * @exception SQLException if an error occurs. 4239 */ 4240 public void updateInt(Field field, int value) 4241 throws SQLException 4242 { 4243 SelectQuery t_Query = getQuery(); 4244 4245 if (t_Query != null) 4246 { 4247 int t_iFieldIndex = t_Query.getFieldIndex(field); 4248 4249 ResultSet t_ResultSet = getResultSet(); 4250 4251 if (t_ResultSet != null) 4252 { 4253 t_ResultSet.updateInt(t_iFieldIndex, value); 4254 } 4255 } 4256 } 4257 4258 /*** 4259 * Updates a long column using the field reference. 4260 * @param field the field. 4261 * @param value (Taken from Sun's Javadoc) the new column value. 4262 * @exception SQLException if an error occurs 4263 */ 4264 public void updateLong(Field field, long value) 4265 throws SQLException 4266 { 4267 SelectQuery t_Query = getQuery(); 4268 4269 if (t_Query != null) 4270 { 4271 int t_iFieldIndex = t_Query.getFieldIndex(field); 4272 4273 ResultSet t_ResultSet = getResultSet(); 4274 4275 if (t_ResultSet != null) 4276 { 4277 t_ResultSet.updateLong(t_iFieldIndex, value); 4278 } 4279 } 4280 } 4281 4282 /*** 4283 * Sets a column to null using the field reference. 4284 * @param field the field. 4285 * @exception SQLException if an error occurs. 4286 */ 4287 public void updateNull(Field field) 4288 throws SQLException 4289 { 4290 SelectQuery t_Query = getQuery(); 4291 4292 if (t_Query != null) 4293 { 4294 int t_iFieldIndex = t_Query.getFieldIndex(field); 4295 4296 ResultSet t_ResultSet = getResultSet(); 4297 4298 if (t_ResultSet != null) 4299 { 4300 t_ResultSet.updateNull(t_iFieldIndex); 4301 } 4302 } 4303 } 4304 4305 /*** 4306 * Updates an object column using the field reference. 4307 * @param field the field. 4308 * @param value (Taken from Sun's Javadoc) the new column value. 4309 * @param scale (Taken from Sun's Javadoc) for java.sql.Types.DECIMA 4310 * or java.sql.Types.NUMERIC types, this is the number of digits after 4311 * the decimal point. For all other types this value will be ignored. 4312 * @exception SQLException if an error occurs. 4313 */ 4314 public void updateObject(Field field, Object value, int scale) 4315 throws SQLException 4316 { 4317 SelectQuery t_Query = getQuery(); 4318 4319 if (t_Query != null) 4320 { 4321 int t_iFieldIndex = t_Query.getFieldIndex(field); 4322 4323 ResultSet t_ResultSet = getResultSet(); 4324 4325 if (t_ResultSet != null) 4326 { 4327 t_ResultSet.updateObject(t_iFieldIndex, value, scale); 4328 } 4329 } 4330 } 4331 4332 /*** 4333 * Updates an object column using the field reference. 4334 * @param field the field. 4335 * @param value (Taken from Sun's Javadoc) the new column value. 4336 * @exception SQLException if an error occurs. 4337 */ 4338 public void updateObject(Field field, Object value) 4339 throws SQLException 4340 { 4341 SelectQuery t_Query = getQuery(); 4342 4343 if (t_Query != null) 4344 { 4345 int t_iFieldIndex = t_Query.getFieldIndex(field); 4346 4347 ResultSet t_ResultSet = getResultSet(); 4348 4349 if (t_ResultSet != null) 4350 { 4351 t_ResultSet.updateObject(t_iFieldIndex, value); 4352 } 4353 } 4354 } 4355 4356 /*** 4357 * Updates a short column using the field reference. 4358 * @param field the field. 4359 * @param value (Taken from Sun's Javadoc) the new column value. 4360 * @exception SQLException if an error occurs. 4361 */ 4362 public void updateShort(Field field, short value) 4363 throws SQLException 4364 { 4365 SelectQuery t_Query = getQuery(); 4366 4367 if (t_Query != null) 4368 { 4369 int t_iFieldIndex = t_Query.getFieldIndex(field); 4370 4371 ResultSet t_ResultSet = getResultSet(); 4372 4373 if (t_ResultSet != null) 4374 { 4375 t_ResultSet.updateShort(t_iFieldIndex, value); 4376 } 4377 } 4378 } 4379 4380 /*** 4381 * Updates a text column using the field reference. 4382 * @param field the field. 4383 * @param value (Taken from Sun's Javadoc) the new column value. 4384 * @exception SQLException if an error occurs. 4385 */ 4386 public void updateString(Field field, String value) 4387 throws SQLException 4388 { 4389 SelectQuery t_Query = getQuery(); 4390 4391 if (t_Query != null) 4392 { 4393 int t_iFieldIndex = t_Query.getFieldIndex(field); 4394 4395 ResultSet t_ResultSet = getResultSet(); 4396 4397 if (t_ResultSet != null) 4398 { 4399 t_ResultSet.updateString(t_iFieldIndex, value); 4400 } 4401 } 4402 } 4403 4404 /*** 4405 * Updates a time column using the field reference. 4406 * @param field the field. 4407 * @param value (Taken from Sun's Javadoc) the new column value. 4408 * @exception SQLException if an error occurs. 4409 */ 4410 public void updateTime(Field field, Time value) 4411 throws SQLException 4412 { 4413 SelectQuery t_Query = getQuery(); 4414 4415 if (t_Query != null) 4416 { 4417 int t_iFieldIndex = t_Query.getFieldIndex(field); 4418 4419 ResultSet t_ResultSet = getResultSet(); 4420 4421 if (t_ResultSet != null) 4422 { 4423 t_ResultSet.updateTime(t_iFieldIndex, value); 4424 } 4425 } 4426 } 4427 4428 /*** 4429 * Updates a timestamp column using the field reference. 4430 * @param field the field. 4431 * @param value (Taken from Sun's Javadoc) the new column value. 4432 * @exception SQLException if an error occurs. 4433 */ 4434 public void updateTimestamp(Field field, Timestamp value) 4435 throws SQLException 4436 { 4437 SelectQuery t_Query = getQuery(); 4438 4439 if (t_Query != null) 4440 { 4441 int t_iFieldIndex = t_Query.getFieldIndex(field); 4442 4443 ResultSet t_ResultSet = getResultSet(); 4444 4445 if (t_ResultSet != null) 4446 { 4447 t_ResultSet.updateTimestamp(t_iFieldIndex, value); 4448 } 4449 } 4450 } 4451 4452 // New methods from JDK 1.4 // 4453 4454 /*** 4455 * Updates a Ref column using the field reference. 4456 * @param field the field. 4457 * @param value (Taken from Sun's Javadoc) the new column value. 4458 * @exception SQLException if an error occurs. 4459 */ 4460 public void updateRef(Field field, Ref value) 4461 throws SQLException 4462 { 4463 SelectQuery t_Query = getQuery(); 4464 4465 if (t_Query != null) 4466 { 4467 int t_iFieldIndex = t_Query.getFieldIndex(field); 4468 4469 ResultSet t_ResultSet = getResultSet(); 4470 4471 if (t_ResultSet != null) 4472 { 4473 t_ResultSet.updateRef(t_iFieldIndex, value); 4474 } 4475 } 4476 } 4477 4478 /*** 4479 * Updates a Blob column using the field bloberence. 4480 * @param field the field. 4481 * @param value (Taken from Sun's Javadoc) the new column value. 4482 * @exception SQLException if an error occurs. 4483 */ 4484 public void updateBlob(Field field, Blob value) 4485 throws SQLException 4486 { 4487 SelectQuery t_Query = getQuery(); 4488 4489 if (t_Query != null) 4490 { 4491 int t_iFieldIndex = t_Query.getFieldIndex(field); 4492 4493 ResultSet t_ResultSet = getResultSet(); 4494 4495 if (t_ResultSet != null) 4496 { 4497 t_ResultSet.updateBlob(t_iFieldIndex, value); 4498 } 4499 } 4500 } 4501 4502 /*** 4503 * Updates a Clob column using the field cloberence. 4504 * @param field the field. 4505 * @param value (Taken from Sun's Javadoc) the new column value. 4506 * @exception SQLException if an error occurs. 4507 */ 4508 public void updateClob(Field field, Clob value) 4509 throws SQLException 4510 { 4511 SelectQuery t_Query = getQuery(); 4512 4513 if (t_Query != null) 4514 { 4515 int t_iFieldIndex = t_Query.getFieldIndex(field); 4516 4517 ResultSet t_ResultSet = getResultSet(); 4518 4519 if (t_ResultSet != null) 4520 { 4521 t_ResultSet.updateClob(t_iFieldIndex, value); 4522 } 4523 } 4524 } 4525 4526 /*** 4527 * Updates a Array column using the field arrayerence. 4528 * @param field the field. 4529 * @param value (Taken from Sun's Javadoc) the new column value. 4530 * @exception SQLException if an error occurs. 4531 */ 4532 public void updateArray(Field field, Array value) 4533 throws SQLException 4534 { 4535 SelectQuery t_Query = getQuery(); 4536 4537 if (t_Query != null) 4538 { 4539 int t_iFieldIndex = t_Query.getFieldIndex(field); 4540 4541 ResultSet t_ResultSet = getResultSet(); 4542 4543 if (t_ResultSet != null) 4544 { 4545 t_ResultSet.updateArray(t_iFieldIndex, value); 4546 } 4547 } 4548 } 4549 }

This page was automatically generated by Maven