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