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> records = new LinkedList<Map>();
50 private transient Map 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>();
71 JDBCResultSet rs = new JDBCResultSet(_sql);
72 this.subQueries.put(logicalName,rs);
76 public Map<String,JDBCResultSet> getSubQueries() {
77 if(this.subQueries==null)
78 this.subQueries = new HashMap<>();
79 return this.subQueries;
82 public JDBCResultSet(String _sql) {
83 synchronized (JDBCResultSet.class) {
90 public String getSQL() {
94 public void setError(Exception _err) {
98 public Exception getError() {
102 public void updateData(JDBCResultSet rs) {
103 synchronized (this) {
104 this.tablesInQuery = rs.tablesInQuery;
105 this.tablesInQueryMap = rs.tablesInQueryMap;
106 this.fieldsInQuery = rs.fieldsInQuery;
111 public int isObjectFitCriteria(Map objValues, String tableName) {
112 Map<XSQLColumn, List<XSQLCriteria>> tblCriteria = criteria
114 if (tblCriteria == null) {
117 for (Map.Entry<XSQLColumn, List<XSQLCriteria>> cc : tblCriteria
119 for (XSQLCriteria c : cc.getValue()) {
120 Object value = objValues.get(cc.getKey().toString());
121 int result = c.checkValue(value);
130 public int isObjectFitCriteria(Object element, Class<?> cls) {
131 Map<XSQLColumn, List<XSQLCriteria>> tblCriteria = criteria.get(cls
133 if (tblCriteria == null) {
136 for (Map.Entry<XSQLColumn, List<XSQLCriteria>> cc : tblCriteria
138 for (XSQLCriteria c : cc.getValue()) {
139 int result = c.isObjectFitCriteria(element, cc.getKey()
149 public Map<String, Map<XSQLColumn, List<XSQLCriteria>>> getCriteria() {
150 return this.criteria;
157 public List<XSQLBluePrintNode> getTables() {
158 return tablesInQuery;
161 public void addTableToQuery(XSQLBluePrintNode node) {
162 if (this.tablesInQueryMap.containsKey(node.getBluePrintNodeName())) {
165 this.tablesInQuery.add(node);
166 this.tablesInQueryMap.put(node.getBluePrintNodeName(), node);
169 public List<XSQLColumn> getFields() {
170 return this.fieldsInQuery;
173 public XSQLBluePrintNode getMainTable() {
174 if (tablesInQuery.size() == 1) {
175 return tablesInQuery.get(0);
177 XSQLBluePrintNode result = null;
178 for (XSQLBluePrintNode node : tablesInQuery) {
179 if (result == null) {
181 } else if (result.getLevel() < node.getLevel()) {
188 public boolean isFinished() {
192 public void setFinished(boolean b) {
197 return this.records.size();
200 public void addRecord(Map r) {
201 synchronized (this) {
202 if (records == null) {
203 records = new LinkedList<Map>();
210 public void addRecord(ArrayList hierarchy) {
211 Map rec = new HashMap();
212 for (int i = hierarchy.size() - 1; i >= 0; i--) {
213 Object element = hierarchy.get(i);
214 for (XSQLColumn c : fieldsInQuery) {
215 if (c.getTableName().equals(element.getClass().getSimpleName())) {
217 Method m = element.getClass().getMethod(c.getName(),
219 Object value = m.invoke(element, null);
220 rec.put(c.getName(), value);
221 } catch (Exception err) {
222 err.printStackTrace();
227 this.records.add(rec);
230 public boolean next() {
231 this.currentRecord = null;
232 if (records == null) {
233 records = new LinkedList<Map>();
235 while (!finished || records.size() > 0) {
236 synchronized (this) {
237 if (records.size() == 0) {
240 } catch (Exception err) {
242 if (records.size() > 0) {
244 currentRecord = records.removeFirst();
252 currentRecord = records.removeFirst();
263 public Map getCurrent() {
264 return this.currentRecord;
267 private void createRecord(Object data, XSQLBluePrintNode node) {
268 Map rec = new HashMap();
269 for (XSQLColumn c : this.fieldsInQuery) {
270 if (c.getTableName().equals(node.getBluePrintNodeName())) {
272 Method m = node.getInterface().getMethod(c.getName(), null);
273 Object value = m.invoke(data, null);
275 rec.put(c.getName(), value);
277 rec.put(c.getName(), "");
279 } catch (Exception err) {
280 err.printStackTrace();
287 public static class Record {
288 public Map data = new HashMap();
289 public Object element = null;
291 public Map getRecord() {
296 private Map collectColumnValues(Object node, XSQLBluePrintNode bpn) {
297 Map subChildren = XSQLODLUtils.getChildren(node);
298 Map result = new HashMap();
299 for (Object stc : subChildren.values()) {
300 if (stc.getClass().getName().endsWith("ImmutableAugmentationNode")) {
301 Map values = XSQLODLUtils.getChildren(stc);
302 for (Object key : values.keySet()) {
303 Object val = values.get(key);
304 if (val.getClass().getName().endsWith("ImmutableLeafNode")) {
305 Object value = XSQLODLUtils.getValue(val);
306 String k = XSQLODLUtils.getNodeName(val);
308 result.put(bpn.getBluePrintNodeName() + "." + k,
313 } else if (stc.getClass().getName().endsWith("ImmutableLeafNode")) {
314 String k = XSQLODLUtils.getNodeName(stc);
315 Object value = XSQLODLUtils.getValue(stc);
317 result.put(bpn.getBluePrintNodeName() + "." + k,
325 private void addToData(Record rec, XSQLBluePrintNode bpn,
326 XSQLBluePrint bluePrint, Map fullRecord) {
327 XSQLBluePrintNode eNodes[] = bluePrint
328 .getBluePrintNodeByODLTableName(XSQLODLUtils
329 .getNodeIdentiofier(rec.element));
331 for (XSQLColumn c : fieldsInQuery) {
332 for (XSQLBluePrintNode eNode : eNodes) {
333 if (((XSQLBluePrintNode) c.getBluePrintNode())
334 .getBluePrintNodeName().equals(
335 eNode.getBluePrintNodeName())) {
336 // Object value = Criteria.getValue(rec.element,
338 String columnName = c.toString();
339 Object value = fullRecord.get(columnName);
342 Object rsValue = c.getResultSetValue(value);
343 c.setCharWidth(rsValue.toString().length());
344 rec.data.put(columnName, rsValue);
345 } catch (Exception err) {
354 private boolean beenHere(Set<String> beenHereElement, Object element) {
355 if (beenHereElement == null) {
356 beenHereElement = new HashSet<String>();
359 String elementKey = null;
362 elementKey = element.toString();
363 } catch (Exception err) {
364 elementKey = "Unknown";
367 if (beenHereElement.contains(elementKey)) {
371 beenHereElement.add(elementKey);
375 public List<Object> getChildren(Object node, String tableName,
376 XSQLBluePrint bluePrint) {
378 List<Object> children = XSQLODLUtils.getMChildren(node);
379 List<Object> result = new LinkedList<Object>();
381 for (Object child : children) {
383 String odlNodeName = XSQLODLUtils.getNodeIdentiofier(child);
384 if (odlNodeName == null)
387 XSQLBluePrintNode eNodes[] = bluePrint
388 .getBluePrintNodeByODLTableName(odlNodeName);
392 boolean match = false;
393 for (XSQLBluePrintNode enode : eNodes) {
394 if (tableName.startsWith(enode.toString())) {
403 if (child.getClass().getName().endsWith("ImmutableContainerNode")) {
405 } else if (child.getClass().getName()
406 .endsWith("ImmutableAugmentationNode")) {
407 List<Object> _children = XSQLODLUtils.getMChildren(child);
408 for (Object c : _children) {
409 if (c.getClass().getName()
410 .endsWith("ImmutableContainerNode")) {
414 } else if (child.getClass().getName().endsWith("ImmutableMapNode")) {
415 result.addAll(XSQLODLUtils.getMChildren(child));
421 public List<Record> addRecords(Object element, XSQLBluePrintNode node,
422 boolean root, String tableName, XSQLBluePrint bluePrint) {
424 List<Record> result = new LinkedList<Record>();
425 String nodeID = XSQLODLUtils.getNodeIdentiofier(element);
426 if (node.getODLTableName().equals(nodeID)) {
427 XSQLBluePrintNode bluePrintNode = bluePrint
428 .getBluePrintNodeByODLTableName(nodeID)[0];
429 Record rec = new Record();
430 rec.element = element;
431 XSQLBluePrintNode bpn = this.tablesInQueryMap.get(bluePrintNode
432 .getBluePrintNodeName());
433 if (this.criteria.containsKey(bluePrintNode.getBluePrintNodeName())
435 Map<?, ?> allKeyValues = collectColumnValues(element, bpn);
436 if (!(isObjectFitCriteria(allKeyValues,
437 bpn.getBluePrintNodeName()) == 1)) {
440 addToData(rec, bpn, bluePrint, allKeyValues);
450 XSQLBluePrintNode parent = node.getParent();
451 List<Record> subRecords = addRecords(element, parent, false, tableName,
453 for (Record subRec : subRecords) {
454 List<Object> subO = getChildren(subRec.element, tableName,
457 for (Object subData : subO) {
458 Record rec = new Record();
459 rec.element = subData;
460 rec.data.putAll(subRec.data);
462 String recID = XSQLODLUtils.getNodeIdentiofier(rec.element);
463 XSQLBluePrintNode eNodes[] = bluePrint
464 .getBluePrintNodeByODLTableName(recID);
465 XSQLBluePrintNode bpn = null;
466 for (XSQLBluePrintNode eNode : eNodes) {
467 bpn = this.tablesInQueryMap.get(eNode
468 .getBluePrintNodeName());
472 boolean isObjectInCriteria = true;
474 Map allKeyValues = collectColumnValues(rec.element, bpn);
475 if ((isObjectFitCriteria(allKeyValues,
476 bpn.getBluePrintNodeName()) == 1)) {
477 addToData(rec, bpn, bluePrint, allKeyValues);
479 isObjectInCriteria = false;
483 if (isObjectInCriteria) {
485 if (!rec.data.isEmpty())
499 public boolean isWrapperFor(Class<?> iface) throws SQLException {
500 // TODO Auto-generated method stub
505 public <T> T unwrap(Class<T> iface) throws SQLException {
506 // TODO Auto-generated method stub
511 public boolean absolute(int row) throws SQLException {
512 // TODO Auto-generated method stub
517 public void afterLast() throws SQLException {
518 // TODO Auto-generated method stub
523 public void beforeFirst() throws SQLException {
524 // TODO Auto-generated method stub
529 public void cancelRowUpdates() throws SQLException {
530 // TODO Auto-generated method stub
535 public void clearWarnings() throws SQLException {
536 // TODO Auto-generated method stub
541 public void close() throws SQLException {
542 // TODO Auto-generated method stub
547 public void deleteRow() throws SQLException {
548 // TODO Auto-generated method stub
553 public int findColumn(String columnLabel) throws SQLException {
554 // TODO Auto-generated method stub
559 public boolean first() throws SQLException {
560 // TODO Auto-generated method stub
565 public Array getArray(int columnIndex) throws SQLException {
566 // TODO Auto-generated method stub
571 public Array getArray(String columnLabel) throws SQLException {
572 // TODO Auto-generated method stub
577 public InputStream getAsciiStream(int columnIndex) throws SQLException {
578 // TODO Auto-generated method stub
583 public InputStream getAsciiStream(String columnLabel) throws SQLException {
584 // TODO Auto-generated method stub
589 public BigDecimal getBigDecimal(int columnIndex, int scale)
590 throws SQLException {
591 // TODO Auto-generated method stub
596 public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
597 // TODO Auto-generated method stub
602 public BigDecimal getBigDecimal(String columnLabel, int scale)
603 throws SQLException {
604 // TODO Auto-generated method stub
609 public BigDecimal getBigDecimal(String columnLabel) throws SQLException {
610 // TODO Auto-generated method stub
615 public InputStream getBinaryStream(int columnIndex) throws SQLException {
616 // TODO Auto-generated method stub
621 public InputStream getBinaryStream(String columnLabel) throws SQLException {
622 // TODO Auto-generated method stub
627 public Blob getBlob(int columnIndex) throws SQLException {
628 // TODO Auto-generated method stub
633 public Blob getBlob(String columnLabel) throws SQLException {
634 // TODO Auto-generated method stub
639 public boolean getBoolean(int columnIndex) throws SQLException {
640 // TODO Auto-generated method stub
645 public boolean getBoolean(String columnLabel) throws SQLException {
646 // TODO Auto-generated method stub
651 public byte getByte(int columnIndex) throws SQLException {
652 // TODO Auto-generated method stub
657 public byte getByte(String columnLabel) throws SQLException {
658 // TODO Auto-generated method stub
663 public byte[] getBytes(int columnIndex) throws SQLException {
664 // TODO Auto-generated method stub
669 public byte[] getBytes(String columnLabel) throws SQLException {
670 // TODO Auto-generated method stub
675 public Reader getCharacterStream(int columnIndex) throws SQLException {
676 // TODO Auto-generated method stub
681 public Reader getCharacterStream(String columnLabel) throws SQLException {
682 // TODO Auto-generated method stub
687 public Clob getClob(int columnIndex) throws SQLException {
688 // TODO Auto-generated method stub
693 public Clob getClob(String columnLabel) throws SQLException {
694 // TODO Auto-generated method stub
699 public int getConcurrency() throws SQLException {
700 // TODO Auto-generated method stub
705 public String getCursorName() throws SQLException {
706 // TODO Auto-generated method stub
711 public Date getDate(int columnIndex, Calendar cal) throws SQLException {
712 // TODO Auto-generated method stub
717 public Date getDate(int columnIndex) throws SQLException {
718 // TODO Auto-generated method stub
723 public Date getDate(String columnLabel, Calendar cal) throws SQLException {
724 // TODO Auto-generated method stub
729 public Date getDate(String columnLabel) throws SQLException {
730 // TODO Auto-generated method stub
735 public double getDouble(int columnIndex) throws SQLException {
736 // TODO Auto-generated method stub
741 public double getDouble(String columnLabel) throws SQLException {
742 // TODO Auto-generated method stub
747 public int getFetchDirection() throws SQLException {
748 // TODO Auto-generated method stub
753 public int getFetchSize() throws SQLException {
754 // TODO Auto-generated method stub
759 public float getFloat(int columnIndex) throws SQLException {
760 // TODO Auto-generated method stub
765 public float getFloat(String columnLabel) throws SQLException {
766 // TODO Auto-generated method stub
771 public int getHoldability() throws SQLException {
772 // TODO Auto-generated method stub
777 public int getInt(int columnIndex) throws SQLException {
778 // TODO Auto-generated method stub
783 public int getInt(String columnLabel) throws SQLException {
784 // TODO Auto-generated method stub
789 public long getLong(int columnIndex) throws SQLException {
790 // TODO Auto-generated method stub
795 public long getLong(String columnLabel) throws SQLException {
796 // TODO Auto-generated method stub
801 public ResultSetMetaData getMetaData() throws SQLException {
806 public Reader getNCharacterStream(int columnIndex) throws SQLException {
807 // TODO Auto-generated method stub
812 public Reader getNCharacterStream(String columnLabel) throws SQLException {
813 // TODO Auto-generated method stub
818 public NClob getNClob(int columnIndex) throws SQLException {
819 // TODO Auto-generated method stub
824 public NClob getNClob(String columnLabel) throws SQLException {
825 // TODO Auto-generated method stub
830 public String getNString(int columnIndex) throws SQLException {
831 // TODO Auto-generated method stub
836 public String getNString(String columnLabel) throws SQLException {
837 // TODO Auto-generated method stub
842 public Object getObject(int columnIndex, Map<String, Class<?>> map)
843 throws SQLException {
844 return getObject(columnIndex);
848 public Object getObject(int columnIndex) throws SQLException {
849 return currentRecord.get(this.fieldsInQuery.get(columnIndex - 1)
854 public Object getObject(String columnLabel, Map<String, Class<?>> map)
855 throws SQLException {
856 return getObject(columnLabel);
860 public Object getObject(String columnLabel) throws SQLException {
861 return currentRecord.get(columnLabel);
865 public Ref getRef(int columnIndex) throws SQLException {
866 // TODO Auto-generated method stub
871 public Ref getRef(String columnLabel) throws SQLException {
872 // TODO Auto-generated method stub
877 public int getRow() throws SQLException {
878 // TODO Auto-generated method stub
883 public RowId getRowId(int columnIndex) throws SQLException {
884 // TODO Auto-generated method stub
889 public RowId getRowId(String columnLabel) throws SQLException {
890 // TODO Auto-generated method stub
895 public SQLXML getSQLXML(int columnIndex) throws SQLException {
896 // TODO Auto-generated method stub
901 public SQLXML getSQLXML(String columnLabel) throws SQLException {
902 // TODO Auto-generated method stub
907 public short getShort(int columnIndex) throws SQLException {
908 // TODO Auto-generated method stub
913 public short getShort(String columnLabel) throws SQLException {
914 // TODO Auto-generated method stub
919 public Statement getStatement() throws SQLException {
920 // TODO Auto-generated method stub
925 public String getString(int columnIndex) throws SQLException {
930 public String getString(String columnLabel) throws SQLException {
935 public Time getTime(int columnIndex, Calendar cal) throws SQLException {
936 // TODO Auto-generated method stub
941 public Time getTime(int columnIndex) throws SQLException {
942 // TODO Auto-generated method stub
947 public Time getTime(String columnLabel, Calendar cal) throws SQLException {
948 // TODO Auto-generated method stub
953 public Time getTime(String columnLabel) throws SQLException {
954 // TODO Auto-generated method stub
959 public Timestamp getTimestamp(int columnIndex, Calendar cal)
960 throws SQLException {
961 // TODO Auto-generated method stub
966 public Timestamp getTimestamp(int columnIndex) throws SQLException {
967 // TODO Auto-generated method stub
972 public Timestamp getTimestamp(String columnLabel, Calendar cal)
973 throws SQLException {
974 // TODO Auto-generated method stub
979 public Timestamp getTimestamp(String columnLabel) throws SQLException {
980 // TODO Auto-generated method stub
985 public int getType() throws SQLException {
986 return ResultSet.TYPE_FORWARD_ONLY;
990 public URL getURL(int columnIndex) throws SQLException {
991 // TODO Auto-generated method stub
996 public URL getURL(String columnLabel) throws SQLException {
997 // TODO Auto-generated method stub
1002 public InputStream getUnicodeStream(int columnIndex) throws SQLException {
1003 // TODO Auto-generated method stub
1008 public InputStream getUnicodeStream(String columnLabel) throws SQLException {
1009 // TODO Auto-generated method stub
1014 public SQLWarning getWarnings() throws SQLException {
1015 // TODO Auto-generated method stub
1020 public void insertRow() throws SQLException {
1021 // TODO Auto-generated method stub
1026 public boolean isAfterLast() throws SQLException {
1027 // TODO Auto-generated method stub
1032 public boolean isBeforeFirst() throws SQLException {
1033 // TODO Auto-generated method stub
1038 public boolean isClosed() throws SQLException {
1039 // TODO Auto-generated method stub
1044 public boolean isFirst() throws SQLException {
1045 // TODO Auto-generated method stub
1050 public boolean isLast() throws SQLException {
1051 // TODO Auto-generated method stub
1056 public boolean last() throws SQLException {
1057 // TODO Auto-generated method stub
1062 public void moveToCurrentRow() throws SQLException {
1063 // TODO Auto-generated method stub
1068 public void moveToInsertRow() throws SQLException {
1069 // TODO Auto-generated method stub
1074 public boolean previous() throws SQLException {
1075 // TODO Auto-generated method stub
1080 public void refreshRow() throws SQLException {
1081 // TODO Auto-generated method stub
1086 public boolean relative(int rows) throws SQLException {
1087 // TODO Auto-generated method stub
1092 public boolean rowDeleted() throws SQLException {
1093 // TODO Auto-generated method stub
1098 public boolean rowInserted() throws SQLException {
1099 // TODO Auto-generated method stub
1104 public boolean rowUpdated() throws SQLException {
1105 // TODO Auto-generated method stub
1110 public void setFetchDirection(int direction) throws SQLException {
1111 // TODO Auto-generated method stub
1116 public void setFetchSize(int rows) throws SQLException {
1117 // TODO Auto-generated method stub
1122 public void updateArray(int columnIndex, Array x) throws SQLException {
1123 // TODO Auto-generated method stub
1128 public void updateArray(String columnLabel, Array x) throws SQLException {
1129 // TODO Auto-generated method stub
1134 public void updateAsciiStream(int columnIndex, InputStream x, int length)
1135 throws SQLException {
1136 // TODO Auto-generated method stub
1141 public void updateAsciiStream(int columnIndex, InputStream x, long length)
1142 throws SQLException {
1143 // TODO Auto-generated method stub
1148 public void updateAsciiStream(int columnIndex, InputStream x)
1149 throws SQLException {
1150 // TODO Auto-generated method stub
1155 public void updateAsciiStream(String columnLabel, InputStream x, int length)
1156 throws SQLException {
1157 // TODO Auto-generated method stub
1162 public void updateAsciiStream(String columnLabel, InputStream x, long length)
1163 throws SQLException {
1164 // TODO Auto-generated method stub
1169 public void updateAsciiStream(String columnLabel, InputStream x)
1170 throws SQLException {
1171 // TODO Auto-generated method stub
1176 public void updateBigDecimal(int columnIndex, BigDecimal x)
1177 throws SQLException {
1178 // TODO Auto-generated method stub
1183 public void updateBigDecimal(String columnLabel, BigDecimal x)
1184 throws SQLException {
1185 // TODO Auto-generated method stub
1190 public void updateBinaryStream(int columnIndex, InputStream x, int length)
1191 throws SQLException {
1192 // TODO Auto-generated method stub
1197 public void updateBinaryStream(int columnIndex, InputStream x, long length)
1198 throws SQLException {
1199 // TODO Auto-generated method stub
1204 public void updateBinaryStream(int columnIndex, InputStream x)
1205 throws SQLException {
1206 // TODO Auto-generated method stub
1211 public void updateBinaryStream(String columnLabel, InputStream x, int length)
1212 throws SQLException {
1213 // TODO Auto-generated method stub
1218 public void updateBinaryStream(String columnLabel, InputStream x,
1219 long length) throws SQLException {
1220 // TODO Auto-generated method stub
1225 public void updateBinaryStream(String columnLabel, InputStream x)
1226 throws SQLException {
1227 // TODO Auto-generated method stub
1232 public void updateBlob(int columnIndex, Blob x) throws SQLException {
1233 // TODO Auto-generated method stub
1238 public void updateBlob(int columnIndex, InputStream inputStream, long length)
1239 throws SQLException {
1240 // TODO Auto-generated method stub
1245 public void updateBlob(int columnIndex, InputStream inputStream)
1246 throws SQLException {
1247 // TODO Auto-generated method stub
1252 public void updateBlob(String columnLabel, Blob x) throws SQLException {
1253 // TODO Auto-generated method stub
1258 public void updateBlob(String columnLabel, InputStream inputStream,
1259 long length) throws SQLException {
1260 // TODO Auto-generated method stub
1265 public void updateBlob(String columnLabel, InputStream inputStream)
1266 throws SQLException {
1267 // TODO Auto-generated method stub
1272 public void updateBoolean(int columnIndex, boolean x) throws SQLException {
1273 // TODO Auto-generated method stub
1278 public void updateBoolean(String columnLabel, boolean x)
1279 throws SQLException {
1280 // TODO Auto-generated method stub
1285 public void updateByte(int columnIndex, byte x) throws SQLException {
1286 // TODO Auto-generated method stub
1291 public void updateByte(String columnLabel, byte x) throws SQLException {
1292 // TODO Auto-generated method stub
1297 public void updateBytes(int columnIndex, byte[] x) throws SQLException {
1298 // TODO Auto-generated method stub
1303 public void updateBytes(String columnLabel, byte[] x) throws SQLException {
1304 // TODO Auto-generated method stub
1309 public void updateCharacterStream(int columnIndex, Reader x, int length)
1310 throws SQLException {
1311 // TODO Auto-generated method stub
1316 public void updateCharacterStream(int columnIndex, Reader x, long length)
1317 throws SQLException {
1318 // TODO Auto-generated method stub
1323 public void updateCharacterStream(int columnIndex, Reader x)
1324 throws SQLException {
1325 // TODO Auto-generated method stub
1330 public void updateCharacterStream(String columnLabel, Reader reader,
1331 int length) throws SQLException {
1332 // TODO Auto-generated method stub
1337 public void updateCharacterStream(String columnLabel, Reader reader,
1338 long length) throws SQLException {
1339 // TODO Auto-generated method stub
1344 public void updateCharacterStream(String columnLabel, Reader reader)
1345 throws SQLException {
1346 // TODO Auto-generated method stub
1351 public void updateClob(int columnIndex, Clob x) throws SQLException {
1352 // TODO Auto-generated method stub
1357 public void updateClob(int columnIndex, Reader reader, long length)
1358 throws SQLException {
1359 // TODO Auto-generated method stub
1364 public void updateClob(int columnIndex, Reader reader) throws SQLException {
1365 // TODO Auto-generated method stub
1370 public void updateClob(String columnLabel, Clob x) throws SQLException {
1371 // TODO Auto-generated method stub
1376 public void updateClob(String columnLabel, Reader reader, long length)
1377 throws SQLException {
1378 // TODO Auto-generated method stub
1383 public void updateClob(String columnLabel, Reader reader)
1384 throws SQLException {
1385 // TODO Auto-generated method stub
1390 public void updateDate(int columnIndex, Date x) throws SQLException {
1391 // TODO Auto-generated method stub
1396 public void updateDate(String columnLabel, Date x) throws SQLException {
1397 // TODO Auto-generated method stub
1402 public void updateDouble(int columnIndex, double x) throws SQLException {
1403 // TODO Auto-generated method stub
1408 public void updateDouble(String columnLabel, double x) throws SQLException {
1409 // TODO Auto-generated method stub
1414 public void updateFloat(int columnIndex, float x) throws SQLException {
1415 // TODO Auto-generated method stub
1420 public void updateFloat(String columnLabel, float x) throws SQLException {
1421 // TODO Auto-generated method stub
1426 public void updateInt(int columnIndex, int x) throws SQLException {
1427 // TODO Auto-generated method stub
1432 public void updateInt(String columnLabel, int x) throws SQLException {
1433 // TODO Auto-generated method stub
1438 public void updateLong(int columnIndex, long x) throws SQLException {
1439 // TODO Auto-generated method stub
1444 public void updateLong(String columnLabel, long x) throws SQLException {
1445 // TODO Auto-generated method stub
1450 public void updateNCharacterStream(int columnIndex, Reader x, long length)
1451 throws SQLException {
1452 // TODO Auto-generated method stub
1457 public void updateNCharacterStream(int columnIndex, Reader x)
1458 throws SQLException {
1459 // TODO Auto-generated method stub
1464 public void updateNCharacterStream(String columnLabel, Reader reader,
1465 long length) throws SQLException {
1466 // TODO Auto-generated method stub
1471 public void updateNCharacterStream(String columnLabel, Reader reader)
1472 throws SQLException {
1473 // TODO Auto-generated method stub
1478 public void updateNClob(int columnIndex, NClob nClob) throws SQLException {
1479 // TODO Auto-generated method stub
1484 public void updateNClob(int columnIndex, Reader reader, long length)
1485 throws SQLException {
1486 // TODO Auto-generated method stub
1491 public void updateNClob(int columnIndex, Reader reader) throws SQLException {
1492 // TODO Auto-generated method stub
1497 public void updateNClob(String columnLabel, NClob nClob)
1498 throws SQLException {
1499 // TODO Auto-generated method stub
1504 public void updateNClob(String columnLabel, Reader reader, long length)
1505 throws SQLException {
1506 // TODO Auto-generated method stub
1511 public void updateNClob(String columnLabel, Reader reader)
1512 throws SQLException {
1513 // TODO Auto-generated method stub
1518 public void updateNString(int columnIndex, String nString)
1519 throws SQLException {
1520 // TODO Auto-generated method stub
1525 public void updateNString(String columnLabel, String nString)
1526 throws SQLException {
1527 // TODO Auto-generated method stub
1532 public void updateNull(int columnIndex) throws SQLException {
1533 // TODO Auto-generated method stub
1538 public void updateNull(String columnLabel) throws SQLException {
1539 // TODO Auto-generated method stub
1544 public void updateObject(int columnIndex, Object x, int scaleOrLength)
1545 throws SQLException {
1546 // TODO Auto-generated method stub
1551 public void updateObject(int columnIndex, Object x) throws SQLException {
1552 // TODO Auto-generated method stub
1557 public void updateObject(String columnLabel, Object x, int scaleOrLength)
1558 throws SQLException {
1559 // TODO Auto-generated method stub
1564 public void updateObject(String columnLabel, Object x) throws SQLException {
1565 // TODO Auto-generated method stub
1570 public void updateRef(int columnIndex, Ref x) throws SQLException {
1571 // TODO Auto-generated method stub
1576 public void updateRef(String columnLabel, Ref x) throws SQLException {
1577 // TODO Auto-generated method stub
1582 public void updateRow() throws SQLException {
1583 // TODO Auto-generated method stub
1588 public void updateRowId(int columnIndex, RowId x) throws SQLException {
1589 // TODO Auto-generated method stub
1594 public void updateRowId(String columnLabel, RowId x) throws SQLException {
1595 // TODO Auto-generated method stub
1600 public void updateSQLXML(int columnIndex, SQLXML xmlObject)
1601 throws SQLException {
1602 // TODO Auto-generated method stub
1607 public void updateSQLXML(String columnLabel, SQLXML xmlObject)
1608 throws SQLException {
1609 // TODO Auto-generated method stub
1614 public void updateShort(int columnIndex, short x) throws SQLException {
1615 // TODO Auto-generated method stub
1620 public void updateShort(String columnLabel, short x) throws SQLException {
1621 // TODO Auto-generated method stub
1626 public void updateString(int columnIndex, String x) throws SQLException {
1627 // TODO Auto-generated method stub
1632 public void updateString(String columnLabel, String x) throws SQLException {
1633 // TODO Auto-generated method stub
1638 public void updateTime(int columnIndex, Time x) throws SQLException {
1639 // TODO Auto-generated method stub
1644 public void updateTime(String columnLabel, Time x) throws SQLException {
1645 // TODO Auto-generated method stub
1650 public void updateTimestamp(int columnIndex, Timestamp x)
1651 throws SQLException {
1652 // TODO Auto-generated method stub
1657 public void updateTimestamp(String columnLabel, Timestamp x)
1658 throws SQLException {
1659 // TODO Auto-generated method stub
1664 public boolean wasNull() throws SQLException {
1665 // TODO Auto-generated method stub
1670 public String getCatalogName(int column) throws SQLException {
1671 // TODO Auto-generated method stub
1676 public String getColumnClassName(int column) throws SQLException {
1677 // TODO Auto-generated method stub
1682 public int getColumnCount() throws SQLException {
1683 return fieldsInQuery.size();
1687 public int getColumnDisplaySize(int column) throws SQLException {
1688 // TODO Auto-generated method stub
1693 public String getColumnLabel(int column) throws SQLException {
1694 return this.fieldsInQuery.get(column - 1).toString();
1698 public String getColumnName(int column) throws SQLException {
1699 // TODO Auto-generated method stub
1704 public int getColumnType(int column) throws SQLException {
1709 public String getColumnTypeName(int column) throws SQLException {
1710 // TODO Auto-generated method stub
1715 public int getPrecision(int column) throws SQLException {
1716 // TODO Auto-generated method stub
1721 public int getScale(int column) throws SQLException {
1722 // TODO Auto-generated method stub
1727 public String getSchemaName(int column) throws SQLException {
1728 // TODO Auto-generated method stub
1733 public String getTableName(int column) throws SQLException {
1734 // TODO Auto-generated method stub
1739 public boolean isAutoIncrement(int column) throws SQLException {
1740 // TODO Auto-generated method stub
1745 public boolean isCaseSensitive(int column) throws SQLException {
1746 // TODO Auto-generated method stub
1751 public boolean isCurrency(int column) throws SQLException {
1752 // TODO Auto-generated method stub
1757 public boolean isDefinitelyWritable(int column) throws SQLException {
1758 // TODO Auto-generated method stub
1763 public int isNullable(int column) throws SQLException {
1764 // TODO Auto-generated method stub
1769 public boolean isReadOnly(int column) throws SQLException {
1770 // TODO Auto-generated method stub
1775 public boolean isSearchable(int column) throws SQLException {
1776 // TODO Auto-generated method stub
1781 public boolean isSigned(int column) throws SQLException {
1782 // TODO Auto-generated method stub
1787 public boolean isWritable(int column) throws SQLException {
1788 // TODO Auto-generated method stub
1793 public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
1794 // TODO Auto-generated method stub
1799 public <T> T getObject(String columnLabel, Class<T> type)
1800 throws SQLException {
1801 // TODO Auto-generated method stub