1 22 package org.enhydra.jdbc.core; 23 24 import org.enhydra.jdbc.util.JdbcUtil; 25 26 import java.io.InputStream ; 27 import java.io.Reader ; 28 import java.math.BigDecimal ; 29 import java.sql.Array ; 30 import java.sql.Blob ; 31 import java.sql.Clob ; 32 import java.sql.Connection ; 33 import java.sql.Date ; 34 import java.sql.CallableStatement ; 35 import java.sql.Ref ; 36 import java.sql.ResultSet ; 37 import java.sql.ResultSetMetaData ; 38 import java.sql.SQLException ; 39 import java.sql.SQLWarning ; 40 import java.sql.Time ; 41 import java.sql.Timestamp ; 42 import java.util.Calendar ; 43 44 49 public abstract class CoreCallableStatement 50 extends JdbcUtil 51 implements CallableStatement { 52 53 protected CallableStatement cs; 55 56 public Array getArray(int i) throws SQLException { 57 preInvoke(); 58 try { 59 return cs.getArray(i); 60 } catch (SQLException e) { 61 catchInvoke(e); 62 } 63 return null; 64 } 65 public java.math.BigDecimal getBigDecimal(int i) throws SQLException { 66 preInvoke(); 67 try { 68 return cs.getBigDecimal(i); 69 } catch (SQLException e) { 70 catchInvoke(e); 71 } 72 return null; 73 } 74 public java.math.BigDecimal getBigDecimal(int i, int scale) 75 throws SQLException { 76 preInvoke(); 77 try { 78 return cs.getBigDecimal(i); 79 } catch (SQLException e) { 80 catchInvoke(e); 81 } 82 return null; 83 } 84 public Blob getBlob(int i) throws SQLException { 85 preInvoke(); 86 try { 87 return cs.getBlob(i); 88 } catch (SQLException e) { 89 catchInvoke(e); 90 } 91 return null; 92 } 93 public boolean getBoolean(int i) throws SQLException { 94 preInvoke(); 95 try { 96 return cs.getBoolean(i); 97 } catch (SQLException e) { 98 catchInvoke(e); 99 } 100 return false; 101 } 102 public byte getByte(int i) throws SQLException { 103 preInvoke(); 104 try { 105 return cs.getByte(i); 106 } catch (SQLException e) { 107 catchInvoke(e); 108 } 109 return 0; 110 } 111 public byte[] getBytes(int i) throws SQLException { 112 preInvoke(); 113 try { 114 return cs.getBytes(i); 115 } catch (SQLException e) { 116 catchInvoke(e); 117 } 118 return null; 119 } 120 public Clob getClob(int i) throws SQLException { 121 preInvoke(); 122 try { 123 return cs.getClob(i); 124 } catch (SQLException e) { 125 catchInvoke(e); 126 } 127 return null; 128 } 129 public Date getDate(int i) throws SQLException { 130 preInvoke(); 131 try { 132 return cs.getDate(i); 133 } catch (SQLException e) { 134 catchInvoke(e); 135 } 136 return null; 137 } 138 public Date getDate(int i, java.util.Calendar cal) throws SQLException { 139 preInvoke(); 140 try { 141 return cs.getDate(i, cal); 142 } catch (SQLException e) { 143 catchInvoke(e); 144 } 145 return null; 146 } 147 public double getDouble(int i) throws SQLException { 148 preInvoke(); 149 try { 150 return cs.getDouble(i); 151 } catch (SQLException e) { 152 catchInvoke(e); 153 } 154 return 0; 155 } 156 public float getFloat(int i) throws SQLException { 157 preInvoke(); 158 try { 159 return cs.getFloat(i); 160 } catch (SQLException e) { 161 catchInvoke(e); 162 } 163 return 0; 164 } 165 public int getInt(int i) throws SQLException { 166 preInvoke(); 167 try { 168 return cs.getInt(i); 169 } catch (SQLException e) { 170 catchInvoke(e); 171 } 172 return 0; 173 } 174 public long getLong(int i) throws SQLException { 175 preInvoke(); 176 try { 177 return cs.getLong(i); 178 } catch (SQLException e) { 179 catchInvoke(e); 180 } 181 return 0; 182 } 183 public Object getObject(int i) throws SQLException { 184 preInvoke(); 185 try { 186 return cs.getObject(i); 187 } catch (SQLException e) { 188 catchInvoke(e); 189 } 190 return null; 191 } 192 public Object getObject(int i, java.util.Map map) throws SQLException { 193 preInvoke(); 194 try { 195 return cs.getObject(i, map); 196 } catch (SQLException e) { 197 catchInvoke(e); 198 } 199 return null; 200 } 201 public Ref getRef(int i) throws SQLException { 202 preInvoke(); 203 try { 204 return cs.getRef(i); 205 } catch (SQLException e) { 206 catchInvoke(e); 207 } 208 return null; 209 } 210 public short getShort(int i) throws SQLException { 211 preInvoke(); 212 try { 213 return cs.getShort(i); 214 } catch (SQLException e) { 215 catchInvoke(e); 216 } 217 return 0; 218 } 219 public java.lang.String getString(int i) throws SQLException { 220 preInvoke(); 221 try { 222 return cs.getString(i); 223 } catch (SQLException e) { 224 catchInvoke(e); 225 } 226 return null; 227 } 228 public java.sql.Time getTime(int i) throws SQLException { 229 preInvoke(); 230 try { 231 return cs.getTime(i); 232 } catch (SQLException e) { 233 catchInvoke(e); 234 } 235 return null; 236 } 237 public java.sql.Time getTime(int i, java.util.Calendar cal) 238 throws SQLException { 239 preInvoke(); 240 try { 241 return cs.getTime(i, cal); 242 } catch (SQLException e) { 243 catchInvoke(e); 244 } 245 return null; 246 } 247 public java.sql.Timestamp getTimestamp(int i) throws SQLException { 248 preInvoke(); 249 try { 250 return cs.getTimestamp(i); 251 } catch (SQLException e) { 252 catchInvoke(e); 253 } 254 return null; 255 } 256 public java.sql.Timestamp getTimestamp(int i, java.util.Calendar cal) 257 throws SQLException { 258 preInvoke(); 259 try { 260 return cs.getTimestamp(i, cal); 261 } catch (SQLException e) { 262 catchInvoke(e); 263 } 264 return null; 265 } 266 public void registerOutParameter(int i, int sqlType) throws SQLException { 267 preInvoke(); 268 try { 269 cs.registerOutParameter(i, sqlType); 270 } catch (SQLException e) { 271 catchInvoke(e); 272 } 273 } 274 public void registerOutParameter(int i, int sqlType, int scale) 275 throws SQLException { 276 preInvoke(); 277 try { 278 cs.registerOutParameter(i, sqlType, scale); 279 } catch (SQLException e) { 280 catchInvoke(e); 281 } 282 } 283 public void registerOutParameter(int i, int sqlType, String typeName) 284 throws SQLException { 285 preInvoke(); 286 try { 287 cs.registerOutParameter(i, sqlType, typeName); 288 } catch (SQLException e) { 289 catchInvoke(e); 290 } 291 } 292 public boolean wasNull() throws SQLException { 293 preInvoke(); 294 try { 295 return cs.wasNull(); 296 } catch (SQLException e) { 297 catchInvoke(e); 298 } 299 return false; 300 } 301 302 public void addBatch() throws SQLException { 303 preInvoke(); 304 try { 305 cs.addBatch(); 306 } catch (SQLException e) { 307 catchInvoke(e); 308 } 309 } 310 311 public void clearParameters() throws SQLException { 312 preInvoke(); 313 try { 314 cs.clearParameters(); 315 } catch (SQLException e) { 316 catchInvoke(e); 317 } 318 } 319 320 public boolean execute() throws SQLException { 321 preInvoke(); 322 try { 323 return cs.execute(); 324 } catch (SQLException e) { 325 catchInvoke(e); 326 } 327 return false; 328 } 329 330 public ResultSet executeQuery() throws SQLException { 331 preInvoke(); 332 try { 333 return cs.executeQuery(); 334 } catch (SQLException e) { 335 catchInvoke(e); 336 } 337 return null; 338 } 339 340 public int executeUpdate() throws SQLException { 341 preInvoke(); 342 try { 343 return cs.executeUpdate(); 344 } catch (SQLException e) { 345 catchInvoke(e); 346 } 347 return 0; 348 } 349 350 public ResultSetMetaData getMetaData() throws SQLException { 351 preInvoke(); 352 try { 353 return cs.getMetaData(); 354 } catch (SQLException e) { 355 catchInvoke(e); 356 } 357 return null; 358 } 359 360 public void setArray(int i, Array x) throws SQLException { 361 preInvoke(); 362 try { 363 cs.setArray(i, x); 364 } catch (SQLException e) { 365 catchInvoke(e); 366 } 367 } 368 369 public void setAsciiStream(int parameterIndex, InputStream x, int length) 370 throws SQLException { 371 preInvoke(); 372 try { 373 cs.setAsciiStream(parameterIndex, x, length); 374 } catch (SQLException e) { 375 catchInvoke(e); 376 } 377 } 378 379 public void setBigDecimal(int parameterIndex, BigDecimal x) 380 throws SQLException { 381 preInvoke(); 382 try { 383 cs.setBigDecimal(parameterIndex, x); 384 } catch (SQLException e) { 385 catchInvoke(e); 386 } 387 } 388 389 public void setBinaryStream(int parameterIndex, InputStream x, int length) 390 throws SQLException { 391 preInvoke(); 392 try { 393 cs.setBinaryStream(parameterIndex, x, length); 394 } catch (SQLException e) { 395 catchInvoke(e); 396 } 397 } 398 399 public void setBlob(int i, Blob x) throws SQLException { 400 preInvoke(); 401 try { 402 cs.setBlob(i, x); 403 } catch (SQLException e) { 404 catchInvoke(e); 405 } 406 } 407 408 public void setBoolean(int parameterIndex, boolean x) throws SQLException { 409 preInvoke(); 410 try { 411 cs.setBoolean(parameterIndex, x); 412 } catch (SQLException e) { 413 catchInvoke(e); 414 } 415 } 416 417 public void setByte(int parameterIndex, byte x) throws SQLException { 418 preInvoke(); 419 try { 420 cs.setByte(parameterIndex, x); 421 } catch (SQLException e) { 422 catchInvoke(e); 423 } 424 } 425 426 public void setBytes(int parameterIndex, byte x[]) throws SQLException { 427 preInvoke(); 428 try { 429 cs.setBytes(parameterIndex, x); 430 } catch (SQLException e) { 431 catchInvoke(e); 432 } 433 } 434 435 public void setCharacterStream( 436 int parameterIndex, 437 Reader reader, 438 int length) 439 throws SQLException { 440 preInvoke(); 441 try { 442 cs.setCharacterStream(parameterIndex, reader, length); 443 } catch (SQLException e) { 444 catchInvoke(e); 445 } 446 } 447 448 public void setClob(int i, Clob x) throws SQLException { 449 preInvoke(); 450 try { 451 cs.setClob(i, x); 452 } catch (SQLException e) { 453 catchInvoke(e); 454 } 455 } 456 457 public void setDate(int parameterIndex, Date x) throws SQLException { 458 preInvoke(); 459 try { 460 cs.setDate(parameterIndex, x); 461 } catch (SQLException e) { 462 catchInvoke(e); 463 } 464 } 465 466 public void setDate(int parameterIndex, Date x, Calendar cal) 467 throws SQLException { 468 preInvoke(); 469 try { 470 cs.setDate(parameterIndex, x, cal); 471 } catch (SQLException e) { 472 catchInvoke(e); 473 } 474 } 475 476 public void setDouble(int parameterIndex, double x) throws SQLException { 477 preInvoke(); 478 try { 479 cs.setDouble(parameterIndex, x); 480 } catch (SQLException e) { 481 catchInvoke(e); 482 } 483 } 484 485 public void setFloat(int parameterIndex, float x) throws SQLException { 486 preInvoke(); 487 try { 488 cs.setFloat(parameterIndex, x); 489 } catch (SQLException e) { 490 catchInvoke(e); 491 } 492 } 493 494 public void setInt(int parameterIndex, int x) throws SQLException { 495 preInvoke(); 496 try { 497 cs.setInt(parameterIndex, x); 498 } catch (SQLException e) { 499 catchInvoke(e); 500 } 501 } 502 503 public void setLong(int parameterIndex, long x) throws SQLException { 504 preInvoke(); 505 try { 506 cs.setLong(parameterIndex, x); 507 } catch (SQLException e) { 508 catchInvoke(e); 509 } 510 } 511 512 public void setNull(int parameterIndex, int sqlType) throws SQLException { 513 preInvoke(); 514 try { 515 cs.setNull(parameterIndex, sqlType); 516 } catch (SQLException e) { 517 catchInvoke(e); 518 } 519 } 520 521 public void setNull(int paramIndex, int sqlType, String typeName) 522 throws SQLException { 523 preInvoke(); 524 try { 525 cs.setNull(paramIndex, sqlType, typeName); 526 } catch (SQLException e) { 527 catchInvoke(e); 528 } 529 } 530 531 public void setObject(int parameterIndex, Object x) throws SQLException { 532 preInvoke(); 533 try { 534 cs.setObject(parameterIndex, x); 535 } catch (SQLException e) { 536 catchInvoke(e); 537 } 538 } 539 540 public void setObject(int parameterIndex, Object x, int targetSqlType) 541 throws SQLException { 542 preInvoke(); 543 try { 544 cs.setObject(parameterIndex, x, targetSqlType); 545 } catch (SQLException e) { 546 catchInvoke(e); 547 } 548 } 549 550 public void setObject( 551 int parameterIndex, 552 Object x, 553 int targetSqlType, 554 int scale) 555 throws SQLException { 556 preInvoke(); 557 try { 558 cs.setObject(parameterIndex, x, targetSqlType, scale); 559 } catch (SQLException e) { 560 catchInvoke(e); 561 } 562 } 563 564 public void setRef(int i, Ref x) throws SQLException { 565 preInvoke(); 566 try { 567 cs.setRef(i, x); 568 } catch (SQLException e) { 569 catchInvoke(e); 570 } 571 } 572 573 public void setShort(int parameterIndex, short x) throws SQLException { 574 preInvoke(); 575 try { 576 cs.setShort(parameterIndex, x); 577 } catch (SQLException e) { 578 catchInvoke(e); 579 } 580 } 581 582 public void setString(int parameterIndex, String x) throws SQLException { 583 preInvoke(); 584 try { 585 cs.setString(parameterIndex, x); 586 } catch (SQLException e) { 587 catchInvoke(e); 588 } 589 } 590 591 public void setTime(int parameterIndex, Time x) throws SQLException { 592 preInvoke(); 593 try { 594 cs.setTime(parameterIndex, x); 595 } catch (SQLException e) { 596 catchInvoke(e); 597 } 598 } 599 600 public void setTime(int parameterIndex, Time x, Calendar cal) 601 throws SQLException { 602 preInvoke(); 603 try { 604 cs.setTime(parameterIndex, x, cal); 605 } catch (SQLException e) { 606 catchInvoke(e); 607 } 608 } 609 610 public void setTimestamp(int parameterIndex, Timestamp x) 611 throws SQLException { 612 preInvoke(); 613 try { 614 cs.setTimestamp(parameterIndex, x); 615 } catch (SQLException e) { 616 catchInvoke(e); 617 } 618 } 619 620 public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) 621 throws SQLException { 622 preInvoke(); 623 try { 624 cs.setTimestamp(parameterIndex, x, cal); 625 } catch (SQLException e) { 626 catchInvoke(e); 627 } 628 } 629 630 public void setUnicodeStream(int parameterIndex, InputStream x, int length) 631 throws SQLException { 632 preInvoke(); 633 try { 634 cs.setUnicodeStream(parameterIndex, x, length); 635 } catch (SQLException e) { 636 catchInvoke(e); 637 } 638 } 639 640 642 public void close() throws SQLException { 643 if (cs != null) { 644 cs.close(); 645 } 646 } 647 648 public int[] executeBatch() throws SQLException { 649 preInvoke(); 650 try { 651 return cs.executeBatch(); 652 } catch (SQLException e) { 653 catchInvoke(e); 654 } 655 return null; 656 } 657 658 public int getMaxFieldSize() throws SQLException { 659 preInvoke(); 660 try { 661 return cs.getMaxFieldSize(); 662 } catch (SQLException e) { 663 catchInvoke(e); 664 } 665 return 0; 666 } 667 668 public void setMaxFieldSize(int max) throws SQLException { 669 preInvoke(); 670 try { 671 cs.setMaxFieldSize(max); 672 } catch (SQLException e) { 673 catchInvoke(e); 674 } 675 } 676 677 public int getMaxRows() throws SQLException { 678 preInvoke(); 679 try { 680 return cs.getMaxRows(); 681 } catch (SQLException e) { 682 catchInvoke(e); 683 } 684 return 0; 685 } 686 687 public void setMaxRows(int max) throws SQLException { 688 preInvoke(); 689 try { 690 cs.setMaxRows(max); 691 } catch (SQLException e) { 692 catchInvoke(e); 693 } 694 } 695 696 public void setEscapeProcessing(boolean enable) throws SQLException { 697 preInvoke(); 698 try { 699 cs.setEscapeProcessing(enable); 700 } catch (SQLException e) { 701 catchInvoke(e); 702 } 703 } 704 705 public int getQueryTimeout() throws SQLException { 706 preInvoke(); 707 try { 708 return cs.getQueryTimeout(); 709 } catch (SQLException e) { 710 catchInvoke(e); 711 } 712 return 0; 713 } 714 715 public void setQueryTimeout(int seconds) throws SQLException { 716 preInvoke(); 717 try { 718 cs.setQueryTimeout(seconds); 719 } catch (SQLException e) { 720 catchInvoke(e); 721 } 722 } 723 724 public void cancel() throws SQLException { 725 preInvoke(); 726 try { 727 cs.cancel(); 728 } catch (SQLException e) { 729 catchInvoke(e); 730 } 731 } 732 733 public SQLWarning getWarnings() throws SQLException { 734 preInvoke(); 735 try { 736 return cs.getWarnings(); 737 } catch (SQLException e) { 738 catchInvoke(e); 739 } 740 return null; 741 } 742 743 public void clearWarnings() throws SQLException { 744 preInvoke(); 745 try { 746 cs.clearWarnings(); 747 } catch (SQLException e) { 748 catchInvoke(e); 749 } 750 } 751 752 public void setCursorName(String name) throws SQLException { 753 preInvoke(); 754 try { 755 cs.setCursorName(name); 756 } catch (SQLException e) { 757 catchInvoke(e); 758 } 759 } 760 761 public ResultSet getResultSet() throws SQLException { 762 preInvoke(); 763 try { 764 return cs.getResultSet(); 765 } catch (SQLException e) { 766 catchInvoke(e); 767 } 768 return null; 769 } 770 771 public int getUpdateCount() throws SQLException { 772 preInvoke(); 773 try { 774 return cs.getUpdateCount(); 775 } catch (SQLException e) { 776 catchInvoke(e); 777 } 778 return 0; 779 } 780 781 public boolean getMoreResults() throws SQLException { 782 preInvoke(); 783 try { 784 return cs.getMoreResults(); 785 } catch (SQLException e) { 786 catchInvoke(e); 787 } 788 return false; 789 } 790 791 public void setFetchDirection(int direction) throws SQLException { 792 preInvoke(); 793 try { 794 cs.setFetchDirection(direction); 795 } catch (SQLException e) { 796 catchInvoke(e); 797 } 798 } 799 800 public int getFetchDirection() throws SQLException { 801 preInvoke(); 802 try { 803 return cs.getFetchDirection(); 804 } catch (SQLException e) { 805 catchInvoke(e); 806 } 807 return 0; 808 } 809 810 public void setFetchSize(int rows) throws SQLException { 811 preInvoke(); 812 try { 813 cs.setFetchSize(rows); 814 } catch (SQLException e) { 815 catchInvoke(e); 816 } 817 } 818 819 public int getFetchSize() throws SQLException { 820 preInvoke(); 821 try { 822 return cs.getFetchSize(); 823 } catch (SQLException e) { 824 catchInvoke(e); 825 } 826 return 0; 827 } 828 829 public int getResultSetConcurrency() throws SQLException { 830 preInvoke(); 831 try { 832 return cs.getResultSetConcurrency(); 833 } catch (SQLException e) { 834 catchInvoke(e); 835 } 836 return 0; 837 } 838 839 public int getResultSetType() throws SQLException { 840 preInvoke(); 841 try { 842 return cs.getResultSetType(); 843 } catch (SQLException e) { 844 catchInvoke(e); 845 } 846 return 0; 847 } 848 849 public Connection getConnection() throws SQLException { 850 preInvoke(); 851 try { 852 return cs.getConnection(); 853 } catch (SQLException e) { 854 catchInvoke(e); 855 } 856 return null; 857 } 858 859 public void clearBatch() throws SQLException { 860 preInvoke(); 861 try { 862 cs.clearBatch(); 863 } catch (SQLException e) { 864 catchInvoke(e); 865 } 866 } 867 868 public void addBatch(String s) throws SQLException { 869 preInvoke(); 870 try { 871 cs.addBatch(s); 872 } catch (SQLException e) { 873 catchInvoke(e); 874 } 875 } 876 877 public boolean execute(String s) throws SQLException { 878 preInvoke(); 879 try { 880 return cs.execute(s); 881 } catch (SQLException e) { 882 catchInvoke(e); 883 } 884 return false; 885 } 886 887 public ResultSet executeQuery(String s) throws SQLException { 888 preInvoke(); 889 try { 890 return cs.executeQuery(s); 891 } catch (SQLException e) { 892 catchInvoke(e); 893 } 894 return null; 895 } 896 897 public int executeUpdate(String s) throws SQLException { 898 preInvoke(); 899 try { 900 return cs.executeUpdate(s); 901 } catch (SQLException e) { 902 catchInvoke(e); 903 } 904 return 0; 905 } 906 907 912 913 public boolean execute(String sql, int autoGeneratedKeys) 915 throws SQLException { 916 preInvoke(); 917 try { 918 return cs.execute(sql, autoGeneratedKeys); 919 } catch (SQLException e) { 920 catchInvoke(e); 921 } 922 return false; 923 } 924 public boolean execute(String sql, int[] columnIndexes) 925 throws SQLException { 926 preInvoke(); 927 try { 928 return cs.execute(sql, columnIndexes); 929 } catch (SQLException e) { 930 catchInvoke(e); 931 } 932 return false; 933 } 934 public boolean execute(String sql, String [] columnNames) 935 throws SQLException { 936 preInvoke(); 937 try { 938 return cs.execute(sql, columnNames); 939 } catch (SQLException e) { 940 catchInvoke(e); 941 } 942 return false; 943 } 944 public int executeUpdate(String sql, int autoGeneratedKeys) 945 throws SQLException { 946 preInvoke(); 947 try { 948 return cs.executeUpdate(sql, autoGeneratedKeys); 949 } catch (SQLException e) { 950 catchInvoke(e); 951 } 952 return 0; 953 } 954 public int executeUpdate(String sql, int[] columnIndexes) 955 throws SQLException { 956 preInvoke(); 957 try { 958 return cs.executeUpdate(sql, columnIndexes); 959 } catch (SQLException e) { 960 catchInvoke(e); 961 } 962 return 0; 963 } 964 public int executeUpdate(String sql, String [] columnNames) 965 throws SQLException { 966 preInvoke(); 967 try { 968 return cs.executeUpdate(sql, columnNames); 969 } catch (SQLException e) { 970 catchInvoke(e); 971 } 972 return 0; 973 } 974 public java.sql.ResultSet getGeneratedKeys() throws SQLException { 975 preInvoke(); 976 try { 977 return cs.getGeneratedKeys(); 978 } catch (SQLException e) { 979 catchInvoke(e); 980 } 981 return null; 982 } 983 public boolean getMoreResults(int current) throws SQLException { 984 preInvoke(); 985 try { 986 return cs.getMoreResults(current); 987 } catch (SQLException e) { 988 catchInvoke(e); 989 } 990 return false; 991 992 } 993 public int getResultSetHoldability() throws SQLException { 994 preInvoke(); 995 try { 996 return cs.getResultSetHoldability(); 997 } catch (SQLException e) { 998 catchInvoke(e); 999 } 1000 return 0; 1001 1002 } 1003 public java.sql.ParameterMetaData getParameterMetaData() 1005 throws SQLException { 1006 preInvoke(); 1007 try { 1008 return cs.getParameterMetaData(); 1009 } catch (SQLException e) { 1010 catchInvoke(e); 1011 } 1012 return null; 1013 1014 } 1015 public void setURL(int parameterIndex, java.net.URL x) 1016 throws SQLException { 1017 preInvoke(); 1018 try { 1019 cs.setURL(parameterIndex, x); 1020 } catch (SQLException e) { 1021 catchInvoke(e); 1022 } 1023 } 1024 1025 public java.sql.Array getArray(String parameterName) throws SQLException { 1027 preInvoke(); 1028 try { 1029 return cs.getArray(parameterName); 1030 } catch (SQLException e) { 1031 catchInvoke(e); 1032 } 1033 return null; 1034 1035 } 1036 public java.math.BigDecimal getBigDecimal(String parameterName) 1037 throws SQLException { 1038 preInvoke(); 1039 try { 1040 return cs.getBigDecimal(parameterName); 1041 } catch (SQLException e) { 1042 catchInvoke(e); 1043 } 1044 return null; 1045 } 1046 public java.sql.Blob getBlob(String parameterName) throws SQLException { 1047 preInvoke(); 1048 try { 1049 return cs.getBlob(parameterName); 1050 } catch (SQLException e) { 1051 catchInvoke(e); 1052 } 1053 return null; 1054 } 1055 public boolean getBoolean(String parameterName) throws SQLException { 1056 preInvoke(); 1057 try { 1058 return cs.getBoolean(parameterName); 1059 } catch (SQLException e) { 1060 catchInvoke(e); 1061 } 1062 return false; 1063 } 1064 public byte getByte(String parameterName) throws SQLException { 1065 preInvoke(); 1066 try { 1067 return cs.getByte(parameterName); 1068 } catch (SQLException e) { 1069 catchInvoke(e); 1070 } 1071 return 0; 1072 } 1073 public byte[] getBytes(String parameterName) throws SQLException { 1074 preInvoke(); 1075 try { 1076 return cs.getBytes(parameterName); 1077 } catch (SQLException e) { 1078 catchInvoke(e); 1079 } 1080 return null; 1081 } 1082 public java.sql.Clob getClob(String parameterName) throws SQLException { 1083 preInvoke(); 1084 try { 1085 return cs.getClob(parameterName); 1086 } catch (SQLException e) { 1087 catchInvoke(e); 1088 } 1089 return null; 1090 } 1091 public java.sql.Date getDate(String parameterName) throws SQLException { 1092 preInvoke(); 1093 try { 1094 return cs.getDate(parameterName); 1095 } catch (SQLException e) { 1096 catchInvoke(e); 1097 } 1098 return null; 1099 } 1100 public java.sql.Date getDate(String parameterName, java.util.Calendar cal) 1101 throws SQLException { 1102 preInvoke(); 1103 try { 1104 return cs.getDate(parameterName, cal); 1105 } catch (SQLException e) { 1106 catchInvoke(e); 1107 } 1108 return null; 1109 } 1110 public double getDouble(String parameterName) throws SQLException { 1111 preInvoke(); 1112 try { 1113 return cs.getDouble(parameterName); 1114 } catch (SQLException e) { 1115 catchInvoke(e); 1116 } 1117 return 0; 1118 } 1119 public float getFloat(String parameterName) throws SQLException { 1120 preInvoke(); 1121 try { 1122 return cs.getFloat(parameterName); 1123 } catch (SQLException e) { 1124 catchInvoke(e); 1125 } 1126 return 0; 1127 } 1128 public int getInt(String parameterName) throws SQLException { 1129 preInvoke(); 1130 try { 1131 return cs.getInt(parameterName); 1132 } catch (SQLException e) { 1133 catchInvoke(e); 1134 } 1135 return 0; 1136 } 1137 public long getLong(String parameterName) throws SQLException { 1138 preInvoke(); 1139 try { 1140 return cs.getLong(parameterName); 1141 } catch (SQLException e) { 1142 catchInvoke(e); 1143 } 1144 return 0; 1145 } 1146 public Object getObject(String parameterName) throws SQLException { 1147 preInvoke(); 1148 try { 1149 return cs.getObject(parameterName); 1150 } catch (SQLException e) { 1151 catchInvoke(e); 1152 } 1153 return null; 1154 } 1155 public Object getObject(String parameterName, java.util.Map map) 1156 throws SQLException { 1157 preInvoke(); 1158 try { 1159 return cs.getObject(parameterName, map); 1160 } catch (SQLException e) { 1161 catchInvoke(e); 1162 } 1163 return null; 1164 } 1165 public java.sql.Ref getRef(String parameterName) throws SQLException { 1166 preInvoke(); 1167 try { 1168 return cs.getRef(parameterName); 1169 } catch (SQLException e) { 1170 catchInvoke(e); 1171 } 1172 return null; 1173 } 1174 public short getShort(String parameterName) throws SQLException { 1175 preInvoke(); 1176 try { 1177 return cs.getShort(parameterName); 1178 } catch (SQLException e) { 1179 catchInvoke(e); 1180 } 1181 return 0; 1182 } 1183 public String getString(String parameterName) throws SQLException { 1184 preInvoke(); 1185 try { 1186 return cs.getString(parameterName); 1187 } catch (SQLException e) { 1188 catchInvoke(e); 1189 } 1190 return null; 1191 } 1192 public java.sql.Time getTime(String parameterName) throws SQLException { 1193 preInvoke(); 1194 try { 1195 return cs.getTime(parameterName); 1196 } catch (SQLException e) { 1197 catchInvoke(e); 1198 } 1199 return null; 1200 } 1201 public java.sql.Time getTime(String parameterName, java.util.Calendar cal) 1202 throws SQLException { 1203 preInvoke(); 1204 try { 1205 return cs.getTime(parameterName, cal); 1206 } catch (SQLException e) { 1207 catchInvoke(e); 1208 } 1209 return null; 1210 } 1211 public java.sql.Timestamp getTimestamp(String parameterName) 1212 throws SQLException { 1213 preInvoke(); 1214 try { 1215 return cs.getTimestamp(parameterName); 1216 } catch (SQLException e) { 1217 catchInvoke(e); 1218 } 1219 return null; 1220 } 1221 public java.sql.Timestamp getTimestamp( 1222 String parameterName, 1223 java.util.Calendar cal) 1224 throws SQLException { 1225 preInvoke(); 1226 try { 1227 return cs.getTimestamp(parameterName, cal); 1228 } catch (SQLException e) { 1229 catchInvoke(e); 1230 } 1231 return null; 1232 } 1233 public java.net.URL getURL(int parameterIndex) throws SQLException { 1234 preInvoke(); 1235 try { 1236 return cs.getURL(parameterIndex); 1237 } catch (SQLException e) { 1238 catchInvoke(e); 1239 } 1240 return null; 1241 } 1242 public java.net.URL getURL(String parameterName) throws SQLException { 1243 preInvoke(); 1244 try { 1245 return cs.getURL(parameterName); 1246 } catch (SQLException e) { 1247 catchInvoke(e); 1248 } 1249 return null; 1250 } 1251 public void registerOutParameter(String parameterName, int sqlType) 1252 throws SQLException { 1253 preInvoke(); 1254 try { 1255 cs.registerOutParameter(parameterName, sqlType); 1256 } catch (SQLException e) { 1257 catchInvoke(e); 1258 } 1259 } 1260 public void registerOutParameter( 1261 String parameterName, 1262 int sqlType, 1263 int scale) 1264 throws SQLException { 1265 preInvoke(); 1266 try { 1267 cs.registerOutParameter(parameterName, sqlType, scale); 1268 } catch (SQLException e) { 1269 catchInvoke(e); 1270 } 1271 } 1272 public void registerOutParameter( 1273 String parameterName, 1274 int sqlType, 1275 String typeName) 1276 throws SQLException { 1277 preInvoke(); 1278 try { 1279 cs.registerOutParameter(parameterName, sqlType, typeName); 1280 } catch (SQLException e) { 1281 catchInvoke(e); 1282 } 1283 } 1284 public void setAsciiStream( 1285 String parameterName, 1286 java.io.InputStream x, 1287 int length) 1288 throws SQLException { 1289 preInvoke(); 1290 try { 1291 cs.setAsciiStream(parameterName, x, length); 1292 } catch (SQLException e) { 1293 catchInvoke(e); 1294 } 1295 } 1296 public void setBigDecimal(String parameterName, java.math.BigDecimal x) 1297 throws SQLException { 1298 preInvoke(); 1299 try { 1300 cs.setBigDecimal(parameterName, x); 1301 } catch (SQLException e) { 1302 catchInvoke(e); 1303 } 1304 } 1305 public void setBinaryStream( 1306 String parameterName, 1307 java.io.InputStream x, 1308 int length) 1309 throws SQLException { 1310 preInvoke(); 1311 try { 1312 cs.setBinaryStream(parameterName, x, length); 1313 } catch (SQLException e) { 1314 catchInvoke(e); 1315 } 1316 } 1317 public void setBoolean(String parameterName, boolean x) 1318 throws SQLException { 1319 preInvoke(); 1320 try { 1321 cs.setBoolean(parameterName, x); 1322 } catch (SQLException e) { 1323 catchInvoke(e); 1324 } 1325 } 1326 public void setByte(String parameterName, byte x) throws SQLException { 1327 preInvoke(); 1328 try { 1329 cs.setByte(parameterName, x); 1330 } catch (SQLException e) { 1331 catchInvoke(e); 1332 } 1333 } 1334 public void setBytes(String parameterName, byte[] x) throws SQLException { 1335 preInvoke(); 1336 try { 1337 cs.setBytes(parameterName, x); 1338 } catch (SQLException e) { 1339 catchInvoke(e); 1340 } 1341 } 1342 public void setCharacterStream( 1343 String parameterName, 1344 java.io.Reader reader, 1345 int length) 1346 throws SQLException { 1347 preInvoke(); 1348 try { 1349 cs.setCharacterStream(parameterName, reader, length); 1350 } catch (SQLException e) { 1351 catchInvoke(e); 1352 } 1353 } 1354 public void setDate(String parameterName, java.sql.Date x) 1355 throws SQLException { 1356 preInvoke(); 1357 try { 1358 cs.setDate(parameterName, x); 1359 } catch (SQLException e) { 1360 catchInvoke(e); 1361 } 1362 } 1363 public void setDate( 1364 String parameterName, 1365 java.sql.Date x, 1366 java.util.Calendar cal) 1367 throws SQLException { 1368 preInvoke(); 1369 try { 1370 cs.setDate(parameterName, x, cal); 1371 } catch (SQLException e) { 1372 catchInvoke(e); 1373 } 1374 } 1375 public void setDouble(String parameterName, double x) throws SQLException { 1376 preInvoke(); 1377 try { 1378 cs.setDouble(parameterName, x); 1379 } catch (SQLException e) { 1380 catchInvoke(e); 1381 } 1382 } 1383 public void setFloat(String parameterName, float x) throws SQLException { 1384 preInvoke(); 1385 try { 1386 cs.setFloat(parameterName, x); 1387 } catch (SQLException e) { 1388 catchInvoke(e); 1389 } 1390 } 1391 public void setInt(String parameterName, int x) throws SQLException { 1392 preInvoke(); 1393 try { 1394 cs.setInt(parameterName, x); 1395 } catch (SQLException e) { 1396 catchInvoke(e); 1397 } 1398 } 1399 public void setLong(String parameterName, long x) throws SQLException { 1400 preInvoke(); 1401 try { 1402 cs.setLong(parameterName, x); 1403 } catch (SQLException e) { 1404 catchInvoke(e); 1405 } 1406 } 1407 public void setNull(String parameterName, int sqlType) 1408 throws SQLException { 1409 preInvoke(); 1410 try { 1411 cs.setNull(parameterName, sqlType); 1412 } catch (SQLException e) { 1413 catchInvoke(e); 1414 } 1415 } 1416 public void setNull(String parameterName, int sqlType, String typeName) 1417 throws SQLException { 1418 preInvoke(); 1419 try { 1420 cs.setNull(parameterName, sqlType, typeName); 1421 } catch (SQLException e) { 1422 catchInvoke(e); 1423 } 1424 } 1425 public void setObject(String parameterName, Object x) throws SQLException { 1426 preInvoke(); 1427 try { 1428 cs.setObject(parameterName, x); 1429 } catch (SQLException e) { 1430 catchInvoke(e); 1431 } 1432 } 1433 public void setObject(String parameterName, Object x, int targetSqlType) 1434 throws SQLException { 1435 preInvoke(); 1436 try { 1437 cs.setObject(parameterName, x, targetSqlType); 1438 } catch (SQLException e) { 1439 catchInvoke(e); 1440 } 1441 } 1442 public void setObject( 1443 String parameterName, 1444 Object x, 1445 int targetSqlType, 1446 int sacle) 1447 throws SQLException { 1448 preInvoke(); 1449 try { 1450 cs.setObject(parameterName, x, targetSqlType, sacle); 1451 } catch (SQLException e) { 1452 catchInvoke(e); 1453 } 1454 } 1455 public void setShort(String parameterName, short x) throws SQLException { 1456 preInvoke(); 1457 try { 1458 cs.setShort(parameterName, x); 1459 } catch (SQLException e) { 1460 catchInvoke(e); 1461 } 1462 } 1463 public void setString(String parameterName, String x) throws SQLException { 1464 preInvoke(); 1465 try { 1466 cs.setString(parameterName, x); 1467 } catch (SQLException e) { 1468 catchInvoke(e); 1469 } 1470 } 1471 public void setTime(String parameterName, java.sql.Time x) 1472 throws SQLException { 1473 preInvoke(); 1474 try { 1475 cs.setTime(parameterName, x); 1476 } catch (SQLException e) { 1477 catchInvoke(e); 1478 } 1479 } 1480 public void setTime( 1481 String parameterName, 1482 java.sql.Time x, 1483 java.util.Calendar cal) 1484 throws SQLException { 1485 preInvoke(); 1486 try { 1487 cs.setTime(parameterName, x, cal); 1488 } catch (SQLException e) { 1489 catchInvoke(e); 1490 } 1491 } 1492 public void setTimestamp(String parameterName, java.sql.Timestamp x) 1493 throws SQLException { 1494 preInvoke(); 1495 try { 1496 cs.setTimestamp(parameterName, x); 1497 } catch (SQLException e) { 1498 catchInvoke(e); 1499 } 1500 } 1501 public void setTimestamp( 1502 String parameterName, 1503 java.sql.Timestamp x, 1504 java.util.Calendar cal) 1505 throws SQLException { 1506 preInvoke(); 1507 try { 1508 cs.setTimestamp(parameterName, x, cal); 1509 } catch (SQLException e) { 1510 catchInvoke(e); 1511 } 1512 } 1513 public void setURL(String parameterName, java.net.URL x) 1514 throws SQLException { 1515 preInvoke(); 1516 try { 1517 cs.setURL(parameterName, x); 1518 } catch (SQLException e) { 1519 catchInvoke(e); 1520 } 1521 } 1522 1523 1527 abstract public void preInvoke() throws SQLException ; 1528 abstract public void catchInvoke(SQLException e) throws SQLException ; 1529 1530} 1531 | Popular Tags |