1 28 29 package com.caucho.sql; 30 31 import com.caucho.log.Log; 32 import com.caucho.util.L10N; 33 34 import java.io.InputStream ; 35 import java.io.Reader ; 36 import java.math.BigDecimal ; 37 import java.net.URL ; 38 import java.sql.*; 39 import java.util.Calendar ; 40 import java.util.Map ; 41 import java.util.logging.Logger ; 42 43 46 public class UserCallableStatement extends UserPreparedStatement 47 implements CallableStatement { 48 protected final static Logger log = Log.open(UserCallableStatement.class); 49 protected static L10N L = new L10N(UserCallableStatement.class); 50 51 protected CallableStatement _cstmt; 52 private boolean _isClosed; 53 54 UserCallableStatement(UserConnection conn, 55 CallableStatement cStmt) 56 { 57 super(conn, cStmt); 58 59 _cstmt = cStmt; 60 61 if (cStmt == null) 62 throw new NullPointerException (); 63 } 64 65 68 public Array getArray(int i) 69 throws SQLException 70 { 71 return _cstmt.getArray(i); 72 } 73 74 77 public Array getArray(String name) 78 throws SQLException 79 { 80 return _cstmt.getArray(name); 81 } 82 83 86 public BigDecimal getBigDecimal(int i) 87 throws SQLException 88 { 89 return _cstmt.getBigDecimal(i); 90 } 91 92 95 public BigDecimal getBigDecimal(String name) 96 throws SQLException 97 { 98 return _cstmt.getBigDecimal(name); 99 } 100 101 104 public BigDecimal getBigDecimal(int i, int scale) 105 throws SQLException 106 { 107 return _cstmt.getBigDecimal(i, scale); 108 } 109 110 113 public Blob getBlob(int i) 114 throws SQLException 115 { 116 return _cstmt.getBlob(i); 117 } 118 119 122 public Blob getBlob(String name) 123 throws SQLException 124 { 125 return _cstmt.getBlob(name); 126 } 127 128 131 public boolean getBoolean(int i) 132 throws SQLException 133 { 134 return _cstmt.getBoolean(i); 135 } 136 137 140 public boolean getBoolean(String name) 141 throws SQLException 142 { 143 return _cstmt.getBoolean(name); 144 } 145 146 149 public byte getByte(int i) 150 throws SQLException 151 { 152 return _cstmt.getByte(i); 153 } 154 155 158 public byte getByte(String name) 159 throws SQLException 160 { 161 return _cstmt.getByte(name); 162 } 163 164 167 public byte []getBytes(int i) 168 throws SQLException 169 { 170 return _cstmt.getBytes(i); 171 } 172 173 176 public byte []getBytes(String name) 177 throws SQLException 178 { 179 return _cstmt.getBytes(name); 180 } 181 182 185 public Clob getClob(int i) 186 throws SQLException 187 { 188 return _cstmt.getClob(i); 189 } 190 191 194 public Clob getClob(String name) 195 throws SQLException 196 { 197 return _cstmt.getClob(name); 198 } 199 200 203 public Date getDate(int i) 204 throws SQLException 205 { 206 return _cstmt.getDate(i); 207 } 208 209 212 public Date getDate(String name) 213 throws SQLException 214 { 215 return _cstmt.getDate(name); 216 } 217 218 221 public Date getDate(int i, Calendar cal) 222 throws SQLException 223 { 224 return _cstmt.getDate(i, cal); 225 } 226 227 230 public Date getDate(String name, Calendar cal) 231 throws SQLException 232 { 233 return _cstmt.getDate(name); 234 } 235 236 239 public double getDouble(int i) 240 throws SQLException 241 { 242 return _cstmt.getDouble(i); 243 } 244 245 248 public double getDouble(String name) 249 throws SQLException 250 { 251 return _cstmt.getDouble(name); 252 } 253 254 257 public float getFloat(int i) 258 throws SQLException 259 { 260 return _cstmt.getFloat(i); 261 } 262 263 266 public float getFloat(String name) 267 throws SQLException 268 { 269 return _cstmt.getFloat(name); 270 } 271 272 275 public int getInt(int i) 276 throws SQLException 277 { 278 return _cstmt.getInt(i); 279 } 280 281 284 public int getInt(String name) 285 throws SQLException 286 { 287 return _cstmt.getInt(name); 288 } 289 290 293 public long getLong(int i) 294 throws SQLException 295 { 296 return _cstmt.getLong(i); 297 } 298 299 302 public long getLong(String name) 303 throws SQLException 304 { 305 return _cstmt.getLong(name); 306 } 307 308 311 public Object getObject(int i) 312 throws SQLException 313 { 314 return _cstmt.getObject(i); 315 } 316 317 320 public Object getObject(String name) 321 throws SQLException 322 { 323 return _cstmt.getObject(name); 324 } 325 326 329 public Object getObject(int i, Map <String ,Class <?>> map) 330 throws SQLException 331 { 332 return _cstmt.getObject(i); 333 } 334 335 338 public Object getObject(String name, Map <String ,Class <?>> map) 339 throws SQLException 340 { 341 return _cstmt.getObject(name); 342 } 343 344 347 public Ref getRef(int i) 348 throws SQLException 349 { 350 return _cstmt.getRef(i); 351 } 352 353 356 public Ref getRef(String name) 357 throws SQLException 358 { 359 return _cstmt.getRef(name); 360 } 361 362 365 public short getShort(int i) 366 throws SQLException 367 { 368 return _cstmt.getShort(i); 369 } 370 371 374 public short getShort(String name) 375 throws SQLException 376 { 377 return _cstmt.getShort(name); 378 } 379 380 383 public String getString(int i) 384 throws SQLException 385 { 386 return _cstmt.getString(i); 387 } 388 389 392 public String getString(String name) 393 throws SQLException 394 { 395 return _cstmt.getString(name); 396 } 397 398 401 public Time getTime(int i) 402 throws SQLException 403 { 404 return _cstmt.getTime(i); 405 } 406 407 410 public Time getTime(String name) 411 throws SQLException 412 { 413 return _cstmt.getTime(name); 414 } 415 416 419 public Time getTime(int i, Calendar cal) 420 throws SQLException 421 { 422 return _cstmt.getTime(i, cal); 423 } 424 425 428 public Time getTime(String name, Calendar cal) 429 throws SQLException 430 { 431 return _cstmt.getTime(name); 432 } 433 434 437 public Timestamp getTimestamp(int i) 438 throws SQLException 439 { 440 return _cstmt.getTimestamp(i); 441 } 442 443 446 public Timestamp getTimestamp(String name) 447 throws SQLException 448 { 449 return _cstmt.getTimestamp(name); 450 } 451 452 455 public Timestamp getTimestamp(int i, Calendar cal) 456 throws SQLException 457 { 458 return _cstmt.getTimestamp(i, cal); 459 } 460 461 464 public Timestamp getTimestamp(String name, Calendar cal) 465 throws SQLException 466 { 467 return _cstmt.getTimestamp(name); 468 } 469 470 473 public URL getURL(int i) 474 throws SQLException 475 { 476 return _cstmt.getURL(i); 477 } 478 479 482 public URL getURL(String name) 483 throws SQLException 484 { 485 return _cstmt.getURL(name); 486 } 487 488 491 public void registerOutParameter(int parameterIndex, int sqlType) 492 throws SQLException 493 { 494 _cstmt.registerOutParameter(parameterIndex, sqlType); 495 } 496 497 500 public void registerOutParameter(int parameterIndex, int sqlType, int scale) 501 throws SQLException 502 { 503 _cstmt.registerOutParameter(parameterIndex, sqlType, scale); 504 } 505 506 509 public void registerOutParameter(int parameterIndex, int sqlType, 510 String typeName) 511 throws SQLException 512 { 513 _cstmt.registerOutParameter(parameterIndex, sqlType, typeName); 514 } 515 516 519 public void registerOutParameter(String parameterName, int sqlType) 520 throws SQLException 521 { 522 _cstmt.registerOutParameter(parameterName, sqlType); 523 } 524 525 528 public void registerOutParameter(String parameterName, int sqlType, int scale) 529 throws SQLException 530 { 531 _cstmt.registerOutParameter(parameterName, sqlType, scale); 532 } 533 534 537 public void registerOutParameter(String parameterName, int sqlType, 538 String typeName) 539 throws SQLException 540 { 541 _cstmt.registerOutParameter(parameterName, sqlType, typeName); 542 } 543 544 547 public void setAsciiStream(String parameterName, 548 InputStream x, 549 int length) 550 throws SQLException 551 { 552 _cstmt.setAsciiStream(parameterName, x, length); 553 } 554 555 558 public void setBigDecimal(String parameterName, 559 BigDecimal x) 560 throws SQLException 561 { 562 _cstmt.setBigDecimal(parameterName, x); 563 } 564 565 568 public void setBinaryStream(String parameterName, 569 InputStream x, 570 int length) 571 throws SQLException 572 { 573 _cstmt.setBinaryStream(parameterName, x, length); 574 } 575 576 579 public void setBoolean(String parameterName, 580 boolean x) 581 throws SQLException 582 { 583 _cstmt.setBoolean(parameterName, x); 584 } 585 586 589 public void setByte(String parameterName, 590 byte x) 591 throws SQLException 592 { 593 _cstmt.setByte(parameterName, x); 594 } 595 596 599 public void setBytes(String parameterName, 600 byte []x) 601 throws SQLException 602 { 603 _cstmt.setBytes(parameterName, x); 604 } 605 606 609 public void setCharacterStream(String parameterName, 610 Reader reader, 611 int length) 612 throws SQLException 613 { 614 _cstmt.setCharacterStream(parameterName, reader, length); 615 } 616 617 620 public void setDate(String parameterName, 621 Date x) 622 throws SQLException 623 { 624 _cstmt.setDate(parameterName, x); 625 } 626 627 630 public void setDate(String parameterName, 631 Date x, 632 Calendar cal) 633 throws SQLException 634 { 635 _cstmt.setDate(parameterName, x, cal); 636 } 637 638 641 public void setDouble(String parameterName, 642 double x) 643 throws SQLException 644 { 645 _cstmt.setDouble(parameterName, x); 646 } 647 648 651 public void setFloat(String parameterName, 652 float x) 653 throws SQLException 654 { 655 _cstmt.setFloat(parameterName, x); 656 } 657 658 661 public void setInt(String parameterName, 662 int x) 663 throws SQLException 664 { 665 _cstmt.setInt(parameterName, x); 666 } 667 668 671 public void setLong(String parameterName, 672 long x) 673 throws SQLException 674 { 675 _cstmt.setLong(parameterName, x); 676 } 677 678 681 public void setNull(String parameterName, 682 int sqlType) 683 throws SQLException 684 { 685 _cstmt.setNull(parameterName, sqlType); 686 } 687 688 691 public void setNull(String parameterName, 692 int sqlType, 693 String typeName) 694 throws SQLException 695 { 696 _cstmt.setNull(parameterName, sqlType, typeName); 697 } 698 699 702 public void setObject(String parameterName, 703 Object x) 704 throws SQLException 705 { 706 _cstmt.setObject(parameterName, x); 707 } 708 709 712 public void setObject(String parameterName, 713 Object x, int type) 714 throws SQLException 715 { 716 _cstmt.setObject(parameterName, x, type); 717 } 718 719 722 public void setObject(String parameterName, 723 Object x, int type, int scale) 724 throws SQLException 725 { 726 _cstmt.setObject(parameterName, x, type, scale); 727 } 728 729 732 public void setShort(String parameterName, 733 short x) 734 throws SQLException 735 { 736 _cstmt.setShort(parameterName, x); 737 } 738 739 742 public void setString(String parameterName, 743 String x) 744 throws SQLException 745 { 746 _cstmt.setString(parameterName, x); 747 } 748 749 752 public void setTime(String parameterName, 753 Time x) 754 throws SQLException 755 { 756 _cstmt.setTime(parameterName, x); 757 } 758 759 762 public void setTime(String parameterName, 763 Time x, 764 Calendar cal) 765 throws SQLException 766 { 767 _cstmt.setTime(parameterName, x, cal); 768 } 769 770 773 public void setTimestamp(String parameterName, 774 Timestamp x) 775 throws SQLException 776 { 777 _cstmt.setTimestamp(parameterName, x); 778 } 779 780 783 public void setTimestamp(String parameterName, 784 Timestamp x, 785 Calendar cal) 786 throws SQLException 787 { 788 _cstmt.setTimestamp(parameterName, x, cal); 789 } 790 791 794 public void setURL(String parameterName, 795 URL x) 796 throws SQLException 797 { 798 _cstmt.setURL(parameterName, x); 799 } 800 801 804 public boolean wasNull() 805 throws SQLException 806 { 807 return _cstmt.wasNull(); 808 } 809 810 813 public void close() 814 throws SQLException 815 { 816 synchronized (this) { 817 if (_isClosed) 818 return; 819 _isClosed = true; 820 } 821 822 super.close(); 823 } 824 } 825 | Popular Tags |