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,boolean root, String tableName, XSQLBluePrint bluePrint) {
427 List<Record> result = new LinkedList<Record>();
428 //In case this is a sibling to the requested table, the elenment type
429 //won't be in the path of the leaf node
433 String nodeID = XSQLODLUtils.getNodeIdentiofier(element);
434 if (node.getODLTableName().equals(nodeID)) {
435 XSQLBluePrintNode bluePrintNode = bluePrint.getBluePrintNodeByODLTableName(nodeID)[0];
436 Record rec = new Record();
437 rec.element = element;
438 XSQLBluePrintNode bpn = this.tablesInQueryMap.get(bluePrintNode.getBluePrintNodeName());
439 if (this.criteria.containsKey(bluePrintNode.getBluePrintNodeName()) || bpn != null) {
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,bluePrint);
457 for (Record subRec : subRecords) {
458 List<Object> subO = getChildren(subRec.element, tableName,
461 for (Object subData : subO) {
462 Record rec = new Record();
463 rec.element = subData;
464 rec.data.putAll(subRec.data);
466 String recID = XSQLODLUtils.getNodeIdentiofier(rec.element);
467 XSQLBluePrintNode eNodes[] = bluePrint
468 .getBluePrintNodeByODLTableName(recID);
469 XSQLBluePrintNode bpn = null;
470 for (XSQLBluePrintNode eNode : eNodes) {
471 bpn = this.tablesInQueryMap.get(eNode
472 .getBluePrintNodeName());
477 boolean isObjectInCriteria = true;
479 Map<String, Object> allKeyValues = collectColumnValues(rec.element, bpn);
480 if ((isObjectFitCriteria(allKeyValues,
481 bpn.getBluePrintNodeName()) == 1)) {
482 addToData(rec, bpn, bluePrint, allKeyValues);
484 isObjectInCriteria = false;
488 if (isObjectInCriteria) {
490 if (!rec.data.isEmpty()) {
505 public boolean isWrapperFor(Class<?> iface) throws SQLException {
506 // TODO Auto-generated method stub
511 public <T> T unwrap(Class<T> iface) throws SQLException {
512 // TODO Auto-generated method stub
517 public boolean absolute(int row) throws SQLException {
518 // TODO Auto-generated method stub
523 public void afterLast() throws SQLException {
524 // TODO Auto-generated method stub
529 public void beforeFirst() throws SQLException {
530 // TODO Auto-generated method stub
535 public void cancelRowUpdates() throws SQLException {
536 // TODO Auto-generated method stub
541 public void clearWarnings() throws SQLException {
542 // TODO Auto-generated method stub
547 public void close() throws SQLException {
548 // TODO Auto-generated method stub
553 public void deleteRow() throws SQLException {
554 // TODO Auto-generated method stub
559 public int findColumn(String columnLabel) throws SQLException {
560 // TODO Auto-generated method stub
565 public boolean first() throws SQLException {
566 // TODO Auto-generated method stub
571 public Array getArray(int columnIndex) throws SQLException {
572 // TODO Auto-generated method stub
577 public Array getArray(String columnLabel) throws SQLException {
578 // TODO Auto-generated method stub
583 public InputStream getAsciiStream(int columnIndex) throws SQLException {
584 // TODO Auto-generated method stub
589 public InputStream getAsciiStream(String columnLabel) throws SQLException {
590 // TODO Auto-generated method stub
595 public BigDecimal getBigDecimal(int columnIndex, int scale)
596 throws SQLException {
597 // TODO Auto-generated method stub
602 public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
603 // TODO Auto-generated method stub
608 public BigDecimal getBigDecimal(String columnLabel, int scale)
609 throws SQLException {
610 // TODO Auto-generated method stub
615 public BigDecimal getBigDecimal(String columnLabel) throws SQLException {
616 // TODO Auto-generated method stub
621 public InputStream getBinaryStream(int columnIndex) throws SQLException {
622 // TODO Auto-generated method stub
627 public InputStream getBinaryStream(String columnLabel) throws SQLException {
628 // TODO Auto-generated method stub
633 public Blob getBlob(int columnIndex) throws SQLException {
634 // TODO Auto-generated method stub
639 public Blob getBlob(String columnLabel) throws SQLException {
640 // TODO Auto-generated method stub
645 public boolean getBoolean(int columnIndex) throws SQLException {
646 // TODO Auto-generated method stub
651 public boolean getBoolean(String columnLabel) throws SQLException {
652 // TODO Auto-generated method stub
657 public byte getByte(int columnIndex) throws SQLException {
658 // TODO Auto-generated method stub
663 public byte getByte(String columnLabel) throws SQLException {
664 // TODO Auto-generated method stub
669 public byte[] getBytes(int columnIndex) throws SQLException {
670 // TODO Auto-generated method stub
675 public byte[] getBytes(String columnLabel) throws SQLException {
676 // TODO Auto-generated method stub
681 public Reader getCharacterStream(int columnIndex) throws SQLException {
682 // TODO Auto-generated method stub
687 public Reader getCharacterStream(String columnLabel) throws SQLException {
688 // TODO Auto-generated method stub
693 public Clob getClob(int columnIndex) throws SQLException {
694 // TODO Auto-generated method stub
699 public Clob getClob(String columnLabel) throws SQLException {
700 // TODO Auto-generated method stub
705 public int getConcurrency() throws SQLException {
706 // TODO Auto-generated method stub
711 public String getCursorName() throws SQLException {
712 // TODO Auto-generated method stub
717 public Date getDate(int columnIndex, Calendar cal) throws SQLException {
718 // TODO Auto-generated method stub
723 public Date getDate(int columnIndex) throws SQLException {
724 // TODO Auto-generated method stub
729 public Date getDate(String columnLabel, Calendar cal) throws SQLException {
730 // TODO Auto-generated method stub
735 public Date getDate(String columnLabel) throws SQLException {
736 // TODO Auto-generated method stub
741 public double getDouble(int columnIndex) throws SQLException {
742 // TODO Auto-generated method stub
747 public double getDouble(String columnLabel) throws SQLException {
748 // TODO Auto-generated method stub
753 public int getFetchDirection() throws SQLException {
754 // TODO Auto-generated method stub
759 public int getFetchSize() throws SQLException {
760 // TODO Auto-generated method stub
765 public float getFloat(int columnIndex) throws SQLException {
766 // TODO Auto-generated method stub
771 public float getFloat(String columnLabel) throws SQLException {
772 // TODO Auto-generated method stub
777 public int getHoldability() throws SQLException {
778 // TODO Auto-generated method stub
783 public int getInt(int columnIndex) throws SQLException {
784 // TODO Auto-generated method stub
789 public int getInt(String columnLabel) throws SQLException {
790 // TODO Auto-generated method stub
795 public long getLong(int columnIndex) throws SQLException {
796 // TODO Auto-generated method stub
801 public long getLong(String columnLabel) throws SQLException {
802 // TODO Auto-generated method stub
807 public ResultSetMetaData getMetaData() throws SQLException {
812 public Reader getNCharacterStream(int columnIndex) throws SQLException {
813 // TODO Auto-generated method stub
818 public Reader getNCharacterStream(String columnLabel) throws SQLException {
819 // TODO Auto-generated method stub
824 public NClob getNClob(int columnIndex) throws SQLException {
825 // TODO Auto-generated method stub
830 public NClob getNClob(String columnLabel) throws SQLException {
831 // TODO Auto-generated method stub
836 public String getNString(int columnIndex) throws SQLException {
837 // TODO Auto-generated method stub
842 public String getNString(String columnLabel) throws SQLException {
843 // TODO Auto-generated method stub
848 public Object getObject(int columnIndex, Map<String, Class<?>> map)
849 throws SQLException {
850 return getObject(columnIndex);
854 public Object getObject(int columnIndex) throws SQLException {
855 return currentRecord.get(this.fieldsInQuery.get(columnIndex - 1)
860 public Object getObject(String columnLabel, Map<String, Class<?>> map)
861 throws SQLException {
862 return getObject(columnLabel);
866 public Object getObject(String columnLabel) throws SQLException {
867 return currentRecord.get(columnLabel);
871 public Ref getRef(int columnIndex) throws SQLException {
872 // TODO Auto-generated method stub
877 public Ref getRef(String columnLabel) throws SQLException {
878 // TODO Auto-generated method stub
883 public int getRow() throws SQLException {
884 // TODO Auto-generated method stub
889 public RowId getRowId(int columnIndex) throws SQLException {
890 // TODO Auto-generated method stub
895 public RowId getRowId(String columnLabel) throws SQLException {
896 // TODO Auto-generated method stub
901 public SQLXML getSQLXML(int columnIndex) throws SQLException {
902 // TODO Auto-generated method stub
907 public SQLXML getSQLXML(String columnLabel) throws SQLException {
908 // TODO Auto-generated method stub
913 public short getShort(int columnIndex) throws SQLException {
914 // TODO Auto-generated method stub
919 public short getShort(String columnLabel) throws SQLException {
920 // TODO Auto-generated method stub
925 public Statement getStatement() throws SQLException {
926 // TODO Auto-generated method stub
931 public String getString(int columnIndex) throws SQLException {
936 public String getString(String columnLabel) throws SQLException {
941 public Time getTime(int columnIndex, Calendar cal) throws SQLException {
942 // TODO Auto-generated method stub
947 public Time getTime(int columnIndex) throws SQLException {
948 // TODO Auto-generated method stub
953 public Time getTime(String columnLabel, Calendar cal) throws SQLException {
954 // TODO Auto-generated method stub
959 public Time getTime(String columnLabel) throws SQLException {
960 // TODO Auto-generated method stub
965 public Timestamp getTimestamp(int columnIndex, Calendar cal)
966 throws SQLException {
967 // TODO Auto-generated method stub
972 public Timestamp getTimestamp(int columnIndex) throws SQLException {
973 // TODO Auto-generated method stub
978 public Timestamp getTimestamp(String columnLabel, Calendar cal)
979 throws SQLException {
980 // TODO Auto-generated method stub
985 public Timestamp getTimestamp(String columnLabel) throws SQLException {
986 // TODO Auto-generated method stub
991 public int getType() throws SQLException {
992 return ResultSet.TYPE_FORWARD_ONLY;
996 public URL getURL(int columnIndex) throws SQLException {
997 // TODO Auto-generated method stub
1002 public URL getURL(String columnLabel) throws SQLException {
1003 // TODO Auto-generated method stub
1008 public InputStream getUnicodeStream(int columnIndex) throws SQLException {
1009 // TODO Auto-generated method stub
1014 public InputStream getUnicodeStream(String columnLabel) throws SQLException {
1015 // TODO Auto-generated method stub
1020 public SQLWarning getWarnings() throws SQLException {
1021 // TODO Auto-generated method stub
1026 public void insertRow() throws SQLException {
1027 // TODO Auto-generated method stub
1032 public boolean isAfterLast() throws SQLException {
1033 // TODO Auto-generated method stub
1038 public boolean isBeforeFirst() throws SQLException {
1039 // TODO Auto-generated method stub
1044 public boolean isClosed() throws SQLException {
1045 // TODO Auto-generated method stub
1050 public boolean isFirst() throws SQLException {
1051 // TODO Auto-generated method stub
1056 public boolean isLast() throws SQLException {
1057 // TODO Auto-generated method stub
1062 public boolean last() throws SQLException {
1063 // TODO Auto-generated method stub
1068 public void moveToCurrentRow() throws SQLException {
1069 // TODO Auto-generated method stub
1074 public void moveToInsertRow() throws SQLException {
1075 // TODO Auto-generated method stub
1080 public boolean previous() throws SQLException {
1081 // TODO Auto-generated method stub
1086 public void refreshRow() throws SQLException {
1087 // TODO Auto-generated method stub
1092 public boolean relative(int rows) throws SQLException {
1093 // TODO Auto-generated method stub
1098 public boolean rowDeleted() throws SQLException {
1099 // TODO Auto-generated method stub
1104 public boolean rowInserted() throws SQLException {
1105 // TODO Auto-generated method stub
1110 public boolean rowUpdated() throws SQLException {
1111 // TODO Auto-generated method stub
1116 public void setFetchDirection(int direction) throws SQLException {
1117 // TODO Auto-generated method stub
1122 public void setFetchSize(int rows) throws SQLException {
1123 // TODO Auto-generated method stub
1128 public void updateArray(int columnIndex, Array x) throws SQLException {
1129 // TODO Auto-generated method stub
1134 public void updateArray(String columnLabel, Array x) throws SQLException {
1135 // TODO Auto-generated method stub
1140 public void updateAsciiStream(int columnIndex, InputStream x, int length)
1141 throws SQLException {
1142 // TODO Auto-generated method stub
1147 public void updateAsciiStream(int columnIndex, InputStream x, long length)
1148 throws SQLException {
1149 // TODO Auto-generated method stub
1154 public void updateAsciiStream(int columnIndex, InputStream x)
1155 throws SQLException {
1156 // TODO Auto-generated method stub
1161 public void updateAsciiStream(String columnLabel, InputStream x, int length)
1162 throws SQLException {
1163 // TODO Auto-generated method stub
1168 public void updateAsciiStream(String columnLabel, InputStream x, long length)
1169 throws SQLException {
1170 // TODO Auto-generated method stub
1175 public void updateAsciiStream(String columnLabel, InputStream x)
1176 throws SQLException {
1177 // TODO Auto-generated method stub
1182 public void updateBigDecimal(int columnIndex, BigDecimal x)
1183 throws SQLException {
1184 // TODO Auto-generated method stub
1189 public void updateBigDecimal(String columnLabel, BigDecimal x)
1190 throws SQLException {
1191 // TODO Auto-generated method stub
1196 public void updateBinaryStream(int columnIndex, InputStream x, int length)
1197 throws SQLException {
1198 // TODO Auto-generated method stub
1203 public void updateBinaryStream(int columnIndex, InputStream x, long length)
1204 throws SQLException {
1205 // TODO Auto-generated method stub
1210 public void updateBinaryStream(int columnIndex, InputStream x)
1211 throws SQLException {
1212 // TODO Auto-generated method stub
1217 public void updateBinaryStream(String columnLabel, InputStream x, int length)
1218 throws SQLException {
1219 // TODO Auto-generated method stub
1224 public void updateBinaryStream(String columnLabel, InputStream x,
1225 long length) throws SQLException {
1226 // TODO Auto-generated method stub
1231 public void updateBinaryStream(String columnLabel, InputStream x)
1232 throws SQLException {
1233 // TODO Auto-generated method stub
1238 public void updateBlob(int columnIndex, Blob x) throws SQLException {
1239 // TODO Auto-generated method stub
1244 public void updateBlob(int columnIndex, InputStream inputStream, long length)
1245 throws SQLException {
1246 // TODO Auto-generated method stub
1251 public void updateBlob(int columnIndex, InputStream inputStream)
1252 throws SQLException {
1253 // TODO Auto-generated method stub
1258 public void updateBlob(String columnLabel, Blob x) throws SQLException {
1259 // TODO Auto-generated method stub
1264 public void updateBlob(String columnLabel, InputStream inputStream,
1265 long length) throws SQLException {
1266 // TODO Auto-generated method stub
1271 public void updateBlob(String columnLabel, InputStream inputStream)
1272 throws SQLException {
1273 // TODO Auto-generated method stub
1278 public void updateBoolean(int columnIndex, boolean x) throws SQLException {
1279 // TODO Auto-generated method stub
1284 public void updateBoolean(String columnLabel, boolean x)
1285 throws SQLException {
1286 // TODO Auto-generated method stub
1291 public void updateByte(int columnIndex, byte x) throws SQLException {
1292 // TODO Auto-generated method stub
1297 public void updateByte(String columnLabel, byte x) throws SQLException {
1298 // TODO Auto-generated method stub
1303 public void updateBytes(int columnIndex, byte[] x) throws SQLException {
1304 // TODO Auto-generated method stub
1309 public void updateBytes(String columnLabel, byte[] x) throws SQLException {
1310 // TODO Auto-generated method stub
1315 public void updateCharacterStream(int columnIndex, Reader x, int length)
1316 throws SQLException {
1317 // TODO Auto-generated method stub
1322 public void updateCharacterStream(int columnIndex, Reader x, long length)
1323 throws SQLException {
1324 // TODO Auto-generated method stub
1329 public void updateCharacterStream(int columnIndex, Reader x)
1330 throws SQLException {
1331 // TODO Auto-generated method stub
1336 public void updateCharacterStream(String columnLabel, Reader reader,
1337 int length) throws SQLException {
1338 // TODO Auto-generated method stub
1343 public void updateCharacterStream(String columnLabel, Reader reader,
1344 long length) throws SQLException {
1345 // TODO Auto-generated method stub
1350 public void updateCharacterStream(String columnLabel, Reader reader)
1351 throws SQLException {
1352 // TODO Auto-generated method stub
1357 public void updateClob(int columnIndex, Clob x) throws SQLException {
1358 // TODO Auto-generated method stub
1363 public void updateClob(int columnIndex, Reader reader, long length)
1364 throws SQLException {
1365 // TODO Auto-generated method stub
1370 public void updateClob(int columnIndex, Reader reader) throws SQLException {
1371 // TODO Auto-generated method stub
1376 public void updateClob(String columnLabel, Clob x) throws SQLException {
1377 // TODO Auto-generated method stub
1382 public void updateClob(String columnLabel, Reader reader, long length)
1383 throws SQLException {
1384 // TODO Auto-generated method stub
1389 public void updateClob(String columnLabel, Reader reader)
1390 throws SQLException {
1391 // TODO Auto-generated method stub
1396 public void updateDate(int columnIndex, Date x) throws SQLException {
1397 // TODO Auto-generated method stub
1402 public void updateDate(String columnLabel, Date x) throws SQLException {
1403 // TODO Auto-generated method stub
1408 public void updateDouble(int columnIndex, double x) throws SQLException {
1409 // TODO Auto-generated method stub
1414 public void updateDouble(String columnLabel, double x) throws SQLException {
1415 // TODO Auto-generated method stub
1420 public void updateFloat(int columnIndex, float x) throws SQLException {
1421 // TODO Auto-generated method stub
1426 public void updateFloat(String columnLabel, float x) throws SQLException {
1427 // TODO Auto-generated method stub
1432 public void updateInt(int columnIndex, int x) throws SQLException {
1433 // TODO Auto-generated method stub
1438 public void updateInt(String columnLabel, int x) throws SQLException {
1439 // TODO Auto-generated method stub
1444 public void updateLong(int columnIndex, long x) throws SQLException {
1445 // TODO Auto-generated method stub
1450 public void updateLong(String columnLabel, long x) throws SQLException {
1451 // TODO Auto-generated method stub
1456 public void updateNCharacterStream(int columnIndex, Reader x, long length)
1457 throws SQLException {
1458 // TODO Auto-generated method stub
1463 public void updateNCharacterStream(int columnIndex, Reader x)
1464 throws SQLException {
1465 // TODO Auto-generated method stub
1470 public void updateNCharacterStream(String columnLabel, Reader reader,
1471 long length) throws SQLException {
1472 // TODO Auto-generated method stub
1477 public void updateNCharacterStream(String columnLabel, Reader reader)
1478 throws SQLException {
1479 // TODO Auto-generated method stub
1484 public void updateNClob(int columnIndex, NClob nClob) throws SQLException {
1485 // TODO Auto-generated method stub
1490 public void updateNClob(int columnIndex, Reader reader, long length)
1491 throws SQLException {
1492 // TODO Auto-generated method stub
1497 public void updateNClob(int columnIndex, Reader reader) throws SQLException {
1498 // TODO Auto-generated method stub
1503 public void updateNClob(String columnLabel, NClob nClob)
1504 throws SQLException {
1505 // TODO Auto-generated method stub
1510 public void updateNClob(String columnLabel, Reader reader, long length)
1511 throws SQLException {
1512 // TODO Auto-generated method stub
1517 public void updateNClob(String columnLabel, Reader reader)
1518 throws SQLException {
1519 // TODO Auto-generated method stub
1524 public void updateNString(int columnIndex, String nString)
1525 throws SQLException {
1526 // TODO Auto-generated method stub
1531 public void updateNString(String columnLabel, String nString)
1532 throws SQLException {
1533 // TODO Auto-generated method stub
1538 public void updateNull(int columnIndex) throws SQLException {
1539 // TODO Auto-generated method stub
1544 public void updateNull(String columnLabel) throws SQLException {
1545 // TODO Auto-generated method stub
1550 public void updateObject(int columnIndex, Object x, int scaleOrLength)
1551 throws SQLException {
1552 // TODO Auto-generated method stub
1557 public void updateObject(int columnIndex, Object x) throws SQLException {
1558 // TODO Auto-generated method stub
1563 public void updateObject(String columnLabel, Object x, int scaleOrLength)
1564 throws SQLException {
1565 // TODO Auto-generated method stub
1570 public void updateObject(String columnLabel, Object x) throws SQLException {
1571 // TODO Auto-generated method stub
1576 public void updateRef(int columnIndex, Ref x) throws SQLException {
1577 // TODO Auto-generated method stub
1582 public void updateRef(String columnLabel, Ref x) throws SQLException {
1583 // TODO Auto-generated method stub
1588 public void updateRow() throws SQLException {
1589 // TODO Auto-generated method stub
1594 public void updateRowId(int columnIndex, RowId x) throws SQLException {
1595 // TODO Auto-generated method stub
1600 public void updateRowId(String columnLabel, RowId x) throws SQLException {
1601 // TODO Auto-generated method stub
1606 public void updateSQLXML(int columnIndex, SQLXML xmlObject)
1607 throws SQLException {
1608 // TODO Auto-generated method stub
1613 public void updateSQLXML(String columnLabel, SQLXML xmlObject)
1614 throws SQLException {
1615 // TODO Auto-generated method stub
1620 public void updateShort(int columnIndex, short x) throws SQLException {
1621 // TODO Auto-generated method stub
1626 public void updateShort(String columnLabel, short x) throws SQLException {
1627 // TODO Auto-generated method stub
1632 public void updateString(int columnIndex, String x) throws SQLException {
1633 // TODO Auto-generated method stub
1638 public void updateString(String columnLabel, String x) throws SQLException {
1639 // TODO Auto-generated method stub
1644 public void updateTime(int columnIndex, Time x) throws SQLException {
1645 // TODO Auto-generated method stub
1650 public void updateTime(String columnLabel, Time x) throws SQLException {
1651 // TODO Auto-generated method stub
1656 public void updateTimestamp(int columnIndex, Timestamp x)
1657 throws SQLException {
1658 // TODO Auto-generated method stub
1663 public void updateTimestamp(String columnLabel, Timestamp x)
1664 throws SQLException {
1665 // TODO Auto-generated method stub
1670 public boolean wasNull() throws SQLException {
1671 // TODO Auto-generated method stub
1676 public String getCatalogName(int column) throws SQLException {
1677 // TODO Auto-generated method stub
1682 public String getColumnClassName(int column) throws SQLException {
1683 // TODO Auto-generated method stub
1688 public int getColumnCount() throws SQLException {
1689 return fieldsInQuery.size();
1693 public int getColumnDisplaySize(int column) throws SQLException {
1694 // TODO Auto-generated method stub
1699 public String getColumnLabel(int column) throws SQLException {
1700 return this.fieldsInQuery.get(column - 1).toString();
1704 public String getColumnName(int column) throws SQLException {
1705 // TODO Auto-generated method stub
1710 public int getColumnType(int column) throws SQLException {
1715 public String getColumnTypeName(int column) throws SQLException {
1716 // TODO Auto-generated method stub
1721 public int getPrecision(int column) throws SQLException {
1722 // TODO Auto-generated method stub
1727 public int getScale(int column) throws SQLException {
1728 // TODO Auto-generated method stub
1733 public String getSchemaName(int column) throws SQLException {
1734 // TODO Auto-generated method stub
1739 public String getTableName(int column) throws SQLException {
1740 // TODO Auto-generated method stub
1745 public boolean isAutoIncrement(int column) throws SQLException {
1746 // TODO Auto-generated method stub
1751 public boolean isCaseSensitive(int column) throws SQLException {
1752 // TODO Auto-generated method stub
1757 public boolean isCurrency(int column) throws SQLException {
1758 // TODO Auto-generated method stub
1763 public boolean isDefinitelyWritable(int column) throws SQLException {
1764 // TODO Auto-generated method stub
1769 public int isNullable(int column) throws SQLException {
1770 // TODO Auto-generated method stub
1775 public boolean isReadOnly(int column) throws SQLException {
1776 // TODO Auto-generated method stub
1781 public boolean isSearchable(int column) throws SQLException {
1782 // TODO Auto-generated method stub
1787 public boolean isSigned(int column) throws SQLException {
1788 // TODO Auto-generated method stub
1793 public boolean isWritable(int column) throws SQLException {
1794 // TODO Auto-generated method stub
1799 public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
1800 // TODO Auto-generated method stub
1805 public <T> T getObject(String columnLabel, Class<T> type)
1806 throws SQLException {
1807 // TODO Auto-generated method stub