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