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.math.BigDecimal;
13 import java.sql.NClob;
15 import java.sql.ResultSet;
16 import java.sql.ResultSetMetaData;
17 import java.sql.RowId;
18 import java.sql.SQLException;
19 import java.sql.SQLWarning;
20 import java.sql.SQLXML;
21 import java.sql.Statement;
23 import java.sql.Timestamp;
24 import java.util.ArrayList;
25 import java.util.Calendar;
26 import java.util.HashMap;
27 import java.util.HashSet;
28 import java.util.LinkedList;
29 import java.util.List;
32 import java.util.concurrent.ConcurrentHashMap;
34 import org.opendaylight.controller.md.sal.dom.xsql.XSQLBluePrint;
35 import org.opendaylight.controller.md.sal.dom.xsql.XSQLBluePrintNode;
36 import org.opendaylight.controller.md.sal.dom.xsql.XSQLColumn;
37 import org.opendaylight.controller.md.sal.dom.xsql.XSQLCriteria;
38 import org.opendaylight.controller.md.sal.dom.xsql.XSQLODLUtils;
40 public class JDBCResultSet
41 implements Serializable, ResultSet, ResultSetMetaData {
42 private static final long serialVersionUID = -7450200738431047057L;
44 private String sql = null;
45 private List<XSQLBluePrintNode> tablesInQuery =
46 new ArrayList<XSQLBluePrintNode>();
47 private Map<String, XSQLBluePrintNode> tablesInQueryMap =
48 new ConcurrentHashMap<String, XSQLBluePrintNode>();
49 private List<XSQLColumn> fieldsInQuery = new ArrayList<XSQLColumn>();
50 private transient LinkedList<Map> records = new LinkedList<Map>();
51 private transient Map currentRecord = null;
52 private boolean finished = false;
54 private static Integer nextID = new Integer(0);
55 public int numberOfTasks = 0;
56 private Map<String, Map<XSQLColumn, List<XSQLCriteria>>> criteria =
57 new ConcurrentHashMap<String, Map<XSQLColumn, List<XSQLCriteria>>>();
58 private Exception err = null;
59 private List<Record> EMPTY_RESULT = new LinkedList<Record>();
61 public JDBCResultSet(String _sql) {
62 synchronized (JDBCResultSet.class) {
69 public String getSQL() {
73 public void setError(Exception _err) {
77 public Exception getError() {
81 public void updateData(JDBCResultSet rs) {
83 this.tablesInQuery = rs.tablesInQuery;
84 this.tablesInQueryMap = rs.tablesInQueryMap;
85 this.fieldsInQuery = rs.fieldsInQuery;
90 public int isObjectFitCriteria(Map objValues, String tableName) {
91 Map<XSQLColumn, List<XSQLCriteria>> tblCriteria = criteria.get(tableName);
92 if (tblCriteria == null) {
95 for (Map.Entry<XSQLColumn, List<XSQLCriteria>> cc : tblCriteria
97 for (XSQLCriteria c : cc.getValue()) {
98 Object value = objValues.get(cc.getKey().toString());
99 int result = c.checkValue(value);
108 public int isObjectFitCriteria(Object element, Class cls) {
109 Map<XSQLColumn, List<XSQLCriteria>> tblCriteria =
110 criteria.get(cls.getName());
111 if (tblCriteria == null) {
114 for (Map.Entry<XSQLColumn, List<XSQLCriteria>> cc : tblCriteria
116 for (XSQLCriteria c : cc.getValue()) {
118 c.isObjectFitCriteria(element, cc.getKey().getName());
127 public Map<String, Map<XSQLColumn, List<XSQLCriteria>>> getCriteria() {
128 return this.criteria;
135 public List<XSQLBluePrintNode> getTables() {
136 return tablesInQuery;
139 public void addTableToQuery(XSQLBluePrintNode node) {
140 if (this.tablesInQueryMap.containsKey(node.getBluePrintNodeName())) {
143 this.tablesInQuery.add(node);
144 this.tablesInQueryMap.put(node.getBluePrintNodeName(), node);
147 public List<XSQLColumn> getFields() {
148 return this.fieldsInQuery;
151 public XSQLBluePrintNode getMainTable() {
152 if (tablesInQuery.size() == 1) {
153 return tablesInQuery.get(0);
155 XSQLBluePrintNode result = null;
156 for (XSQLBluePrintNode node : tablesInQuery) {
157 if (result == null) {
159 } else if (result.getLevel() < node.getLevel()) {
166 public boolean isFinished() {
170 public void setFinished(boolean b) {
175 return this.records.size();
178 public void addRecord(Map r) {
179 synchronized (this) {
180 if (records == null) {
181 records = new LinkedList<Map>();
189 public void addRecord(ArrayList hierarchy) {
190 Map rec = new HashMap();
191 for (int i = hierarchy.size() - 1; i >= 0; i--) {
192 Object element = hierarchy.get(i);
193 for (XSQLColumn c : fieldsInQuery) {
195 .equals(element.getClass().getSimpleName())) {
197 Method m = element.getClass().getMethod(c.getName(), null);
198 Object value = m.invoke(element, null);
199 rec.put(c.getName(), value);
200 } catch (Exception err) {
201 err.printStackTrace();
206 this.records.add(rec);
209 public boolean next() {
210 this.currentRecord = null;
211 if (records == null) {
212 records = new LinkedList<Map>();
214 while (!finished || records.size() > 0) {
215 synchronized (this) {
216 if (records.size() == 0) {
219 } catch (Exception err) {
221 if (records.size() > 0) {
223 currentRecord = records.removeFirst();
231 currentRecord = records.removeFirst();
242 public Map getCurrent() {
243 return this.currentRecord;
246 private void createRecord(Object data, XSQLBluePrintNode node) {
247 Map rec = new HashMap();
248 for (XSQLColumn c : this.fieldsInQuery) {
249 if (c.getTableName().equals(node.getBluePrintNodeName())) {
251 Method m = node.getInterface().getMethod(c.getName(), null);
252 Object value = m.invoke(data, null);
254 rec.put(c.getName(), value);
256 rec.put(c.getName(), "");
258 } catch (Exception err) {
259 err.printStackTrace();
266 public static class Record {
267 public Map data = new HashMap();
268 public Object element = null;
270 public Map getRecord() {
275 private Map collectColumnValues(Object node, XSQLBluePrintNode bpn) {
276 Map subChildren = XSQLODLUtils.getChildren(node);
277 Map result = new HashMap();
278 for (Object stc : subChildren.values()) {
279 if (stc.getClass().getName()
280 .endsWith("ImmutableAugmentationNode")) {
281 Map values = XSQLODLUtils.getChildren(stc);
282 for (Object key : values.keySet()) {
283 Object val = values.get(key);
284 if (val.getClass().getName()
285 .endsWith("ImmutableLeafNode")) {
286 Object value = XSQLODLUtils.getValue(val);
287 String k = XSQLODLUtils.getNodeName(val);
289 result.put(bpn.getBluePrintNodeName() + "." + k,
294 } else if (stc.getClass().getName().endsWith("ImmutableLeafNode")) {
295 String k = XSQLODLUtils.getNodeName(stc);
296 Object value = XSQLODLUtils.getValue(stc);
298 result.put(bpn.getBluePrintNodeName() + "." + k, value.toString());
305 private void addToData(Record rec, XSQLBluePrintNode bpn, XSQLBluePrint bluePrint, Map fullRecord) {
306 XSQLBluePrintNode eNodes[] = bluePrint.getBluePrintNodeByODLTableName(XSQLODLUtils.getNodeIdentiofier(rec.element));
308 for (XSQLColumn c : fieldsInQuery) {
309 for(XSQLBluePrintNode eNode:eNodes){
310 if (((XSQLBluePrintNode) c.getBluePrintNode()).getBluePrintNodeName().equals(eNode.getBluePrintNodeName())) {
311 //Object value = Criteria.getValue(rec.element, c.getName());
312 String columnName = c.toString();
313 Object value = fullRecord.get(columnName);
316 Object rsValue = c.getResultSetValue(value);
317 c.setCharWidth(rsValue.toString().length());
318 rec.data.put(columnName, rsValue);
319 } catch (Exception err) {
328 private boolean beenHere(Set<String> beenHereElement, Object element) {
329 if (beenHereElement == null) {
330 beenHereElement = new HashSet<String>();
333 String elementKey = null;
336 elementKey = element.toString();
337 } catch (Exception err) {
338 elementKey = "Unknown";
341 if (beenHereElement.contains(elementKey)) {
345 beenHereElement.add(elementKey);
349 public List<Object> getChildren(Object node, String tableName,XSQLBluePrint bluePrint) {
351 List<Object> children = XSQLODLUtils.getMChildren(node);
352 List<Object> result = new LinkedList<Object>();
354 for (Object child : children) {
356 String odlNodeName = XSQLODLUtils.getNodeIdentiofier(child);
357 if(odlNodeName==null) continue;
359 XSQLBluePrintNode eNodes[] = bluePrint.getBluePrintNodeByODLTableName(odlNodeName);
360 if(eNodes==null) continue;
362 boolean match = false;
363 for(XSQLBluePrintNode enode:eNodes){
364 if(tableName.startsWith(enode.toString())){
372 if (child.getClass().getName().endsWith("ImmutableContainerNode")) {
375 if (child.getClass().getName().endsWith("ImmutableAugmentationNode")) {
376 List<Object> _children = XSQLODLUtils.getMChildren(child);
377 for (Object c : _children) {
378 if (c.getClass().getName().endsWith("ImmutableContainerNode")) {
382 } else if (child.getClass().getName().endsWith("ImmutableMapNode")) {
383 result.addAll(XSQLODLUtils.getMChildren(child));
389 public List<Record> addRecords(Object element, XSQLBluePrintNode node,boolean root, String tableName,XSQLBluePrint bluePrint) {
391 List<Record> result = new LinkedList<Record>();
392 String nodeID = XSQLODLUtils.getNodeIdentiofier(element);
393 if (node.getODLTableName().equals(nodeID)) {
394 XSQLBluePrintNode bluePrintNode = bluePrint.getBluePrintNodeByODLTableName(nodeID)[0];
395 Record rec = new Record();
396 rec.element = element;
397 XSQLBluePrintNode bpn = this.tablesInQueryMap.get(bluePrintNode.getBluePrintNodeName());
398 if (this.criteria.containsKey(bluePrintNode.getBluePrintNodeName()) || bpn != null) {
399 Map<?, ?> allKeyValues = collectColumnValues(element, bpn);
400 if (!(isObjectFitCriteria(allKeyValues, bpn.getBluePrintNodeName()) == 1)) {
403 addToData(rec, bpn, bluePrint,allKeyValues);
413 XSQLBluePrintNode parent = node.getParent();
414 List<Record> subRecords = addRecords(element, parent, false, tableName,bluePrint);
415 for (Record subRec : subRecords) {
416 List<Object> subO = getChildren(subRec.element, tableName,bluePrint);
418 for (Object subData : subO) {
419 Record rec = new Record();
420 rec.element = subData;
421 rec.data.putAll(subRec.data);
423 String recID = XSQLODLUtils.getNodeIdentiofier(rec.element);
424 XSQLBluePrintNode eNodes[] = bluePrint.getBluePrintNodeByODLTableName(recID);
425 XSQLBluePrintNode bpn = null;
426 for(XSQLBluePrintNode eNode:eNodes){
427 bpn = this.tablesInQueryMap.get(eNode.getBluePrintNodeName());
431 boolean isObjectInCriteria = true;
433 Map allKeyValues = collectColumnValues(rec.element, bpn);
434 if ((isObjectFitCriteria(allKeyValues, bpn.getBluePrintNodeName()) == 1)) {
435 addToData(rec, bpn,bluePrint,allKeyValues);
437 isObjectInCriteria = false;
441 if (isObjectInCriteria) {
443 if(!rec.data.isEmpty())
457 public boolean isWrapperFor(Class<?> iface) throws SQLException {
458 // TODO Auto-generated method stub
463 public <T> T unwrap(Class<T> iface) throws SQLException {
464 // TODO Auto-generated method stub
469 public boolean absolute(int row) throws SQLException {
470 // TODO Auto-generated method stub
475 public void afterLast() throws SQLException {
476 // TODO Auto-generated method stub
481 public void beforeFirst() throws SQLException {
482 // TODO Auto-generated method stub
487 public void cancelRowUpdates() throws SQLException {
488 // TODO Auto-generated method stub
493 public void clearWarnings() throws SQLException {
494 // TODO Auto-generated method stub
499 public void close() throws SQLException {
500 // TODO Auto-generated method stub
505 public void deleteRow() throws SQLException {
506 // TODO Auto-generated method stub
511 public int findColumn(String columnLabel) throws SQLException {
512 // TODO Auto-generated method stub
517 public boolean first() throws SQLException {
518 // TODO Auto-generated method stub
523 public Array getArray(int columnIndex) throws SQLException {
524 // TODO Auto-generated method stub
529 public Array getArray(String columnLabel) throws SQLException {
530 // TODO Auto-generated method stub
535 public InputStream getAsciiStream(int columnIndex) throws SQLException {
536 // TODO Auto-generated method stub
541 public InputStream getAsciiStream(String columnLabel) throws SQLException {
542 // TODO Auto-generated method stub
547 public BigDecimal getBigDecimal(int columnIndex, int scale)
548 throws SQLException {
549 // TODO Auto-generated method stub
554 public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
555 // TODO Auto-generated method stub
560 public BigDecimal getBigDecimal(String columnLabel, int scale)
561 throws SQLException {
562 // TODO Auto-generated method stub
567 public BigDecimal getBigDecimal(String columnLabel) throws SQLException {
568 // TODO Auto-generated method stub
573 public InputStream getBinaryStream(int columnIndex) throws SQLException {
574 // TODO Auto-generated method stub
579 public InputStream getBinaryStream(String columnLabel) throws SQLException {
580 // TODO Auto-generated method stub
585 public Blob getBlob(int columnIndex) throws SQLException {
586 // TODO Auto-generated method stub
591 public Blob getBlob(String columnLabel) throws SQLException {
592 // TODO Auto-generated method stub
597 public boolean getBoolean(int columnIndex) throws SQLException {
598 // TODO Auto-generated method stub
603 public boolean getBoolean(String columnLabel) throws SQLException {
604 // TODO Auto-generated method stub
609 public byte getByte(int columnIndex) throws SQLException {
610 // TODO Auto-generated method stub
615 public byte getByte(String columnLabel) throws SQLException {
616 // TODO Auto-generated method stub
621 public byte[] getBytes(int columnIndex) throws SQLException {
622 // TODO Auto-generated method stub
627 public byte[] getBytes(String columnLabel) throws SQLException {
628 // TODO Auto-generated method stub
633 public Reader getCharacterStream(int columnIndex) throws SQLException {
634 // TODO Auto-generated method stub
639 public Reader getCharacterStream(String columnLabel) throws SQLException {
640 // TODO Auto-generated method stub
645 public Clob getClob(int columnIndex) throws SQLException {
646 // TODO Auto-generated method stub
651 public Clob getClob(String columnLabel) throws SQLException {
652 // TODO Auto-generated method stub
657 public int getConcurrency() throws SQLException {
658 // TODO Auto-generated method stub
663 public String getCursorName() throws SQLException {
664 // TODO Auto-generated method stub
669 public Date getDate(int columnIndex, Calendar cal) throws SQLException {
670 // TODO Auto-generated method stub
675 public Date getDate(int columnIndex) throws SQLException {
676 // TODO Auto-generated method stub
681 public Date getDate(String columnLabel, Calendar cal) throws SQLException {
682 // TODO Auto-generated method stub
687 public Date getDate(String columnLabel) throws SQLException {
688 // TODO Auto-generated method stub
693 public double getDouble(int columnIndex) throws SQLException {
694 // TODO Auto-generated method stub
699 public double getDouble(String columnLabel) throws SQLException {
700 // TODO Auto-generated method stub
705 public int getFetchDirection() throws SQLException {
706 // TODO Auto-generated method stub
711 public int getFetchSize() throws SQLException {
712 // TODO Auto-generated method stub
717 public float getFloat(int columnIndex) throws SQLException {
718 // TODO Auto-generated method stub
723 public float getFloat(String columnLabel) throws SQLException {
724 // TODO Auto-generated method stub
729 public int getHoldability() throws SQLException {
730 // TODO Auto-generated method stub
735 public int getInt(int columnIndex) throws SQLException {
736 // TODO Auto-generated method stub
741 public int getInt(String columnLabel) throws SQLException {
742 // TODO Auto-generated method stub
747 public long getLong(int columnIndex) throws SQLException {
748 // TODO Auto-generated method stub
753 public long getLong(String columnLabel) throws SQLException {
754 // TODO Auto-generated method stub
759 public ResultSetMetaData getMetaData() throws SQLException {
764 public Reader getNCharacterStream(int columnIndex) throws SQLException {
765 // TODO Auto-generated method stub
770 public Reader getNCharacterStream(String columnLabel) throws SQLException {
771 // TODO Auto-generated method stub
776 public NClob getNClob(int columnIndex) throws SQLException {
777 // TODO Auto-generated method stub
782 public NClob getNClob(String columnLabel) throws SQLException {
783 // TODO Auto-generated method stub
788 public String getNString(int columnIndex) throws SQLException {
789 // TODO Auto-generated method stub
794 public String getNString(String columnLabel) throws SQLException {
795 // TODO Auto-generated method stub
800 public Object getObject(int columnIndex, Map<String, Class<?>> map)
801 throws SQLException {
802 // TODO Auto-generated method stub
807 public Object getObject(int columnIndex) throws SQLException {
809 .get(this.fieldsInQuery.get(columnIndex - 1).toString());
813 public Object getObject(String columnLabel, Map<String, Class<?>> map)
814 throws SQLException {
815 // TODO Auto-generated method stub
820 public Object getObject(String columnLabel) throws SQLException {
821 return currentRecord.get(columnLabel);
825 public Ref getRef(int columnIndex) throws SQLException {
826 // TODO Auto-generated method stub
831 public Ref getRef(String columnLabel) throws SQLException {
832 // TODO Auto-generated method stub
837 public int getRow() throws SQLException {
838 // TODO Auto-generated method stub
843 public RowId getRowId(int columnIndex) throws SQLException {
844 // TODO Auto-generated method stub
849 public RowId getRowId(String columnLabel) throws SQLException {
850 // TODO Auto-generated method stub
855 public SQLXML getSQLXML(int columnIndex) throws SQLException {
856 // TODO Auto-generated method stub
861 public SQLXML getSQLXML(String columnLabel) throws SQLException {
862 // TODO Auto-generated method stub
867 public short getShort(int columnIndex) throws SQLException {
868 // TODO Auto-generated method stub
873 public short getShort(String columnLabel) throws SQLException {
874 // TODO Auto-generated method stub
879 public Statement getStatement() throws SQLException {
880 // TODO Auto-generated method stub
885 public String getString(int columnIndex) throws SQLException {
886 // TODO Auto-generated method stub
891 public String getString(String columnLabel) throws SQLException {
892 // TODO Auto-generated method stub
897 public Time getTime(int columnIndex, Calendar cal) throws SQLException {
898 // TODO Auto-generated method stub
903 public Time getTime(int columnIndex) throws SQLException {
904 // TODO Auto-generated method stub
909 public Time getTime(String columnLabel, Calendar cal) throws SQLException {
910 // TODO Auto-generated method stub
915 public Time getTime(String columnLabel) throws SQLException {
916 // TODO Auto-generated method stub
921 public Timestamp getTimestamp(int columnIndex, Calendar cal)
922 throws SQLException {
923 // TODO Auto-generated method stub
928 public Timestamp getTimestamp(int columnIndex) throws SQLException {
929 // TODO Auto-generated method stub
934 public Timestamp getTimestamp(String columnLabel, Calendar cal)
935 throws SQLException {
936 // TODO Auto-generated method stub
941 public Timestamp getTimestamp(String columnLabel) throws SQLException {
942 // TODO Auto-generated method stub
947 public int getType() throws SQLException {
948 // TODO Auto-generated method stub
953 public URL getURL(int columnIndex) throws SQLException {
954 // TODO Auto-generated method stub
959 public URL getURL(String columnLabel) throws SQLException {
960 // TODO Auto-generated method stub
965 public InputStream getUnicodeStream(int columnIndex) throws SQLException {
966 // TODO Auto-generated method stub
971 public InputStream getUnicodeStream(String columnLabel)
972 throws SQLException {
973 // TODO Auto-generated method stub
978 public SQLWarning getWarnings() throws SQLException {
979 // TODO Auto-generated method stub
984 public void insertRow() throws SQLException {
985 // TODO Auto-generated method stub
990 public boolean isAfterLast() throws SQLException {
991 // TODO Auto-generated method stub
996 public boolean isBeforeFirst() throws SQLException {
997 // TODO Auto-generated method stub
1002 public boolean isClosed() throws SQLException {
1003 // TODO Auto-generated method stub
1008 public boolean isFirst() throws SQLException {
1009 // TODO Auto-generated method stub
1014 public boolean isLast() throws SQLException {
1015 // TODO Auto-generated method stub
1020 public boolean last() throws SQLException {
1021 // TODO Auto-generated method stub
1026 public void moveToCurrentRow() throws SQLException {
1027 // TODO Auto-generated method stub
1032 public void moveToInsertRow() throws SQLException {
1033 // TODO Auto-generated method stub
1038 public boolean previous() throws SQLException {
1039 // TODO Auto-generated method stub
1044 public void refreshRow() throws SQLException {
1045 // TODO Auto-generated method stub
1050 public boolean relative(int rows) throws SQLException {
1051 // TODO Auto-generated method stub
1056 public boolean rowDeleted() throws SQLException {
1057 // TODO Auto-generated method stub
1062 public boolean rowInserted() throws SQLException {
1063 // TODO Auto-generated method stub
1068 public boolean rowUpdated() throws SQLException {
1069 // TODO Auto-generated method stub
1074 public void setFetchDirection(int direction) throws SQLException {
1075 // TODO Auto-generated method stub
1080 public void setFetchSize(int rows) throws SQLException {
1081 // TODO Auto-generated method stub
1086 public void updateArray(int columnIndex, Array x) throws SQLException {
1087 // TODO Auto-generated method stub
1092 public void updateArray(String columnLabel, Array x) throws SQLException {
1093 // TODO Auto-generated method stub
1098 public void updateAsciiStream(int columnIndex, InputStream x, int length)
1099 throws SQLException {
1100 // TODO Auto-generated method stub
1105 public void updateAsciiStream(int columnIndex, InputStream x, long length)
1106 throws SQLException {
1107 // TODO Auto-generated method stub
1112 public void updateAsciiStream(int columnIndex, InputStream x)
1113 throws SQLException {
1114 // TODO Auto-generated method stub
1119 public void updateAsciiStream(String columnLabel, InputStream x, int length)
1120 throws SQLException {
1121 // TODO Auto-generated method stub
1126 public void updateAsciiStream(String columnLabel, InputStream x,
1128 throws SQLException {
1129 // TODO Auto-generated method stub
1134 public void updateAsciiStream(String columnLabel, InputStream x)
1135 throws SQLException {
1136 // TODO Auto-generated method stub
1141 public void updateBigDecimal(int columnIndex, BigDecimal x)
1142 throws SQLException {
1143 // TODO Auto-generated method stub
1148 public void updateBigDecimal(String columnLabel, BigDecimal x)
1149 throws SQLException {
1150 // TODO Auto-generated method stub
1155 public void updateBinaryStream(int columnIndex, InputStream x, int length)
1156 throws SQLException {
1157 // TODO Auto-generated method stub
1162 public void updateBinaryStream(int columnIndex, InputStream x, long length)
1163 throws SQLException {
1164 // TODO Auto-generated method stub
1169 public void updateBinaryStream(int columnIndex, InputStream x)
1170 throws SQLException {
1171 // TODO Auto-generated method stub
1176 public void updateBinaryStream(String columnLabel, InputStream x,
1178 throws SQLException {
1179 // TODO Auto-generated method stub
1184 public void updateBinaryStream(String columnLabel, InputStream x,
1185 long length) throws SQLException {
1186 // TODO Auto-generated method stub
1191 public void updateBinaryStream(String columnLabel, InputStream x)
1192 throws SQLException {
1193 // TODO Auto-generated method stub
1198 public void updateBlob(int columnIndex, Blob x) throws SQLException {
1199 // TODO Auto-generated method stub
1204 public void updateBlob(int columnIndex, InputStream inputStream,
1206 throws SQLException {
1207 // TODO Auto-generated method stub
1212 public void updateBlob(int columnIndex, InputStream inputStream)
1213 throws SQLException {
1214 // TODO Auto-generated method stub
1219 public void updateBlob(String columnLabel, Blob x) throws SQLException {
1220 // TODO Auto-generated method stub
1225 public void updateBlob(String columnLabel, InputStream inputStream,
1226 long length) throws SQLException {
1227 // TODO Auto-generated method stub
1232 public void updateBlob(String columnLabel, InputStream inputStream)
1233 throws SQLException {
1234 // TODO Auto-generated method stub
1239 public void updateBoolean(int columnIndex, boolean x) throws SQLException {
1240 // TODO Auto-generated method stub
1245 public void updateBoolean(String columnLabel, boolean x)
1246 throws SQLException {
1247 // TODO Auto-generated method stub
1252 public void updateByte(int columnIndex, byte x) throws SQLException {
1253 // TODO Auto-generated method stub
1258 public void updateByte(String columnLabel, byte x) throws SQLException {
1259 // TODO Auto-generated method stub
1264 public void updateBytes(int columnIndex, byte[] x) throws SQLException {
1265 // TODO Auto-generated method stub
1270 public void updateBytes(String columnLabel, byte[] x) throws SQLException {
1271 // TODO Auto-generated method stub
1276 public void updateCharacterStream(int columnIndex, Reader x, int length)
1277 throws SQLException {
1278 // TODO Auto-generated method stub
1283 public void updateCharacterStream(int columnIndex, Reader x, long length)
1284 throws SQLException {
1285 // TODO Auto-generated method stub
1290 public void updateCharacterStream(int columnIndex, Reader x)
1291 throws SQLException {
1292 // TODO Auto-generated method stub
1297 public void updateCharacterStream(String columnLabel, Reader reader,
1298 int length) throws SQLException {
1299 // TODO Auto-generated method stub
1304 public void updateCharacterStream(String columnLabel, Reader reader,
1305 long length) throws SQLException {
1306 // TODO Auto-generated method stub
1311 public void updateCharacterStream(String columnLabel, Reader reader)
1312 throws SQLException {
1313 // TODO Auto-generated method stub
1318 public void updateClob(int columnIndex, Clob x) throws SQLException {
1319 // TODO Auto-generated method stub
1324 public void updateClob(int columnIndex, Reader reader, long length)
1325 throws SQLException {
1326 // TODO Auto-generated method stub
1331 public void updateClob(int columnIndex, Reader reader) throws SQLException {
1332 // TODO Auto-generated method stub
1337 public void updateClob(String columnLabel, Clob x) throws SQLException {
1338 // TODO Auto-generated method stub
1343 public void updateClob(String columnLabel, Reader reader, long length)
1344 throws SQLException {
1345 // TODO Auto-generated method stub
1350 public void updateClob(String columnLabel, Reader reader)
1351 throws SQLException {
1352 // TODO Auto-generated method stub
1357 public void updateDate(int columnIndex, Date x) throws SQLException {
1358 // TODO Auto-generated method stub
1363 public void updateDate(String columnLabel, Date x) throws SQLException {
1364 // TODO Auto-generated method stub
1369 public void updateDouble(int columnIndex, double x) throws SQLException {
1370 // TODO Auto-generated method stub
1375 public void updateDouble(String columnLabel, double x) throws SQLException {
1376 // TODO Auto-generated method stub
1381 public void updateFloat(int columnIndex, float x) throws SQLException {
1382 // TODO Auto-generated method stub
1387 public void updateFloat(String columnLabel, float x) throws SQLException {
1388 // TODO Auto-generated method stub
1393 public void updateInt(int columnIndex, int x) throws SQLException {
1394 // TODO Auto-generated method stub
1399 public void updateInt(String columnLabel, int x) throws SQLException {
1400 // TODO Auto-generated method stub
1405 public void updateLong(int columnIndex, long x) throws SQLException {
1406 // TODO Auto-generated method stub
1411 public void updateLong(String columnLabel, long x) throws SQLException {
1412 // TODO Auto-generated method stub
1417 public void updateNCharacterStream(int columnIndex, Reader x, long length)
1418 throws SQLException {
1419 // TODO Auto-generated method stub
1424 public void updateNCharacterStream(int columnIndex, Reader x)
1425 throws SQLException {
1426 // TODO Auto-generated method stub
1431 public void updateNCharacterStream(String columnLabel, Reader reader,
1432 long length) throws SQLException {
1433 // TODO Auto-generated method stub
1438 public void updateNCharacterStream(String columnLabel, Reader reader)
1439 throws SQLException {
1440 // TODO Auto-generated method stub
1445 public void updateNClob(int columnIndex, NClob nClob) throws SQLException {
1446 // TODO Auto-generated method stub
1451 public void updateNClob(int columnIndex, Reader reader, long length)
1452 throws SQLException {
1453 // TODO Auto-generated method stub
1458 public void updateNClob(int columnIndex, Reader reader)
1459 throws SQLException {
1460 // TODO Auto-generated method stub
1465 public void updateNClob(String columnLabel, NClob nClob)
1466 throws SQLException {
1467 // TODO Auto-generated method stub
1472 public void updateNClob(String columnLabel, Reader reader, long length)
1473 throws SQLException {
1474 // TODO Auto-generated method stub
1479 public void updateNClob(String columnLabel, Reader reader)
1480 throws SQLException {
1481 // TODO Auto-generated method stub
1486 public void updateNString(int columnIndex, String nString)
1487 throws SQLException {
1488 // TODO Auto-generated method stub
1493 public void updateNString(String columnLabel, String nString)
1494 throws SQLException {
1495 // TODO Auto-generated method stub
1500 public void updateNull(int columnIndex) throws SQLException {
1501 // TODO Auto-generated method stub
1506 public void updateNull(String columnLabel) throws SQLException {
1507 // TODO Auto-generated method stub
1512 public void updateObject(int columnIndex, Object x, int scaleOrLength)
1513 throws SQLException {
1514 // TODO Auto-generated method stub
1519 public void updateObject(int columnIndex, Object x) throws SQLException {
1520 // TODO Auto-generated method stub
1525 public void updateObject(String columnLabel, Object x, int scaleOrLength)
1526 throws SQLException {
1527 // TODO Auto-generated method stub
1532 public void updateObject(String columnLabel, Object x) throws SQLException {
1533 // TODO Auto-generated method stub
1538 public void updateRef(int columnIndex, Ref x) throws SQLException {
1539 // TODO Auto-generated method stub
1544 public void updateRef(String columnLabel, Ref x) throws SQLException {
1545 // TODO Auto-generated method stub
1550 public void updateRow() throws SQLException {
1551 // TODO Auto-generated method stub
1556 public void updateRowId(int columnIndex, RowId x) throws SQLException {
1557 // TODO Auto-generated method stub
1562 public void updateRowId(String columnLabel, RowId x) throws SQLException {
1563 // TODO Auto-generated method stub
1568 public void updateSQLXML(int columnIndex, SQLXML xmlObject)
1569 throws SQLException {
1570 // TODO Auto-generated method stub
1575 public void updateSQLXML(String columnLabel, SQLXML xmlObject)
1576 throws SQLException {
1577 // TODO Auto-generated method stub
1582 public void updateShort(int columnIndex, short x) throws SQLException {
1583 // TODO Auto-generated method stub
1588 public void updateShort(String columnLabel, short x) throws SQLException {
1589 // TODO Auto-generated method stub
1594 public void updateString(int columnIndex, String x) throws SQLException {
1595 // TODO Auto-generated method stub
1600 public void updateString(String columnLabel, String x) throws SQLException {
1601 // TODO Auto-generated method stub
1606 public void updateTime(int columnIndex, Time x) throws SQLException {
1607 // TODO Auto-generated method stub
1612 public void updateTime(String columnLabel, Time x) throws SQLException {
1613 // TODO Auto-generated method stub
1618 public void updateTimestamp(int columnIndex, Timestamp x)
1619 throws SQLException {
1620 // TODO Auto-generated method stub
1625 public void updateTimestamp(String columnLabel, Timestamp x)
1626 throws SQLException {
1627 // TODO Auto-generated method stub
1632 public boolean wasNull() throws SQLException {
1633 // TODO Auto-generated method stub
1638 public String getCatalogName(int column) throws SQLException {
1639 // TODO Auto-generated method stub
1644 public String getColumnClassName(int column) throws SQLException {
1645 // TODO Auto-generated method stub
1650 public int getColumnCount() throws SQLException {
1651 return fieldsInQuery.size();
1655 public int getColumnDisplaySize(int column) throws SQLException {
1656 // TODO Auto-generated method stub
1661 public String getColumnLabel(int column) throws SQLException {
1662 return this.fieldsInQuery.get(column - 1).toString();
1666 public String getColumnName(int column) throws SQLException {
1667 // TODO Auto-generated method stub
1672 public int getColumnType(int column) throws SQLException {
1673 // TODO Auto-generated method stub
1678 public String getColumnTypeName(int column) throws SQLException {
1679 // TODO Auto-generated method stub
1684 public int getPrecision(int column) throws SQLException {
1685 // TODO Auto-generated method stub
1690 public int getScale(int column) throws SQLException {
1691 // TODO Auto-generated method stub
1696 public String getSchemaName(int column) throws SQLException {
1697 // TODO Auto-generated method stub
1702 public String getTableName(int column) throws SQLException {
1703 // TODO Auto-generated method stub
1708 public boolean isAutoIncrement(int column) throws SQLException {
1709 // TODO Auto-generated method stub
1714 public boolean isCaseSensitive(int column) throws SQLException {
1715 // TODO Auto-generated method stub
1720 public boolean isCurrency(int column) throws SQLException {
1721 // TODO Auto-generated method stub
1726 public boolean isDefinitelyWritable(int column) throws SQLException {
1727 // TODO Auto-generated method stub
1732 public int isNullable(int column) throws SQLException {
1733 // TODO Auto-generated method stub
1738 public boolean isReadOnly(int column) throws SQLException {
1739 // TODO Auto-generated method stub
1744 public boolean isSearchable(int column) throws SQLException {
1745 // TODO Auto-generated method stub
1750 public boolean isSigned(int column) throws SQLException {
1751 // TODO Auto-generated method stub
1756 public boolean isWritable(int column) throws SQLException {
1757 // TODO Auto-generated method stub
1762 public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
1763 // TODO Auto-generated method stub
1768 public <T> T getObject(String columnLabel, Class<T> type)
1769 throws SQLException {
1770 // TODO Auto-generated method stub