001: /*
002: * Copyright (c) 1998 - 2005 Versant Corporation
003: * All rights reserved. This program and the accompanying materials
004: * are made available under the terms of the Eclipse Public License v1.0
005: * which accompanies this distribution, and is available at
006: * http://www.eclipse.org/legal/epl-v10.html
007: *
008: * Contributors:
009: * Versant Corporation - initial API and implementation
010: */
011: package com.versant.core.jdbc.conn;
012:
013: import com.versant.core.logging.LogEventStore;
014: import com.versant.core.jdbc.logging.JdbcStatementEvent;
015: import com.versant.core.jdbc.logging.JdbcResultSetEvent;
016: import com.versant.core.jdbc.logging.JdbcLogEvent;
017: import com.versant.core.logging.LogEventStore;
018:
019: import java.math.BigDecimal;
020: import java.io.InputStream;
021: import java.io.Reader;
022: import java.util.Map;
023: import java.util.Calendar;
024: import java.sql.*;
025: import java.net.URL;
026:
027: import com.versant.core.common.BindingSupportImpl;
028:
029: /**
030: * A JDBC ResultSet wrapped for logging.
031: */
032: public final class LoggingResultSet implements ResultSet {
033:
034: private LoggingStatement proxyStatement;
035: private String sql;
036: private ResultSet resultSet;
037: private LogEventStore pes;
038: private Object[] row = new Object[8];
039: private int rowSize;
040:
041: public LoggingResultSet(LoggingStatement proxyStatement,
042: String sql, ResultSet resultSet, LogEventStore pes) {
043: this .proxyStatement = proxyStatement;
044: this .sql = sql;
045: this .resultSet = resultSet;
046: this .pes = pes;
047: }
048:
049: /**
050: * Add data for the current row to ev and reset the data store.
051: */
052: private void addRowToEvent(JdbcResultSetEvent ev) {
053: if (rowSize > 0) {
054: ev.setRow(getRowData());
055: rowSize = 0;
056: }
057: }
058:
059: /**
060: * Get whatever data we have for the current row. This may be an empty
061: * array.
062: */
063: public Object[] getRowData() {
064: Object[] a = new Object[rowSize];
065: System.arraycopy(row, 0, a, 0, rowSize);
066: return a;
067: }
068:
069: /**
070: * Get whatever data we have for the current row in a String.
071: */
072: public String getRowDataString() {
073: Object[] a = getRowData();
074: StringBuffer s = new StringBuffer();
075: s.append('[');
076: for (int i = 0; i < a.length; i++) {
077: if (i > 0)
078: s.append(", ");
079: try {
080: s.append(a[i]);
081: } catch (Exception e) {
082: s.append("<toString failed: ");
083: s.append(e.toString());
084: s.append('>');
085: }
086: }
087: s.append(']');
088: return s.toString();
089: }
090:
091: /**
092: * Get the original SQL statement for this ResultSet.
093: */
094: public String getSql() {
095: return sql;
096: }
097:
098: private void setRow(int columnIndex, Object x) {
099: if (columnIndex > rowSize)
100: rowSize = columnIndex;
101: int i = columnIndex - 1;
102: int n = row.length;
103: if (i >= n) {
104: Object[] a = new Object[i * 2];
105: System.arraycopy(row, 0, a, 0, n);
106: row = a;
107: }
108: row[i] = x;
109: }
110:
111: // public URL getURL(int columnIndex) throws SQLException {
112: // return resultSet.getURL(columnIndex);
113: // }
114: //
115: // public URL getURL(String columnName) throws SQLException {
116: // return resultSet.getURL(columnName);
117: // }
118: //
119: // public void updateRef(int columnIndex, Ref x) throws SQLException {
120: // resultSet.updateRef(columnIndex, x);
121: // }
122: //
123: // public void updateRef(String columnName, Ref x) throws SQLException {
124: // resultSet.updateRef(columnName, x);
125: // }
126: //
127: // public void updateBlob(int columnIndex, Blob x) throws SQLException {
128: // resultSet.updateBlob(columnIndex, x);
129: // }
130: //
131: // public void updateBlob(String columnName, Blob x) throws SQLException {
132: // resultSet.updateBlob(columnName, x);
133: // }
134: //
135: // public void updateClob(int columnIndex, Clob x) throws SQLException {
136: // resultSet.updateClob(columnIndex, x);
137: // }
138: //
139: // public void updateClob(String columnName, Clob x) throws SQLException {
140: // resultSet.updateClob(columnName, x);
141: // }
142: //
143: // public void updateArray(int columnIndex, Array x) throws SQLException {
144: // resultSet.updateArray(columnIndex, x);
145: // }
146: //
147: // public void updateArray(String columnName, Array x) throws SQLException {
148: // resultSet.updateArray(columnName, x);
149: // }
150:
151: public boolean next() throws SQLException {
152: JdbcResultSetEvent ev = new JdbcResultSetEvent(0, this , null,
153: JdbcStatementEvent.RS_NEXT);
154: addRowToEvent(ev);
155: pes.log(ev);
156: try {
157: boolean ans = resultSet.next();
158: ev.setNext(ans);
159: return ans;
160: } catch (SQLException e) {
161: ev.setErrorMsg(e);
162: throw e;
163: } catch (RuntimeException e) {
164: ev.setErrorMsg(e);
165: throw e;
166: } finally {
167: ev.updateTotalMs();
168: }
169: }
170:
171: public void close() throws SQLException {
172: JdbcResultSetEvent ev = new JdbcResultSetEvent(0, this , null,
173: JdbcStatementEvent.RS_CLOSE);
174: addRowToEvent(ev);
175: pes.log(ev);
176: try {
177: resultSet.close();
178: } catch (SQLException e) {
179: ev.setErrorMsg(e);
180: throw e;
181: } catch (RuntimeException e) {
182: ev.setErrorMsg(e);
183: throw e;
184: } finally {
185: ev.updateTotalMs();
186: }
187: }
188:
189: public boolean wasNull() throws SQLException {
190: return resultSet.wasNull();
191: }
192:
193: public String getString(int columnIndex) throws SQLException {
194: String s = resultSet.getString(columnIndex);
195: setRow(columnIndex, s);
196: return s;
197: }
198:
199: public boolean getBoolean(int columnIndex) throws SQLException {
200: boolean b = resultSet.getBoolean(columnIndex);
201: setRow(columnIndex, b ? Boolean.TRUE : Boolean.FALSE);
202: return b;
203: }
204:
205: public byte getByte(int columnIndex) throws SQLException {
206: byte b = resultSet.getByte(columnIndex);
207: setRow(columnIndex, new Byte(b));
208: return b;
209: }
210:
211: public short getShort(int columnIndex) throws SQLException {
212: short s = resultSet.getShort(columnIndex);
213: setRow(columnIndex, new Short(s));
214: return s;
215: }
216:
217: public int getInt(int columnIndex) throws SQLException {
218: int x = resultSet.getInt(columnIndex);
219: setRow(columnIndex, new Integer(x));
220: return x;
221: }
222:
223: public long getLong(int columnIndex) throws SQLException {
224: long x = resultSet.getLong(columnIndex);
225: setRow(columnIndex, new Long(x));
226: return x;
227: }
228:
229: public float getFloat(int columnIndex) throws SQLException {
230: float x = resultSet.getFloat(columnIndex);
231: setRow(columnIndex, new Float(x));
232: return x;
233: }
234:
235: public double getDouble(int columnIndex) throws SQLException {
236: double x = resultSet.getDouble(columnIndex);
237: setRow(columnIndex, new Double(x));
238: return x;
239: }
240:
241: public BigDecimal getBigDecimal(int columnIndex, int scale)
242: throws SQLException {
243: BigDecimal x = resultSet.getBigDecimal(columnIndex, scale);
244: setRow(columnIndex, x);
245: return x;
246: }
247:
248: public byte[] getBytes(int columnIndex) throws SQLException {
249: byte[] x = resultSet.getBytes(columnIndex);
250: setRow(columnIndex, x);
251: return x;
252: }
253:
254: public Date getDate(int columnIndex) throws SQLException {
255: Date x = resultSet.getDate(columnIndex);
256: setRow(columnIndex, x);
257: return x;
258: }
259:
260: public Time getTime(int columnIndex) throws SQLException {
261: Time x = resultSet.getTime(columnIndex);
262: setRow(columnIndex, x);
263: return x;
264: }
265:
266: public Timestamp getTimestamp(int columnIndex) throws SQLException {
267: Timestamp x = resultSet.getTimestamp(columnIndex);
268: setRow(columnIndex, x);
269: return x;
270: }
271:
272: public BigDecimal getBigDecimal(int columnIndex)
273: throws SQLException {
274: BigDecimal x = resultSet.getBigDecimal(columnIndex);
275: setRow(columnIndex, x);
276: return x;
277: }
278:
279: public Object getObject(int columnIndex) throws SQLException {
280: Object x = resultSet.getObject(columnIndex);
281: setRow(columnIndex, x);
282: return x;
283: }
284:
285: public InputStream getAsciiStream(int columnIndex)
286: throws SQLException {
287: return resultSet.getAsciiStream(columnIndex);
288: }
289:
290: public InputStream getUnicodeStream(int columnIndex)
291: throws SQLException {
292: return resultSet.getUnicodeStream(columnIndex);
293: }
294:
295: public InputStream getBinaryStream(int columnIndex)
296: throws SQLException {
297: return resultSet.getBinaryStream(columnIndex);
298: }
299:
300: public String getString(String columnName) throws SQLException {
301: return resultSet.getString(columnName);
302: }
303:
304: public boolean getBoolean(String columnName) throws SQLException {
305: return resultSet.getBoolean(columnName);
306: }
307:
308: public byte getByte(String columnName) throws SQLException {
309: return resultSet.getByte(columnName);
310: }
311:
312: public short getShort(String columnName) throws SQLException {
313: return resultSet.getShort(columnName);
314: }
315:
316: public int getInt(String columnName) throws SQLException {
317: return resultSet.getInt(columnName);
318: }
319:
320: public long getLong(String columnName) throws SQLException {
321: return resultSet.getLong(columnName);
322: }
323:
324: public float getFloat(String columnName) throws SQLException {
325: return resultSet.getFloat(columnName);
326: }
327:
328: public double getDouble(String columnName) throws SQLException {
329: return resultSet.getDouble(columnName);
330: }
331:
332: public BigDecimal getBigDecimal(String columnName, int scale)
333: throws SQLException {
334: return resultSet.getBigDecimal(columnName, scale);
335: }
336:
337: public byte[] getBytes(String columnName) throws SQLException {
338: return resultSet.getBytes(columnName);
339: }
340:
341: public Date getDate(String columnName) throws SQLException {
342: return resultSet.getDate(columnName);
343: }
344:
345: public Time getTime(String columnName) throws SQLException {
346: return resultSet.getTime(columnName);
347: }
348:
349: public Timestamp getTimestamp(String columnName)
350: throws SQLException {
351: return resultSet.getTimestamp(columnName);
352: }
353:
354: public InputStream getAsciiStream(String columnName)
355: throws SQLException {
356: return resultSet.getAsciiStream(columnName);
357: }
358:
359: public InputStream getUnicodeStream(String columnName)
360: throws SQLException {
361: return resultSet.getUnicodeStream(columnName);
362: }
363:
364: public InputStream getBinaryStream(String columnName)
365: throws SQLException {
366: return resultSet.getBinaryStream(columnName);
367: }
368:
369: public SQLWarning getWarnings() throws SQLException {
370: return resultSet.getWarnings();
371: }
372:
373: public void clearWarnings() throws SQLException {
374: resultSet.clearWarnings();
375: }
376:
377: public String getCursorName() throws SQLException {
378: return resultSet.getCursorName();
379: }
380:
381: public ResultSetMetaData getMetaData() throws SQLException {
382: return resultSet.getMetaData();
383: }
384:
385: public Object getObject(String columnName) throws SQLException {
386: return resultSet.getObject(columnName);
387: }
388:
389: public int findColumn(String columnName) throws SQLException {
390: return resultSet.findColumn(columnName);
391: }
392:
393: public Reader getCharacterStream(int columnIndex)
394: throws SQLException {
395: return resultSet.getCharacterStream(columnIndex);
396: }
397:
398: public Reader getCharacterStream(String columnName)
399: throws SQLException {
400: return resultSet.getCharacterStream(columnName);
401: }
402:
403: public BigDecimal getBigDecimal(String columnName)
404: throws SQLException {
405: return resultSet.getBigDecimal(columnName);
406: }
407:
408: public boolean isBeforeFirst() throws SQLException {
409: return resultSet.isBeforeFirst();
410: }
411:
412: public boolean isAfterLast() throws SQLException {
413: return resultSet.isAfterLast();
414: }
415:
416: public boolean isFirst() throws SQLException {
417: return resultSet.isFirst();
418: }
419:
420: public boolean isLast() throws SQLException {
421: return resultSet.isLast();
422: }
423:
424: public void beforeFirst() throws SQLException {
425: resultSet.beforeFirst();
426: }
427:
428: public void afterLast() throws SQLException {
429: resultSet.afterLast();
430: }
431:
432: public boolean first() throws SQLException {
433: return resultSet.first();
434: }
435:
436: public boolean last() throws SQLException {
437: JdbcResultSetEvent ev = new JdbcResultSetEvent(0, this , null,
438: JdbcStatementEvent.RS_LAST);
439: addRowToEvent(ev);
440: pes.log(ev);
441: try {
442: boolean ans = resultSet.last();
443: ev.setNext(ans);
444: return ans;
445: } catch (SQLException e) {
446: ev.setErrorMsg(e);
447: throw e;
448: } catch (RuntimeException e) {
449: ev.setErrorMsg(e);
450: throw e;
451: } finally {
452: ev.updateTotalMs();
453: }
454: }
455:
456: public int getRow() throws SQLException {
457: JdbcResultSetEvent ev = new JdbcResultSetEvent(0, this , null,
458: JdbcStatementEvent.RS_GET_ROW);
459: addRowToEvent(ev);
460: pes.log(ev);
461: try {
462: int ans = resultSet.getRow();
463: ev.setRows(ans);
464: return ans;
465: } catch (SQLException e) {
466: ev.setErrorMsg(e);
467: throw e;
468: } catch (RuntimeException e) {
469: ev.setErrorMsg(e);
470: throw e;
471: } finally {
472: ev.updateTotalMs();
473: }
474: }
475:
476: public boolean absolute(int row) throws SQLException {
477: JdbcResultSetEvent ev = new JdbcResultSetEvent(0, this , null,
478: JdbcStatementEvent.RS_ABSOLUTE);
479: ev.setRows(row);
480: addRowToEvent(ev);
481: pes.log(ev);
482: try {
483: boolean ans = resultSet.absolute(row);
484: ev.setNext(ans);
485: return ans;
486: } catch (SQLException e) {
487: ev.setErrorMsg(e);
488: throw e;
489: } catch (RuntimeException e) {
490: ev.setErrorMsg(e);
491: throw e;
492: } finally {
493: ev.updateTotalMs();
494: }
495: }
496:
497: public boolean relative(int rows) throws SQLException {
498: JdbcResultSetEvent ev = new JdbcResultSetEvent(0, this , null,
499: JdbcStatementEvent.RS_RELATIVE);
500: ev.setRows(rows);
501: addRowToEvent(ev);
502: pes.log(ev);
503: try {
504: boolean ans = resultSet.relative(rows);
505: ev.setNext(ans);
506: return ans;
507: } catch (SQLException e) {
508: ev.setErrorMsg(e);
509: throw e;
510: } catch (RuntimeException e) {
511: ev.setErrorMsg(e);
512: throw e;
513: } finally {
514: ev.updateTotalMs();
515: }
516: }
517:
518: public boolean previous() throws SQLException {
519: return resultSet.previous();
520: }
521:
522: public void setFetchDirection(int direction) throws SQLException {
523: resultSet.setFetchDirection(direction);
524: }
525:
526: public int getFetchDirection() throws SQLException {
527: return resultSet.getFetchDirection();
528: }
529:
530: public void setFetchSize(int rows) throws SQLException {
531: JdbcLogEvent ev = null;
532: if (pes.isFiner()) {
533: ev = new JdbcLogEvent(0, JdbcLogEvent.RS_FETCH_SIZE,
534: Integer.toString(rows));
535: pes.log(ev);
536: }
537: try {
538: resultSet.setFetchSize(rows);
539: } catch (SQLException e) {
540: if (ev != null)
541: ev.setErrorMsg(e);
542: throw e;
543: } catch (RuntimeException e) {
544: if (ev != null)
545: ev.setErrorMsg(e);
546: throw e;
547: } finally {
548: if (ev != null)
549: ev.updateTotalMs();
550: }
551: }
552:
553: public int getFetchSize() throws SQLException {
554: return resultSet.getFetchSize();
555: }
556:
557: public int getType() throws SQLException {
558: return resultSet.getType();
559: }
560:
561: public int getConcurrency() throws SQLException {
562: return resultSet.getConcurrency();
563: }
564:
565: public boolean rowUpdated() throws SQLException {
566: return resultSet.rowUpdated();
567: }
568:
569: public boolean rowInserted() throws SQLException {
570: return resultSet.rowInserted();
571: }
572:
573: public boolean rowDeleted() throws SQLException {
574: return resultSet.rowDeleted();
575: }
576:
577: public void updateNull(int columnIndex) throws SQLException {
578: resultSet.updateNull(columnIndex);
579: }
580:
581: public void updateBoolean(int columnIndex, boolean x)
582: throws SQLException {
583: resultSet.updateBoolean(columnIndex, x);
584: }
585:
586: public void updateByte(int columnIndex, byte x) throws SQLException {
587: resultSet.updateByte(columnIndex, x);
588: }
589:
590: public void updateShort(int columnIndex, short x)
591: throws SQLException {
592: resultSet.updateShort(columnIndex, x);
593: }
594:
595: public void updateInt(int columnIndex, int x) throws SQLException {
596: resultSet.updateInt(columnIndex, x);
597: }
598:
599: public void updateLong(int columnIndex, long x) throws SQLException {
600: resultSet.updateLong(columnIndex, x);
601: }
602:
603: public void updateFloat(int columnIndex, float x)
604: throws SQLException {
605: resultSet.updateFloat(columnIndex, x);
606: }
607:
608: public void updateDouble(int columnIndex, double x)
609: throws SQLException {
610: resultSet.updateDouble(columnIndex, x);
611: }
612:
613: public void updateBigDecimal(int columnIndex, BigDecimal x)
614: throws SQLException {
615: resultSet.updateBigDecimal(columnIndex, x);
616: }
617:
618: public void updateString(int columnIndex, String x)
619: throws SQLException {
620: resultSet.updateString(columnIndex, x);
621: }
622:
623: public void updateBytes(int columnIndex, byte x[])
624: throws SQLException {
625: resultSet.updateBytes(columnIndex, x);
626: }
627:
628: public void updateDate(int columnIndex, Date x) throws SQLException {
629: resultSet.updateDate(columnIndex, x);
630: }
631:
632: public void updateTime(int columnIndex, Time x) throws SQLException {
633: resultSet.updateTime(columnIndex, x);
634: }
635:
636: public void updateTimestamp(int columnIndex, Timestamp x)
637: throws SQLException {
638: resultSet.updateTimestamp(columnIndex, x);
639: }
640:
641: public void updateAsciiStream(int columnIndex, InputStream x,
642: int length) throws SQLException {
643: resultSet.updateAsciiStream(columnIndex, x, length);
644: }
645:
646: public void updateBinaryStream(int columnIndex, InputStream x,
647: int length) throws SQLException {
648: resultSet.updateBinaryStream(columnIndex, x, length);
649: }
650:
651: public void updateCharacterStream(int columnIndex, Reader x,
652: int length) throws SQLException {
653: resultSet.updateCharacterStream(columnIndex, x, length);
654: }
655:
656: public void updateObject(int columnIndex, Object x, int scale)
657: throws SQLException {
658: resultSet.updateObject(columnIndex, x, scale);
659: }
660:
661: public void updateObject(int columnIndex, Object x)
662: throws SQLException {
663: resultSet.updateObject(columnIndex, x);
664: }
665:
666: public void updateNull(String columnName) throws SQLException {
667: resultSet.updateNull(columnName);
668: }
669:
670: public void updateBoolean(String columnName, boolean x)
671: throws SQLException {
672: resultSet.updateBoolean(columnName, x);
673: }
674:
675: public void updateByte(String columnName, byte x)
676: throws SQLException {
677: resultSet.updateByte(columnName, x);
678: }
679:
680: public void updateShort(String columnName, short x)
681: throws SQLException {
682: resultSet.updateShort(columnName, x);
683: }
684:
685: public void updateInt(String columnName, int x) throws SQLException {
686: resultSet.updateInt(columnName, x);
687: }
688:
689: public void updateLong(String columnName, long x)
690: throws SQLException {
691: resultSet.updateLong(columnName, x);
692: }
693:
694: public void updateFloat(String columnName, float x)
695: throws SQLException {
696: resultSet.updateFloat(columnName, x);
697: }
698:
699: public void updateDouble(String columnName, double x)
700: throws SQLException {
701: resultSet.updateDouble(columnName, x);
702: }
703:
704: public void updateBigDecimal(String columnName, BigDecimal x)
705: throws SQLException {
706: resultSet.updateBigDecimal(columnName, x);
707: }
708:
709: public void updateString(String columnName, String x)
710: throws SQLException {
711: resultSet.updateString(columnName, x);
712: }
713:
714: public void updateBytes(String columnName, byte x[])
715: throws SQLException {
716: resultSet.updateBytes(columnName, x);
717: }
718:
719: public void updateDate(String columnName, Date x)
720: throws SQLException {
721: resultSet.updateDate(columnName, x);
722: }
723:
724: public void updateTime(String columnName, Time x)
725: throws SQLException {
726: resultSet.updateTime(columnName, x);
727: }
728:
729: public void updateTimestamp(String columnName, Timestamp x)
730: throws SQLException {
731: resultSet.updateTimestamp(columnName, x);
732: }
733:
734: public void updateAsciiStream(String columnName, InputStream x,
735: int length) throws SQLException {
736: resultSet.updateAsciiStream(columnName, x, length);
737: }
738:
739: public void updateBinaryStream(String columnName, InputStream x,
740: int length) throws SQLException {
741: resultSet.updateBinaryStream(columnName, x, length);
742: }
743:
744: public void updateCharacterStream(String columnName, Reader reader,
745: int length) throws SQLException {
746: resultSet.updateCharacterStream(columnName, reader, length);
747: }
748:
749: public void updateObject(String columnName, Object x, int scale)
750: throws SQLException {
751: resultSet.updateObject(columnName, x, scale);
752: }
753:
754: public void updateObject(String columnName, Object x)
755: throws SQLException {
756: resultSet.updateObject(columnName, x);
757: }
758:
759: public void insertRow() throws SQLException {
760: resultSet.insertRow();
761: }
762:
763: public void updateRow() throws SQLException {
764: resultSet.updateRow();
765: }
766:
767: public void deleteRow() throws SQLException {
768: resultSet.deleteRow();
769: }
770:
771: public void refreshRow() throws SQLException {
772: resultSet.refreshRow();
773: }
774:
775: public void cancelRowUpdates() throws SQLException {
776: resultSet.cancelRowUpdates();
777: }
778:
779: public void moveToInsertRow() throws SQLException {
780: resultSet.moveToInsertRow();
781: }
782:
783: public void moveToCurrentRow() throws SQLException {
784: resultSet.moveToCurrentRow();
785: }
786:
787: public Statement getStatement() throws SQLException {
788: return proxyStatement;
789: }
790:
791: public Object getObject(int i, Map map) throws SQLException {
792: return resultSet.getObject(i, map);
793: }
794:
795: public Ref getRef(int i) throws SQLException {
796: return resultSet.getRef(i);
797: }
798:
799: public Blob getBlob(int i) throws SQLException {
800: return resultSet.getBlob(i);
801: }
802:
803: public Clob getClob(int i) throws SQLException {
804: return resultSet.getClob(i);
805: }
806:
807: public Array getArray(int i) throws SQLException {
808: return resultSet.getArray(i);
809: }
810:
811: public Object getObject(String colName, Map map)
812: throws SQLException {
813: return resultSet.getObject(colName, map);
814: }
815:
816: public Ref getRef(String colName) throws SQLException {
817: return resultSet.getRef(colName);
818: }
819:
820: public Blob getBlob(String colName) throws SQLException {
821: return resultSet.getBlob(colName);
822: }
823:
824: public Clob getClob(String colName) throws SQLException {
825: return resultSet.getClob(colName);
826: }
827:
828: public Array getArray(String colName) throws SQLException {
829: return resultSet.getArray(colName);
830: }
831:
832: public Date getDate(int columnIndex, Calendar cal)
833: throws SQLException {
834: return resultSet.getDate(columnIndex, cal);
835: }
836:
837: public Date getDate(String columnName, Calendar cal)
838: throws SQLException {
839: return resultSet.getDate(columnName, cal);
840: }
841:
842: public Time getTime(int columnIndex, Calendar cal)
843: throws SQLException {
844: return resultSet.getTime(columnIndex, cal);
845: }
846:
847: public Time getTime(String columnName, Calendar cal)
848: throws SQLException {
849: return resultSet.getTime(columnName, cal);
850: }
851:
852: public Timestamp getTimestamp(int columnIndex, Calendar cal)
853: throws SQLException {
854: return resultSet.getTimestamp(columnIndex, cal);
855: }
856:
857: public Timestamp getTimestamp(String columnName, Calendar cal)
858: throws SQLException {
859: return resultSet.getTimestamp(columnName, cal);
860: }
861:
862: //#####################################################################//
863: //#################### this stuff is for jdk1.4 #######################//
864: //#####################################################################//
865: public URL getURL(int columnIndex) throws SQLException {
866: throw BindingSupportImpl.getInstance().unsupported(
867: "not implemented.");
868: }
869:
870: public URL getURL(String columnName) throws SQLException {
871: throw BindingSupportImpl.getInstance().unsupported(
872: "not implemented.");
873: }
874:
875: public void updateRef(int columnIndex, Ref x) throws SQLException {
876: throw BindingSupportImpl.getInstance().unsupported(
877: "not implemented.");
878: }
879:
880: public void updateRef(String columnName, Ref x) throws SQLException {
881: throw BindingSupportImpl.getInstance().unsupported(
882: "not implemented.");
883: }
884:
885: public void updateBlob(int columnIndex, Blob x) throws SQLException {
886: throw BindingSupportImpl.getInstance().unsupported(
887: "not implemented.");
888: }
889:
890: public void updateBlob(String columnName, Blob x)
891: throws SQLException {
892: throw BindingSupportImpl.getInstance().unsupported(
893: "not implemented.");
894: }
895:
896: public void updateClob(int columnIndex, Clob x) throws SQLException {
897: throw BindingSupportImpl.getInstance().unsupported(
898: "not implemented.");
899: }
900:
901: public void updateClob(String columnName, Clob x)
902: throws SQLException {
903: throw BindingSupportImpl.getInstance().unsupported(
904: "not implemented.");
905: }
906:
907: public void updateArray(int columnIndex, Array x)
908: throws SQLException {
909: throw BindingSupportImpl.getInstance().unsupported(
910: "not implemented.");
911: }
912:
913: public void updateArray(String columnName, Array x)
914: throws SQLException {
915: throw BindingSupportImpl.getInstance().unsupported(
916: "not implemented.");
917: }
918: }
|