BUG-5222: offload XSQLBluePrint creation to first access
[controller.git] / opendaylight / md-sal / sal-dom-xsql / src / main / java / org / opendaylight / controller / md / sal / dom / xsql / XSQLBluePrint.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.controller.md.sal.dom.xsql;
9
10 import java.io.DataInputStream;
11 import java.io.DataOutputStream;
12 import java.io.FileOutputStream;
13 import java.io.InputStream;
14 import java.io.ObjectInputStream;
15 import java.io.ObjectOutputStream;
16 import java.io.Serializable;
17 import java.lang.reflect.InvocationHandler;
18 import java.lang.reflect.Method;
19 import java.lang.reflect.ParameterizedType;
20 import java.lang.reflect.Proxy;
21 import java.lang.reflect.Type;
22 import java.sql.Connection;
23 import java.sql.DatabaseMetaData;
24 import java.sql.ResultSet;
25 import java.sql.RowIdLifetime;
26 import java.sql.SQLException;
27 import java.util.ArrayList;
28 import java.util.HashMap;
29 import java.util.HashSet;
30 import java.util.List;
31 import java.util.Map;
32 import java.util.Set;
33 import org.opendaylight.yangtools.yang.model.api.Module;
34 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
35 /**
36  * @author Sharon Aicler(saichler@gmail.com)
37  **/
38 public class XSQLBluePrint implements DatabaseMetaData, Serializable {
39
40     private static final long serialVersionUID = 1L;
41
42     public static final String CACHE_FILE_NAME = "./BluePrintCache.dat";
43
44     private final Map<String, XSQLBluePrintNode> tableNameToBluePrint = new HashMap<>();
45     private final Map<String, Map<String, XSQLBluePrintNode>> odlNameToBluePrint = new HashMap<>();
46
47     private final boolean cacheLoadedSuccessfuly = false;
48     private DatabaseMetaData myProxy = null;
49
50     public static final String replaceAll(final String source, final String toReplace,
51             final String withThis) {
52         int index = source.indexOf(toReplace);
53         int index2 = 0;
54         StringBuffer result = new StringBuffer();
55         while (index != -1) {
56             result.append(source.substring(index2, index));
57             result.append(withThis);
58             index2 = index + toReplace.length();
59             index = source.indexOf(toReplace, index2);
60         }
61         if (index2 < source.length()) {
62             result.append(source.substring(index2));
63         }
64         return result.toString();
65     }
66
67     XSQLBluePrint() {
68
69     }
70
71     public void save() {
72         ObjectOutputStream out = null;
73         try {
74             out = new ObjectOutputStream(new DataOutputStream(
75                     new FileOutputStream(CACHE_FILE_NAME)));
76             out.writeObject(this);
77         } catch (Exception err) {
78             err.printStackTrace();
79         } finally {
80             try {
81                 out.close();
82             } catch (Exception err) {
83             }
84         }
85     }
86
87     static XSQLBluePrint create(final SchemaContext context) {
88         final XSQLBluePrint ret = new XSQLBluePrint();
89         for (Module m : context.getModules()) {
90             XSQLODLUtils.createOpenDaylightCache(ret, m);
91         }
92
93         return ret;
94     }
95
96     public static XSQLBluePrint load(final InputStream ins) {
97         ObjectInputStream in = null;
98         try {
99             in = new ObjectInputStream(new DataInputStream(ins));
100             return (XSQLBluePrint) in.readObject();
101         } catch (Exception err) {
102             err.printStackTrace();
103         } finally {
104             try {
105                 in.close();
106             } catch (Exception err) {
107             }
108         }
109         return null;
110     }
111
112     private class NQLBluePrintProxy implements InvocationHandler {
113         @Override
114         public Object invoke(final Object proxy, final Method method, final Object[] args)
115                 throws Throwable {
116             System.out.println("Method " + method);
117             return method.invoke(XSQLBluePrint.this, args);
118         }
119     }
120
121     public DatabaseMetaData getProxy() {
122         if (myProxy == null) {
123             try {
124                 myProxy = (DatabaseMetaData) Proxy.newProxyInstance(getClass()
125                         .getClassLoader(),
126                         new Class[] { DatabaseMetaData.class },
127                         new NQLBluePrintProxy());
128             } catch (Exception err) {
129                 err.printStackTrace();
130             }
131         }
132         return myProxy;
133     }
134
135     public XSQLBluePrintNode[] getBluePrintNodeByODLTableName(
136             final String odlTableName) {
137         Map<String, XSQLBluePrintNode> map = this.odlNameToBluePrint
138                 .get(odlTableName);
139         if (map == null) {
140             return null;
141         }
142         return map.values().toArray(new XSQLBluePrintNode[map.size()]);
143     }
144
145     public XSQLBluePrintNode getBluePrintNodeByTableName(String tableName) {
146         if (tableName.indexOf(".") != -1) {
147             tableName = tableName.substring(tableName.lastIndexOf(".") + 1);
148         }
149
150         XSQLBluePrintNode node = tableNameToBluePrint.get(tableName);
151
152         if (node != null) {
153             return node;
154         }
155
156         for (XSQLBluePrintNode n : tableNameToBluePrint.values()) {
157             if (n.getBluePrintNodeName().endsWith(tableName)) {
158                 return n;
159             }
160         }
161
162         for (XSQLBluePrintNode n : tableNameToBluePrint.values()) {
163             if (n.getBluePrintNodeName().toLowerCase()
164                     .endsWith(tableName.toLowerCase())) {
165                 return n;
166             }
167         }
168
169         for (XSQLBluePrintNode n : tableNameToBluePrint.values()) {
170             if (n.getBluePrintNodeName().toLowerCase()
171                     .equals(tableName.toLowerCase())) {
172                 return n;
173             }
174         }
175
176         for (XSQLBluePrintNode n : tableNameToBluePrint.values()) {
177             if (n.getBluePrintNodeName().toLowerCase()
178                     .indexOf(tableName.toLowerCase()) != -1) {
179                 return n;
180             }
181         }
182         return null;
183     }
184
185     public boolean isCacheLoaded() {
186         return cacheLoadedSuccessfuly;
187     }
188
189     private static Map<Class<?>, Set<Class<?>>> superClassMap = new HashMap<>();
190
191     public static Set<Class<?>> getInheritance(final Class<?> myObjectClass,
192             final Class<?> returnType) {
193
194         if (returnType != null && myObjectClass.equals(returnType)) {
195             return new HashSet<>();
196         }
197         Set<Class<?>> result = superClassMap.get(myObjectClass);
198         if (result != null) {
199             return result;
200         }
201         result = new HashSet<>();
202         superClassMap.put(myObjectClass, result);
203         if (returnType != null) {
204             if (!returnType.equals(myObjectClass)) {
205                 Class<?> mySuperClass = myObjectClass.getSuperclass();
206                 while (mySuperClass != null) {
207                     result.add(mySuperClass);
208                     mySuperClass = mySuperClass.getSuperclass();
209                 }
210                 result.addAll(collectInterfaces(myObjectClass));
211             }
212         }
213         return result;
214     }
215
216     public static Set<Class<?>> collectInterfaces(final Class<?> cls) {
217         Set<Class<?>> result = new HashSet<>();
218         Class<?> myInterfaces[] = cls.getInterfaces();
219         if (myInterfaces != null) {
220             for (Class<?> in : myInterfaces) {
221                 result.add(in);
222                 result.addAll(collectInterfaces(in));
223             }
224         }
225         return result;
226     }
227
228     public XSQLBluePrintNode addToBluePrintCache(final XSQLBluePrintNode blNode,final XSQLBluePrintNode parent) {
229         XSQLBluePrintNode existingNode = this.tableNameToBluePrint.get(blNode.getBluePrintNodeName());
230         if(existingNode!=null){
231             existingNode.mergeAugmentation(blNode);
232             return existingNode;
233         }else{
234             this.tableNameToBluePrint.put(blNode.getBluePrintNodeName(), blNode);
235             Map<String, XSQLBluePrintNode> map = this.odlNameToBluePrint.get(blNode.getODLTableName());
236             if (map == null) {
237                 map = new HashMap<String, XSQLBluePrintNode>();
238                 this.odlNameToBluePrint.put(blNode.getODLTableName(), map);
239             }
240             map.put(blNode.getBluePrintNodeName(), blNode);
241             if(parent!=null) {
242                 parent.addChild(blNode);
243             }
244             return blNode;
245         }
246     }
247
248     public Class<?> getGenericType(final ParameterizedType type) {
249         Type[] typeArguments = type.getActualTypeArguments();
250         for (Type typeArgument : typeArguments) {
251             if (typeArgument instanceof ParameterizedType) {
252                 ParameterizedType pType = (ParameterizedType) typeArgument;
253                 return (Class<?>) pType.getRawType();
254             } else if (typeArgument instanceof Class) {
255                 return (Class<?>) typeArgument;
256             }
257         }
258         return null;
259     }
260
261     public Class<?> getMethodReturnTypeFromGeneric(final Method m) {
262         Type rType = m.getGenericReturnType();
263         if (rType instanceof ParameterizedType) {
264             return getGenericType((ParameterizedType) rType);
265         }
266         return null;
267     }
268
269     public List<String> getAllTableNames() {
270         List<String> names = new ArrayList<String>();
271         for (XSQLBluePrintNode n : this.tableNameToBluePrint.values()) {
272             if (!n.isModule() && !n.getColumns().isEmpty()) {
273                 names.add(n.getBluePrintNodeName());
274             }
275         }
276         return names;
277
278     }
279
280     public List<String> getInterfaceNames(final XSQLBluePrintNode node) {
281         Set<XSQLBluePrintNode> children = node.getChildren();
282         List<String> names = new ArrayList<String>();
283         for (XSQLBluePrintNode n : children) {
284             if (!n.isModule() && !n.getColumns().isEmpty()) {
285                 names.add(n.toString());
286             }
287             names.addAll(getInterfaceNames(n));
288         }
289         return names;
290     }
291
292     @Override
293     public boolean allProceduresAreCallable() throws SQLException {
294         return false;
295     }
296
297     @Override
298     public boolean allTablesAreSelectable() throws SQLException {
299         return true;
300     }
301
302     @Override
303     public boolean autoCommitFailureClosesAllResultSets() throws SQLException {
304         // TODO Auto-generated method stub
305         return false;
306     }
307
308     @Override
309     public boolean dataDefinitionCausesTransactionCommit() throws SQLException {
310         // TODO Auto-generated method stub
311         return false;
312     }
313
314     @Override
315     public boolean dataDefinitionIgnoredInTransactions() throws SQLException {
316         // TODO Auto-generated method stub
317         return false;
318     }
319
320     @Override
321     public boolean deletesAreDetected(final int type) throws SQLException {
322         // TODO Auto-generated method stub
323         return false;
324     }
325
326     @Override
327     public boolean doesMaxRowSizeIncludeBlobs() throws SQLException {
328         // TODO Auto-generated method stub
329         return false;
330     }
331
332     @Override
333     public ResultSet getAttributes(final String catalog, final String schemaPattern,
334             final String typeNamePattern, final String attributeNamePattern)
335             throws SQLException {
336         // TODO Auto-generated method stub
337         return null;
338     }
339
340     @Override
341     public ResultSet getBestRowIdentifier(final String catalog, final String schema,
342             final String table, final int scope, final boolean nullable) throws SQLException {
343         // TODO Auto-generated method stub
344         return null;
345     }
346
347     @Override
348     public ResultSet getCatalogs() throws SQLException {
349         // TODO Auto-generated method stub
350         return null;
351     }
352
353     @Override
354     public String getCatalogSeparator() throws SQLException {
355         // TODO Auto-generated method stub
356         return null;
357     }
358
359     @Override
360     public String getCatalogTerm() throws SQLException {
361         // TODO Auto-generated method stub
362         return null;
363     }
364
365     @Override
366     public ResultSet getClientInfoProperties() throws SQLException {
367         // TODO Auto-generated method stub
368         return null;
369     }
370
371     @Override
372     public ResultSet getColumnPrivileges(final String catalog, final String schema,
373             final String table, final String columnNamePattern) throws SQLException {
374         // TODO Auto-generated method stub
375         return null;
376     }
377
378     @Override
379     public ResultSet getColumns(final String catalog, final String schemaPattern,
380             final String tableNamePattern, final String columnNamePattern)
381             throws SQLException {
382         // TODO Auto-generated method stub
383         return null;
384     }
385
386     @Override
387     public Connection getConnection() throws SQLException {
388         // TODO Auto-generated method stub
389         return null;
390     }
391
392     @Override
393     public ResultSet getCrossReference(final String parentCatalog,
394             final String parentSchema, final String parentTable, final String foreignCatalog,
395             final String foreignSchema, final String foreignTable) throws SQLException {
396         // TODO Auto-generated method stub
397         return null;
398     }
399
400     @Override
401     public int getDatabaseMajorVersion() throws SQLException {
402         return 0;
403     }
404
405     @Override
406     public int getDatabaseMinorVersion() throws SQLException {
407         // TODO Auto-generated method stub
408         return 1;
409     }
410
411     @Override
412     public String getDatabaseProductName() throws SQLException {
413         return "OpenDayLight";
414     }
415
416     @Override
417     public String getDatabaseProductVersion() throws SQLException {
418         return "0.1";
419     }
420
421     @Override
422     public int getDefaultTransactionIsolation() throws SQLException {
423         // TODO Auto-generated method stub
424         return 0;
425     }
426
427     @Override
428     public int getDriverMajorVersion() {
429         // TODO Auto-generated method stub
430         return 0;
431     }
432
433     @Override
434     public int getDriverMinorVersion() {
435         // TODO Auto-generated method stub
436         return 0;
437     }
438
439     @Override
440     public String getDriverName() throws SQLException {
441         // TODO Auto-generated method stub
442         return null;
443     }
444
445     @Override
446     public String getDriverVersion() throws SQLException {
447         // TODO Auto-generated method stub
448         return null;
449     }
450
451     @Override
452     public ResultSet getExportedKeys(final String catalog, final String schema, final String table)
453             throws SQLException {
454         // TODO Auto-generated method stub
455         return null;
456     }
457
458     @Override
459     public String getExtraNameCharacters() throws SQLException {
460         // TODO Auto-generated method stub
461         return null;
462     }
463
464     @Override
465     public ResultSet getFunctionColumns(final String catalog, final String schemaPattern,
466             final String functionNamePattern, final String columnNamePattern)
467             throws SQLException {
468         // TODO Auto-generated method stub
469         return null;
470     }
471
472     @Override
473     public ResultSet getFunctions(final String catalog, final String schemaPattern,
474             final String functionNamePattern) throws SQLException {
475         // TODO Auto-generated method stub
476         return null;
477     }
478
479     @Override
480     public String getIdentifierQuoteString() throws SQLException {
481         // TODO Auto-generated method stub
482         return null;
483     }
484
485     @Override
486     public ResultSet getImportedKeys(final String catalog, final String schema, final String table)
487             throws SQLException {
488         // TODO Auto-generated method stub
489         return null;
490     }
491
492     @Override
493     public ResultSet getIndexInfo(final String catalog, final String schema, final String table,
494             final boolean unique, final boolean approximate) throws SQLException {
495         // TODO Auto-generated method stub
496         return null;
497     }
498
499     @Override
500     public int getJDBCMajorVersion() throws SQLException {
501         // TODO Auto-generated method stub
502         return 0;
503     }
504
505     @Override
506     public int getJDBCMinorVersion() throws SQLException {
507         // TODO Auto-generated method stub
508         return 0;
509     }
510
511     @Override
512     public int getMaxBinaryLiteralLength() throws SQLException {
513         // TODO Auto-generated method stub
514         return 0;
515     }
516
517     @Override
518     public int getMaxCatalogNameLength() throws SQLException {
519         // TODO Auto-generated method stub
520         return 0;
521     }
522
523     @Override
524     public int getMaxCharLiteralLength() throws SQLException {
525         // TODO Auto-generated method stub
526         return 0;
527     }
528
529     @Override
530     public int getMaxColumnNameLength() throws SQLException {
531         // TODO Auto-generated method stub
532         return 0;
533     }
534
535     @Override
536     public int getMaxColumnsInGroupBy() throws SQLException {
537         // TODO Auto-generated method stub
538         return 0;
539     }
540
541     @Override
542     public int getMaxColumnsInIndex() throws SQLException {
543         // TODO Auto-generated method stub
544         return 0;
545     }
546
547     @Override
548     public int getMaxColumnsInOrderBy() throws SQLException {
549         // TODO Auto-generated method stub
550         return 0;
551     }
552
553     @Override
554     public int getMaxColumnsInSelect() throws SQLException {
555         // TODO Auto-generated method stub
556         return 0;
557     }
558
559     @Override
560     public int getMaxColumnsInTable() throws SQLException {
561         // TODO Auto-generated method stub
562         return 0;
563     }
564
565     @Override
566     public int getMaxConnections() throws SQLException {
567         // TODO Auto-generated method stub
568         return 0;
569     }
570
571     @Override
572     public int getMaxCursorNameLength() throws SQLException {
573         // TODO Auto-generated method stub
574         return 0;
575     }
576
577     @Override
578     public int getMaxIndexLength() throws SQLException {
579         // TODO Auto-generated method stub
580         return 0;
581     }
582
583     @Override
584     public int getMaxProcedureNameLength() throws SQLException {
585         // TODO Auto-generated method stub
586         return 0;
587     }
588
589     @Override
590     public int getMaxRowSize() throws SQLException {
591         // TODO Auto-generated method stub
592         return 0;
593     }
594
595     @Override
596     public int getMaxSchemaNameLength() throws SQLException {
597         // TODO Auto-generated method stub
598         return 0;
599     }
600
601     @Override
602     public int getMaxStatementLength() throws SQLException {
603         // TODO Auto-generated method stub
604         return 0;
605     }
606
607     @Override
608     public int getMaxStatements() throws SQLException {
609         // TODO Auto-generated method stub
610         return 0;
611     }
612
613     @Override
614     public int getMaxTableNameLength() throws SQLException {
615         // TODO Auto-generated method stub
616         return 0;
617     }
618
619     @Override
620     public int getMaxTablesInSelect() throws SQLException {
621         // TODO Auto-generated method stub
622         return 0;
623     }
624
625     @Override
626     public int getMaxUserNameLength() throws SQLException {
627         // TODO Auto-generated method stub
628         return 0;
629     }
630
631     @Override
632     public String getNumericFunctions() throws SQLException {
633         // TODO Auto-generated method stub
634         return null;
635     }
636
637     @Override
638     public ResultSet getPrimaryKeys(final String catalog, final String schema, final String table)
639             throws SQLException {
640         // TODO Auto-generated method stub
641         return null;
642     }
643
644     @Override
645     public ResultSet getProcedureColumns(final String catalog, final String schemaPattern,
646             final String procedureNamePattern, final String columnNamePattern)
647             throws SQLException {
648         // TODO Auto-generated method stub
649         return null;
650     }
651
652     @Override
653     public ResultSet getProcedures(final String catalog, final String schemaPattern,
654             final String procedureNamePattern) throws SQLException {
655         // TODO Auto-generated method stub
656         return null;
657     }
658
659     @Override
660     public String getProcedureTerm() throws SQLException {
661         // TODO Auto-generated method stub
662         return null;
663     }
664
665     @Override
666     public int getResultSetHoldability() throws SQLException {
667         // TODO Auto-generated method stub
668         return 0;
669     }
670
671     @Override
672     public RowIdLifetime getRowIdLifetime() throws SQLException {
673         // TODO Auto-generated method stub
674         return null;
675     }
676
677     @Override
678     public ResultSet getSchemas() throws SQLException {
679         // TODO Auto-generated method stub
680         return null;
681     }
682
683     @Override
684     public ResultSet getSchemas(final String catalog, final String schemaPattern)
685             throws SQLException {
686         // TODO Auto-generated method stub
687         return null;
688     }
689
690     @Override
691     public String getSchemaTerm() throws SQLException {
692         // TODO Auto-generated method stub
693         return null;
694     }
695
696     @Override
697     public String getSearchStringEscape() throws SQLException {
698         // TODO Auto-generated method stub
699         return null;
700     }
701
702     @Override
703     public String getSQLKeywords() throws SQLException {
704         // TODO Auto-generated method stub
705         return null;
706     }
707
708     @Override
709     public int getSQLStateType() throws SQLException {
710         // TODO Auto-generated method stub
711         return 0;
712     }
713
714     @Override
715     public String getStringFunctions() throws SQLException {
716         // TODO Auto-generated method stub
717         return null;
718     }
719
720     @Override
721     public ResultSet getSuperTables(final String catalog, final String schemaPattern,
722             final String tableNamePattern) throws SQLException {
723         // TODO Auto-generated method stub
724         return null;
725     }
726
727     @Override
728     public ResultSet getSuperTypes(final String catalog, final String schemaPattern,
729             final String typeNamePattern) throws SQLException {
730         // TODO Auto-generated method stub
731         return null;
732     }
733
734     @Override
735     public String getSystemFunctions() throws SQLException {
736         // TODO Auto-generated method stub
737         return null;
738     }
739
740     @Override
741     public ResultSet getTablePrivileges(final String catalog, final String schemaPattern,
742             final String tableNamePattern) throws SQLException {
743         // TODO Auto-generated method stub
744         return null;
745     }
746
747     @Override
748     public ResultSet getTables(final String catalog, final String schemaPattern,
749             final String tableNamePattern, final String[] types) throws SQLException {
750         return new TablesResultSet(this);
751     }
752
753     @Override
754     public ResultSet getTableTypes() throws SQLException {
755         // TODO Auto-generated method stub
756         return null;
757     }
758
759     @Override
760     public String getTimeDateFunctions() throws SQLException {
761         // TODO Auto-generated method stub
762         return null;
763     }
764
765     @Override
766     public ResultSet getTypeInfo() throws SQLException {
767         // TODO Auto-generated method stub
768         return null;
769     }
770
771     @Override
772     public ResultSet getUDTs(final String catalog, final String schemaPattern,
773             final String typeNamePattern, final int[] types) throws SQLException {
774         // TODO Auto-generated method stub
775         return null;
776     }
777
778     @Override
779     public String getURL() throws SQLException {
780         // TODO Auto-generated method stub
781         return null;
782     }
783
784     @Override
785     public String getUserName() throws SQLException {
786         // TODO Auto-generated method stub
787         return null;
788     }
789
790     @Override
791     public ResultSet getVersionColumns(final String catalog, final String schema,
792             final String table) throws SQLException {
793         // TODO Auto-generated method stub
794         return null;
795     }
796
797     @Override
798     public boolean insertsAreDetected(final int type) throws SQLException {
799         // TODO Auto-generated method stub
800         return false;
801     }
802
803     @Override
804     public boolean isCatalogAtStart() throws SQLException {
805         // TODO Auto-generated method stub
806         return false;
807     }
808
809     @Override
810     public boolean isReadOnly() throws SQLException {
811         // TODO Auto-generated method stub
812         return false;
813     }
814
815     @Override
816     public boolean locatorsUpdateCopy() throws SQLException {
817         // TODO Auto-generated method stub
818         return false;
819     }
820
821     @Override
822     public boolean nullPlusNonNullIsNull() throws SQLException {
823         // TODO Auto-generated method stub
824         return false;
825     }
826
827     @Override
828     public boolean nullsAreSortedAtEnd() throws SQLException {
829         // TODO Auto-generated method stub
830         return false;
831     }
832
833     @Override
834     public boolean nullsAreSortedAtStart() throws SQLException {
835         // TODO Auto-generated method stub
836         return false;
837     }
838
839     @Override
840     public boolean nullsAreSortedHigh() throws SQLException {
841         // TODO Auto-generated method stub
842         return false;
843     }
844
845     @Override
846     public boolean nullsAreSortedLow() throws SQLException {
847         // TODO Auto-generated method stub
848         return false;
849     }
850
851     @Override
852     public boolean othersDeletesAreVisible(final int type) throws SQLException {
853         // TODO Auto-generated method stub
854         return false;
855     }
856
857     @Override
858     public boolean othersInsertsAreVisible(final int type) throws SQLException {
859         // TODO Auto-generated method stub
860         return false;
861     }
862
863     @Override
864     public boolean othersUpdatesAreVisible(final int type) throws SQLException {
865         // TODO Auto-generated method stub
866         return false;
867     }
868
869     @Override
870     public boolean ownDeletesAreVisible(final int type) throws SQLException {
871         // TODO Auto-generated method stub
872         return false;
873     }
874
875     @Override
876     public boolean ownInsertsAreVisible(final int type) throws SQLException {
877         // TODO Auto-generated method stub
878         return false;
879     }
880
881     @Override
882     public boolean ownUpdatesAreVisible(final int type) throws SQLException {
883         // TODO Auto-generated method stub
884         return false;
885     }
886
887     @Override
888     public boolean storesLowerCaseIdentifiers() throws SQLException {
889         // TODO Auto-generated method stub
890         return false;
891     }
892
893     @Override
894     public boolean storesLowerCaseQuotedIdentifiers() throws SQLException {
895         // TODO Auto-generated method stub
896         return false;
897     }
898
899     @Override
900     public boolean storesMixedCaseIdentifiers() throws SQLException {
901         // TODO Auto-generated method stub
902         return false;
903     }
904
905     @Override
906     public boolean storesMixedCaseQuotedIdentifiers() throws SQLException {
907         // TODO Auto-generated method stub
908         return false;
909     }
910
911     @Override
912     public boolean storesUpperCaseIdentifiers() throws SQLException {
913         // TODO Auto-generated method stub
914         return false;
915     }
916
917     @Override
918     public boolean storesUpperCaseQuotedIdentifiers() throws SQLException {
919         // TODO Auto-generated method stub
920         return false;
921     }
922
923     @Override
924     public boolean supportsAlterTableWithAddColumn() throws SQLException {
925         // TODO Auto-generated method stub
926         return false;
927     }
928
929     @Override
930     public boolean supportsAlterTableWithDropColumn() throws SQLException {
931         // TODO Auto-generated method stub
932         return false;
933     }
934
935     @Override
936     public boolean supportsANSI92EntryLevelSQL() throws SQLException {
937         // TODO Auto-generated method stub
938         return false;
939     }
940
941     @Override
942     public boolean supportsANSI92FullSQL() throws SQLException {
943         // TODO Auto-generated method stub
944         return false;
945     }
946
947     @Override
948     public boolean supportsANSI92IntermediateSQL() throws SQLException {
949         // TODO Auto-generated method stub
950         return false;
951     }
952
953     @Override
954     public boolean supportsBatchUpdates() throws SQLException {
955         // TODO Auto-generated method stub
956         return false;
957     }
958
959     @Override
960     public boolean supportsCatalogsInDataManipulation() throws SQLException {
961         // TODO Auto-generated method stub
962         return false;
963     }
964
965     @Override
966     public boolean supportsCatalogsInIndexDefinitions() throws SQLException {
967         // TODO Auto-generated method stub
968         return false;
969     }
970
971     @Override
972     public boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException {
973         // TODO Auto-generated method stub
974         return false;
975     }
976
977     @Override
978     public boolean supportsCatalogsInProcedureCalls() throws SQLException {
979         // TODO Auto-generated method stub
980         return false;
981     }
982
983     @Override
984     public boolean supportsCatalogsInTableDefinitions() throws SQLException {
985         // TODO Auto-generated method stub
986         return false;
987     }
988
989     @Override
990     public boolean supportsColumnAliasing() throws SQLException {
991         // TODO Auto-generated method stub
992         return false;
993     }
994
995     @Override
996     public boolean supportsConvert() throws SQLException {
997         // TODO Auto-generated method stub
998         return false;
999     }
1000
1001     @Override
1002     public boolean supportsConvert(final int fromType, final int toType)
1003             throws SQLException {
1004         // TODO Auto-generated method stub
1005         return false;
1006     }
1007
1008     @Override
1009     public boolean supportsCoreSQLGrammar() throws SQLException {
1010         // TODO Auto-generated method stub
1011         return false;
1012     }
1013
1014     @Override
1015     public boolean supportsCorrelatedSubqueries() throws SQLException {
1016         // TODO Auto-generated method stub
1017         return false;
1018     }
1019
1020     @Override
1021     public boolean supportsDataDefinitionAndDataManipulationTransactions()
1022             throws SQLException {
1023         // TODO Auto-generated method stub
1024         return false;
1025     }
1026
1027     @Override
1028     public boolean supportsDataManipulationTransactionsOnly()
1029             throws SQLException {
1030         // TODO Auto-generated method stub
1031         return false;
1032     }
1033
1034     @Override
1035     public boolean supportsDifferentTableCorrelationNames() throws SQLException {
1036         // TODO Auto-generated method stub
1037         return false;
1038     }
1039
1040     @Override
1041     public boolean supportsExpressionsInOrderBy() throws SQLException {
1042         // TODO Auto-generated method stub
1043         return false;
1044     }
1045
1046     @Override
1047     public boolean supportsExtendedSQLGrammar() throws SQLException {
1048         // TODO Auto-generated method stub
1049         return false;
1050     }
1051
1052     @Override
1053     public boolean supportsFullOuterJoins() throws SQLException {
1054         // TODO Auto-generated method stub
1055         return false;
1056     }
1057
1058     @Override
1059     public boolean supportsGetGeneratedKeys() throws SQLException {
1060         // TODO Auto-generated method stub
1061         return false;
1062     }
1063
1064     @Override
1065     public boolean supportsGroupBy() throws SQLException {
1066         // TODO Auto-generated method stub
1067         return false;
1068     }
1069
1070     @Override
1071     public boolean supportsGroupByBeyondSelect() throws SQLException {
1072         // TODO Auto-generated method stub
1073         return false;
1074     }
1075
1076     @Override
1077     public boolean supportsGroupByUnrelated() throws SQLException {
1078         // TODO Auto-generated method stub
1079         return false;
1080     }
1081
1082     @Override
1083     public boolean supportsIntegrityEnhancementFacility() throws SQLException {
1084         // TODO Auto-generated method stub
1085         return false;
1086     }
1087
1088     @Override
1089     public boolean supportsLikeEscapeClause() throws SQLException {
1090         // TODO Auto-generated method stub
1091         return false;
1092     }
1093
1094     @Override
1095     public boolean supportsLimitedOuterJoins() throws SQLException {
1096         // TODO Auto-generated method stub
1097         return false;
1098     }
1099
1100     @Override
1101     public boolean supportsMinimumSQLGrammar() throws SQLException {
1102         // TODO Auto-generated method stub
1103         return false;
1104     }
1105
1106     @Override
1107     public boolean supportsMixedCaseIdentifiers() throws SQLException {
1108         // TODO Auto-generated method stub
1109         return false;
1110     }
1111
1112     @Override
1113     public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException {
1114         // TODO Auto-generated method stub
1115         return false;
1116     }
1117
1118     @Override
1119     public boolean supportsMultipleOpenResults() throws SQLException {
1120         // TODO Auto-generated method stub
1121         return false;
1122     }
1123
1124     @Override
1125     public boolean supportsMultipleResultSets() throws SQLException {
1126         // TODO Auto-generated method stub
1127         return false;
1128     }
1129
1130     @Override
1131     public boolean supportsMultipleTransactions() throws SQLException {
1132         // TODO Auto-generated method stub
1133         return false;
1134     }
1135
1136     @Override
1137     public boolean supportsNamedParameters() throws SQLException {
1138         // TODO Auto-generated method stub
1139         return false;
1140     }
1141
1142     @Override
1143     public boolean supportsNonNullableColumns() throws SQLException {
1144         // TODO Auto-generated method stub
1145         return false;
1146     }
1147
1148     @Override
1149     public boolean supportsOpenCursorsAcrossCommit() throws SQLException {
1150         // TODO Auto-generated method stub
1151         return false;
1152     }
1153
1154     @Override
1155     public boolean supportsOpenCursorsAcrossRollback() throws SQLException {
1156         // TODO Auto-generated method stub
1157         return false;
1158     }
1159
1160     @Override
1161     public boolean supportsOpenStatementsAcrossCommit() throws SQLException {
1162         // TODO Auto-generated method stub
1163         return false;
1164     }
1165
1166     @Override
1167     public boolean supportsOpenStatementsAcrossRollback() throws SQLException {
1168         // TODO Auto-generated method stub
1169         return false;
1170     }
1171
1172     @Override
1173     public boolean supportsOrderByUnrelated() throws SQLException {
1174         // TODO Auto-generated method stub
1175         return false;
1176     }
1177
1178     @Override
1179     public boolean supportsOuterJoins() throws SQLException {
1180         // TODO Auto-generated method stub
1181         return false;
1182     }
1183
1184     @Override
1185     public boolean supportsPositionedDelete() throws SQLException {
1186         // TODO Auto-generated method stub
1187         return false;
1188     }
1189
1190     @Override
1191     public boolean supportsPositionedUpdate() throws SQLException {
1192         // TODO Auto-generated method stub
1193         return false;
1194     }
1195
1196     @Override
1197     public boolean supportsResultSetConcurrency(final int type, final int concurrency)
1198             throws SQLException {
1199         // TODO Auto-generated method stub
1200         return false;
1201     }
1202
1203     @Override
1204     public boolean supportsResultSetHoldability(final int holdability)
1205             throws SQLException {
1206         // TODO Auto-generated method stub
1207         return false;
1208     }
1209
1210     @Override
1211     public boolean supportsResultSetType(final int type) throws SQLException {
1212         // TODO Auto-generated method stub
1213         return false;
1214     }
1215
1216     @Override
1217     public boolean supportsSavepoints() throws SQLException {
1218         // TODO Auto-generated method stub
1219         return false;
1220     }
1221
1222     @Override
1223     public boolean supportsSchemasInDataManipulation() throws SQLException {
1224         // TODO Auto-generated method stub
1225         return false;
1226     }
1227
1228     @Override
1229     public boolean supportsSchemasInIndexDefinitions() throws SQLException {
1230         // TODO Auto-generated method stub
1231         return false;
1232     }
1233
1234     @Override
1235     public boolean supportsSchemasInPrivilegeDefinitions() throws SQLException {
1236         // TODO Auto-generated method stub
1237         return false;
1238     }
1239
1240     @Override
1241     public boolean supportsSchemasInProcedureCalls() throws SQLException {
1242         // TODO Auto-generated method stub
1243         return false;
1244     }
1245
1246     @Override
1247     public boolean supportsSchemasInTableDefinitions() throws SQLException {
1248         // TODO Auto-generated method stub
1249         return false;
1250     }
1251
1252     @Override
1253     public boolean supportsSelectForUpdate() throws SQLException {
1254         // TODO Auto-generated method stub
1255         return false;
1256     }
1257
1258     @Override
1259     public boolean supportsStatementPooling() throws SQLException {
1260         // TODO Auto-generated method stub
1261         return false;
1262     }
1263
1264     @Override
1265     public boolean supportsStoredFunctionsUsingCallSyntax() throws SQLException {
1266         // TODO Auto-generated method stub
1267         return false;
1268     }
1269
1270     @Override
1271     public boolean supportsStoredProcedures() throws SQLException {
1272         // TODO Auto-generated method stub
1273         return false;
1274     }
1275
1276     @Override
1277     public boolean supportsSubqueriesInComparisons() throws SQLException {
1278         // TODO Auto-generated method stub
1279         return false;
1280     }
1281
1282     @Override
1283     public boolean supportsSubqueriesInExists() throws SQLException {
1284         // TODO Auto-generated method stub
1285         return false;
1286     }
1287
1288     @Override
1289     public boolean supportsSubqueriesInIns() throws SQLException {
1290         // TODO Auto-generated method stub
1291         return false;
1292     }
1293
1294     @Override
1295     public boolean supportsSubqueriesInQuantifieds() throws SQLException {
1296         // TODO Auto-generated method stub
1297         return false;
1298     }
1299
1300     @Override
1301     public boolean supportsTableCorrelationNames() throws SQLException {
1302         // TODO Auto-generated method stub
1303         return false;
1304     }
1305
1306     @Override
1307     public boolean supportsTransactionIsolationLevel(final int level)
1308             throws SQLException {
1309         // TODO Auto-generated method stub
1310         return false;
1311     }
1312
1313     @Override
1314     public boolean supportsTransactions() throws SQLException {
1315         // TODO Auto-generated method stub
1316         return false;
1317     }
1318
1319     @Override
1320     public boolean supportsUnion() throws SQLException {
1321         // TODO Auto-generated method stub
1322         return false;
1323     }
1324
1325     @Override
1326     public boolean supportsUnionAll() throws SQLException {
1327         // TODO Auto-generated method stub
1328         return false;
1329     }
1330
1331     @Override
1332     public boolean updatesAreDetected(final int type) throws SQLException {
1333         // TODO Auto-generated method stub
1334         return false;
1335     }
1336
1337     @Override
1338     public boolean usesLocalFilePerTable() throws SQLException {
1339         // TODO Auto-generated method stub
1340         return false;
1341     }
1342
1343     @Override
1344     public boolean usesLocalFiles() throws SQLException {
1345         // TODO Auto-generated method stub
1346         return false;
1347     }
1348
1349     @Override
1350     public boolean isWrapperFor(final Class<?> iface) throws SQLException {
1351         // TODO Auto-generated method stub
1352         return false;
1353     }
1354
1355     @Override
1356     public <T> T unwrap(final Class<T> iface) throws SQLException {
1357         // TODO Auto-generated method stub
1358         return null;
1359     }
1360
1361     @Override
1362     public ResultSet getPseudoColumns(final String catalog, final String schemaPattern,
1363             final String tableNamePattern, final String columnNamePattern)
1364             throws SQLException {
1365         // TODO Auto-generated method stub
1366         return null;
1367     }
1368
1369     @Override
1370     public boolean generatedKeyAlwaysReturned() throws SQLException {
1371         // TODO Auto-generated method stub
1372         return false;
1373     }
1374 }