Merge "Add missing copyright text"
[controller.git] / opendaylight / md-sal / sal-dom-xsql / src / main / java / org / opendaylight / controller / md / sal / dom / xsql / jdbc / JDBCResultSet.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.controller.md.sal.dom.xsql.jdbc;
9
10 import java.io.InputStream;
11 import java.io.Reader;
12 import java.io.Serializable;
13 import java.lang.reflect.Method;
14 import java.math.BigDecimal;
15 import java.net.URL;
16 import java.sql.Array;
17 import java.sql.Blob;
18 import java.sql.Clob;
19 import java.sql.Date;
20 import java.sql.NClob;
21 import java.sql.Ref;
22 import java.sql.ResultSet;
23 import java.sql.ResultSetMetaData;
24 import java.sql.RowId;
25 import java.sql.SQLException;
26 import java.sql.SQLWarning;
27 import java.sql.SQLXML;
28 import java.sql.Statement;
29 import java.sql.Time;
30 import java.sql.Timestamp;
31 import java.util.ArrayList;
32 import java.util.Calendar;
33 import java.util.Collection;
34 import java.util.HashMap;
35 import java.util.HashSet;
36 import java.util.LinkedList;
37 import java.util.List;
38 import java.util.Map;
39 import java.util.Set;
40 import java.util.concurrent.ConcurrentHashMap;
41
42 import org.opendaylight.controller.md.sal.dom.xsql.XSQLAdapter;
43 import org.opendaylight.controller.md.sal.dom.xsql.XSQLBluePrint;
44 import org.opendaylight.controller.md.sal.dom.xsql.XSQLBluePrintNode;
45 import org.opendaylight.controller.md.sal.dom.xsql.XSQLColumn;
46 import org.opendaylight.controller.md.sal.dom.xsql.XSQLCriteria;
47 import org.opendaylight.controller.md.sal.dom.xsql.XSQLODLUtils;
48 import org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode;
49
50 /**
51  * @author Sharon Aicler(saichler@gmail.com)
52  **/
53 public class JDBCResultSet implements Serializable, ResultSet, ResultSetMetaData {
54     private static final long serialVersionUID = -7450200738431047057L;
55     private static final ClassLoader CLASS_LOADER = JDBCResultSet.class.getClassLoader();
56     private static final Class<?>[] PROXY_INTERFACES = new Class[] { ResultSet.class };
57     private static int nextID = 0;
58
59     private String sql = null;
60     private List<XSQLBluePrintNode> tablesInQuery = new ArrayList<XSQLBluePrintNode>();
61     private Map<String, XSQLBluePrintNode> tablesInQueryMap = new ConcurrentHashMap<String, XSQLBluePrintNode>();
62     private List<XSQLColumn> fieldsInQuery = new ArrayList<XSQLColumn>();
63     private transient LinkedList<Map<String, Object>> records = new LinkedList<>();
64     private transient Map<String, Object> currentRecord = null;
65     private boolean finished = false;
66     private int id = 0;
67     public int numberOfTasks = 0;
68     private Map<String, Map<XSQLColumn, List<XSQLCriteria>>> criteria = new ConcurrentHashMap<String, Map<XSQLColumn, List<XSQLCriteria>>>();
69     private Exception err = null;
70     private List<Record> EMPTY_RESULT = new LinkedList<Record>();
71     private transient Map<String, JDBCResultSet> subQueries = new HashMap<String, JDBCResultSet>();
72
73     public ResultSet getProxy() {
74         return this;
75         //return (ResultSet) Proxy.newProxyInstance(CLASS_LOADER, PROXY_INTERFACES, new JDBCProxy(this));
76     }
77
78     public void setSQL(String _sql) {
79         this.sql = _sql;
80     }
81
82     public JDBCResultSet addSubQuery(String _sql, String logicalName) {
83         if (subQueries == null) {
84             subQueries = new HashMap<String, JDBCResultSet>();
85         }
86         JDBCResultSet rs = new JDBCResultSet(_sql);
87         this.subQueries.put(logicalName, rs);
88         return rs;
89     }
90
91     public Map<String, JDBCResultSet> getSubQueries() {
92         if (this.subQueries == null) {
93             this.subQueries = new HashMap<>();
94         }
95         return this.subQueries;
96     }
97
98     public JDBCResultSet(String _sql) {
99         synchronized (JDBCResultSet.class) {
100             nextID++;
101             id = nextID;
102         }
103         this.sql = _sql;
104     }
105
106     public String getSQL() {
107         return this.sql;
108     }
109
110     public void setError(Exception _err) {
111         this.err = _err;
112     }
113
114     public Exception getError() {
115         return this.err;
116     }
117
118     public void updateData(JDBCResultSet rs) {
119         synchronized (this) {
120             this.tablesInQuery = rs.tablesInQuery;
121             this.tablesInQueryMap = rs.tablesInQueryMap;
122             this.fieldsInQuery = rs.fieldsInQuery;
123             this.notifyAll();
124         }
125     }
126
127     public int isObjectFitCriteria(Map<String, Object> objValues,
128             String tableName) {
129         Map<XSQLColumn, List<XSQLCriteria>> tblCriteria = criteria
130                 .get(tableName);
131         if (tblCriteria == null) {
132             return 1;
133         }
134         for (Map.Entry<XSQLColumn, List<XSQLCriteria>> cc : tblCriteria
135                 .entrySet()) {
136             for (XSQLCriteria c : cc.getValue()) {
137                 Object value = objValues.get(cc.getKey().toString());
138                 int result = c.checkValue(value);
139                 if (result == 0) {
140                     return 0;
141                 }
142             }
143         }
144         return 1;
145     }
146
147     public int isObjectFitCriteria(Object element, Class<?> cls) {
148         Map<XSQLColumn, List<XSQLCriteria>> tblCriteria = criteria.get(cls
149                 .getName());
150         if (tblCriteria == null) {
151             return 1;
152         }
153         for (Map.Entry<XSQLColumn, List<XSQLCriteria>> cc : tblCriteria
154                 .entrySet()) {
155             for (XSQLCriteria c : cc.getValue()) {
156                 int result = c.isObjectFitCriteria(element, cc.getKey()
157                         .getName());
158                 if (result == 0) {
159                     return 0;
160                 }
161             }
162         }
163         return 1;
164     }
165
166     public Map<String, Map<XSQLColumn, List<XSQLCriteria>>> getCriteria() {
167         return this.criteria;
168     }
169
170     public int getID() {
171         return this.id;
172     }
173
174     public List<XSQLBluePrintNode> getTables() {
175         return tablesInQuery;
176     }
177
178     public void addTableToQuery(XSQLBluePrintNode node) {
179         if (this.tablesInQueryMap.containsKey(node.getBluePrintNodeName())) {
180             return;
181         }
182         this.tablesInQuery.add(node);
183         this.tablesInQueryMap.put(node.getBluePrintNodeName(), node);
184     }
185
186     public List<XSQLColumn> getFields() {
187         return this.fieldsInQuery;
188     }
189
190     public XSQLBluePrintNode getMainTable() {
191         if (tablesInQuery.size() == 1) {
192             return tablesInQuery.get(0);
193         }
194         XSQLBluePrintNode result = null;
195         for (XSQLBluePrintNode node : tablesInQuery) {
196             if (result == null) {
197                 result = node;
198             } else if (result.getLevel() < node.getLevel()) {
199                 result = node;
200             }
201         }
202         return result;
203     }
204
205     public boolean isFinished() {
206         return finished;
207     }
208
209     public void setFinished(boolean b) {
210         this.finished = b;
211     }
212
213     public int size() {
214         return this.records.size();
215     }
216
217     public void addRecord(Map<String, Object> r) {
218         synchronized (this) {
219             if (records == null) {
220                 records = new LinkedList<>();
221             }
222             records.add(r);
223             this.notifyAll();
224         }
225     }
226
227     public void addRecord(ArrayList<?> hierarchy) {
228         Map<String, Object> rec = new HashMap<>();
229         for (int i = hierarchy.size() - 1; i >= 0; i--) {
230             Object element = hierarchy.get(i);
231             for (XSQLColumn c : fieldsInQuery) {
232                 if (c.getTableName().equals(element.getClass().getSimpleName())) {
233                     try {
234                         Method m = element.getClass().getMethod(c.getName(),
235                                 null);
236                         Object value = m.invoke(element, null);
237                         rec.put(c.getName(), value);
238                     } catch (Exception err) {
239                         err.printStackTrace();
240                     }
241                 }
242             }
243         }
244         this.records.add(rec);
245     }
246
247     public boolean next() {
248         this.currentRecord = null;
249         if (records == null) {
250             records = new LinkedList<>();
251         }
252         while (!finished || records.size() > 0) {
253             synchronized (this) {
254                 if (records.size() == 0) {
255                     try {
256                         this.wait(1000);
257                     } catch (Exception err) {
258                     }
259                     if (records.size() > 0) {
260                         try {
261                             currentRecord = records.removeFirst();
262                             return true;
263                         } finally {
264                             this.notifyAll();
265                         }
266                     }
267                 } else {
268                     try {
269                         currentRecord = records.removeFirst();
270                         return true;
271                     } finally {
272                         this.notifyAll();
273                     }
274                 }
275             }
276         }
277         return false;
278     }
279
280     public Map<String, Object> getCurrent() {
281         return this.currentRecord;
282     }
283
284     private void createRecord(Object data, XSQLBluePrintNode node) {
285         Map<String, Object> rec = new HashMap<>();
286         for (XSQLColumn c : this.fieldsInQuery) {
287             if (c.getTableName().equals(node.getBluePrintNodeName())) {
288                 try {
289                     Method m = node.getInterface().getMethod(c.getName(), null);
290                     Object value = m.invoke(data, null);
291                     if (value != null) {
292                         rec.put(c.getName(), value);
293                     } else {
294                         rec.put(c.getName(), "");
295                     }
296                 } catch (Exception err) {
297                     err.printStackTrace();
298                 }
299
300             }
301         }
302     }
303
304     public static class Record {
305         // The map container the Attribute 2 the attribute value
306         public Map<String, Object> data = new HashMap<>();
307         // The Element Object (Possibly some kind of NormalizedNode
308         public Object element = null;
309         // Does this record fit the criteria
310         // In case of a list property, we first collect the list and only then
311         // we
312         // we decide which list item should be included or not.
313         public boolean fitCriteria = true;
314
315         public Map<String, Object> getRecord() {
316             return this.data;
317         }
318     }
319
320     public static class RecordsContainer {
321         public List<Record> records = new LinkedList<Record>();
322         public List<Record> fitRecords = new LinkedList<Record>();
323         public Object currentObject = null;
324     }
325
326     private void collectColumnValues(RecordsContainer rContainer,
327             XSQLBluePrintNode bpn) {
328         Collection<?> subChildren = XSQLODLUtils
329                 .getChildrenCollection(rContainer.currentObject);
330         Record r = new Record();
331         r.element = rContainer.currentObject;
332         for (Object stc : subChildren) {
333             if (stc.getClass().getName()
334                     .endsWith("ImmutableUnkeyedListEntryNode")) {
335                 r.fitCriteria = false;
336                 rContainer.currentObject = stc;
337                 collectColumnValues(rContainer, bpn);
338             } else if (stc.getClass().getName()
339                     .endsWith("ImmutableAugmentationNode")) {
340                 Map<?, ?> values = XSQLODLUtils.getChildren(stc);
341                 for (Object key : values.keySet()) {
342                     Object val = values.get(key);
343                     if (val.getClass().getName().endsWith("ImmutableLeafNode")) {
344                         Object value = XSQLODLUtils.getValue(val);
345                         String k = XSQLODLUtils.getNodeName(val);
346                         if (value != null) {
347                             r.data.put(bpn.getBluePrintNodeName() + "." + k,
348                                     value.toString());
349                         }
350                     }
351                 }
352             } else if (stc.getClass().getName().endsWith("ImmutableLeafNode")) {
353                 String k = XSQLODLUtils.getNodeName(stc);
354                 Object value = XSQLODLUtils.getValue(stc);
355                 if (value != null) {
356                     r.data.put(bpn.getBluePrintNodeName() + "." + k,
357                             value.toString());
358                 }
359             }
360         }
361         if (r.fitCriteria) {
362             rContainer.records.add(r);
363         }
364     }
365
366     private void addToData(Record rec, XSQLBluePrintNode bpn,XSQLBluePrint bluePrint, Map<String, Object> fullRecord) {
367         XSQLBluePrintNode eNodes[] = bluePrint
368                 .getBluePrintNodeByODLTableName(XSQLODLUtils
369                         .getNodeIdentiofier(rec.element));
370         if (bpn != null) {
371             for (XSQLColumn c : fieldsInQuery) {
372                 for (XSQLBluePrintNode eNode : eNodes) {
373                     if (((XSQLBluePrintNode) c.getBluePrintNode())
374                             .getBluePrintNodeName().equals(
375                                     eNode.getBluePrintNodeName())) {
376                         // Object value = Criteria.getValue(rec.element,
377                         // c.getName());
378                         String columnName = c.toString();
379                         Object value = fullRecord.get(columnName);
380                         if (value != null) {
381                             try {
382                                 Object rsValue = c.getResultSetValue(value);
383                                 c.setCharWidth(rsValue.toString().length());
384                                 rec.data.put(columnName, rsValue);
385                             } catch (Exception err) {
386                             }
387                         }
388                     }
389                 }
390             }
391         }
392     }
393
394     private boolean beenHere(Set<String> beenHereElement, Object element) {
395         if (beenHereElement == null) {
396             beenHereElement = new HashSet<String>();
397         }
398
399         String elementKey = null;
400
401         try {
402             elementKey = element.toString();
403         } catch (Exception err) {
404             elementKey = "Unknown";
405         }
406
407         if (beenHereElement.contains(elementKey)) {
408             return true;
409         }
410
411         beenHereElement.add(elementKey);
412         return false;
413     }
414
415     public List<Object> getChildren(Object node, String tableName,
416             XSQLBluePrint bluePrint) {
417
418         List<Object> children = XSQLODLUtils.getMChildren(node);
419         List<Object> result = new LinkedList<Object>();
420
421         for (Object child : children) {
422
423             String odlNodeName = XSQLODLUtils.getNodeIdentiofier(child);
424             if (odlNodeName == null) {
425                 if (child instanceof DataContainerNode) {
426                     List<Object> augChidlren = getChildren(child, tableName,
427                             bluePrint);
428                     result.addAll(augChidlren);
429                 }
430                 continue;
431             }
432
433             XSQLBluePrintNode eNodes[] = bluePrint
434                     .getBluePrintNodeByODLTableName(odlNodeName);
435             if (eNodes == null) {
436                 continue;
437             }
438
439             boolean match = false;
440             for (XSQLBluePrintNode enode : eNodes) {
441                 if (tableName.startsWith(enode.toString())) {
442                     match = true;
443                     break;
444                 }
445             }
446
447             if (!match) {
448                 continue;
449             }
450
451             if (child.getClass().getName().endsWith("ImmutableUnkeyedListNode")) {
452                 result.add(child);
453             } else if (child.getClass().getName()
454                     .endsWith("ImmutableContainerNode")) {
455                 result.add(child);
456             } else if (child.getClass().getName()
457                     .endsWith("ImmutableAugmentationNode")) {
458                 List<Object> _children = XSQLODLUtils.getMChildren(child);
459                 for (Object c : _children) {
460                     if (c.getClass().getName()
461                             .endsWith("ImmutableContainerNode")) {
462                         result.add(c);
463                     }
464                 }
465             } else if (child.getClass().getName().endsWith("ImmutableMapNode")) {
466                 result.addAll(XSQLODLUtils.getMChildren(child));
467             } else {
468                 XSQLAdapter.log("Missed Node Data OF Type="
469                         + child.getClass().getName());
470             }
471         }
472         return result;
473     }
474
475     public List<Record> addRecords(Object element, XSQLBluePrintNode node,
476             boolean root, String tableName, XSQLBluePrint bluePrint) {
477         List<Record> result = new LinkedList<Record>();
478         String nodeID = XSQLODLUtils.getNodeIdentiofier(element);
479         if (node.getODLTableName().equals(nodeID)) {
480             XSQLBluePrintNode bluePrintNode = bluePrint
481                     .getBluePrintNodeByODLTableName(nodeID)[0];
482             RecordsContainer rContainer = new RecordsContainer();
483             rContainer.currentObject = element;
484             XSQLBluePrintNode bpn = this.tablesInQueryMap.get(bluePrintNode
485                     .getBluePrintNodeName());
486             if (this.criteria.containsKey(bluePrintNode.getBluePrintNodeName())
487                     || bpn != null) {
488                 collectColumnValues(rContainer, bpn);
489                 for (Record r : rContainer.records) {
490                     if (!(isObjectFitCriteria(r.data,
491                             bpn.getBluePrintNodeName()) == 1)) {
492                         r.fitCriteria = false;
493                     }
494                     if (r.fitCriteria) {
495                         Record rec = new Record();
496                         rec.element = r.element;
497                         addToData(rec, bpn, bluePrint, r.data);
498                         rContainer.fitRecords.add(rec);
499                     }
500                 }
501                 if (rContainer.fitRecords.isEmpty())
502                     return EMPTY_RESULT;
503             }
504             if (rContainer.records.isEmpty()) {
505                 Record rec = new Record();
506                 rec.element = rContainer.currentObject;
507                 if (root) {
508                     addRecord(rec.data);
509                 } else {
510                     result.add(rec);
511                 }
512             } else {
513                 for (Record rec : rContainer.fitRecords) {
514                     if (root) {
515                         addRecord(rec.data);
516                     } else {
517                         result.add(rec);
518                     }
519                 }
520             }
521             return result;
522         }
523
524         XSQLBluePrintNode parent = node.getParent();
525         List<Record> subRecords = addRecords(element, parent, false, tableName,
526                 bluePrint);
527         for (Record subRec : subRecords) {
528             List<Object> subO = getChildren(subRec.element, tableName,
529                     bluePrint);
530             if (subO != null) {
531                 for (Object subData : subO) {
532                     RecordsContainer rContainer = new RecordsContainer();
533                     rContainer.currentObject = subData;
534
535                     String recID = XSQLODLUtils
536                             .getNodeIdentiofier(rContainer.currentObject);
537                     XSQLBluePrintNode eNodes[] = bluePrint
538                             .getBluePrintNodeByODLTableName(recID);
539                     XSQLBluePrintNode bpn = null;
540                     for (XSQLBluePrintNode eNode : eNodes) {
541                         bpn = this.tablesInQueryMap.get(eNode
542                                 .getBluePrintNodeName());
543                         if (bpn != null) {
544                             break;
545                         }
546                     }
547                     if (bpn != null) {
548                         collectColumnValues(rContainer, bpn);
549                         for (Record r : rContainer.records) {
550                             if ((isObjectFitCriteria(r.data,
551                                     bpn.getBluePrintNodeName()) == 1)) {
552                                 Record rec = new Record();
553                                 rec.data.putAll(subRec.data);
554                                 rec.element = r.element;
555                                 addToData(rec, bpn, bluePrint, r.data);
556                             } else {
557                                 r.fitCriteria = false;
558                             }
559                         }
560                     }
561                     if (rContainer.records.isEmpty()) {
562                         Record rec = new Record();
563                         rec.data.putAll(subRec.data);
564                         rec.element = rContainer.currentObject;
565                         if (root) {
566                             if (!rec.data.isEmpty()) {
567                                 addRecord(rec.data);
568                             }
569                         } else {
570                             result.add(rec);
571                         }
572                     } else {
573                         for (Record r : rContainer.records) {
574                             r.data.putAll(subRec.data);
575                             if (r.fitCriteria) {
576                                 if (root) {
577                                     if (!r.data.isEmpty()) {
578                                         addRecord(r.data);
579                                     }
580                                 } else {
581                                     result.add(r);
582                                 }
583                             }
584                         }
585                     }
586                 }
587             }
588         }
589         return result;
590     }
591
592     @Override
593     public boolean isWrapperFor(Class<?> iface) throws SQLException {
594         // TODO Auto-generated method stub
595         return false;
596     }
597
598     @Override
599     public <T> T unwrap(Class<T> iface) throws SQLException {
600         // TODO Auto-generated method stub
601         return null;
602     }
603
604     @Override
605     public boolean absolute(int row) throws SQLException {
606         // TODO Auto-generated method stub
607         return false;
608     }
609
610     @Override
611     public void afterLast() throws SQLException {
612         // TODO Auto-generated method stub
613
614     }
615
616     @Override
617     public void beforeFirst() throws SQLException {
618         // TODO Auto-generated method stub
619
620     }
621
622     @Override
623     public void cancelRowUpdates() throws SQLException {
624         // TODO Auto-generated method stub
625
626     }
627
628     @Override
629     public void clearWarnings() throws SQLException {
630         // TODO Auto-generated method stub
631
632     }
633
634     @Override
635     public void close() throws SQLException {
636         // TODO Auto-generated method stub
637
638     }
639
640     @Override
641     public void deleteRow() throws SQLException {
642         // TODO Auto-generated method stub
643
644     }
645
646     @Override
647     public int findColumn(String columnLabel) throws SQLException {
648         // TODO Auto-generated method stub
649         return 0;
650     }
651
652     @Override
653     public boolean first() throws SQLException {
654         // TODO Auto-generated method stub
655         return false;
656     }
657
658     @Override
659     public Array getArray(int columnIndex) throws SQLException {
660         // TODO Auto-generated method stub
661         return null;
662     }
663
664     @Override
665     public Array getArray(String columnLabel) throws SQLException {
666         // TODO Auto-generated method stub
667         return null;
668     }
669
670     @Override
671     public InputStream getAsciiStream(int columnIndex) throws SQLException {
672         // TODO Auto-generated method stub
673         return null;
674     }
675
676     @Override
677     public InputStream getAsciiStream(String columnLabel) throws SQLException {
678         // TODO Auto-generated method stub
679         return null;
680     }
681
682     @Override
683     public BigDecimal getBigDecimal(int columnIndex, int scale)
684             throws SQLException {
685         // TODO Auto-generated method stub
686         return null;
687     }
688
689     @Override
690     public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
691         // TODO Auto-generated method stub
692         return null;
693     }
694
695     @Override
696     public BigDecimal getBigDecimal(String columnLabel, int scale)
697             throws SQLException {
698         // TODO Auto-generated method stub
699         return null;
700     }
701
702     @Override
703     public BigDecimal getBigDecimal(String columnLabel) throws SQLException {
704         // TODO Auto-generated method stub
705         return null;
706     }
707
708     @Override
709     public InputStream getBinaryStream(int columnIndex) throws SQLException {
710         // TODO Auto-generated method stub
711         return null;
712     }
713
714     @Override
715     public InputStream getBinaryStream(String columnLabel) throws SQLException {
716         // TODO Auto-generated method stub
717         return null;
718     }
719
720     @Override
721     public Blob getBlob(int columnIndex) throws SQLException {
722         // TODO Auto-generated method stub
723         return null;
724     }
725
726     @Override
727     public Blob getBlob(String columnLabel) throws SQLException {
728         // TODO Auto-generated method stub
729         return null;
730     }
731
732     @Override
733     public boolean getBoolean(int columnIndex) throws SQLException {
734         // TODO Auto-generated method stub
735         return false;
736     }
737
738     @Override
739     public boolean getBoolean(String columnLabel) throws SQLException {
740         // TODO Auto-generated method stub
741         return false;
742     }
743
744     @Override
745     public byte getByte(int columnIndex) throws SQLException {
746         // TODO Auto-generated method stub
747         return 0;
748     }
749
750     @Override
751     public byte getByte(String columnLabel) throws SQLException {
752         // TODO Auto-generated method stub
753         return 0;
754     }
755
756     @Override
757     public byte[] getBytes(int columnIndex) throws SQLException {
758         // TODO Auto-generated method stub
759         return null;
760     }
761
762     @Override
763     public byte[] getBytes(String columnLabel) throws SQLException {
764         // TODO Auto-generated method stub
765         return null;
766     }
767
768     @Override
769     public Reader getCharacterStream(int columnIndex) throws SQLException {
770         // TODO Auto-generated method stub
771         return null;
772     }
773
774     @Override
775     public Reader getCharacterStream(String columnLabel) throws SQLException {
776         // TODO Auto-generated method stub
777         return null;
778     }
779
780     @Override
781     public Clob getClob(int columnIndex) throws SQLException {
782         // TODO Auto-generated method stub
783         return null;
784     }
785
786     @Override
787     public Clob getClob(String columnLabel) throws SQLException {
788         // TODO Auto-generated method stub
789         return null;
790     }
791
792     @Override
793     public int getConcurrency() throws SQLException {
794         // TODO Auto-generated method stub
795         return 0;
796     }
797
798     @Override
799     public String getCursorName() throws SQLException {
800         // TODO Auto-generated method stub
801         return null;
802     }
803
804     @Override
805     public Date getDate(int columnIndex, Calendar cal) throws SQLException {
806         // TODO Auto-generated method stub
807         return null;
808     }
809
810     @Override
811     public Date getDate(int columnIndex) throws SQLException {
812         // TODO Auto-generated method stub
813         return null;
814     }
815
816     @Override
817     public Date getDate(String columnLabel, Calendar cal) throws SQLException {
818         // TODO Auto-generated method stub
819         return null;
820     }
821
822     @Override
823     public Date getDate(String columnLabel) throws SQLException {
824         // TODO Auto-generated method stub
825         return null;
826     }
827
828     @Override
829     public double getDouble(int columnIndex) throws SQLException {
830         // TODO Auto-generated method stub
831         return 0;
832     }
833
834     @Override
835     public double getDouble(String columnLabel) throws SQLException {
836         // TODO Auto-generated method stub
837         return 0;
838     }
839
840     @Override
841     public int getFetchDirection() throws SQLException {
842         // TODO Auto-generated method stub
843         return 0;
844     }
845
846     @Override
847     public int getFetchSize() throws SQLException {
848         // TODO Auto-generated method stub
849         return 0;
850     }
851
852     @Override
853     public float getFloat(int columnIndex) throws SQLException {
854         // TODO Auto-generated method stub
855         return 0;
856     }
857
858     @Override
859     public float getFloat(String columnLabel) throws SQLException {
860         // TODO Auto-generated method stub
861         return 0;
862     }
863
864     @Override
865     public int getHoldability() throws SQLException {
866         // TODO Auto-generated method stub
867         return 0;
868     }
869
870     @Override
871     public int getInt(int columnIndex) throws SQLException {
872         // TODO Auto-generated method stub
873         return 0;
874     }
875
876     @Override
877     public int getInt(String columnLabel) throws SQLException {
878         // TODO Auto-generated method stub
879         return 0;
880     }
881
882     @Override
883     public long getLong(int columnIndex) throws SQLException {
884         // TODO Auto-generated method stub
885         return 0;
886     }
887
888     @Override
889     public long getLong(String columnLabel) throws SQLException {
890         // TODO Auto-generated method stub
891         return 0;
892     }
893
894     @Override
895     public ResultSetMetaData getMetaData() throws SQLException {
896         return this;
897     }
898
899     @Override
900     public Reader getNCharacterStream(int columnIndex) throws SQLException {
901         // TODO Auto-generated method stub
902         return null;
903     }
904
905     @Override
906     public Reader getNCharacterStream(String columnLabel) throws SQLException {
907         // TODO Auto-generated method stub
908         return null;
909     }
910
911     @Override
912     public NClob getNClob(int columnIndex) throws SQLException {
913         // TODO Auto-generated method stub
914         return null;
915     }
916
917     @Override
918     public NClob getNClob(String columnLabel) throws SQLException {
919         // TODO Auto-generated method stub
920         return null;
921     }
922
923     @Override
924     public String getNString(int columnIndex) throws SQLException {
925         // TODO Auto-generated method stub
926         return null;
927     }
928
929     @Override
930     public String getNString(String columnLabel) throws SQLException {
931         // TODO Auto-generated method stub
932         return null;
933     }
934
935     @Override
936     public Object getObject(int columnIndex, Map<String, Class<?>> map)
937             throws SQLException {
938         return getObject(columnIndex);
939     }
940
941     @Override
942     public Object getObject(int columnIndex) throws SQLException {
943         return currentRecord.get(this.fieldsInQuery.get(columnIndex - 1)
944                 .toString());
945     }
946
947     @Override
948     public Object getObject(String columnLabel, Map<String, Class<?>> map)
949             throws SQLException {
950         return getObject(columnLabel);
951     }
952
953     @Override
954     public Object getObject(String columnLabel) throws SQLException {
955         return currentRecord.get(columnLabel);
956     }
957
958     @Override
959     public Ref getRef(int columnIndex) throws SQLException {
960         // TODO Auto-generated method stub
961         return null;
962     }
963
964     @Override
965     public Ref getRef(String columnLabel) throws SQLException {
966         // TODO Auto-generated method stub
967         return null;
968     }
969
970     @Override
971     public int getRow() throws SQLException {
972         // TODO Auto-generated method stub
973         return 0;
974     }
975
976     @Override
977     public RowId getRowId(int columnIndex) throws SQLException {
978         // TODO Auto-generated method stub
979         return null;
980     }
981
982     @Override
983     public RowId getRowId(String columnLabel) throws SQLException {
984         // TODO Auto-generated method stub
985         return null;
986     }
987
988     @Override
989     public SQLXML getSQLXML(int columnIndex) throws SQLException {
990         // TODO Auto-generated method stub
991         return null;
992     }
993
994     @Override
995     public SQLXML getSQLXML(String columnLabel) throws SQLException {
996         // TODO Auto-generated method stub
997         return null;
998     }
999
1000     @Override
1001     public short getShort(int columnIndex) throws SQLException {
1002         // TODO Auto-generated method stub
1003         return 0;
1004     }
1005
1006     @Override
1007     public short getShort(String columnLabel) throws SQLException {
1008         // TODO Auto-generated method stub
1009         return 0;
1010     }
1011
1012     @Override
1013     public Statement getStatement() throws SQLException {
1014         // TODO Auto-generated method stub
1015         return null;
1016     }
1017
1018     @Override
1019     public String getString(int columnIndex) throws SQLException {
1020         return "Kuku";
1021     }
1022
1023     @Override
1024     public String getString(String columnLabel) throws SQLException {
1025         return "Kuku";
1026     }
1027
1028     @Override
1029     public Time getTime(int columnIndex, Calendar cal) throws SQLException {
1030         // TODO Auto-generated method stub
1031         return null;
1032     }
1033
1034     @Override
1035     public Time getTime(int columnIndex) throws SQLException {
1036         // TODO Auto-generated method stub
1037         return null;
1038     }
1039
1040     @Override
1041     public Time getTime(String columnLabel, Calendar cal) throws SQLException {
1042         // TODO Auto-generated method stub
1043         return null;
1044     }
1045
1046     @Override
1047     public Time getTime(String columnLabel) throws SQLException {
1048         // TODO Auto-generated method stub
1049         return null;
1050     }
1051
1052     @Override
1053     public Timestamp getTimestamp(int columnIndex, Calendar cal)
1054             throws SQLException {
1055         // TODO Auto-generated method stub
1056         return null;
1057     }
1058
1059     @Override
1060     public Timestamp getTimestamp(int columnIndex) throws SQLException {
1061         // TODO Auto-generated method stub
1062         return null;
1063     }
1064
1065     @Override
1066     public Timestamp getTimestamp(String columnLabel, Calendar cal)
1067             throws SQLException {
1068         // TODO Auto-generated method stub
1069         return null;
1070     }
1071
1072     @Override
1073     public Timestamp getTimestamp(String columnLabel) throws SQLException {
1074         // TODO Auto-generated method stub
1075         return null;
1076     }
1077
1078     @Override
1079     public int getType() throws SQLException {
1080         return ResultSet.TYPE_FORWARD_ONLY;
1081     }
1082
1083     @Override
1084     public URL getURL(int columnIndex) throws SQLException {
1085         // TODO Auto-generated method stub
1086         return null;
1087     }
1088
1089     @Override
1090     public URL getURL(String columnLabel) throws SQLException {
1091         // TODO Auto-generated method stub
1092         return null;
1093     }
1094
1095     @Override
1096     public InputStream getUnicodeStream(int columnIndex) throws SQLException {
1097         // TODO Auto-generated method stub
1098         return null;
1099     }
1100
1101     @Override
1102     public InputStream getUnicodeStream(String columnLabel) throws SQLException {
1103         // TODO Auto-generated method stub
1104         return null;
1105     }
1106
1107     @Override
1108     public SQLWarning getWarnings() throws SQLException {
1109         // TODO Auto-generated method stub
1110         return null;
1111     }
1112
1113     @Override
1114     public void insertRow() throws SQLException {
1115         // TODO Auto-generated method stub
1116
1117     }
1118
1119     @Override
1120     public boolean isAfterLast() throws SQLException {
1121         // TODO Auto-generated method stub
1122         return false;
1123     }
1124
1125     @Override
1126     public boolean isBeforeFirst() throws SQLException {
1127         // TODO Auto-generated method stub
1128         return false;
1129     }
1130
1131     @Override
1132     public boolean isClosed() throws SQLException {
1133         // TODO Auto-generated method stub
1134         return false;
1135     }
1136
1137     @Override
1138     public boolean isFirst() throws SQLException {
1139         // TODO Auto-generated method stub
1140         return false;
1141     }
1142
1143     @Override
1144     public boolean isLast() throws SQLException {
1145         // TODO Auto-generated method stub
1146         return false;
1147     }
1148
1149     @Override
1150     public boolean last() throws SQLException {
1151         // TODO Auto-generated method stub
1152         return false;
1153     }
1154
1155     @Override
1156     public void moveToCurrentRow() throws SQLException {
1157         // TODO Auto-generated method stub
1158
1159     }
1160
1161     @Override
1162     public void moveToInsertRow() throws SQLException {
1163         // TODO Auto-generated method stub
1164
1165     }
1166
1167     @Override
1168     public boolean previous() throws SQLException {
1169         // TODO Auto-generated method stub
1170         return false;
1171     }
1172
1173     @Override
1174     public void refreshRow() throws SQLException {
1175         // TODO Auto-generated method stub
1176
1177     }
1178
1179     @Override
1180     public boolean relative(int rows) throws SQLException {
1181         // TODO Auto-generated method stub
1182         return false;
1183     }
1184
1185     @Override
1186     public boolean rowDeleted() throws SQLException {
1187         // TODO Auto-generated method stub
1188         return false;
1189     }
1190
1191     @Override
1192     public boolean rowInserted() throws SQLException {
1193         // TODO Auto-generated method stub
1194         return false;
1195     }
1196
1197     @Override
1198     public boolean rowUpdated() throws SQLException {
1199         // TODO Auto-generated method stub
1200         return false;
1201     }
1202
1203     @Override
1204     public void setFetchDirection(int direction) throws SQLException {
1205         // TODO Auto-generated method stub
1206
1207     }
1208
1209     @Override
1210     public void setFetchSize(int rows) throws SQLException {
1211         // TODO Auto-generated method stub
1212
1213     }
1214
1215     @Override
1216     public void updateArray(int columnIndex, Array x) throws SQLException {
1217         // TODO Auto-generated method stub
1218
1219     }
1220
1221     @Override
1222     public void updateArray(String columnLabel, Array x) throws SQLException {
1223         // TODO Auto-generated method stub
1224
1225     }
1226
1227     @Override
1228     public void updateAsciiStream(int columnIndex, InputStream x, int length)
1229             throws SQLException {
1230         // TODO Auto-generated method stub
1231
1232     }
1233
1234     @Override
1235     public void updateAsciiStream(int columnIndex, InputStream x, long length)
1236             throws SQLException {
1237         // TODO Auto-generated method stub
1238
1239     }
1240
1241     @Override
1242     public void updateAsciiStream(int columnIndex, InputStream x)
1243             throws SQLException {
1244         // TODO Auto-generated method stub
1245
1246     }
1247
1248     @Override
1249     public void updateAsciiStream(String columnLabel, InputStream x, int length)
1250             throws SQLException {
1251         // TODO Auto-generated method stub
1252
1253     }
1254
1255     @Override
1256     public void updateAsciiStream(String columnLabel, InputStream x, long length)
1257             throws SQLException {
1258         // TODO Auto-generated method stub
1259
1260     }
1261
1262     @Override
1263     public void updateAsciiStream(String columnLabel, InputStream x)
1264             throws SQLException {
1265         // TODO Auto-generated method stub
1266
1267     }
1268
1269     @Override
1270     public void updateBigDecimal(int columnIndex, BigDecimal x)
1271             throws SQLException {
1272         // TODO Auto-generated method stub
1273
1274     }
1275
1276     @Override
1277     public void updateBigDecimal(String columnLabel, BigDecimal x)
1278             throws SQLException {
1279         // TODO Auto-generated method stub
1280
1281     }
1282
1283     @Override
1284     public void updateBinaryStream(int columnIndex, InputStream x, int length)
1285             throws SQLException {
1286         // TODO Auto-generated method stub
1287
1288     }
1289
1290     @Override
1291     public void updateBinaryStream(int columnIndex, InputStream x, long length)
1292             throws SQLException {
1293         // TODO Auto-generated method stub
1294
1295     }
1296
1297     @Override
1298     public void updateBinaryStream(int columnIndex, InputStream x)
1299             throws SQLException {
1300         // TODO Auto-generated method stub
1301
1302     }
1303
1304     @Override
1305     public void updateBinaryStream(String columnLabel, InputStream x, int length)
1306             throws SQLException {
1307         // TODO Auto-generated method stub
1308
1309     }
1310
1311     @Override
1312     public void updateBinaryStream(String columnLabel, InputStream x,
1313             long length) throws SQLException {
1314         // TODO Auto-generated method stub
1315
1316     }
1317
1318     @Override
1319     public void updateBinaryStream(String columnLabel, InputStream x)
1320             throws SQLException {
1321         // TODO Auto-generated method stub
1322
1323     }
1324
1325     @Override
1326     public void updateBlob(int columnIndex, Blob x) throws SQLException {
1327         // TODO Auto-generated method stub
1328
1329     }
1330
1331     @Override
1332     public void updateBlob(int columnIndex, InputStream inputStream, long length)
1333             throws SQLException {
1334         // TODO Auto-generated method stub
1335
1336     }
1337
1338     @Override
1339     public void updateBlob(int columnIndex, InputStream inputStream)
1340             throws SQLException {
1341         // TODO Auto-generated method stub
1342
1343     }
1344
1345     @Override
1346     public void updateBlob(String columnLabel, Blob x) throws SQLException {
1347         // TODO Auto-generated method stub
1348
1349     }
1350
1351     @Override
1352     public void updateBlob(String columnLabel, InputStream inputStream,
1353             long length) throws SQLException {
1354         // TODO Auto-generated method stub
1355
1356     }
1357
1358     @Override
1359     public void updateBlob(String columnLabel, InputStream inputStream)
1360             throws SQLException {
1361         // TODO Auto-generated method stub
1362
1363     }
1364
1365     @Override
1366     public void updateBoolean(int columnIndex, boolean x) throws SQLException {
1367         // TODO Auto-generated method stub
1368
1369     }
1370
1371     @Override
1372     public void updateBoolean(String columnLabel, boolean x)
1373             throws SQLException {
1374         // TODO Auto-generated method stub
1375
1376     }
1377
1378     @Override
1379     public void updateByte(int columnIndex, byte x) throws SQLException {
1380         // TODO Auto-generated method stub
1381
1382     }
1383
1384     @Override
1385     public void updateByte(String columnLabel, byte x) throws SQLException {
1386         // TODO Auto-generated method stub
1387
1388     }
1389
1390     @Override
1391     public void updateBytes(int columnIndex, byte[] x) throws SQLException {
1392         // TODO Auto-generated method stub
1393
1394     }
1395
1396     @Override
1397     public void updateBytes(String columnLabel, byte[] x) throws SQLException {
1398         // TODO Auto-generated method stub
1399
1400     }
1401
1402     @Override
1403     public void updateCharacterStream(int columnIndex, Reader x, int length)
1404             throws SQLException {
1405         // TODO Auto-generated method stub
1406
1407     }
1408
1409     @Override
1410     public void updateCharacterStream(int columnIndex, Reader x, long length)
1411             throws SQLException {
1412         // TODO Auto-generated method stub
1413
1414     }
1415
1416     @Override
1417     public void updateCharacterStream(int columnIndex, Reader x)
1418             throws SQLException {
1419         // TODO Auto-generated method stub
1420
1421     }
1422
1423     @Override
1424     public void updateCharacterStream(String columnLabel, Reader reader,
1425             int length) throws SQLException {
1426         // TODO Auto-generated method stub
1427
1428     }
1429
1430     @Override
1431     public void updateCharacterStream(String columnLabel, Reader reader,
1432             long length) throws SQLException {
1433         // TODO Auto-generated method stub
1434
1435     }
1436
1437     @Override
1438     public void updateCharacterStream(String columnLabel, Reader reader)
1439             throws SQLException {
1440         // TODO Auto-generated method stub
1441
1442     }
1443
1444     @Override
1445     public void updateClob(int columnIndex, Clob x) throws SQLException {
1446         // TODO Auto-generated method stub
1447
1448     }
1449
1450     @Override
1451     public void updateClob(int columnIndex, Reader reader, long length)
1452             throws SQLException {
1453         // TODO Auto-generated method stub
1454
1455     }
1456
1457     @Override
1458     public void updateClob(int columnIndex, Reader reader) throws SQLException {
1459         // TODO Auto-generated method stub
1460
1461     }
1462
1463     @Override
1464     public void updateClob(String columnLabel, Clob x) throws SQLException {
1465         // TODO Auto-generated method stub
1466
1467     }
1468
1469     @Override
1470     public void updateClob(String columnLabel, Reader reader, long length)
1471             throws SQLException {
1472         // TODO Auto-generated method stub
1473
1474     }
1475
1476     @Override
1477     public void updateClob(String columnLabel, Reader reader)
1478             throws SQLException {
1479         // TODO Auto-generated method stub
1480
1481     }
1482
1483     @Override
1484     public void updateDate(int columnIndex, Date x) throws SQLException {
1485         // TODO Auto-generated method stub
1486
1487     }
1488
1489     @Override
1490     public void updateDate(String columnLabel, Date x) throws SQLException {
1491         // TODO Auto-generated method stub
1492
1493     }
1494
1495     @Override
1496     public void updateDouble(int columnIndex, double x) throws SQLException {
1497         // TODO Auto-generated method stub
1498
1499     }
1500
1501     @Override
1502     public void updateDouble(String columnLabel, double x) throws SQLException {
1503         // TODO Auto-generated method stub
1504
1505     }
1506
1507     @Override
1508     public void updateFloat(int columnIndex, float x) throws SQLException {
1509         // TODO Auto-generated method stub
1510
1511     }
1512
1513     @Override
1514     public void updateFloat(String columnLabel, float x) throws SQLException {
1515         // TODO Auto-generated method stub
1516
1517     }
1518
1519     @Override
1520     public void updateInt(int columnIndex, int x) throws SQLException {
1521         // TODO Auto-generated method stub
1522
1523     }
1524
1525     @Override
1526     public void updateInt(String columnLabel, int x) throws SQLException {
1527         // TODO Auto-generated method stub
1528
1529     }
1530
1531     @Override
1532     public void updateLong(int columnIndex, long x) throws SQLException {
1533         // TODO Auto-generated method stub
1534
1535     }
1536
1537     @Override
1538     public void updateLong(String columnLabel, long x) throws SQLException {
1539         // TODO Auto-generated method stub
1540
1541     }
1542
1543     @Override
1544     public void updateNCharacterStream(int columnIndex, Reader x, long length)
1545             throws SQLException {
1546         // TODO Auto-generated method stub
1547
1548     }
1549
1550     @Override
1551     public void updateNCharacterStream(int columnIndex, Reader x)
1552             throws SQLException {
1553         // TODO Auto-generated method stub
1554
1555     }
1556
1557     @Override
1558     public void updateNCharacterStream(String columnLabel, Reader reader,
1559             long length) throws SQLException {
1560         // TODO Auto-generated method stub
1561
1562     }
1563
1564     @Override
1565     public void updateNCharacterStream(String columnLabel, Reader reader)
1566             throws SQLException {
1567         // TODO Auto-generated method stub
1568
1569     }
1570
1571     @Override
1572     public void updateNClob(int columnIndex, NClob nClob) throws SQLException {
1573         // TODO Auto-generated method stub
1574
1575     }
1576
1577     @Override
1578     public void updateNClob(int columnIndex, Reader reader, long length)
1579             throws SQLException {
1580         // TODO Auto-generated method stub
1581
1582     }
1583
1584     @Override
1585     public void updateNClob(int columnIndex, Reader reader) throws SQLException {
1586         // TODO Auto-generated method stub
1587
1588     }
1589
1590     @Override
1591     public void updateNClob(String columnLabel, NClob nClob)
1592             throws SQLException {
1593         // TODO Auto-generated method stub
1594
1595     }
1596
1597     @Override
1598     public void updateNClob(String columnLabel, Reader reader, long length)
1599             throws SQLException {
1600         // TODO Auto-generated method stub
1601
1602     }
1603
1604     @Override
1605     public void updateNClob(String columnLabel, Reader reader)
1606             throws SQLException {
1607         // TODO Auto-generated method stub
1608
1609     }
1610
1611     @Override
1612     public void updateNString(int columnIndex, String nString)
1613             throws SQLException {
1614         // TODO Auto-generated method stub
1615
1616     }
1617
1618     @Override
1619     public void updateNString(String columnLabel, String nString)
1620             throws SQLException {
1621         // TODO Auto-generated method stub
1622
1623     }
1624
1625     @Override
1626     public void updateNull(int columnIndex) throws SQLException {
1627         // TODO Auto-generated method stub
1628
1629     }
1630
1631     @Override
1632     public void updateNull(String columnLabel) throws SQLException {
1633         // TODO Auto-generated method stub
1634
1635     }
1636
1637     @Override
1638     public void updateObject(int columnIndex, Object x, int scaleOrLength)
1639             throws SQLException {
1640         // TODO Auto-generated method stub
1641
1642     }
1643
1644     @Override
1645     public void updateObject(int columnIndex, Object x) throws SQLException {
1646         // TODO Auto-generated method stub
1647
1648     }
1649
1650     @Override
1651     public void updateObject(String columnLabel, Object x, int scaleOrLength)
1652             throws SQLException {
1653         // TODO Auto-generated method stub
1654
1655     }
1656
1657     @Override
1658     public void updateObject(String columnLabel, Object x) throws SQLException {
1659         // TODO Auto-generated method stub
1660
1661     }
1662
1663     @Override
1664     public void updateRef(int columnIndex, Ref x) throws SQLException {
1665         // TODO Auto-generated method stub
1666
1667     }
1668
1669     @Override
1670     public void updateRef(String columnLabel, Ref x) throws SQLException {
1671         // TODO Auto-generated method stub
1672
1673     }
1674
1675     @Override
1676     public void updateRow() throws SQLException {
1677         // TODO Auto-generated method stub
1678
1679     }
1680
1681     @Override
1682     public void updateRowId(int columnIndex, RowId x) throws SQLException {
1683         // TODO Auto-generated method stub
1684
1685     }
1686
1687     @Override
1688     public void updateRowId(String columnLabel, RowId x) throws SQLException {
1689         // TODO Auto-generated method stub
1690
1691     }
1692
1693     @Override
1694     public void updateSQLXML(int columnIndex, SQLXML xmlObject)
1695             throws SQLException {
1696         // TODO Auto-generated method stub
1697
1698     }
1699
1700     @Override
1701     public void updateSQLXML(String columnLabel, SQLXML xmlObject)
1702             throws SQLException {
1703         // TODO Auto-generated method stub
1704
1705     }
1706
1707     @Override
1708     public void updateShort(int columnIndex, short x) throws SQLException {
1709         // TODO Auto-generated method stub
1710
1711     }
1712
1713     @Override
1714     public void updateShort(String columnLabel, short x) throws SQLException {
1715         // TODO Auto-generated method stub
1716
1717     }
1718
1719     @Override
1720     public void updateString(int columnIndex, String x) throws SQLException {
1721         // TODO Auto-generated method stub
1722
1723     }
1724
1725     @Override
1726     public void updateString(String columnLabel, String x) throws SQLException {
1727         // TODO Auto-generated method stub
1728
1729     }
1730
1731     @Override
1732     public void updateTime(int columnIndex, Time x) throws SQLException {
1733         // TODO Auto-generated method stub
1734
1735     }
1736
1737     @Override
1738     public void updateTime(String columnLabel, Time x) throws SQLException {
1739         // TODO Auto-generated method stub
1740
1741     }
1742
1743     @Override
1744     public void updateTimestamp(int columnIndex, Timestamp x)
1745             throws SQLException {
1746         // TODO Auto-generated method stub
1747
1748     }
1749
1750     @Override
1751     public void updateTimestamp(String columnLabel, Timestamp x)
1752             throws SQLException {
1753         // TODO Auto-generated method stub
1754
1755     }
1756
1757     @Override
1758     public boolean wasNull() throws SQLException {
1759         // TODO Auto-generated method stub
1760         return false;
1761     }
1762
1763     @Override
1764     public String getCatalogName(int column) throws SQLException {
1765         // TODO Auto-generated method stub
1766         return null;
1767     }
1768
1769     @Override
1770     public String getColumnClassName(int column) throws SQLException {
1771         // TODO Auto-generated method stub
1772         return null;
1773     }
1774
1775     @Override
1776     public int getColumnCount() throws SQLException {
1777         return fieldsInQuery.size();
1778     }
1779
1780     @Override
1781     public int getColumnDisplaySize(int column) throws SQLException {
1782         // TODO Auto-generated method stub
1783         return 0;
1784     }
1785
1786     @Override
1787     public String getColumnLabel(int column) throws SQLException {
1788         return this.fieldsInQuery.get(column - 1).toString();
1789     }
1790
1791     @Override
1792     public String getColumnName(int column) throws SQLException {
1793         // TODO Auto-generated method stub
1794         return null;
1795     }
1796
1797     @Override
1798     public int getColumnType(int column) throws SQLException {
1799         return 12;
1800     }
1801
1802     @Override
1803     public String getColumnTypeName(int column) throws SQLException {
1804         // TODO Auto-generated method stub
1805         return null;
1806     }
1807
1808     @Override
1809     public int getPrecision(int column) throws SQLException {
1810         // TODO Auto-generated method stub
1811         return 0;
1812     }
1813
1814     @Override
1815     public int getScale(int column) throws SQLException {
1816         // TODO Auto-generated method stub
1817         return 0;
1818     }
1819
1820     @Override
1821     public String getSchemaName(int column) throws SQLException {
1822         // TODO Auto-generated method stub
1823         return null;
1824     }
1825
1826     @Override
1827     public String getTableName(int column) throws SQLException {
1828         // TODO Auto-generated method stub
1829         return null;
1830     }
1831
1832     @Override
1833     public boolean isAutoIncrement(int column) throws SQLException {
1834         // TODO Auto-generated method stub
1835         return false;
1836     }
1837
1838     @Override
1839     public boolean isCaseSensitive(int column) throws SQLException {
1840         // TODO Auto-generated method stub
1841         return false;
1842     }
1843
1844     @Override
1845     public boolean isCurrency(int column) throws SQLException {
1846         // TODO Auto-generated method stub
1847         return false;
1848     }
1849
1850     @Override
1851     public boolean isDefinitelyWritable(int column) throws SQLException {
1852         // TODO Auto-generated method stub
1853         return false;
1854     }
1855
1856     @Override
1857     public int isNullable(int column) throws SQLException {
1858         // TODO Auto-generated method stub
1859         return 0;
1860     }
1861
1862     @Override
1863     public boolean isReadOnly(int column) throws SQLException {
1864         // TODO Auto-generated method stub
1865         return false;
1866     }
1867
1868     @Override
1869     public boolean isSearchable(int column) throws SQLException {
1870         // TODO Auto-generated method stub
1871         return false;
1872     }
1873
1874     @Override
1875     public boolean isSigned(int column) throws SQLException {
1876         // TODO Auto-generated method stub
1877         return false;
1878     }
1879
1880     @Override
1881     public boolean isWritable(int column) throws SQLException {
1882         // TODO Auto-generated method stub
1883         return false;
1884     }
1885
1886     @Override
1887     public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
1888         // TODO Auto-generated method stub
1889         return null;
1890     }
1891
1892     @Override
1893     public <T> T getObject(String columnLabel, Class<T> type)
1894             throws SQLException {
1895         // TODO Auto-generated method stub
1896         return null;
1897     }
1898
1899     // //Metadata
1900
1901 }