1 package org.opendaylight.controller.md.sal.dom.xsql.jdbc;
3 import java.io.InputStream;
5 import java.io.Serializable;
6 import java.lang.reflect.Method;
7 import java.lang.reflect.Proxy;
8 import java.math.BigDecimal;
10 import java.sql.Array;
14 import java.sql.NClob;
16 import java.sql.ResultSet;
17 import java.sql.ResultSetMetaData;
18 import java.sql.RowId;
19 import java.sql.SQLException;
20 import java.sql.SQLWarning;
21 import java.sql.SQLXML;
22 import java.sql.Statement;
24 import java.sql.Timestamp;
25 import java.util.ArrayList;
26 import java.util.Calendar;
27 import java.util.HashMap;
28 import java.util.HashSet;
29 import java.util.LinkedList;
30 import java.util.List;
33 import java.util.concurrent.ConcurrentHashMap;
35 import org.opendaylight.controller.md.sal.dom.xsql.XSQLBluePrint;
36 import org.opendaylight.controller.md.sal.dom.xsql.XSQLBluePrintNode;
37 import org.opendaylight.controller.md.sal.dom.xsql.XSQLColumn;
38 import org.opendaylight.controller.md.sal.dom.xsql.XSQLCriteria;
39 import org.opendaylight.controller.md.sal.dom.xsql.XSQLODLUtils;
41 public class JDBCResultSet implements Serializable, ResultSet,
43 private static final long serialVersionUID = -7450200738431047057L;
45 private String sql = null;
46 private List<XSQLBluePrintNode> tablesInQuery = new ArrayList<XSQLBluePrintNode>();
47 private Map<String, XSQLBluePrintNode> tablesInQueryMap = new ConcurrentHashMap<String, XSQLBluePrintNode>();
48 private List<XSQLColumn> fieldsInQuery = new ArrayList<XSQLColumn>();
49 private transient LinkedList<Map<String, Object>> records = new LinkedList<>();
50 private transient Map<String, Object> currentRecord = null;
51 private boolean finished = false;
53 private static Integer nextID = new Integer(0);
54 public int numberOfTasks = 0;
55 private Map<String, Map<XSQLColumn, List<XSQLCriteria>>> criteria = new ConcurrentHashMap<String, Map<XSQLColumn, List<XSQLCriteria>>>();
56 private Exception err = null;
57 private List<Record> EMPTY_RESULT = new LinkedList<Record>();
58 private transient Map<String,JDBCResultSet> subQueries = new HashMap<String,JDBCResultSet>();
60 public ResultSet getProxy() {
61 return (ResultSet) Proxy.newProxyInstance(this.getClass().getClassLoader(), new Class[] {ResultSet.class }, new JDBCProxy(this));
64 public void setSQL(String _sql) {
68 public JDBCResultSet addSubQuery(String _sql,String logicalName) {
69 if (subQueries == null) {
70 subQueries = new HashMap<String,JDBCResultSet>();
72 JDBCResultSet rs = new JDBCResultSet(_sql);
73 this.subQueries.put(logicalName,rs);
77 public Map<String,JDBCResultSet> getSubQueries() {
78 if (this.subQueries==null) {
79 this.subQueries = new HashMap<>();
81 return this.subQueries;
84 public JDBCResultSet(String _sql) {
85 synchronized (JDBCResultSet.class) {
92 public String getSQL() {
96 public void setError(Exception _err) {
100 public Exception getError() {
104 public void updateData(JDBCResultSet rs) {
105 synchronized (this) {
106 this.tablesInQuery = rs.tablesInQuery;
107 this.tablesInQueryMap = rs.tablesInQueryMap;
108 this.fieldsInQuery = rs.fieldsInQuery;
113 public int isObjectFitCriteria(Map<String, Object> objValues, String tableName) {
114 Map<XSQLColumn, List<XSQLCriteria>> tblCriteria = criteria
116 if (tblCriteria == null) {
119 for (Map.Entry<XSQLColumn, List<XSQLCriteria>> cc : tblCriteria
121 for (XSQLCriteria c : cc.getValue()) {
122 Object value = objValues.get(cc.getKey().toString());
123 int result = c.checkValue(value);
132 public int isObjectFitCriteria(Object element, Class<?> cls) {
133 Map<XSQLColumn, List<XSQLCriteria>> tblCriteria = criteria.get(cls
135 if (tblCriteria == null) {
138 for (Map.Entry<XSQLColumn, List<XSQLCriteria>> cc : tblCriteria
140 for (XSQLCriteria c : cc.getValue()) {
141 int result = c.isObjectFitCriteria(element, cc.getKey()
151 public Map<String, Map<XSQLColumn, List<XSQLCriteria>>> getCriteria() {
152 return this.criteria;
159 public List<XSQLBluePrintNode> getTables() {
160 return tablesInQuery;
163 public void addTableToQuery(XSQLBluePrintNode node) {
164 if (this.tablesInQueryMap.containsKey(node.getBluePrintNodeName())) {
167 this.tablesInQuery.add(node);
168 this.tablesInQueryMap.put(node.getBluePrintNodeName(), node);
171 public List<XSQLColumn> getFields() {
172 return this.fieldsInQuery;
175 public XSQLBluePrintNode getMainTable() {
176 if (tablesInQuery.size() == 1) {
177 return tablesInQuery.get(0);
179 XSQLBluePrintNode result = null;
180 for (XSQLBluePrintNode node : tablesInQuery) {
181 if (result == null) {
183 } else if (result.getLevel() < node.getLevel()) {
190 public boolean isFinished() {
194 public void setFinished(boolean b) {
199 return this.records.size();
202 public void addRecord(Map<String, Object> r) {
203 synchronized (this) {
204 if (records == null) {
205 records = new LinkedList<>();
212 public void addRecord(ArrayList<?> hierarchy) {
213 Map<String, Object> rec = new HashMap<>();
214 for (int i = hierarchy.size() - 1; i >= 0; i--) {
215 Object element = hierarchy.get(i);
216 for (XSQLColumn c : fieldsInQuery) {
217 if (c.getTableName().equals(element.getClass().getSimpleName())) {
219 Method m = element.getClass().getMethod(c.getName(),
221 Object value = m.invoke(element, null);
222 rec.put(c.getName(), value);
223 } catch (Exception err) {
224 err.printStackTrace();
229 this.records.add(rec);
232 public boolean next() {
233 this.currentRecord = null;
234 if (records == null) {
235 records = new LinkedList<>();
237 while (!finished || records.size() > 0) {
238 synchronized (this) {
239 if (records.size() == 0) {
242 } catch (Exception err) {
244 if (records.size() > 0) {
246 currentRecord = records.removeFirst();
254 currentRecord = records.removeFirst();
265 public Map<String, Object> getCurrent() {
266 return this.currentRecord;
269 private void createRecord(Object data, XSQLBluePrintNode node) {
270 Map<String, Object> rec = new HashMap<>();
271 for (XSQLColumn c : this.fieldsInQuery) {
272 if (c.getTableName().equals(node.getBluePrintNodeName())) {
274 Method m = node.getInterface().getMethod(c.getName(), null);
275 Object value = m.invoke(data, null);
277 rec.put(c.getName(), value);
279 rec.put(c.getName(), "");
281 } catch (Exception err) {
282 err.printStackTrace();
289 public static class Record {
290 public Map<String, Object> data = new HashMap<>();
291 public Object element = null;
293 public Map<String, Object> getRecord() {
298 private Map<String, Object> collectColumnValues(Object node, XSQLBluePrintNode bpn) {
299 Map<?, ?> subChildren = XSQLODLUtils.getChildren(node);
300 Map<String, Object> result = new HashMap<>();
301 for (Object stc : subChildren.values()) {
302 if (stc.getClass().getName().endsWith("ImmutableAugmentationNode")) {
303 Map<?, ?> values = XSQLODLUtils.getChildren(stc);
304 for (Object key : values.keySet()) {
305 Object val = values.get(key);
306 if (val.getClass().getName().endsWith("ImmutableLeafNode")) {
307 Object value = XSQLODLUtils.getValue(val);
308 String k = XSQLODLUtils.getNodeName(val);
310 result.put(bpn.getBluePrintNodeName() + "." + k,
315 } else if (stc.getClass().getName().endsWith("ImmutableLeafNode")) {
316 String k = XSQLODLUtils.getNodeName(stc);
317 Object value = XSQLODLUtils.getValue(stc);
319 result.put(bpn.getBluePrintNodeName() + "." + k,
327 private void addToData(Record rec, XSQLBluePrintNode bpn,
328 XSQLBluePrint bluePrint, Map<String, Object> fullRecord) {
329 XSQLBluePrintNode eNodes[] = bluePrint
330 .getBluePrintNodeByODLTableName(XSQLODLUtils
331 .getNodeIdentiofier(rec.element));
333 for (XSQLColumn c : fieldsInQuery) {
334 for (XSQLBluePrintNode eNode : eNodes) {
335 if (((XSQLBluePrintNode) c.getBluePrintNode())
336 .getBluePrintNodeName().equals(
337 eNode.getBluePrintNodeName())) {
338 // Object value = Criteria.getValue(rec.element,
340 String columnName = c.toString();
341 Object value = fullRecord.get(columnName);
344 Object rsValue = c.getResultSetValue(value);
345 c.setCharWidth(rsValue.toString().length());
346 rec.data.put(columnName, rsValue);
347 } catch (Exception err) {
356 private boolean beenHere(Set<String> beenHereElement, Object element) {
357 if (beenHereElement == null) {
358 beenHereElement = new HashSet<String>();
361 String elementKey = null;
364 elementKey = element.toString();
365 } catch (Exception err) {
366 elementKey = "Unknown";
369 if (beenHereElement.contains(elementKey)) {
373 beenHereElement.add(elementKey);
377 public List<Object> getChildren(Object node, String tableName,
378 XSQLBluePrint bluePrint) {
380 List<Object> children = XSQLODLUtils.getMChildren(node);
381 List<Object> result = new LinkedList<Object>();
383 for (Object child : children) {
385 String odlNodeName = XSQLODLUtils.getNodeIdentiofier(child);
386 if (odlNodeName == null) {
390 XSQLBluePrintNode eNodes[] = bluePrint
391 .getBluePrintNodeByODLTableName(odlNodeName);
392 if (eNodes == null) {
396 boolean match = false;
397 for (XSQLBluePrintNode enode : eNodes) {
398 if (tableName.startsWith(enode.toString())) {
408 if (child.getClass().getName().endsWith("ImmutableContainerNode")) {
410 } else if (child.getClass().getName()
411 .endsWith("ImmutableAugmentationNode")) {
412 List<Object> _children = XSQLODLUtils.getMChildren(child);
413 for (Object c : _children) {
414 if (c.getClass().getName()
415 .endsWith("ImmutableContainerNode")) {
419 } else if (child.getClass().getName().endsWith("ImmutableMapNode")) {
420 result.addAll(XSQLODLUtils.getMChildren(child));
426 public List<Record> addRecords(Object element, XSQLBluePrintNode node,
427 boolean root, String tableName, XSQLBluePrint bluePrint) {
429 List<Record> result = new LinkedList<Record>();
430 String nodeID = XSQLODLUtils.getNodeIdentiofier(element);
431 if (node.getODLTableName().equals(nodeID)) {
432 XSQLBluePrintNode bluePrintNode = bluePrint
433 .getBluePrintNodeByODLTableName(nodeID)[0];
434 Record rec = new Record();
435 rec.element = element;
436 XSQLBluePrintNode bpn = this.tablesInQueryMap.get(bluePrintNode
437 .getBluePrintNodeName());
438 if (this.criteria.containsKey(bluePrintNode.getBluePrintNodeName())
440 Map<String, Object> allKeyValues = collectColumnValues(element, bpn);
441 if (!(isObjectFitCriteria(allKeyValues,
442 bpn.getBluePrintNodeName()) == 1)) {
445 addToData(rec, bpn, bluePrint, allKeyValues);
455 XSQLBluePrintNode parent = node.getParent();
456 List<Record> subRecords = addRecords(element, parent, false, tableName,
458 for (Record subRec : subRecords) {
459 List<Object> subO = getChildren(subRec.element, tableName,
462 for (Object subData : subO) {
463 Record rec = new Record();
464 rec.element = subData;
465 rec.data.putAll(subRec.data);
467 String recID = XSQLODLUtils.getNodeIdentiofier(rec.element);
468 XSQLBluePrintNode eNodes[] = bluePrint
469 .getBluePrintNodeByODLTableName(recID);
470 XSQLBluePrintNode bpn = null;
471 for (XSQLBluePrintNode eNode : eNodes) {
472 bpn = this.tablesInQueryMap.get(eNode
473 .getBluePrintNodeName());
478 boolean isObjectInCriteria = true;
480 Map<String, Object> allKeyValues = collectColumnValues(rec.element, bpn);
481 if ((isObjectFitCriteria(allKeyValues,
482 bpn.getBluePrintNodeName()) == 1)) {
483 addToData(rec, bpn, bluePrint, allKeyValues);
485 isObjectInCriteria = false;
489 if (isObjectInCriteria) {
491 if (!rec.data.isEmpty()) {
506 public boolean isWrapperFor(Class<?> iface) throws SQLException {
507 // TODO Auto-generated method stub
512 public <T> T unwrap(Class<T> iface) throws SQLException {
513 // TODO Auto-generated method stub
518 public boolean absolute(int row) throws SQLException {
519 // TODO Auto-generated method stub
524 public void afterLast() throws SQLException {
525 // TODO Auto-generated method stub
530 public void beforeFirst() throws SQLException {
531 // TODO Auto-generated method stub
536 public void cancelRowUpdates() throws SQLException {
537 // TODO Auto-generated method stub
542 public void clearWarnings() throws SQLException {
543 // TODO Auto-generated method stub
548 public void close() throws SQLException {
549 // TODO Auto-generated method stub
554 public void deleteRow() throws SQLException {
555 // TODO Auto-generated method stub
560 public int findColumn(String columnLabel) throws SQLException {
561 // TODO Auto-generated method stub
566 public boolean first() throws SQLException {
567 // TODO Auto-generated method stub
572 public Array getArray(int columnIndex) throws SQLException {
573 // TODO Auto-generated method stub
578 public Array getArray(String columnLabel) throws SQLException {
579 // TODO Auto-generated method stub
584 public InputStream getAsciiStream(int columnIndex) throws SQLException {
585 // TODO Auto-generated method stub
590 public InputStream getAsciiStream(String columnLabel) throws SQLException {
591 // TODO Auto-generated method stub
596 public BigDecimal getBigDecimal(int columnIndex, int scale)
597 throws SQLException {
598 // TODO Auto-generated method stub
603 public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
604 // TODO Auto-generated method stub
609 public BigDecimal getBigDecimal(String columnLabel, int scale)
610 throws SQLException {
611 // TODO Auto-generated method stub
616 public BigDecimal getBigDecimal(String columnLabel) throws SQLException {
617 // TODO Auto-generated method stub
622 public InputStream getBinaryStream(int columnIndex) throws SQLException {
623 // TODO Auto-generated method stub
628 public InputStream getBinaryStream(String columnLabel) throws SQLException {
629 // TODO Auto-generated method stub
634 public Blob getBlob(int columnIndex) throws SQLException {
635 // TODO Auto-generated method stub
640 public Blob getBlob(String columnLabel) throws SQLException {
641 // TODO Auto-generated method stub
646 public boolean getBoolean(int columnIndex) throws SQLException {
647 // TODO Auto-generated method stub
652 public boolean getBoolean(String columnLabel) throws SQLException {
653 // TODO Auto-generated method stub
658 public byte getByte(int columnIndex) throws SQLException {
659 // TODO Auto-generated method stub
664 public byte getByte(String columnLabel) throws SQLException {
665 // TODO Auto-generated method stub
670 public byte[] getBytes(int columnIndex) throws SQLException {
671 // TODO Auto-generated method stub
676 public byte[] getBytes(String columnLabel) throws SQLException {
677 // TODO Auto-generated method stub
682 public Reader getCharacterStream(int columnIndex) throws SQLException {
683 // TODO Auto-generated method stub
688 public Reader getCharacterStream(String columnLabel) throws SQLException {
689 // TODO Auto-generated method stub
694 public Clob getClob(int columnIndex) throws SQLException {
695 // TODO Auto-generated method stub
700 public Clob getClob(String columnLabel) throws SQLException {
701 // TODO Auto-generated method stub
706 public int getConcurrency() throws SQLException {
707 // TODO Auto-generated method stub
712 public String getCursorName() throws SQLException {
713 // TODO Auto-generated method stub
718 public Date getDate(int columnIndex, Calendar cal) throws SQLException {
719 // TODO Auto-generated method stub
724 public Date getDate(int columnIndex) throws SQLException {
725 // TODO Auto-generated method stub
730 public Date getDate(String columnLabel, Calendar cal) throws SQLException {
731 // TODO Auto-generated method stub
736 public Date getDate(String columnLabel) throws SQLException {
737 // TODO Auto-generated method stub
742 public double getDouble(int columnIndex) throws SQLException {
743 // TODO Auto-generated method stub
748 public double getDouble(String columnLabel) throws SQLException {
749 // TODO Auto-generated method stub
754 public int getFetchDirection() throws SQLException {
755 // TODO Auto-generated method stub
760 public int getFetchSize() throws SQLException {
761 // TODO Auto-generated method stub
766 public float getFloat(int columnIndex) throws SQLException {
767 // TODO Auto-generated method stub
772 public float getFloat(String columnLabel) throws SQLException {
773 // TODO Auto-generated method stub
778 public int getHoldability() throws SQLException {
779 // TODO Auto-generated method stub
784 public int getInt(int columnIndex) throws SQLException {
785 // TODO Auto-generated method stub
790 public int getInt(String columnLabel) throws SQLException {
791 // TODO Auto-generated method stub
796 public long getLong(int columnIndex) throws SQLException {
797 // TODO Auto-generated method stub
802 public long getLong(String columnLabel) throws SQLException {
803 // TODO Auto-generated method stub
808 public ResultSetMetaData getMetaData() throws SQLException {
813 public Reader getNCharacterStream(int columnIndex) throws SQLException {
814 // TODO Auto-generated method stub
819 public Reader getNCharacterStream(String columnLabel) throws SQLException {
820 // TODO Auto-generated method stub
825 public NClob getNClob(int columnIndex) throws SQLException {
826 // TODO Auto-generated method stub
831 public NClob getNClob(String columnLabel) throws SQLException {
832 // TODO Auto-generated method stub
837 public String getNString(int columnIndex) throws SQLException {
838 // TODO Auto-generated method stub
843 public String getNString(String columnLabel) throws SQLException {
844 // TODO Auto-generated method stub
849 public Object getObject(int columnIndex, Map<String, Class<?>> map)
850 throws SQLException {
851 return getObject(columnIndex);
855 public Object getObject(int columnIndex) throws SQLException {
856 return currentRecord.get(this.fieldsInQuery.get(columnIndex - 1)
861 public Object getObject(String columnLabel, Map<String, Class<?>> map)
862 throws SQLException {
863 return getObject(columnLabel);
867 public Object getObject(String columnLabel) throws SQLException {
868 return currentRecord.get(columnLabel);
872 public Ref getRef(int columnIndex) throws SQLException {
873 // TODO Auto-generated method stub
878 public Ref getRef(String columnLabel) throws SQLException {
879 // TODO Auto-generated method stub
884 public int getRow() throws SQLException {
885 // TODO Auto-generated method stub
890 public RowId getRowId(int columnIndex) throws SQLException {
891 // TODO Auto-generated method stub
896 public RowId getRowId(String columnLabel) throws SQLException {
897 // TODO Auto-generated method stub
902 public SQLXML getSQLXML(int columnIndex) throws SQLException {
903 // TODO Auto-generated method stub
908 public SQLXML getSQLXML(String columnLabel) throws SQLException {
909 // TODO Auto-generated method stub
914 public short getShort(int columnIndex) throws SQLException {
915 // TODO Auto-generated method stub
920 public short getShort(String columnLabel) throws SQLException {
921 // TODO Auto-generated method stub
926 public Statement getStatement() throws SQLException {
927 // TODO Auto-generated method stub
932 public String getString(int columnIndex) throws SQLException {
937 public String getString(String columnLabel) throws SQLException {
942 public Time getTime(int columnIndex, Calendar cal) throws SQLException {
943 // TODO Auto-generated method stub
948 public Time getTime(int columnIndex) throws SQLException {
949 // TODO Auto-generated method stub
954 public Time getTime(String columnLabel, Calendar cal) throws SQLException {
955 // TODO Auto-generated method stub
960 public Time getTime(String columnLabel) throws SQLException {
961 // TODO Auto-generated method stub
966 public Timestamp getTimestamp(int columnIndex, Calendar cal)
967 throws SQLException {
968 // TODO Auto-generated method stub
973 public Timestamp getTimestamp(int columnIndex) throws SQLException {
974 // TODO Auto-generated method stub
979 public Timestamp getTimestamp(String columnLabel, Calendar cal)
980 throws SQLException {
981 // TODO Auto-generated method stub
986 public Timestamp getTimestamp(String columnLabel) throws SQLException {
987 // TODO Auto-generated method stub
992 public int getType() throws SQLException {
993 return ResultSet.TYPE_FORWARD_ONLY;
997 public URL getURL(int columnIndex) throws SQLException {
998 // TODO Auto-generated method stub
1003 public URL getURL(String columnLabel) throws SQLException {
1004 // TODO Auto-generated method stub
1009 public InputStream getUnicodeStream(int columnIndex) throws SQLException {
1010 // TODO Auto-generated method stub
1015 public InputStream getUnicodeStream(String columnLabel) throws SQLException {
1016 // TODO Auto-generated method stub
1021 public SQLWarning getWarnings() throws SQLException {
1022 // TODO Auto-generated method stub
1027 public void insertRow() throws SQLException {
1028 // TODO Auto-generated method stub
1033 public boolean isAfterLast() throws SQLException {
1034 // TODO Auto-generated method stub
1039 public boolean isBeforeFirst() throws SQLException {
1040 // TODO Auto-generated method stub
1045 public boolean isClosed() throws SQLException {
1046 // TODO Auto-generated method stub
1051 public boolean isFirst() throws SQLException {
1052 // TODO Auto-generated method stub
1057 public boolean isLast() throws SQLException {
1058 // TODO Auto-generated method stub
1063 public boolean last() throws SQLException {
1064 // TODO Auto-generated method stub
1069 public void moveToCurrentRow() throws SQLException {
1070 // TODO Auto-generated method stub
1075 public void moveToInsertRow() throws SQLException {
1076 // TODO Auto-generated method stub
1081 public boolean previous() throws SQLException {
1082 // TODO Auto-generated method stub
1087 public void refreshRow() throws SQLException {
1088 // TODO Auto-generated method stub
1093 public boolean relative(int rows) throws SQLException {
1094 // TODO Auto-generated method stub
1099 public boolean rowDeleted() throws SQLException {
1100 // TODO Auto-generated method stub
1105 public boolean rowInserted() throws SQLException {
1106 // TODO Auto-generated method stub
1111 public boolean rowUpdated() throws SQLException {
1112 // TODO Auto-generated method stub
1117 public void setFetchDirection(int direction) throws SQLException {
1118 // TODO Auto-generated method stub
1123 public void setFetchSize(int rows) throws SQLException {
1124 // TODO Auto-generated method stub
1129 public void updateArray(int columnIndex, Array x) throws SQLException {
1130 // TODO Auto-generated method stub
1135 public void updateArray(String columnLabel, Array x) throws SQLException {
1136 // TODO Auto-generated method stub
1141 public void updateAsciiStream(int columnIndex, InputStream x, int length)
1142 throws SQLException {
1143 // TODO Auto-generated method stub
1148 public void updateAsciiStream(int columnIndex, InputStream x, long length)
1149 throws SQLException {
1150 // TODO Auto-generated method stub
1155 public void updateAsciiStream(int columnIndex, InputStream x)
1156 throws SQLException {
1157 // TODO Auto-generated method stub
1162 public void updateAsciiStream(String columnLabel, InputStream x, int length)
1163 throws SQLException {
1164 // TODO Auto-generated method stub
1169 public void updateAsciiStream(String columnLabel, InputStream x, long length)
1170 throws SQLException {
1171 // TODO Auto-generated method stub
1176 public void updateAsciiStream(String columnLabel, InputStream x)
1177 throws SQLException {
1178 // TODO Auto-generated method stub
1183 public void updateBigDecimal(int columnIndex, BigDecimal x)
1184 throws SQLException {
1185 // TODO Auto-generated method stub
1190 public void updateBigDecimal(String columnLabel, BigDecimal x)
1191 throws SQLException {
1192 // TODO Auto-generated method stub
1197 public void updateBinaryStream(int columnIndex, InputStream x, int length)
1198 throws SQLException {
1199 // TODO Auto-generated method stub
1204 public void updateBinaryStream(int columnIndex, InputStream x, long length)
1205 throws SQLException {
1206 // TODO Auto-generated method stub
1211 public void updateBinaryStream(int columnIndex, InputStream x)
1212 throws SQLException {
1213 // TODO Auto-generated method stub
1218 public void updateBinaryStream(String columnLabel, InputStream x, int length)
1219 throws SQLException {
1220 // TODO Auto-generated method stub
1225 public void updateBinaryStream(String columnLabel, InputStream x,
1226 long length) throws SQLException {
1227 // TODO Auto-generated method stub
1232 public void updateBinaryStream(String columnLabel, InputStream x)
1233 throws SQLException {
1234 // TODO Auto-generated method stub
1239 public void updateBlob(int columnIndex, Blob x) throws SQLException {
1240 // TODO Auto-generated method stub
1245 public void updateBlob(int columnIndex, InputStream inputStream, long length)
1246 throws SQLException {
1247 // TODO Auto-generated method stub
1252 public void updateBlob(int columnIndex, InputStream inputStream)
1253 throws SQLException {
1254 // TODO Auto-generated method stub
1259 public void updateBlob(String columnLabel, Blob x) throws SQLException {
1260 // TODO Auto-generated method stub
1265 public void updateBlob(String columnLabel, InputStream inputStream,
1266 long length) throws SQLException {
1267 // TODO Auto-generated method stub
1272 public void updateBlob(String columnLabel, InputStream inputStream)
1273 throws SQLException {
1274 // TODO Auto-generated method stub
1279 public void updateBoolean(int columnIndex, boolean x) throws SQLException {
1280 // TODO Auto-generated method stub
1285 public void updateBoolean(String columnLabel, boolean x)
1286 throws SQLException {
1287 // TODO Auto-generated method stub
1292 public void updateByte(int columnIndex, byte x) throws SQLException {
1293 // TODO Auto-generated method stub
1298 public void updateByte(String columnLabel, byte x) throws SQLException {
1299 // TODO Auto-generated method stub
1304 public void updateBytes(int columnIndex, byte[] x) throws SQLException {
1305 // TODO Auto-generated method stub
1310 public void updateBytes(String columnLabel, byte[] x) throws SQLException {
1311 // TODO Auto-generated method stub
1316 public void updateCharacterStream(int columnIndex, Reader x, int length)
1317 throws SQLException {
1318 // TODO Auto-generated method stub
1323 public void updateCharacterStream(int columnIndex, Reader x, long length)
1324 throws SQLException {
1325 // TODO Auto-generated method stub
1330 public void updateCharacterStream(int columnIndex, Reader x)
1331 throws SQLException {
1332 // TODO Auto-generated method stub
1337 public void updateCharacterStream(String columnLabel, Reader reader,
1338 int length) throws SQLException {
1339 // TODO Auto-generated method stub
1344 public void updateCharacterStream(String columnLabel, Reader reader,
1345 long length) throws SQLException {
1346 // TODO Auto-generated method stub
1351 public void updateCharacterStream(String columnLabel, Reader reader)
1352 throws SQLException {
1353 // TODO Auto-generated method stub
1358 public void updateClob(int columnIndex, Clob x) throws SQLException {
1359 // TODO Auto-generated method stub
1364 public void updateClob(int columnIndex, Reader reader, long length)
1365 throws SQLException {
1366 // TODO Auto-generated method stub
1371 public void updateClob(int columnIndex, Reader reader) throws SQLException {
1372 // TODO Auto-generated method stub
1377 public void updateClob(String columnLabel, Clob x) throws SQLException {
1378 // TODO Auto-generated method stub
1383 public void updateClob(String columnLabel, Reader reader, long length)
1384 throws SQLException {
1385 // TODO Auto-generated method stub
1390 public void updateClob(String columnLabel, Reader reader)
1391 throws SQLException {
1392 // TODO Auto-generated method stub
1397 public void updateDate(int columnIndex, Date x) throws SQLException {
1398 // TODO Auto-generated method stub
1403 public void updateDate(String columnLabel, Date x) throws SQLException {
1404 // TODO Auto-generated method stub
1409 public void updateDouble(int columnIndex, double x) throws SQLException {
1410 // TODO Auto-generated method stub
1415 public void updateDouble(String columnLabel, double x) throws SQLException {
1416 // TODO Auto-generated method stub
1421 public void updateFloat(int columnIndex, float x) throws SQLException {
1422 // TODO Auto-generated method stub
1427 public void updateFloat(String columnLabel, float x) throws SQLException {
1428 // TODO Auto-generated method stub
1433 public void updateInt(int columnIndex, int x) throws SQLException {
1434 // TODO Auto-generated method stub
1439 public void updateInt(String columnLabel, int x) throws SQLException {
1440 // TODO Auto-generated method stub
1445 public void updateLong(int columnIndex, long x) throws SQLException {
1446 // TODO Auto-generated method stub
1451 public void updateLong(String columnLabel, long x) throws SQLException {
1452 // TODO Auto-generated method stub
1457 public void updateNCharacterStream(int columnIndex, Reader x, long length)
1458 throws SQLException {
1459 // TODO Auto-generated method stub
1464 public void updateNCharacterStream(int columnIndex, Reader x)
1465 throws SQLException {
1466 // TODO Auto-generated method stub
1471 public void updateNCharacterStream(String columnLabel, Reader reader,
1472 long length) throws SQLException {
1473 // TODO Auto-generated method stub
1478 public void updateNCharacterStream(String columnLabel, Reader reader)
1479 throws SQLException {
1480 // TODO Auto-generated method stub
1485 public void updateNClob(int columnIndex, NClob nClob) throws SQLException {
1486 // TODO Auto-generated method stub
1491 public void updateNClob(int columnIndex, Reader reader, long length)
1492 throws SQLException {
1493 // TODO Auto-generated method stub
1498 public void updateNClob(int columnIndex, Reader reader) throws SQLException {
1499 // TODO Auto-generated method stub
1504 public void updateNClob(String columnLabel, NClob nClob)
1505 throws SQLException {
1506 // TODO Auto-generated method stub
1511 public void updateNClob(String columnLabel, Reader reader, long length)
1512 throws SQLException {
1513 // TODO Auto-generated method stub
1518 public void updateNClob(String columnLabel, Reader reader)
1519 throws SQLException {
1520 // TODO Auto-generated method stub
1525 public void updateNString(int columnIndex, String nString)
1526 throws SQLException {
1527 // TODO Auto-generated method stub
1532 public void updateNString(String columnLabel, String nString)
1533 throws SQLException {
1534 // TODO Auto-generated method stub
1539 public void updateNull(int columnIndex) throws SQLException {
1540 // TODO Auto-generated method stub
1545 public void updateNull(String columnLabel) throws SQLException {
1546 // TODO Auto-generated method stub
1551 public void updateObject(int columnIndex, Object x, int scaleOrLength)
1552 throws SQLException {
1553 // TODO Auto-generated method stub
1558 public void updateObject(int columnIndex, Object x) throws SQLException {
1559 // TODO Auto-generated method stub
1564 public void updateObject(String columnLabel, Object x, int scaleOrLength)
1565 throws SQLException {
1566 // TODO Auto-generated method stub
1571 public void updateObject(String columnLabel, Object x) throws SQLException {
1572 // TODO Auto-generated method stub
1577 public void updateRef(int columnIndex, Ref x) throws SQLException {
1578 // TODO Auto-generated method stub
1583 public void updateRef(String columnLabel, Ref x) throws SQLException {
1584 // TODO Auto-generated method stub
1589 public void updateRow() throws SQLException {
1590 // TODO Auto-generated method stub
1595 public void updateRowId(int columnIndex, RowId x) throws SQLException {
1596 // TODO Auto-generated method stub
1601 public void updateRowId(String columnLabel, RowId x) throws SQLException {
1602 // TODO Auto-generated method stub
1607 public void updateSQLXML(int columnIndex, SQLXML xmlObject)
1608 throws SQLException {
1609 // TODO Auto-generated method stub
1614 public void updateSQLXML(String columnLabel, SQLXML xmlObject)
1615 throws SQLException {
1616 // TODO Auto-generated method stub
1621 public void updateShort(int columnIndex, short x) throws SQLException {
1622 // TODO Auto-generated method stub
1627 public void updateShort(String columnLabel, short x) throws SQLException {
1628 // TODO Auto-generated method stub
1633 public void updateString(int columnIndex, String x) throws SQLException {
1634 // TODO Auto-generated method stub
1639 public void updateString(String columnLabel, String x) throws SQLException {
1640 // TODO Auto-generated method stub
1645 public void updateTime(int columnIndex, Time x) throws SQLException {
1646 // TODO Auto-generated method stub
1651 public void updateTime(String columnLabel, Time x) throws SQLException {
1652 // TODO Auto-generated method stub
1657 public void updateTimestamp(int columnIndex, Timestamp x)
1658 throws SQLException {
1659 // TODO Auto-generated method stub
1664 public void updateTimestamp(String columnLabel, Timestamp x)
1665 throws SQLException {
1666 // TODO Auto-generated method stub
1671 public boolean wasNull() throws SQLException {
1672 // TODO Auto-generated method stub
1677 public String getCatalogName(int column) throws SQLException {
1678 // TODO Auto-generated method stub
1683 public String getColumnClassName(int column) throws SQLException {
1684 // TODO Auto-generated method stub
1689 public int getColumnCount() throws SQLException {
1690 return fieldsInQuery.size();
1694 public int getColumnDisplaySize(int column) throws SQLException {
1695 // TODO Auto-generated method stub
1700 public String getColumnLabel(int column) throws SQLException {
1701 return this.fieldsInQuery.get(column - 1).toString();
1705 public String getColumnName(int column) throws SQLException {
1706 // TODO Auto-generated method stub
1711 public int getColumnType(int column) throws SQLException {
1716 public String getColumnTypeName(int column) throws SQLException {
1717 // TODO Auto-generated method stub
1722 public int getPrecision(int column) throws SQLException {
1723 // TODO Auto-generated method stub
1728 public int getScale(int column) throws SQLException {
1729 // TODO Auto-generated method stub
1734 public String getSchemaName(int column) throws SQLException {
1735 // TODO Auto-generated method stub
1740 public String getTableName(int column) throws SQLException {
1741 // TODO Auto-generated method stub
1746 public boolean isAutoIncrement(int column) throws SQLException {
1747 // TODO Auto-generated method stub
1752 public boolean isCaseSensitive(int column) throws SQLException {
1753 // TODO Auto-generated method stub
1758 public boolean isCurrency(int column) throws SQLException {
1759 // TODO Auto-generated method stub
1764 public boolean isDefinitelyWritable(int column) throws SQLException {
1765 // TODO Auto-generated method stub
1770 public int isNullable(int column) throws SQLException {
1771 // TODO Auto-generated method stub
1776 public boolean isReadOnly(int column) throws SQLException {
1777 // TODO Auto-generated method stub
1782 public boolean isSearchable(int column) throws SQLException {
1783 // TODO Auto-generated method stub
1788 public boolean isSigned(int column) throws SQLException {
1789 // TODO Auto-generated method stub
1794 public boolean isWritable(int column) throws SQLException {
1795 // TODO Auto-generated method stub
1800 public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
1801 // TODO Auto-generated method stub
1806 public <T> T getObject(String columnLabel, Class<T> type)
1807 throws SQLException {
1808 // TODO Auto-generated method stub