001: /*
002: * Copyright 2004-2008 H2 Group. Licensed under the H2 License, Version 1.0
003: * (http://h2database.com/html/license.html).
004: * Initial Developer: H2 Group
005: */
006: package org.h2.jdbc;
007:
008: import java.io.InputStream;
009: import java.io.Reader;
010: import java.math.BigDecimal;
011: import java.net.URL;
012: import java.sql.Array;
013: import java.sql.Blob;
014: import java.sql.CallableStatement;
015: import java.sql.Clob;
016: import java.sql.Date;
017: import java.sql.Ref; //#ifdef JDK16
018: /*
019: import java.sql.NClob;
020: import java.sql.SQLXML;
021: import java.sql.RowId;
022: */
023:
024: //#endif
025: import java.sql.SQLException;
026: import java.sql.Time;
027: import java.sql.Timestamp;
028: import java.util.Calendar;
029: import java.util.Map;
030:
031: import org.h2.engine.SessionInterface;
032: import org.h2.message.Message;
033: import org.h2.message.TraceObject;
034:
035: /**
036: * Represents a callable statement.
037: *
038: */
039: public class JdbcCallableStatement extends JdbcPreparedStatement
040: implements CallableStatement {
041:
042: /**
043: * [Not supported]
044: */
045: public void registerOutParameter(int parameterIndex, int sqlType)
046: throws SQLException {
047: throw Message.getUnsupportedException();
048: }
049:
050: /**
051: * [Not supported]
052: */
053: public void registerOutParameter(int parameterIndex, int sqlType,
054: int scale) throws SQLException {
055: throw Message.getUnsupportedException();
056: }
057:
058: /**
059: * [Not supported]
060: */
061: public boolean wasNull() throws SQLException {
062: throw Message.getUnsupportedException();
063: }
064:
065: /**
066: * [Not supported]
067: */
068: public String getString(int parameterIndex) throws SQLException {
069: throw Message.getUnsupportedException();
070: }
071:
072: /**
073: * [Not supported]
074: */
075: public boolean getBoolean(int parameterIndex) throws SQLException {
076: throw Message.getUnsupportedException();
077: }
078:
079: /**
080: * [Not supported]
081: */
082: public byte getByte(int parameterIndex) throws SQLException {
083: throw Message.getUnsupportedException();
084: }
085:
086: /**
087: * [Not supported]
088: */
089: public short getShort(int parameterIndex) throws SQLException {
090: throw Message.getUnsupportedException();
091: }
092:
093: /**
094: * [Not supported]
095: */
096: public int getInt(int parameterIndex) throws SQLException {
097: throw Message.getUnsupportedException();
098: }
099:
100: /**
101: * [Not supported]
102: */
103: public long getLong(int parameterIndex) throws SQLException {
104: throw Message.getUnsupportedException();
105: }
106:
107: /**
108: * [Not supported]
109: */
110: public float getFloat(int parameterIndex) throws SQLException {
111: throw Message.getUnsupportedException();
112: }
113:
114: /**
115: * [Not supported]
116: */
117: public double getDouble(int parameterIndex) throws SQLException {
118: throw Message.getUnsupportedException();
119: }
120:
121: /**
122: * [Not supported]
123: * @deprecated
124: */
125: public BigDecimal getBigDecimal(int parameterIndex, int scale)
126: throws SQLException {
127: throw Message.getUnsupportedException();
128: }
129:
130: /**
131: * [Not supported]
132: */
133: public byte[] getBytes(int parameterIndex) throws SQLException {
134: throw Message.getUnsupportedException();
135: }
136:
137: /**
138: * [Not supported]
139: */
140: public Date getDate(int parameterIndex) throws SQLException {
141: throw Message.getUnsupportedException();
142: }
143:
144: /**
145: * [Not supported]
146: */
147: public Time getTime(int parameterIndex) throws SQLException {
148: throw Message.getUnsupportedException();
149: }
150:
151: /**
152: * [Not supported]
153: */
154: public Timestamp getTimestamp(int parameterIndex)
155: throws SQLException {
156: throw Message.getUnsupportedException();
157: }
158:
159: /**
160: * [Not supported]
161: */
162: public Object getObject(int parameterIndex) throws SQLException {
163: throw Message.getUnsupportedException();
164: }
165:
166: /**
167: * [Not supported]
168: */
169: public BigDecimal getBigDecimal(int parameterIndex)
170: throws SQLException {
171: throw Message.getUnsupportedException();
172: }
173:
174: /**
175: * [Not supported]
176: */
177: public Object getObject(int i, Map map) throws SQLException {
178: throw Message.getUnsupportedException();
179: }
180:
181: /**
182: * [Not supported]
183: */
184: public Ref getRef(int i) throws SQLException {
185: throw Message.getUnsupportedException();
186: }
187:
188: /**
189: * [Not supported]
190: */
191: public Blob getBlob(int i) throws SQLException {
192: throw Message.getUnsupportedException();
193: }
194:
195: /**
196: * [Not supported]
197: */
198: public Clob getClob(int i) throws SQLException {
199: throw Message.getUnsupportedException();
200: }
201:
202: /**
203: * [Not supported]
204: */
205: public Array getArray(int i) throws SQLException {
206: throw Message.getUnsupportedException();
207: }
208:
209: /**
210: * [Not supported]
211: */
212: public Date getDate(int parameterIndex, Calendar cal)
213: throws SQLException {
214: throw Message.getUnsupportedException();
215: }
216:
217: /**
218: * [Not supported]
219: */
220: public Time getTime(int parameterIndex, Calendar cal)
221: throws SQLException {
222: throw Message.getUnsupportedException();
223: }
224:
225: /**
226: * [Not supported]
227: */
228: public Timestamp getTimestamp(int parameterIndex, Calendar cal)
229: throws SQLException {
230: throw Message.getUnsupportedException();
231: }
232:
233: /**
234: * [Not supported]
235: */
236: public void registerOutParameter(int paramIndex, int sqlType,
237: String typeName) throws SQLException {
238: throw Message.getUnsupportedException();
239: }
240:
241: /**
242: * [Not supported]
243: *
244: */
245: public URL getURL(String parameterName) throws SQLException {
246: throw Message.getUnsupportedException();
247: }
248:
249: /**
250: * [Not supported]
251: *
252: */
253: public Timestamp getTimestamp(String parameterName, Calendar cal)
254: throws SQLException {
255: throw Message.getUnsupportedException();
256: }
257:
258: /**
259: * [Not supported]
260: */
261: public Time getTime(String parameterName, Calendar cal)
262: throws SQLException {
263: throw Message.getUnsupportedException();
264: }
265:
266: /**
267: * [Not supported]
268: */
269: public Date getDate(String parameterName, Calendar cal)
270: throws SQLException {
271: throw Message.getUnsupportedException();
272: }
273:
274: /**
275: * [Not supported]
276: */
277: public Array getArray(String parameterName) throws SQLException {
278: throw Message.getUnsupportedException();
279: }
280:
281: /**
282: * [Not supported]
283: */
284: public Clob getClob(String parameterName) throws SQLException {
285: throw Message.getUnsupportedException();
286: }
287:
288: /**
289: * [Not supported]
290: */
291: public Blob getBlob(String parameterName) throws SQLException {
292: throw Message.getUnsupportedException();
293: }
294:
295: /**
296: * [Not supported]
297: */
298: public Ref getRef(String parameterName) throws SQLException {
299: throw Message.getUnsupportedException();
300: }
301:
302: /**
303: * [Not supported]
304: */
305: public Object getObject(String parameterName, Map map)
306: throws SQLException {
307: throw Message.getUnsupportedException();
308: }
309:
310: /**
311: * [Not supported]
312: */
313: public BigDecimal getBigDecimal(String parameterName)
314: throws SQLException {
315: throw Message.getUnsupportedException();
316: }
317:
318: /**
319: * [Not supported]
320: */
321: public Object getObject(String parameterName) throws SQLException {
322: throw Message.getUnsupportedException();
323: }
324:
325: /**
326: * [Not supported]
327: */
328: public Timestamp getTimestamp(String parameterName)
329: throws SQLException {
330: throw Message.getUnsupportedException();
331: }
332:
333: /**
334: * [Not supported]
335: */
336: public Time getTime(String parameterName) throws SQLException {
337: throw Message.getUnsupportedException();
338: }
339:
340: /**
341: * [Not supported]
342: */
343: public Date getDate(String parameterName) throws SQLException {
344: throw Message.getUnsupportedException();
345: }
346:
347: /**
348: * [Not supported]
349: */
350: public byte[] getBytes(String parameterName) throws SQLException {
351: throw Message.getUnsupportedException();
352: }
353:
354: /**
355: * [Not supported]
356: */
357: public double getDouble(String parameterName) throws SQLException {
358: throw Message.getUnsupportedException();
359: }
360:
361: /**
362: * [Not supported]
363: */
364: public float getFloat(String parameterName) throws SQLException {
365: throw Message.getUnsupportedException();
366: }
367:
368: /**
369: * [Not supported]
370: */
371: public long getLong(String parameterName) throws SQLException {
372: throw Message.getUnsupportedException();
373: }
374:
375: /**
376: * [Not supported]
377: */
378: public int getInt(String parameterName) throws SQLException {
379: throw Message.getUnsupportedException();
380: }
381:
382: /**
383: * [Not supported]
384: */
385: public short getShort(String parameterName) throws SQLException {
386: throw Message.getUnsupportedException();
387: }
388:
389: /**
390: * [Not supported]
391: */
392: public byte getByte(String parameterName) throws SQLException {
393: throw Message.getUnsupportedException();
394: }
395:
396: /**
397: * [Not supported]
398: */
399: public boolean getBoolean(String parameterName) throws SQLException {
400: throw Message.getUnsupportedException();
401: }
402:
403: /**
404: * [Not supported]
405: */
406: public String getString(String parameterName) throws SQLException {
407: throw Message.getUnsupportedException();
408: }
409:
410: // --- setters --------------------------------------------------
411:
412: /**
413: * [Not supported]
414: */
415: public void setNull(String parameterName, int sqlType,
416: String typeName) throws SQLException {
417: throw Message.getUnsupportedException();
418: }
419:
420: /**
421: * [Not supported]
422: */
423: public void setTimestamp(String parameterName, Timestamp x,
424: Calendar cal) throws SQLException {
425: throw Message.getUnsupportedException();
426: }
427:
428: /**
429: * [Not supported]
430: */
431: public void setTime(String parameterName, Time x, Calendar cal)
432: throws SQLException {
433: throw Message.getUnsupportedException();
434: }
435:
436: /**
437: * [Not supported]
438: */
439: public void setDate(String parameterName, Date x, Calendar cal)
440: throws SQLException {
441: throw Message.getUnsupportedException();
442: }
443:
444: /**
445: * [Not supported]
446: */
447: public void setCharacterStream(String parameterName, Reader reader,
448: int length) throws SQLException {
449: throw Message.getUnsupportedException();
450: }
451:
452: /**
453: * [Not supported]
454: */
455: public void setObject(String parameterName, Object x)
456: throws SQLException {
457: throw Message.getUnsupportedException();
458: }
459:
460: /**
461: * [Not supported]
462: */
463: public void setObject(String parameterName, Object x,
464: int targetSqlType) throws SQLException {
465: throw Message.getUnsupportedException();
466: }
467:
468: /**
469: * [Not supported]
470: */
471: public void setObject(String parameterName, Object x,
472: int targetSqlType, int scale) throws SQLException {
473: throw Message.getUnsupportedException();
474: }
475:
476: /**
477: * [Not supported]
478: */
479: public void setBinaryStream(String parameterName, InputStream x,
480: int length) throws SQLException {
481: throw Message.getUnsupportedException();
482: }
483:
484: /**
485: * [Not supported]
486: */
487: public void setAsciiStream(String parameterName, InputStream x,
488: long length) throws SQLException {
489: throw Message.getUnsupportedException();
490: }
491:
492: /**
493: * [Not supported]
494: */
495: public void setTimestamp(String parameterName, Timestamp x)
496: throws SQLException {
497: throw Message.getUnsupportedException();
498: }
499:
500: /**
501: * [Not supported]
502: */
503: public void setTime(String parameterName, Time x)
504: throws SQLException {
505: throw Message.getUnsupportedException();
506: }
507:
508: /**
509: * [Not supported]
510: */
511: public void setDate(String parameterName, Date x)
512: throws SQLException {
513: throw Message.getUnsupportedException();
514: }
515:
516: /**
517: * [Not supported]
518: */
519: public void setBytes(String parameterName, byte[] x)
520: throws SQLException {
521: throw Message.getUnsupportedException();
522: }
523:
524: /**
525: * [Not supported]
526: */
527: public void setString(String parameterName, String x)
528: throws SQLException {
529: throw Message.getUnsupportedException();
530: }
531:
532: /**
533: * [Not supported]
534: */
535: public void setBigDecimal(String parameterName, BigDecimal x)
536: throws SQLException {
537: throw Message.getUnsupportedException();
538: }
539:
540: /**
541: * [Not supported]
542: */
543: public void setDouble(String parameterName, double x)
544: throws SQLException {
545: throw Message.getUnsupportedException();
546: }
547:
548: /**
549: * [Not supported]
550: */
551: public void setFloat(String parameterName, float x)
552: throws SQLException {
553: throw Message.getUnsupportedException();
554: }
555:
556: /**
557: * [Not supported]
558: */
559: public void setLong(String parameterName, long x)
560: throws SQLException {
561: throw Message.getUnsupportedException();
562: }
563:
564: /**
565: * [Not supported]
566: */
567: public void setInt(String parameterName, int x) throws SQLException {
568: throw Message.getUnsupportedException();
569: }
570:
571: /**
572: * [Not supported]
573: */
574: public void setShort(String parameterName, short x)
575: throws SQLException {
576: throw Message.getUnsupportedException();
577: }
578:
579: /**
580: * [Not supported]
581: */
582: public void setByte(String parameterName, byte x)
583: throws SQLException {
584: throw Message.getUnsupportedException();
585: }
586:
587: /**
588: * [Not supported]
589: */
590: public void setBoolean(String parameterName, boolean x)
591: throws SQLException {
592: throw Message.getUnsupportedException();
593: }
594:
595: /**
596: * [Not supported]
597: */
598: public void setNull(String parameterName, int sqlType)
599: throws SQLException {
600: throw Message.getUnsupportedException();
601: }
602:
603: /**
604: * [Not supported]
605: */
606: public void setURL(String parameterName, URL val)
607: throws SQLException {
608: throw Message.getUnsupportedException();
609: }
610:
611: /**
612: * [Not supported]
613: */
614: public URL getURL(int parameterIndex) throws SQLException {
615: throw Message.getUnsupportedException();
616: }
617:
618: // --- other methods --------------------------------------------
619:
620: /**
621: * [Not supported]
622: */
623: public void registerOutParameter(String parameterName, int sqlType,
624: String typeName) throws SQLException {
625: throw Message.getUnsupportedException();
626: }
627:
628: /**
629: * [Not supported]
630: */
631: public void registerOutParameter(String parameterName, int sqlType,
632: int scale) throws SQLException {
633: throw Message.getUnsupportedException();
634: }
635:
636: /**
637: * [Not supported]
638: */
639: public void registerOutParameter(String parameterName, int sqlType)
640: throws SQLException {
641: throw Message.getUnsupportedException();
642: }
643:
644: // =============================================================
645:
646: JdbcCallableStatement(SessionInterface session,
647: JdbcConnection conn, String sql, int resultSetType, int id)
648: throws SQLException {
649: super (session, conn, sql, resultSetType, id, false);
650: setTrace(session.getTrace(), TraceObject.CALLABLE_STATEMENT, id);
651: }
652:
653: /**
654: * [Not supported]
655: */
656: //#ifdef JDK16
657: /*
658: public RowId getRowId(int parameterIndex) throws SQLException {
659: throw Message.getUnsupportedException();
660: }
661: */
662: //#endif
663: /**
664: * [Not supported]
665: */
666: //#ifdef JDK16
667: /*
668: public RowId getRowId(String parameterName) throws SQLException {
669: throw Message.getUnsupportedException();
670: }
671: */
672: //#endif
673: /**
674: * [Not supported]
675: */
676: //#ifdef JDK16
677: /*
678: public void setRowId(String parameterName, RowId x) throws SQLException {
679: throw Message.getUnsupportedException();
680: }
681: */
682: //#endif
683: /**
684: * [Not supported]
685: */
686: public void setNString(String parameterName, String value)
687: throws SQLException {
688: throw Message.getUnsupportedException();
689: }
690:
691: /**
692: * [Not supported]
693: */
694: public void setNCharacterStream(String parameterName, Reader value,
695: long length) throws SQLException {
696: throw Message.getUnsupportedException();
697: }
698:
699: /**
700: * [Not supported]
701: */
702: //#ifdef JDK16
703: /*
704: public void setNClob(String parameterName, NClob value) throws SQLException {
705: throw Message.getUnsupportedException();
706: }
707: */
708: //#endif
709: /**
710: * [Not supported]
711: */
712: public void setClob(String parameterName, Reader reader, long length)
713: throws SQLException {
714: throw Message.getUnsupportedException();
715: }
716:
717: /**
718: * [Not supported]
719: */
720: public void setBlob(String parameterName, InputStream inputStream,
721: long length) throws SQLException {
722: throw Message.getUnsupportedException();
723: }
724:
725: /**
726: * [Not supported]
727: */
728: public void setNClob(String parameterName, Reader reader,
729: long length) throws SQLException {
730: throw Message.getUnsupportedException();
731: }
732:
733: /**
734: * [Not supported]
735: */
736: //#ifdef JDK16
737: /*
738: public NClob getNClob(int parameterIndex) throws SQLException {
739: throw Message.getUnsupportedException();
740: }
741: */
742: //#endif
743: /**
744: * [Not supported]
745: */
746: //#ifdef JDK16
747: /*
748: public NClob getNClob(String parameterName) throws SQLException {
749: throw Message.getUnsupportedException();
750: }
751: */
752: //#endif
753: /**
754: * [Not supported]
755: */
756: //#ifdef JDK16
757: /*
758: public void setSQLXML(String parameterName, SQLXML xmlObject)
759: throws SQLException {
760: throw Message.getUnsupportedException();
761: }
762: */
763: //#endif
764: /**
765: * [Not supported]
766: */
767: //#ifdef JDK16
768: /*
769: public SQLXML getSQLXML(int parameterIndex) throws SQLException {
770: throw Message.getUnsupportedException();
771: }
772: */
773: //#endif
774: /**
775: * [Not supported]
776: */
777: //#ifdef JDK16
778: /*
779: public SQLXML getSQLXML(String parameterName) throws SQLException {
780: throw Message.getUnsupportedException();
781: }
782: */
783: //#endif
784: /**
785: * [Not supported]
786: */
787: public String getNString(int parameterIndex) throws SQLException {
788: throw Message.getUnsupportedException();
789: }
790:
791: /**
792: * [Not supported]
793: */
794: public String getNString(String parameterName) throws SQLException {
795: throw Message.getUnsupportedException();
796: }
797:
798: /**
799: * [Not supported]
800: */
801: public Reader getNCharacterStream(int parameterIndex)
802: throws SQLException {
803: throw Message.getUnsupportedException();
804: }
805:
806: /**
807: * [Not supported]
808: */
809: public Reader getNCharacterStream(String parameterName)
810: throws SQLException {
811: throw Message.getUnsupportedException();
812: }
813:
814: /**
815: * [Not supported]
816: */
817: public Reader getCharacterStream(int parameterIndex)
818: throws SQLException {
819: throw Message.getUnsupportedException();
820: }
821:
822: /**
823: * [Not supported]
824: */
825: public Reader getCharacterStream(String parameterName)
826: throws SQLException {
827: throw Message.getUnsupportedException();
828: }
829:
830: /**
831: * [Not supported]
832: */
833: public void setBlob(String parameterName, Blob x)
834: throws SQLException {
835: throw Message.getUnsupportedException();
836: }
837:
838: /**
839: * [Not supported]
840: */
841: public void setClob(String parameterName, Clob x)
842: throws SQLException {
843: throw Message.getUnsupportedException();
844: }
845:
846: /**
847: * [Not supported]
848: */
849: public void setAsciiStream(String parameterName, InputStream x)
850: throws SQLException {
851: throw Message.getUnsupportedException();
852: }
853:
854: /**
855: * [Not supported]
856: */
857: public void setAsciiStream(String parameterName, InputStream x,
858: int length) throws SQLException {
859: throw Message.getUnsupportedException();
860: }
861:
862: /**
863: * [Not supported]
864: */
865: public void setBinaryStream(String parameterName, InputStream x)
866: throws SQLException {
867: throw Message.getUnsupportedException();
868: }
869:
870: /**
871: * [Not supported]
872: */
873: public void setBinaryStream(String parameterName, InputStream x,
874: long length) throws SQLException {
875: throw Message.getUnsupportedException();
876: }
877:
878: /**
879: * [Not supported]
880: */
881: public void setBlob(String parameterName, InputStream x)
882: throws SQLException {
883: throw Message.getUnsupportedException();
884: }
885:
886: /**
887: * [Not supported]
888: */
889: public void setCharacterStream(String parameterName, Reader x)
890: throws SQLException {
891: throw Message.getUnsupportedException();
892: }
893:
894: /**
895: * [Not supported]
896: */
897: public void setCharacterStream(String parameterName, Reader x,
898: long length) throws SQLException {
899: throw Message.getUnsupportedException();
900: }
901:
902: /**
903: * [Not supported]
904: */
905: public void setClob(String parameterName, Reader x)
906: throws SQLException {
907: throw Message.getUnsupportedException();
908: }
909:
910: /**
911: * [Not supported]
912: */
913: public void setNCharacterStream(String parameterName, Reader x)
914: throws SQLException {
915: throw Message.getUnsupportedException();
916: }
917:
918: /**
919: * [Not supported]
920: */
921: public void setNClob(String parameterName, Reader x)
922: throws SQLException {
923: throw Message.getUnsupportedException();
924: }
925:
926: }
|