1 package org.opendaylight.controller.md.sal.dom.xsql;
3 import java.io.InputStream;
5 import java.math.BigDecimal;
11 import java.sql.NClob;
13 import java.sql.ResultSet;
14 import java.sql.ResultSetMetaData;
15 import java.sql.RowId;
16 import java.sql.SQLException;
17 import java.sql.SQLWarning;
18 import java.sql.SQLXML;
19 import java.sql.Statement;
21 import java.sql.Timestamp;
22 import java.util.Calendar;
25 public class TablesResultSet implements ResultSet {
27 private String tables[] = null;
30 public TablesResultSet(XSQLBluePrint cache) {
31 //tables = cache.getInterfaceNames();
35 public <T> T unwrap(Class<T> iface) throws SQLException {
36 // TODO Auto-generated method stub
41 public boolean isWrapperFor(Class<?> iface) throws SQLException {
42 // TODO Auto-generated method stub
47 public boolean next() throws SQLException {
52 if (pos >= tables.length) {
59 public void close() throws SQLException {
60 // TODO Auto-generated method stub
65 public boolean wasNull() throws SQLException {
66 // TODO Auto-generated method stub
71 public String getString(int columnIndex) throws SQLException {
76 public boolean getBoolean(int columnIndex) throws SQLException {
77 // TODO Auto-generated method stub
82 public byte getByte(int columnIndex) throws SQLException {
83 // TODO Auto-generated method stub
88 public short getShort(int columnIndex) throws SQLException {
89 // TODO Auto-generated method stub
94 public int getInt(int columnIndex) throws SQLException {
95 // TODO Auto-generated method stub
100 public long getLong(int columnIndex) throws SQLException {
101 // TODO Auto-generated method stub
106 public float getFloat(int columnIndex) throws SQLException {
107 // TODO Auto-generated method stub
112 public double getDouble(int columnIndex) throws SQLException {
113 // TODO Auto-generated method stub
118 public BigDecimal getBigDecimal(int columnIndex, int scale)
119 throws SQLException {
120 // TODO Auto-generated method stub
125 public byte[] getBytes(int columnIndex) throws SQLException {
126 // TODO Auto-generated method stub
131 public Date getDate(int columnIndex) throws SQLException {
132 // TODO Auto-generated method stub
137 public Time getTime(int columnIndex) throws SQLException {
138 // TODO Auto-generated method stub
143 public Timestamp getTimestamp(int columnIndex) throws SQLException {
144 // TODO Auto-generated method stub
149 public InputStream getAsciiStream(int columnIndex) throws SQLException {
150 // TODO Auto-generated method stub
155 public InputStream getUnicodeStream(int columnIndex) throws SQLException {
156 // TODO Auto-generated method stub
161 public InputStream getBinaryStream(int columnIndex) throws SQLException {
162 // TODO Auto-generated method stub
167 public String getString(String columnLabel) throws SQLException {
172 public boolean getBoolean(String columnLabel) throws SQLException {
173 // TODO Auto-generated method stub
178 public byte getByte(String columnLabel) throws SQLException {
179 // TODO Auto-generated method stub
184 public short getShort(String columnLabel) throws SQLException {
185 // TODO Auto-generated method stub
190 public int getInt(String columnLabel) throws SQLException {
191 // TODO Auto-generated method stub
196 public long getLong(String columnLabel) throws SQLException {
197 // TODO Auto-generated method stub
202 public float getFloat(String columnLabel) throws SQLException {
203 // TODO Auto-generated method stub
208 public double getDouble(String columnLabel) throws SQLException {
209 // TODO Auto-generated method stub
214 public BigDecimal getBigDecimal(String columnLabel, int scale)
215 throws SQLException {
216 // TODO Auto-generated method stub
221 public byte[] getBytes(String columnLabel) throws SQLException {
222 // TODO Auto-generated method stub
227 public Date getDate(String columnLabel) throws SQLException {
228 // TODO Auto-generated method stub
233 public Time getTime(String columnLabel) throws SQLException {
234 // TODO Auto-generated method stub
239 public Timestamp getTimestamp(String columnLabel) throws SQLException {
240 // TODO Auto-generated method stub
245 public InputStream getAsciiStream(String columnLabel) throws SQLException {
246 // TODO Auto-generated method stub
251 public InputStream getUnicodeStream(String columnLabel)
252 throws SQLException {
253 // TODO Auto-generated method stub
258 public InputStream getBinaryStream(String columnLabel) throws SQLException {
259 // TODO Auto-generated method stub
264 public SQLWarning getWarnings() throws SQLException {
265 // TODO Auto-generated method stub
270 public void clearWarnings() throws SQLException {
271 // TODO Auto-generated method stub
276 public String getCursorName() throws SQLException {
277 // TODO Auto-generated method stub
282 public ResultSetMetaData getMetaData() throws SQLException {
283 // TODO Auto-generated method stub
288 public Object getObject(int columnIndex) throws SQLException {
289 // TODO Auto-generated method stub
294 public Object getObject(String columnLabel) throws SQLException {
295 // TODO Auto-generated method stub
300 public int findColumn(String columnLabel) throws SQLException {
301 // TODO Auto-generated method stub
306 public Reader getCharacterStream(int columnIndex) throws SQLException {
307 // TODO Auto-generated method stub
312 public Reader getCharacterStream(String columnLabel) throws SQLException {
313 // TODO Auto-generated method stub
318 public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
319 // TODO Auto-generated method stub
324 public BigDecimal getBigDecimal(String columnLabel) throws SQLException {
325 // TODO Auto-generated method stub
330 public boolean isBeforeFirst() throws SQLException {
331 // TODO Auto-generated method stub
336 public boolean isAfterLast() throws SQLException {
337 // TODO Auto-generated method stub
342 public boolean isFirst() throws SQLException {
343 // TODO Auto-generated method stub
348 public boolean isLast() throws SQLException {
349 // TODO Auto-generated method stub
354 public void beforeFirst() throws SQLException {
355 // TODO Auto-generated method stub
360 public void afterLast() throws SQLException {
361 // TODO Auto-generated method stub
366 public boolean first() throws SQLException {
367 // TODO Auto-generated method stub
372 public boolean last() throws SQLException {
373 // TODO Auto-generated method stub
378 public int getRow() throws SQLException {
379 // TODO Auto-generated method stub
384 public boolean absolute(int row) throws SQLException {
385 // TODO Auto-generated method stub
390 public boolean relative(int rows) throws SQLException {
391 // TODO Auto-generated method stub
396 public boolean previous() throws SQLException {
397 // TODO Auto-generated method stub
402 public void setFetchDirection(int direction) throws SQLException {
403 // TODO Auto-generated method stub
408 public int getFetchDirection() throws SQLException {
409 // TODO Auto-generated method stub
414 public void setFetchSize(int rows) throws SQLException {
415 // TODO Auto-generated method stub
420 public int getFetchSize() throws SQLException {
421 // TODO Auto-generated method stub
426 public int getType() throws SQLException {
427 // TODO Auto-generated method stub
432 public int getConcurrency() throws SQLException {
433 // TODO Auto-generated method stub
438 public boolean rowUpdated() throws SQLException {
439 // TODO Auto-generated method stub
444 public boolean rowInserted() throws SQLException {
445 // TODO Auto-generated method stub
450 public boolean rowDeleted() throws SQLException {
451 // TODO Auto-generated method stub
456 public void updateNull(int columnIndex) throws SQLException {
457 // TODO Auto-generated method stub
462 public void updateBoolean(int columnIndex, boolean x) throws SQLException {
463 // TODO Auto-generated method stub
468 public void updateByte(int columnIndex, byte x) throws SQLException {
469 // TODO Auto-generated method stub
474 public void updateShort(int columnIndex, short x) throws SQLException {
475 // TODO Auto-generated method stub
480 public void updateInt(int columnIndex, int x) throws SQLException {
481 // TODO Auto-generated method stub
486 public void updateLong(int columnIndex, long x) throws SQLException {
487 // TODO Auto-generated method stub
492 public void updateFloat(int columnIndex, float x) throws SQLException {
493 // TODO Auto-generated method stub
498 public void updateDouble(int columnIndex, double x) throws SQLException {
499 // TODO Auto-generated method stub
504 public void updateBigDecimal(int columnIndex, BigDecimal x)
505 throws SQLException {
506 // TODO Auto-generated method stub
511 public void updateString(int columnIndex, String x) throws SQLException {
512 // TODO Auto-generated method stub
517 public void updateBytes(int columnIndex, byte[] x) throws SQLException {
518 // TODO Auto-generated method stub
523 public void updateDate(int columnIndex, Date x) throws SQLException {
524 // TODO Auto-generated method stub
529 public void updateTime(int columnIndex, Time x) throws SQLException {
530 // TODO Auto-generated method stub
535 public void updateTimestamp(int columnIndex, Timestamp x)
536 throws SQLException {
537 // TODO Auto-generated method stub
542 public void updateAsciiStream(int columnIndex, InputStream x, int length)
543 throws SQLException {
544 // TODO Auto-generated method stub
549 public void updateBinaryStream(int columnIndex, InputStream x, int length)
550 throws SQLException {
551 // TODO Auto-generated method stub
556 public void updateCharacterStream(int columnIndex, Reader x, int length)
557 throws SQLException {
558 // TODO Auto-generated method stub
563 public void updateObject(int columnIndex, Object x, int scaleOrLength)
564 throws SQLException {
565 // TODO Auto-generated method stub
570 public void updateObject(int columnIndex, Object x) throws SQLException {
571 // TODO Auto-generated method stub
576 public void updateNull(String columnLabel) throws SQLException {
577 // TODO Auto-generated method stub
582 public void updateBoolean(String columnLabel, boolean x)
583 throws SQLException {
584 // TODO Auto-generated method stub
589 public void updateByte(String columnLabel, byte x) throws SQLException {
590 // TODO Auto-generated method stub
595 public void updateShort(String columnLabel, short x) throws SQLException {
596 // TODO Auto-generated method stub
601 public void updateInt(String columnLabel, int x) throws SQLException {
602 // TODO Auto-generated method stub
607 public void updateLong(String columnLabel, long x) throws SQLException {
608 // TODO Auto-generated method stub
613 public void updateFloat(String columnLabel, float x) throws SQLException {
614 // TODO Auto-generated method stub
619 public void updateDouble(String columnLabel, double x) throws SQLException {
620 // TODO Auto-generated method stub
625 public void updateBigDecimal(String columnLabel, BigDecimal x)
626 throws SQLException {
627 // TODO Auto-generated method stub
632 public void updateString(String columnLabel, String x) throws SQLException {
633 // TODO Auto-generated method stub
638 public void updateBytes(String columnLabel, byte[] x) throws SQLException {
639 // TODO Auto-generated method stub
644 public void updateDate(String columnLabel, Date x) throws SQLException {
645 // TODO Auto-generated method stub
650 public void updateTime(String columnLabel, Time x) throws SQLException {
651 // TODO Auto-generated method stub
656 public void updateTimestamp(String columnLabel, Timestamp x)
657 throws SQLException {
658 // TODO Auto-generated method stub
663 public void updateAsciiStream(String columnLabel, InputStream x, int length)
664 throws SQLException {
665 // TODO Auto-generated method stub
670 public void updateBinaryStream(String columnLabel, InputStream x,
672 throws SQLException {
673 // TODO Auto-generated method stub
678 public void updateCharacterStream(String columnLabel, Reader reader,
679 int length) throws SQLException {
680 // TODO Auto-generated method stub
685 public void updateObject(String columnLabel, Object x, int scaleOrLength)
686 throws SQLException {
687 // TODO Auto-generated method stub
692 public void updateObject(String columnLabel, Object x) throws SQLException {
693 // TODO Auto-generated method stub
698 public void insertRow() throws SQLException {
699 // TODO Auto-generated method stub
704 public void updateRow() throws SQLException {
705 // TODO Auto-generated method stub
710 public void deleteRow() throws SQLException {
711 // TODO Auto-generated method stub
716 public void refreshRow() throws SQLException {
717 // TODO Auto-generated method stub
722 public void cancelRowUpdates() throws SQLException {
723 // TODO Auto-generated method stub
728 public void moveToInsertRow() throws SQLException {
729 // TODO Auto-generated method stub
734 public void moveToCurrentRow() throws SQLException {
735 // TODO Auto-generated method stub
740 public Statement getStatement() throws SQLException {
741 // TODO Auto-generated method stub
746 public Object getObject(int columnIndex, Map<String, Class<?>> map)
747 throws SQLException {
748 // TODO Auto-generated method stub
753 public Ref getRef(int columnIndex) throws SQLException {
754 // TODO Auto-generated method stub
759 public Blob getBlob(int columnIndex) throws SQLException {
760 // TODO Auto-generated method stub
765 public Clob getClob(int columnIndex) throws SQLException {
766 // TODO Auto-generated method stub
771 public Array getArray(int columnIndex) throws SQLException {
772 // TODO Auto-generated method stub
777 public Object getObject(String columnLabel, Map<String, Class<?>> map)
778 throws SQLException {
779 // TODO Auto-generated method stub
784 public Ref getRef(String columnLabel) throws SQLException {
785 // TODO Auto-generated method stub
790 public Blob getBlob(String columnLabel) throws SQLException {
791 // TODO Auto-generated method stub
796 public Clob getClob(String columnLabel) throws SQLException {
797 // TODO Auto-generated method stub
802 public Array getArray(String columnLabel) throws SQLException {
803 // TODO Auto-generated method stub
808 public Date getDate(int columnIndex, Calendar cal) throws SQLException {
809 // TODO Auto-generated method stub
814 public Date getDate(String columnLabel, Calendar cal) throws SQLException {
815 // TODO Auto-generated method stub
820 public Time getTime(int columnIndex, Calendar cal) throws SQLException {
821 // TODO Auto-generated method stub
826 public Time getTime(String columnLabel, Calendar cal) throws SQLException {
827 // TODO Auto-generated method stub
832 public Timestamp getTimestamp(int columnIndex, Calendar cal)
833 throws SQLException {
834 // TODO Auto-generated method stub
839 public Timestamp getTimestamp(String columnLabel, Calendar cal)
840 throws SQLException {
841 // TODO Auto-generated method stub
846 public URL getURL(int columnIndex) throws SQLException {
847 // TODO Auto-generated method stub
852 public URL getURL(String columnLabel) throws SQLException {
853 // TODO Auto-generated method stub
858 public void updateRef(int columnIndex, Ref x) throws SQLException {
859 // TODO Auto-generated method stub
864 public void updateRef(String columnLabel, Ref x) throws SQLException {
865 // TODO Auto-generated method stub
870 public void updateBlob(int columnIndex, Blob x) throws SQLException {
871 // TODO Auto-generated method stub
876 public void updateBlob(String columnLabel, Blob x) throws SQLException {
877 // TODO Auto-generated method stub
882 public void updateClob(int columnIndex, Clob x) throws SQLException {
883 // TODO Auto-generated method stub
888 public void updateClob(String columnLabel, Clob x) throws SQLException {
889 // TODO Auto-generated method stub
894 public void updateArray(int columnIndex, Array x) throws SQLException {
895 // TODO Auto-generated method stub
900 public void updateArray(String columnLabel, Array x) throws SQLException {
901 // TODO Auto-generated method stub
906 public RowId getRowId(int columnIndex) throws SQLException {
907 // TODO Auto-generated method stub
912 public RowId getRowId(String columnLabel) throws SQLException {
913 // TODO Auto-generated method stub
918 public void updateRowId(int columnIndex, RowId x) throws SQLException {
919 // TODO Auto-generated method stub
924 public void updateRowId(String columnLabel, RowId x) throws SQLException {
925 // TODO Auto-generated method stub
930 public int getHoldability() throws SQLException {
931 // TODO Auto-generated method stub
936 public boolean isClosed() throws SQLException {
937 // TODO Auto-generated method stub
942 public void updateNString(int columnIndex, String nString)
943 throws SQLException {
944 // TODO Auto-generated method stub
949 public void updateNString(String columnLabel, String nString)
950 throws SQLException {
951 // TODO Auto-generated method stub
956 public void updateNClob(int columnIndex, NClob nClob) throws SQLException {
957 // TODO Auto-generated method stub
962 public void updateNClob(String columnLabel, NClob nClob)
963 throws SQLException {
964 // TODO Auto-generated method stub
969 public NClob getNClob(int columnIndex) throws SQLException {
970 // TODO Auto-generated method stub
975 public NClob getNClob(String columnLabel) throws SQLException {
976 // TODO Auto-generated method stub
981 public SQLXML getSQLXML(int columnIndex) throws SQLException {
982 // TODO Auto-generated method stub
987 public SQLXML getSQLXML(String columnLabel) throws SQLException {
988 // TODO Auto-generated method stub
993 public void updateSQLXML(int columnIndex, SQLXML xmlObject)
994 throws SQLException {
995 // TODO Auto-generated method stub
1000 public void updateSQLXML(String columnLabel, SQLXML xmlObject)
1001 throws SQLException {
1002 // TODO Auto-generated method stub
1007 public String getNString(int columnIndex) throws SQLException {
1008 // TODO Auto-generated method stub
1013 public String getNString(String columnLabel) throws SQLException {
1014 // TODO Auto-generated method stub
1019 public Reader getNCharacterStream(int columnIndex) throws SQLException {
1020 // TODO Auto-generated method stub
1025 public Reader getNCharacterStream(String columnLabel) throws SQLException {
1026 // TODO Auto-generated method stub
1031 public void updateNCharacterStream(int columnIndex, Reader x, long length)
1032 throws SQLException {
1033 // TODO Auto-generated method stub
1038 public void updateNCharacterStream(String columnLabel, Reader reader,
1039 long length) throws SQLException {
1040 // TODO Auto-generated method stub
1045 public void updateAsciiStream(int columnIndex, InputStream x, long length)
1046 throws SQLException {
1047 // TODO Auto-generated method stub
1052 public void updateBinaryStream(int columnIndex, InputStream x, long length)
1053 throws SQLException {
1054 // TODO Auto-generated method stub
1059 public void updateCharacterStream(int columnIndex, Reader x, long length)
1060 throws SQLException {
1061 // TODO Auto-generated method stub
1066 public void updateAsciiStream(String columnLabel, InputStream x,
1068 throws SQLException {
1069 // TODO Auto-generated method stub
1074 public void updateBinaryStream(String columnLabel, InputStream x,
1075 long length) throws SQLException {
1076 // TODO Auto-generated method stub
1081 public void updateCharacterStream(String columnLabel, Reader reader,
1082 long length) throws SQLException {
1083 // TODO Auto-generated method stub
1088 public void updateBlob(int columnIndex, InputStream inputStream,
1090 throws SQLException {
1091 // TODO Auto-generated method stub
1096 public void updateBlob(String columnLabel, InputStream inputStream,
1097 long length) throws SQLException {
1098 // TODO Auto-generated method stub
1103 public void updateClob(int columnIndex, Reader reader, long length)
1104 throws SQLException {
1105 // TODO Auto-generated method stub
1110 public void updateClob(String columnLabel, Reader reader, long length)
1111 throws SQLException {
1112 // TODO Auto-generated method stub
1117 public void updateNClob(int columnIndex, Reader reader, long length)
1118 throws SQLException {
1119 // TODO Auto-generated method stub
1124 public void updateNClob(String columnLabel, Reader reader, long length)
1125 throws SQLException {
1126 // TODO Auto-generated method stub
1131 public void updateNCharacterStream(int columnIndex, Reader x)
1132 throws SQLException {
1133 // TODO Auto-generated method stub
1138 public void updateNCharacterStream(String columnLabel, Reader reader)
1139 throws SQLException {
1140 // TODO Auto-generated method stub
1145 public void updateAsciiStream(int columnIndex, InputStream x)
1146 throws SQLException {
1147 // TODO Auto-generated method stub
1152 public void updateBinaryStream(int columnIndex, InputStream x)
1153 throws SQLException {
1154 // TODO Auto-generated method stub
1159 public void updateCharacterStream(int columnIndex, Reader x)
1160 throws SQLException {
1161 // TODO Auto-generated method stub
1166 public void updateAsciiStream(String columnLabel, InputStream x)
1167 throws SQLException {
1168 // TODO Auto-generated method stub
1173 public void updateBinaryStream(String columnLabel, InputStream x)
1174 throws SQLException {
1175 // TODO Auto-generated method stub
1180 public void updateCharacterStream(String columnLabel, Reader reader)
1181 throws SQLException {
1182 // TODO Auto-generated method stub
1187 public void updateBlob(int columnIndex, InputStream inputStream)
1188 throws SQLException {
1189 // TODO Auto-generated method stub
1194 public void updateBlob(String columnLabel, InputStream inputStream)
1195 throws SQLException {
1196 // TODO Auto-generated method stub
1201 public void updateClob(int columnIndex, Reader reader) throws SQLException {
1202 // TODO Auto-generated method stub
1207 public void updateClob(String columnLabel, Reader reader)
1208 throws SQLException {
1209 // TODO Auto-generated method stub
1214 public void updateNClob(int columnIndex, Reader reader)
1215 throws SQLException {
1216 // TODO Auto-generated method stub
1221 public void updateNClob(String columnLabel, Reader reader)
1222 throws SQLException {
1223 // TODO Auto-generated method stub
1228 public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
1229 // TODO Auto-generated method stub
1234 public <T> T getObject(String columnLabel, Class<T> type)
1235 throws SQLException {
1236 // TODO Auto-generated method stub