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;
44 private static final ClassLoader CLASS_LOADER = JDBCResultSet.class.getClassLoader();
45 private static final Class<?>[] PROXY_INTERFACES = new Class[] { ResultSet.class };
46 private static int nextID = 0;
48 private String sql = null;
49 private List<XSQLBluePrintNode> tablesInQuery = new ArrayList<XSQLBluePrintNode>();
50 private Map<String, XSQLBluePrintNode> tablesInQueryMap = new ConcurrentHashMap<String, XSQLBluePrintNode>();
51 private List<XSQLColumn> fieldsInQuery = new ArrayList<XSQLColumn>();
52 private transient LinkedList<Map<String, Object>> records = new LinkedList<>();
53 private transient Map<String, Object> currentRecord = null;
54 private boolean finished = false;
56 public int numberOfTasks = 0;
57 private Map<String, Map<XSQLColumn, List<XSQLCriteria>>> criteria = new ConcurrentHashMap<String, Map<XSQLColumn, List<XSQLCriteria>>>();
58 private Exception err = null;
59 private List<Record> EMPTY_RESULT = new LinkedList<Record>();
60 private transient Map<String,JDBCResultSet> subQueries = new HashMap<String,JDBCResultSet>();
62 public ResultSet getProxy() {
63 return (ResultSet) Proxy.newProxyInstance(CLASS_LOADER, PROXY_INTERFACES, new JDBCProxy(this));
66 public void setSQL(String _sql) {
70 public JDBCResultSet addSubQuery(String _sql,String logicalName) {
71 if (subQueries == null) {
72 subQueries = new HashMap<String,JDBCResultSet>();
74 JDBCResultSet rs = new JDBCResultSet(_sql);
75 this.subQueries.put(logicalName,rs);
79 public Map<String,JDBCResultSet> getSubQueries() {
80 if (this.subQueries==null) {
81 this.subQueries = new HashMap<>();
83 return this.subQueries;
86 public JDBCResultSet(String _sql) {
87 synchronized (JDBCResultSet.class) {
94 public String getSQL() {
98 public void setError(Exception _err) {
102 public Exception getError() {
106 public void updateData(JDBCResultSet rs) {
107 synchronized (this) {
108 this.tablesInQuery = rs.tablesInQuery;
109 this.tablesInQueryMap = rs.tablesInQueryMap;
110 this.fieldsInQuery = rs.fieldsInQuery;
115 public int isObjectFitCriteria(Map<String, Object> objValues, String tableName) {
116 Map<XSQLColumn, List<XSQLCriteria>> tblCriteria = criteria
118 if (tblCriteria == null) {
121 for (Map.Entry<XSQLColumn, List<XSQLCriteria>> cc : tblCriteria
123 for (XSQLCriteria c : cc.getValue()) {
124 Object value = objValues.get(cc.getKey().toString());
125 int result = c.checkValue(value);
134 public int isObjectFitCriteria(Object element, Class<?> cls) {
135 Map<XSQLColumn, List<XSQLCriteria>> tblCriteria = criteria.get(cls
137 if (tblCriteria == null) {
140 for (Map.Entry<XSQLColumn, List<XSQLCriteria>> cc : tblCriteria
142 for (XSQLCriteria c : cc.getValue()) {
143 int result = c.isObjectFitCriteria(element, cc.getKey()
153 public Map<String, Map<XSQLColumn, List<XSQLCriteria>>> getCriteria() {
154 return this.criteria;
161 public List<XSQLBluePrintNode> getTables() {
162 return tablesInQuery;
165 public void addTableToQuery(XSQLBluePrintNode node) {
166 if (this.tablesInQueryMap.containsKey(node.getBluePrintNodeName())) {
169 this.tablesInQuery.add(node);
170 this.tablesInQueryMap.put(node.getBluePrintNodeName(), node);
173 public List<XSQLColumn> getFields() {
174 return this.fieldsInQuery;
177 public XSQLBluePrintNode getMainTable() {
178 if (tablesInQuery.size() == 1) {
179 return tablesInQuery.get(0);
181 XSQLBluePrintNode result = null;
182 for (XSQLBluePrintNode node : tablesInQuery) {
183 if (result == null) {
185 } else if (result.getLevel() < node.getLevel()) {
192 public boolean isFinished() {
196 public void setFinished(boolean b) {
201 return this.records.size();
204 public void addRecord(Map<String, Object> r) {
205 synchronized (this) {
206 if (records == null) {
207 records = new LinkedList<>();
214 public void addRecord(ArrayList<?> hierarchy) {
215 Map<String, Object> rec = new HashMap<>();
216 for (int i = hierarchy.size() - 1; i >= 0; i--) {
217 Object element = hierarchy.get(i);
218 for (XSQLColumn c : fieldsInQuery) {
219 if (c.getTableName().equals(element.getClass().getSimpleName())) {
221 Method m = element.getClass().getMethod(c.getName(),
223 Object value = m.invoke(element, null);
224 rec.put(c.getName(), value);
225 } catch (Exception err) {
226 err.printStackTrace();
231 this.records.add(rec);
234 public boolean next() {
235 this.currentRecord = null;
236 if (records == null) {
237 records = new LinkedList<>();
239 while (!finished || records.size() > 0) {
240 synchronized (this) {
241 if (records.size() == 0) {
244 } catch (Exception err) {
246 if (records.size() > 0) {
248 currentRecord = records.removeFirst();
256 currentRecord = records.removeFirst();
267 public Map<String, Object> getCurrent() {
268 return this.currentRecord;
271 private void createRecord(Object data, XSQLBluePrintNode node) {
272 Map<String, Object> rec = new HashMap<>();
273 for (XSQLColumn c : this.fieldsInQuery) {
274 if (c.getTableName().equals(node.getBluePrintNodeName())) {
276 Method m = node.getInterface().getMethod(c.getName(), null);
277 Object value = m.invoke(data, null);
279 rec.put(c.getName(), value);
281 rec.put(c.getName(), "");
283 } catch (Exception err) {
284 err.printStackTrace();
291 public static class Record {
292 public Map<String, Object> data = new HashMap<>();
293 public Object element = null;
295 public Map<String, Object> getRecord() {
300 private Map<String, Object> collectColumnValues(Object node, XSQLBluePrintNode bpn) {
301 Map<?, ?> subChildren = XSQLODLUtils.getChildren(node);
302 Map<String, Object> result = new HashMap<>();
303 for (Object stc : subChildren.values()) {
304 if (stc.getClass().getName().endsWith("ImmutableAugmentationNode")) {
305 Map<?, ?> values = XSQLODLUtils.getChildren(stc);
306 for (Object key : values.keySet()) {
307 Object val = values.get(key);
308 if (val.getClass().getName().endsWith("ImmutableLeafNode")) {
309 Object value = XSQLODLUtils.getValue(val);
310 String k = XSQLODLUtils.getNodeName(val);
312 result.put(bpn.getBluePrintNodeName() + "." + k,
317 } else if (stc.getClass().getName().endsWith("ImmutableLeafNode")) {
318 String k = XSQLODLUtils.getNodeName(stc);
319 Object value = XSQLODLUtils.getValue(stc);
321 result.put(bpn.getBluePrintNodeName() + "." + k,
329 private void addToData(Record rec, XSQLBluePrintNode bpn,
330 XSQLBluePrint bluePrint, Map<String, Object> fullRecord) {
331 XSQLBluePrintNode eNodes[] = bluePrint
332 .getBluePrintNodeByODLTableName(XSQLODLUtils
333 .getNodeIdentiofier(rec.element));
335 for (XSQLColumn c : fieldsInQuery) {
336 for (XSQLBluePrintNode eNode : eNodes) {
337 if (((XSQLBluePrintNode) c.getBluePrintNode())
338 .getBluePrintNodeName().equals(
339 eNode.getBluePrintNodeName())) {
340 // Object value = Criteria.getValue(rec.element,
342 String columnName = c.toString();
343 Object value = fullRecord.get(columnName);
346 Object rsValue = c.getResultSetValue(value);
347 c.setCharWidth(rsValue.toString().length());
348 rec.data.put(columnName, rsValue);
349 } catch (Exception err) {
358 private boolean beenHere(Set<String> beenHereElement, Object element) {
359 if (beenHereElement == null) {
360 beenHereElement = new HashSet<String>();
363 String elementKey = null;
366 elementKey = element.toString();
367 } catch (Exception err) {
368 elementKey = "Unknown";
371 if (beenHereElement.contains(elementKey)) {
375 beenHereElement.add(elementKey);
379 public List<Object> getChildren(Object node, String tableName,
380 XSQLBluePrint bluePrint) {
382 List<Object> children = XSQLODLUtils.getMChildren(node);
383 List<Object> result = new LinkedList<Object>();
385 for (Object child : children) {
387 String odlNodeName = XSQLODLUtils.getNodeIdentiofier(child);
388 if (odlNodeName == null) {
392 XSQLBluePrintNode eNodes[] = bluePrint
393 .getBluePrintNodeByODLTableName(odlNodeName);
394 if (eNodes == null) {
398 boolean match = false;
399 for (XSQLBluePrintNode enode : eNodes) {
400 if (tableName.startsWith(enode.toString())) {
410 if (child.getClass().getName().endsWith("ImmutableContainerNode")) {
412 } else if (child.getClass().getName()
413 .endsWith("ImmutableAugmentationNode")) {
414 List<Object> _children = XSQLODLUtils.getMChildren(child);
415 for (Object c : _children) {
416 if (c.getClass().getName()
417 .endsWith("ImmutableContainerNode")) {
421 } else if (child.getClass().getName().endsWith("ImmutableMapNode")) {
422 result.addAll(XSQLODLUtils.getMChildren(child));
428 public List<Record> addRecords(Object element, XSQLBluePrintNode node,boolean root, String tableName, XSQLBluePrint bluePrint) {
429 List<Record> result = new LinkedList<Record>();
430 //In case this is a sibling to the requested table, the elenment type
431 //won't be in the path of the leaf node
435 String nodeID = XSQLODLUtils.getNodeIdentiofier(element);
436 if (node.getODLTableName().equals(nodeID)) {
437 XSQLBluePrintNode bluePrintNode = bluePrint.getBluePrintNodeByODLTableName(nodeID)[0];
438 Record rec = new Record();
439 rec.element = element;
440 XSQLBluePrintNode bpn = this.tablesInQueryMap.get(bluePrintNode.getBluePrintNodeName());
441 if (this.criteria.containsKey(bluePrintNode.getBluePrintNodeName()) || bpn != null) {
442 Map<String, Object> allKeyValues = collectColumnValues(element, bpn);
443 if (!(isObjectFitCriteria(allKeyValues,
444 bpn.getBluePrintNodeName()) == 1)) {
447 addToData(rec, bpn, bluePrint, allKeyValues);
457 XSQLBluePrintNode parent = node.getParent();
458 List<Record> subRecords = addRecords(element, parent, false, tableName,bluePrint);
459 for (Record subRec : subRecords) {
460 List<Object> subO = getChildren(subRec.element, tableName,
463 for (Object subData : subO) {
464 Record rec = new Record();
465 rec.element = subData;
466 rec.data.putAll(subRec.data);
468 String recID = XSQLODLUtils.getNodeIdentiofier(rec.element);
469 XSQLBluePrintNode eNodes[] = bluePrint
470 .getBluePrintNodeByODLTableName(recID);
471 XSQLBluePrintNode bpn = null;
472 for (XSQLBluePrintNode eNode : eNodes) {
473 bpn = this.tablesInQueryMap.get(eNode
474 .getBluePrintNodeName());
479 boolean isObjectInCriteria = true;
481 Map<String, Object> allKeyValues = collectColumnValues(rec.element, bpn);
482 if ((isObjectFitCriteria(allKeyValues,
483 bpn.getBluePrintNodeName()) == 1)) {
484 addToData(rec, bpn, bluePrint, allKeyValues);
486 isObjectInCriteria = false;
490 if (isObjectInCriteria) {
492 if (!rec.data.isEmpty()) {
507 public boolean isWrapperFor(Class<?> iface) throws SQLException {
508 // TODO Auto-generated method stub
513 public <T> T unwrap(Class<T> iface) throws SQLException {
514 // TODO Auto-generated method stub
519 public boolean absolute(int row) throws SQLException {
520 // TODO Auto-generated method stub
525 public void afterLast() throws SQLException {
526 // TODO Auto-generated method stub
531 public void beforeFirst() throws SQLException {
532 // TODO Auto-generated method stub
537 public void cancelRowUpdates() throws SQLException {
538 // TODO Auto-generated method stub
543 public void clearWarnings() throws SQLException {
544 // TODO Auto-generated method stub
549 public void close() throws SQLException {
550 // TODO Auto-generated method stub
555 public void deleteRow() throws SQLException {
556 // TODO Auto-generated method stub
561 public int findColumn(String columnLabel) throws SQLException {
562 // TODO Auto-generated method stub
567 public boolean first() throws SQLException {
568 // TODO Auto-generated method stub
573 public Array getArray(int columnIndex) throws SQLException {
574 // TODO Auto-generated method stub
579 public Array getArray(String columnLabel) throws SQLException {
580 // TODO Auto-generated method stub
585 public InputStream getAsciiStream(int columnIndex) throws SQLException {
586 // TODO Auto-generated method stub
591 public InputStream getAsciiStream(String columnLabel) throws SQLException {
592 // TODO Auto-generated method stub
597 public BigDecimal getBigDecimal(int columnIndex, int scale)
598 throws SQLException {
599 // TODO Auto-generated method stub
604 public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
605 // TODO Auto-generated method stub
610 public BigDecimal getBigDecimal(String columnLabel, int scale)
611 throws SQLException {
612 // TODO Auto-generated method stub
617 public BigDecimal getBigDecimal(String columnLabel) throws SQLException {
618 // TODO Auto-generated method stub
623 public InputStream getBinaryStream(int columnIndex) throws SQLException {
624 // TODO Auto-generated method stub
629 public InputStream getBinaryStream(String columnLabel) throws SQLException {
630 // TODO Auto-generated method stub
635 public Blob getBlob(int columnIndex) throws SQLException {
636 // TODO Auto-generated method stub
641 public Blob getBlob(String columnLabel) throws SQLException {
642 // TODO Auto-generated method stub
647 public boolean getBoolean(int columnIndex) throws SQLException {
648 // TODO Auto-generated method stub
653 public boolean getBoolean(String columnLabel) throws SQLException {
654 // TODO Auto-generated method stub
659 public byte getByte(int columnIndex) throws SQLException {
660 // TODO Auto-generated method stub
665 public byte getByte(String columnLabel) throws SQLException {
666 // TODO Auto-generated method stub
671 public byte[] getBytes(int columnIndex) throws SQLException {
672 // TODO Auto-generated method stub
677 public byte[] getBytes(String columnLabel) throws SQLException {
678 // TODO Auto-generated method stub
683 public Reader getCharacterStream(int columnIndex) throws SQLException {
684 // TODO Auto-generated method stub
689 public Reader getCharacterStream(String columnLabel) throws SQLException {
690 // TODO Auto-generated method stub
695 public Clob getClob(int columnIndex) throws SQLException {
696 // TODO Auto-generated method stub
701 public Clob getClob(String columnLabel) throws SQLException {
702 // TODO Auto-generated method stub
707 public int getConcurrency() throws SQLException {
708 // TODO Auto-generated method stub
713 public String getCursorName() throws SQLException {
714 // TODO Auto-generated method stub
719 public Date getDate(int columnIndex, Calendar cal) throws SQLException {
720 // TODO Auto-generated method stub
725 public Date getDate(int columnIndex) throws SQLException {
726 // TODO Auto-generated method stub
731 public Date getDate(String columnLabel, Calendar cal) throws SQLException {
732 // TODO Auto-generated method stub
737 public Date getDate(String columnLabel) throws SQLException {
738 // TODO Auto-generated method stub
743 public double getDouble(int columnIndex) throws SQLException {
744 // TODO Auto-generated method stub
749 public double getDouble(String columnLabel) throws SQLException {
750 // TODO Auto-generated method stub
755 public int getFetchDirection() throws SQLException {
756 // TODO Auto-generated method stub
761 public int getFetchSize() throws SQLException {
762 // TODO Auto-generated method stub
767 public float getFloat(int columnIndex) throws SQLException {
768 // TODO Auto-generated method stub
773 public float getFloat(String columnLabel) throws SQLException {
774 // TODO Auto-generated method stub
779 public int getHoldability() throws SQLException {
780 // TODO Auto-generated method stub
785 public int getInt(int columnIndex) throws SQLException {
786 // TODO Auto-generated method stub
791 public int getInt(String columnLabel) throws SQLException {
792 // TODO Auto-generated method stub
797 public long getLong(int columnIndex) throws SQLException {
798 // TODO Auto-generated method stub
803 public long getLong(String columnLabel) throws SQLException {
804 // TODO Auto-generated method stub
809 public ResultSetMetaData getMetaData() throws SQLException {
814 public Reader getNCharacterStream(int columnIndex) throws SQLException {
815 // TODO Auto-generated method stub
820 public Reader getNCharacterStream(String columnLabel) throws SQLException {
821 // TODO Auto-generated method stub
826 public NClob getNClob(int columnIndex) throws SQLException {
827 // TODO Auto-generated method stub
832 public NClob getNClob(String columnLabel) throws SQLException {
833 // TODO Auto-generated method stub
838 public String getNString(int columnIndex) throws SQLException {
839 // TODO Auto-generated method stub
844 public String getNString(String columnLabel) throws SQLException {
845 // TODO Auto-generated method stub
850 public Object getObject(int columnIndex, Map<String, Class<?>> map)
851 throws SQLException {
852 return getObject(columnIndex);
856 public Object getObject(int columnIndex) throws SQLException {
857 return currentRecord.get(this.fieldsInQuery.get(columnIndex - 1)
862 public Object getObject(String columnLabel, Map<String, Class<?>> map)
863 throws SQLException {
864 return getObject(columnLabel);
868 public Object getObject(String columnLabel) throws SQLException {
869 return currentRecord.get(columnLabel);
873 public Ref getRef(int columnIndex) throws SQLException {
874 // TODO Auto-generated method stub
879 public Ref getRef(String columnLabel) throws SQLException {
880 // TODO Auto-generated method stub
885 public int getRow() throws SQLException {
886 // TODO Auto-generated method stub
891 public RowId getRowId(int columnIndex) throws SQLException {
892 // TODO Auto-generated method stub
897 public RowId getRowId(String columnLabel) throws SQLException {
898 // TODO Auto-generated method stub
903 public SQLXML getSQLXML(int columnIndex) throws SQLException {
904 // TODO Auto-generated method stub
909 public SQLXML getSQLXML(String columnLabel) throws SQLException {
910 // TODO Auto-generated method stub
915 public short getShort(int columnIndex) throws SQLException {
916 // TODO Auto-generated method stub
921 public short getShort(String columnLabel) throws SQLException {
922 // TODO Auto-generated method stub
927 public Statement getStatement() throws SQLException {
928 // TODO Auto-generated method stub
933 public String getString(int columnIndex) throws SQLException {
938 public String getString(String columnLabel) throws SQLException {
943 public Time getTime(int columnIndex, Calendar cal) throws SQLException {
944 // TODO Auto-generated method stub
949 public Time getTime(int columnIndex) throws SQLException {
950 // TODO Auto-generated method stub
955 public Time getTime(String columnLabel, Calendar cal) throws SQLException {
956 // TODO Auto-generated method stub
961 public Time getTime(String columnLabel) throws SQLException {
962 // TODO Auto-generated method stub
967 public Timestamp getTimestamp(int columnIndex, Calendar cal)
968 throws SQLException {
969 // TODO Auto-generated method stub
974 public Timestamp getTimestamp(int columnIndex) throws SQLException {
975 // TODO Auto-generated method stub
980 public Timestamp getTimestamp(String columnLabel, Calendar cal)
981 throws SQLException {
982 // TODO Auto-generated method stub
987 public Timestamp getTimestamp(String columnLabel) throws SQLException {
988 // TODO Auto-generated method stub
993 public int getType() throws SQLException {
994 return ResultSet.TYPE_FORWARD_ONLY;
998 public URL getURL(int columnIndex) throws SQLException {
999 // TODO Auto-generated method stub
1004 public URL getURL(String columnLabel) throws SQLException {
1005 // TODO Auto-generated method stub
1010 public InputStream getUnicodeStream(int columnIndex) throws SQLException {
1011 // TODO Auto-generated method stub
1016 public InputStream getUnicodeStream(String columnLabel) throws SQLException {
1017 // TODO Auto-generated method stub
1022 public SQLWarning getWarnings() throws SQLException {
1023 // TODO Auto-generated method stub
1028 public void insertRow() throws SQLException {
1029 // TODO Auto-generated method stub
1034 public boolean isAfterLast() throws SQLException {
1035 // TODO Auto-generated method stub
1040 public boolean isBeforeFirst() throws SQLException {
1041 // TODO Auto-generated method stub
1046 public boolean isClosed() throws SQLException {
1047 // TODO Auto-generated method stub
1052 public boolean isFirst() throws SQLException {
1053 // TODO Auto-generated method stub
1058 public boolean isLast() throws SQLException {
1059 // TODO Auto-generated method stub
1064 public boolean last() throws SQLException {
1065 // TODO Auto-generated method stub
1070 public void moveToCurrentRow() throws SQLException {
1071 // TODO Auto-generated method stub
1076 public void moveToInsertRow() throws SQLException {
1077 // TODO Auto-generated method stub
1082 public boolean previous() throws SQLException {
1083 // TODO Auto-generated method stub
1088 public void refreshRow() throws SQLException {
1089 // TODO Auto-generated method stub
1094 public boolean relative(int rows) throws SQLException {
1095 // TODO Auto-generated method stub
1100 public boolean rowDeleted() throws SQLException {
1101 // TODO Auto-generated method stub
1106 public boolean rowInserted() throws SQLException {
1107 // TODO Auto-generated method stub
1112 public boolean rowUpdated() throws SQLException {
1113 // TODO Auto-generated method stub
1118 public void setFetchDirection(int direction) throws SQLException {
1119 // TODO Auto-generated method stub
1124 public void setFetchSize(int rows) throws SQLException {
1125 // TODO Auto-generated method stub
1130 public void updateArray(int columnIndex, Array x) throws SQLException {
1131 // TODO Auto-generated method stub
1136 public void updateArray(String columnLabel, Array x) throws SQLException {
1137 // TODO Auto-generated method stub
1142 public void updateAsciiStream(int columnIndex, InputStream x, int length)
1143 throws SQLException {
1144 // TODO Auto-generated method stub
1149 public void updateAsciiStream(int columnIndex, InputStream x, long length)
1150 throws SQLException {
1151 // TODO Auto-generated method stub
1156 public void updateAsciiStream(int columnIndex, InputStream x)
1157 throws SQLException {
1158 // TODO Auto-generated method stub
1163 public void updateAsciiStream(String columnLabel, InputStream x, int length)
1164 throws SQLException {
1165 // TODO Auto-generated method stub
1170 public void updateAsciiStream(String columnLabel, InputStream x, long length)
1171 throws SQLException {
1172 // TODO Auto-generated method stub
1177 public void updateAsciiStream(String columnLabel, InputStream x)
1178 throws SQLException {
1179 // TODO Auto-generated method stub
1184 public void updateBigDecimal(int columnIndex, BigDecimal x)
1185 throws SQLException {
1186 // TODO Auto-generated method stub
1191 public void updateBigDecimal(String columnLabel, BigDecimal x)
1192 throws SQLException {
1193 // TODO Auto-generated method stub
1198 public void updateBinaryStream(int columnIndex, InputStream x, int length)
1199 throws SQLException {
1200 // TODO Auto-generated method stub
1205 public void updateBinaryStream(int columnIndex, InputStream x, long length)
1206 throws SQLException {
1207 // TODO Auto-generated method stub
1212 public void updateBinaryStream(int columnIndex, InputStream x)
1213 throws SQLException {
1214 // TODO Auto-generated method stub
1219 public void updateBinaryStream(String columnLabel, InputStream x, int length)
1220 throws SQLException {
1221 // TODO Auto-generated method stub
1226 public void updateBinaryStream(String columnLabel, InputStream x,
1227 long length) throws SQLException {
1228 // TODO Auto-generated method stub
1233 public void updateBinaryStream(String columnLabel, InputStream x)
1234 throws SQLException {
1235 // TODO Auto-generated method stub
1240 public void updateBlob(int columnIndex, Blob x) throws SQLException {
1241 // TODO Auto-generated method stub
1246 public void updateBlob(int columnIndex, InputStream inputStream, long length)
1247 throws SQLException {
1248 // TODO Auto-generated method stub
1253 public void updateBlob(int columnIndex, InputStream inputStream)
1254 throws SQLException {
1255 // TODO Auto-generated method stub
1260 public void updateBlob(String columnLabel, Blob x) throws SQLException {
1261 // TODO Auto-generated method stub
1266 public void updateBlob(String columnLabel, InputStream inputStream,
1267 long length) throws SQLException {
1268 // TODO Auto-generated method stub
1273 public void updateBlob(String columnLabel, InputStream inputStream)
1274 throws SQLException {
1275 // TODO Auto-generated method stub
1280 public void updateBoolean(int columnIndex, boolean x) throws SQLException {
1281 // TODO Auto-generated method stub
1286 public void updateBoolean(String columnLabel, boolean x)
1287 throws SQLException {
1288 // TODO Auto-generated method stub
1293 public void updateByte(int columnIndex, byte x) throws SQLException {
1294 // TODO Auto-generated method stub
1299 public void updateByte(String columnLabel, byte x) throws SQLException {
1300 // TODO Auto-generated method stub
1305 public void updateBytes(int columnIndex, byte[] x) throws SQLException {
1306 // TODO Auto-generated method stub
1311 public void updateBytes(String columnLabel, byte[] x) throws SQLException {
1312 // TODO Auto-generated method stub
1317 public void updateCharacterStream(int columnIndex, Reader x, int length)
1318 throws SQLException {
1319 // TODO Auto-generated method stub
1324 public void updateCharacterStream(int columnIndex, Reader x, long length)
1325 throws SQLException {
1326 // TODO Auto-generated method stub
1331 public void updateCharacterStream(int columnIndex, Reader x)
1332 throws SQLException {
1333 // TODO Auto-generated method stub
1338 public void updateCharacterStream(String columnLabel, Reader reader,
1339 int length) throws SQLException {
1340 // TODO Auto-generated method stub
1345 public void updateCharacterStream(String columnLabel, Reader reader,
1346 long length) throws SQLException {
1347 // TODO Auto-generated method stub
1352 public void updateCharacterStream(String columnLabel, Reader reader)
1353 throws SQLException {
1354 // TODO Auto-generated method stub
1359 public void updateClob(int columnIndex, Clob x) throws SQLException {
1360 // TODO Auto-generated method stub
1365 public void updateClob(int columnIndex, Reader reader, long length)
1366 throws SQLException {
1367 // TODO Auto-generated method stub
1372 public void updateClob(int columnIndex, Reader reader) throws SQLException {
1373 // TODO Auto-generated method stub
1378 public void updateClob(String columnLabel, Clob x) throws SQLException {
1379 // TODO Auto-generated method stub
1384 public void updateClob(String columnLabel, Reader reader, long length)
1385 throws SQLException {
1386 // TODO Auto-generated method stub
1391 public void updateClob(String columnLabel, Reader reader)
1392 throws SQLException {
1393 // TODO Auto-generated method stub
1398 public void updateDate(int columnIndex, Date x) throws SQLException {
1399 // TODO Auto-generated method stub
1404 public void updateDate(String columnLabel, Date x) throws SQLException {
1405 // TODO Auto-generated method stub
1410 public void updateDouble(int columnIndex, double x) throws SQLException {
1411 // TODO Auto-generated method stub
1416 public void updateDouble(String columnLabel, double x) throws SQLException {
1417 // TODO Auto-generated method stub
1422 public void updateFloat(int columnIndex, float x) throws SQLException {
1423 // TODO Auto-generated method stub
1428 public void updateFloat(String columnLabel, float x) throws SQLException {
1429 // TODO Auto-generated method stub
1434 public void updateInt(int columnIndex, int x) throws SQLException {
1435 // TODO Auto-generated method stub
1440 public void updateInt(String columnLabel, int x) throws SQLException {
1441 // TODO Auto-generated method stub
1446 public void updateLong(int columnIndex, long x) throws SQLException {
1447 // TODO Auto-generated method stub
1452 public void updateLong(String columnLabel, long x) throws SQLException {
1453 // TODO Auto-generated method stub
1458 public void updateNCharacterStream(int columnIndex, Reader x, long length)
1459 throws SQLException {
1460 // TODO Auto-generated method stub
1465 public void updateNCharacterStream(int columnIndex, Reader x)
1466 throws SQLException {
1467 // TODO Auto-generated method stub
1472 public void updateNCharacterStream(String columnLabel, Reader reader,
1473 long length) throws SQLException {
1474 // TODO Auto-generated method stub
1479 public void updateNCharacterStream(String columnLabel, Reader reader)
1480 throws SQLException {
1481 // TODO Auto-generated method stub
1486 public void updateNClob(int columnIndex, NClob nClob) throws SQLException {
1487 // TODO Auto-generated method stub
1492 public void updateNClob(int columnIndex, Reader reader, long length)
1493 throws SQLException {
1494 // TODO Auto-generated method stub
1499 public void updateNClob(int columnIndex, Reader reader) throws SQLException {
1500 // TODO Auto-generated method stub
1505 public void updateNClob(String columnLabel, NClob nClob)
1506 throws SQLException {
1507 // TODO Auto-generated method stub
1512 public void updateNClob(String columnLabel, Reader reader, long length)
1513 throws SQLException {
1514 // TODO Auto-generated method stub
1519 public void updateNClob(String columnLabel, Reader reader)
1520 throws SQLException {
1521 // TODO Auto-generated method stub
1526 public void updateNString(int columnIndex, String nString)
1527 throws SQLException {
1528 // TODO Auto-generated method stub
1533 public void updateNString(String columnLabel, String nString)
1534 throws SQLException {
1535 // TODO Auto-generated method stub
1540 public void updateNull(int columnIndex) throws SQLException {
1541 // TODO Auto-generated method stub
1546 public void updateNull(String columnLabel) throws SQLException {
1547 // TODO Auto-generated method stub
1552 public void updateObject(int columnIndex, Object x, int scaleOrLength)
1553 throws SQLException {
1554 // TODO Auto-generated method stub
1559 public void updateObject(int columnIndex, Object x) throws SQLException {
1560 // TODO Auto-generated method stub
1565 public void updateObject(String columnLabel, Object x, int scaleOrLength)
1566 throws SQLException {
1567 // TODO Auto-generated method stub
1572 public void updateObject(String columnLabel, Object x) throws SQLException {
1573 // TODO Auto-generated method stub
1578 public void updateRef(int columnIndex, Ref x) throws SQLException {
1579 // TODO Auto-generated method stub
1584 public void updateRef(String columnLabel, Ref x) throws SQLException {
1585 // TODO Auto-generated method stub
1590 public void updateRow() throws SQLException {
1591 // TODO Auto-generated method stub
1596 public void updateRowId(int columnIndex, RowId x) throws SQLException {
1597 // TODO Auto-generated method stub
1602 public void updateRowId(String columnLabel, RowId x) throws SQLException {
1603 // TODO Auto-generated method stub
1608 public void updateSQLXML(int columnIndex, SQLXML xmlObject)
1609 throws SQLException {
1610 // TODO Auto-generated method stub
1615 public void updateSQLXML(String columnLabel, SQLXML xmlObject)
1616 throws SQLException {
1617 // TODO Auto-generated method stub
1622 public void updateShort(int columnIndex, short x) throws SQLException {
1623 // TODO Auto-generated method stub
1628 public void updateShort(String columnLabel, short x) throws SQLException {
1629 // TODO Auto-generated method stub
1634 public void updateString(int columnIndex, String x) throws SQLException {
1635 // TODO Auto-generated method stub
1640 public void updateString(String columnLabel, String x) throws SQLException {
1641 // TODO Auto-generated method stub
1646 public void updateTime(int columnIndex, Time x) throws SQLException {
1647 // TODO Auto-generated method stub
1652 public void updateTime(String columnLabel, Time x) throws SQLException {
1653 // TODO Auto-generated method stub
1658 public void updateTimestamp(int columnIndex, Timestamp x)
1659 throws SQLException {
1660 // TODO Auto-generated method stub
1665 public void updateTimestamp(String columnLabel, Timestamp x)
1666 throws SQLException {
1667 // TODO Auto-generated method stub
1672 public boolean wasNull() throws SQLException {
1673 // TODO Auto-generated method stub
1678 public String getCatalogName(int column) throws SQLException {
1679 // TODO Auto-generated method stub
1684 public String getColumnClassName(int column) throws SQLException {
1685 // TODO Auto-generated method stub
1690 public int getColumnCount() throws SQLException {
1691 return fieldsInQuery.size();
1695 public int getColumnDisplaySize(int column) throws SQLException {
1696 // TODO Auto-generated method stub
1701 public String getColumnLabel(int column) throws SQLException {
1702 return this.fieldsInQuery.get(column - 1).toString();
1706 public String getColumnName(int column) throws SQLException {
1707 // TODO Auto-generated method stub
1712 public int getColumnType(int column) throws SQLException {
1717 public String getColumnTypeName(int column) throws SQLException {
1718 // TODO Auto-generated method stub
1723 public int getPrecision(int column) throws SQLException {
1724 // TODO Auto-generated method stub
1729 public int getScale(int column) throws SQLException {
1730 // TODO Auto-generated method stub
1735 public String getSchemaName(int column) throws SQLException {
1736 // TODO Auto-generated method stub
1741 public String getTableName(int column) throws SQLException {
1742 // TODO Auto-generated method stub
1747 public boolean isAutoIncrement(int column) throws SQLException {
1748 // TODO Auto-generated method stub
1753 public boolean isCaseSensitive(int column) throws SQLException {
1754 // TODO Auto-generated method stub
1759 public boolean isCurrency(int column) throws SQLException {
1760 // TODO Auto-generated method stub
1765 public boolean isDefinitelyWritable(int column) throws SQLException {
1766 // TODO Auto-generated method stub
1771 public int isNullable(int column) throws SQLException {
1772 // TODO Auto-generated method stub
1777 public boolean isReadOnly(int column) throws SQLException {
1778 // TODO Auto-generated method stub
1783 public boolean isSearchable(int column) throws SQLException {
1784 // TODO Auto-generated method stub
1789 public boolean isSigned(int column) throws SQLException {
1790 // TODO Auto-generated method stub
1795 public boolean isWritable(int column) throws SQLException {
1796 // TODO Auto-generated method stub
1801 public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
1802 // TODO Auto-generated method stub
1807 public <T> T getObject(String columnLabel, Class<T> type)
1808 throws SQLException {
1809 // TODO Auto-generated method stub