View Javadoc

1   /*
2    * $Source: /usr/cvsroot/melati/throwing-jdbc/src/main/java/org/melati/poem/dbms/test/sql/ThrowingDatabaseMetaDataJdbc3.java,v $
3    * $Revision: 1.3 $
4    *
5    * Copyright (C) 2008 Tim Pizey
6    *
7    * Part of Melati (http://melati.org), a framework for the rapid
8    * development of clean, maintainable web applications.
9    *
10   * Melati is free software; Permission is granted to copy, distribute
11   * and/or modify this software under the terms either:
12   *
13   * a) the GNU General Public License as published by the Free Software
14   *    Foundation; either version 2 of the License, or (at your option)
15   *    any later version,
16   *
17   *    or
18   *
19   * b) any version of the Melati Software License, as published
20   *    at http://melati.org
21   *
22   * You should have received a copy of the GNU General Public License and
23   * the Melati Software License along with this program;
24   * if not, write to the Free Software Foundation, Inc.,
25   * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA to obtain the
26   * GNU General Public License and visit http://melati.org to obtain the
27   * Melati Software License.
28   *
29   * Feel free to contact the Developers of Melati (http://melati.org),
30   * if you would like to work out a different arrangement than the options
31   * outlined here.  It is our intention to allow Melati to be used by as
32   * wide an audience as possible.
33   *
34   * This program is distributed in the hope that it will be useful,
35   * but WITHOUT ANY WARRANTY; without even the implied warranty of
36   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
37   * GNU General Public License for more details.
38   *
39   * Contact details for copyright holder:
40   *
41   *     Tim Pizey <timp At paneris.org>
42   *     http://paneris.org/~timp
43   */
44  
45  package org.melati.poem.dbms.test.sql;
46  
47  import java.sql.Connection;
48  import java.sql.DatabaseMetaData;
49  import java.sql.ResultSet;
50  import java.sql.SQLException;
51  
52  /**
53   * The JDBC3 members of a {@link DatabaseMetaData}, decorated to throw an SQLException on command.
54   * 
55   * @author timp
56   * @since  5 Feb 2008
57   *
58   */
59  public abstract class ThrowingDatabaseMetaDataJdbc3 
60      extends Thrower 
61      implements DatabaseMetaData {
62  
63    DatabaseMetaData it = null;
64  
65    public boolean allProceduresAreCallable() throws SQLException {
66      if (shouldThrow(this.getClass().getInterfaces()[0], "allProceduresAreCallable"))
67        throw new SQLException("DatabaseMetaData bombed");
68      return it.allProceduresAreCallable();
69    }
70  
71    public boolean allTablesAreSelectable() throws SQLException {
72      if (shouldThrow(this.getClass().getInterfaces()[0], "allTablesAreSelectable"))
73        throw new SQLException("DatabaseMetaData bombed");
74      return it.allTablesAreSelectable();
75    }
76  
77    public boolean dataDefinitionCausesTransactionCommit() throws SQLException {
78      if (shouldThrow(this.getClass().getInterfaces()[0], "dataDefinitionCausesTransactionCommit"))
79        throw new SQLException("DatabaseMetaData bombed");
80      return it.dataDefinitionCausesTransactionCommit();
81    }
82  
83    public boolean dataDefinitionIgnoredInTransactions() throws SQLException {
84      if (shouldThrow(this.getClass().getInterfaces()[0], "dataDefinitionIgnoredInTransactions"))
85        throw new SQLException("DatabaseMetaData bombed");
86      return it.dataDefinitionIgnoredInTransactions();
87    }
88  
89    public boolean deletesAreDetected(int type) throws SQLException {
90      if (shouldThrow(this.getClass().getInterfaces()[0], "deletesAreDetected"))
91        throw new SQLException("DatabaseMetaData bombed");
92      return it.deletesAreDetected(type);
93    }
94  
95    public boolean doesMaxRowSizeIncludeBlobs() throws SQLException {
96      if (shouldThrow(this.getClass().getInterfaces()[0], "doesMaxRowSizeIncludeBlobs"))
97        throw new SQLException("DatabaseMetaData bombed");
98      return it.doesMaxRowSizeIncludeBlobs();
99    }
100 
101   public ResultSet getAttributes(String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern) throws SQLException {
102     if (shouldThrow(this.getClass().getInterfaces()[0], "getAttributes"))
103       throw new SQLException("DatabaseMetaData bombed");
104     return new ThrowingResultSet(it.getAttributes(catalog, schemaPattern, typeNamePattern, attributeNamePattern));
105   }
106 
107   public ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) throws SQLException {
108     if (shouldThrow(this.getClass().getInterfaces()[0], "getBestRowIdentifier"))
109       throw new SQLException("DatabaseMetaData bombed");
110     return new ThrowingResultSet(it.getBestRowIdentifier(catalog, schema, table, scope, nullable));
111   }
112 
113   public String getCatalogSeparator() throws SQLException {
114     if (shouldThrow(this.getClass().getInterfaces()[0], "getCatalogSeparator"))
115       throw new SQLException("DatabaseMetaData bombed");
116     return it.getCatalogSeparator();
117   }
118 
119   public String getCatalogTerm() throws SQLException {
120     if (shouldThrow(this.getClass().getInterfaces()[0], "getCatalogTerm"))
121       throw new SQLException("DatabaseMetaData bombed");
122     return it.getCatalogTerm();
123   }
124 
125   public ResultSet getCatalogs() throws SQLException {
126     if (shouldThrow(this.getClass().getInterfaces()[0], "getCatalogs"))
127       throw new SQLException("DatabaseMetaData bombed");
128     return new ThrowingResultSet(it.getCatalogs());
129   }
130 
131   public ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) throws SQLException {
132     if (shouldThrow(this.getClass().getInterfaces()[0], "getColumnPrivileges"))
133       throw new SQLException("DatabaseMetaData bombed");
134     return new ThrowingResultSet(it.getColumnPrivileges(catalog, schema, table, columnNamePattern));
135   }
136 
137   public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException {
138     if (shouldThrow(this.getClass().getInterfaces()[0], "getColumns"))
139       throw new SQLException("DatabaseMetaData bombed");
140     return new ThrowingResultSet(it.getColumns(catalog, schemaPattern, tableNamePattern, columnNamePattern));
141   }
142 
143   public Connection getConnection() throws SQLException {
144     if (shouldThrow(this.getClass().getInterfaces()[0], "getConnection"))
145       throw new SQLException("DatabaseMetaData bombed");
146     return new ThrowingConnection(it.getConnection());
147   }
148 
149   public ResultSet getCrossReference(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable) throws SQLException {
150     if (shouldThrow(this.getClass().getInterfaces()[0], "getCrossReference"))
151       throw new SQLException("DatabaseMetaData bombed");
152     return new ThrowingResultSet(it.getCrossReference(primaryCatalog, primarySchema, primaryTable, foreignCatalog, foreignSchema, foreignTable));
153   }
154 
155   public int getDatabaseMajorVersion() throws SQLException {
156     if (shouldThrow(this.getClass().getInterfaces()[0], "getDatabaseMajorVersion"))
157       throw new SQLException("DatabaseMetaData bombed");
158     return it.getDatabaseMajorVersion();
159   }
160 
161   public int getDatabaseMinorVersion() throws SQLException {
162     if (shouldThrow(this.getClass().getInterfaces()[0], "getDatabaseMinorVersion"))
163       throw new SQLException("DatabaseMetaData bombed");
164     return it.getDatabaseMinorVersion();
165   }
166 
167   public String getDatabaseProductName() throws SQLException {
168     if (shouldThrow(this.getClass().getInterfaces()[0], "getDatabaseProductName"))
169       throw new SQLException("DatabaseMetaData bombed");
170     return it.getDatabaseProductName();
171   }
172 
173   public String getDatabaseProductVersion() throws SQLException {
174     if (shouldThrow(this.getClass().getInterfaces()[0], "getDatabaseProductVersion"))
175       throw new SQLException("DatabaseMetaData bombed");
176     return it.getDatabaseProductVersion();
177   }
178 
179   public int getDefaultTransactionIsolation() throws SQLException {
180     if (shouldThrow(this.getClass().getInterfaces()[0], "getDefaultTransactionIsolation"))
181       throw new SQLException("DatabaseMetaData bombed");
182     return it.getDefaultTransactionIsolation();
183   }
184 
185   public int getDriverMajorVersion() {
186     return it.getDriverMajorVersion();
187   }
188 
189   public int getDriverMinorVersion() {
190     return it.getDriverMinorVersion();
191   }
192 
193   public String getDriverName() throws SQLException {
194     if (shouldThrow(this.getClass().getInterfaces()[0], "getDriverName"))
195       throw new SQLException("DatabaseMetaData bombed");
196     return it.getDriverName();
197   }
198 
199   public String getDriverVersion() throws SQLException {
200     if (shouldThrow(this.getClass().getInterfaces()[0], "getDriverVersion"))
201       throw new SQLException("DatabaseMetaData bombed");
202     return it.getDriverVersion();
203   }
204 
205   public ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException {
206     if (shouldThrow(this.getClass().getInterfaces()[0], "getExportedKeys"))
207       throw new SQLException("DatabaseMetaData bombed");
208     return new ThrowingResultSet(it.getExportedKeys(catalog, schema, table));
209   }
210 
211   public String getExtraNameCharacters() throws SQLException {
212     if (shouldThrow(this.getClass().getInterfaces()[0], "getExtraNameCharacters"))
213       throw new SQLException("DatabaseMetaData bombed");
214     return it.getExtraNameCharacters();
215   }
216 
217   public String getIdentifierQuoteString() throws SQLException {
218     if (shouldThrow(this.getClass().getInterfaces()[0], "getIdentifierQuoteString"))
219       throw new SQLException("DatabaseMetaData bombed");
220     return it.getIdentifierQuoteString();
221   }
222 
223   public ResultSet getImportedKeys(String catalog, String schema, String table) throws SQLException {
224     if (shouldThrow(this.getClass().getInterfaces()[0], "getImportedKeys"))
225       throw new SQLException("DatabaseMetaData bombed");
226     return new ThrowingResultSet(it.getImportedKeys(catalog, schema, table));
227   }
228 
229   public ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) throws SQLException {
230     if (shouldThrow(this.getClass().getInterfaces()[0], "getIndexInfo"))
231       throw new SQLException("DatabaseMetaData bombed");
232     return new ThrowingResultSet(it.getIndexInfo(catalog, schema, table, unique, approximate));
233   }
234 
235   public int getJDBCMajorVersion() throws SQLException {
236     if (shouldThrow(this.getClass().getInterfaces()[0], "getJDBCMajorVersion"))
237       throw new SQLException("DatabaseMetaData bombed");
238     return it.getJDBCMajorVersion();
239   }
240 
241   public int getJDBCMinorVersion() throws SQLException {
242     if (shouldThrow(this.getClass().getInterfaces()[0], "getJDBCMinorVersion"))
243       throw new SQLException("DatabaseMetaData bombed");
244     return it.getJDBCMinorVersion();
245   }
246 
247   public int getMaxBinaryLiteralLength() throws SQLException {
248     if (shouldThrow(this.getClass().getInterfaces()[0], "getMaxBinaryLiteralLength"))
249       throw new SQLException("DatabaseMetaData bombed");
250     return it.getMaxBinaryLiteralLength();
251   }
252 
253   public int getMaxCatalogNameLength() throws SQLException {
254     if (shouldThrow(this.getClass().getInterfaces()[0], "getMaxCatalogNameLength"))
255       throw new SQLException("DatabaseMetaData bombed");
256     return it.getMaxCatalogNameLength();
257   }
258 
259   public int getMaxCharLiteralLength() throws SQLException {
260     if (shouldThrow(this.getClass().getInterfaces()[0], "getMaxCharLiteralLength"))
261       throw new SQLException("DatabaseMetaData bombed");
262     return it.getMaxCharLiteralLength();
263   }
264 
265   public int getMaxColumnNameLength() throws SQLException {
266     if (shouldThrow(this.getClass().getInterfaces()[0], "getMaxColumnNameLength"))
267       throw new SQLException("DatabaseMetaData bombed");
268     return it.getMaxColumnNameLength();
269   }
270 
271   public int getMaxColumnsInGroupBy() throws SQLException {
272     if (shouldThrow(this.getClass().getInterfaces()[0], "getMaxColumnsInGroupBy"))
273       throw new SQLException("DatabaseMetaData bombed");
274     return it.getMaxColumnsInGroupBy();
275 
276   }
277 
278   public int getMaxColumnsInIndex() throws SQLException {
279     if (shouldThrow(this.getClass().getInterfaces()[0], "getMaxColumnsInIndex"))
280       throw new SQLException("DatabaseMetaData bombed");
281     return it.getMaxColumnsInIndex();
282   }
283 
284   public int getMaxColumnsInOrderBy() throws SQLException {
285     if (shouldThrow(this.getClass().getInterfaces()[0], "getMaxColumnsInOrderBy"))
286       throw new SQLException("DatabaseMetaData bombed");
287     return it.getMaxColumnsInOrderBy();
288   }
289 
290   public int getMaxColumnsInSelect() throws SQLException {
291     if (shouldThrow(this.getClass().getInterfaces()[0], "getMaxColumnsInSelect"))
292       throw new SQLException("DatabaseMetaData bombed");
293     return it.getMaxColumnsInSelect();
294   }
295 
296   public int getMaxColumnsInTable() throws SQLException {
297     if (shouldThrow(this.getClass().getInterfaces()[0], "getMaxColumnsInTable"))
298       throw new SQLException("DatabaseMetaData bombed");
299     return it.getMaxColumnsInTable();
300   }
301 
302   public int getMaxConnections() throws SQLException {
303     if (shouldThrow(this.getClass().getInterfaces()[0], "getMaxConnections"))
304       throw new SQLException("DatabaseMetaData bombed");
305     return it.getMaxConnections();
306   }
307 
308   public int getMaxCursorNameLength() throws SQLException {
309     if (shouldThrow(this.getClass().getInterfaces()[0], "getMaxCursorNameLength"))
310       throw new SQLException("DatabaseMetaData bombed");
311     return it.getMaxCursorNameLength();
312   }
313 
314   public int getMaxIndexLength() throws SQLException {
315     if (shouldThrow(this.getClass().getInterfaces()[0], "getMaxIndexLength"))
316       throw new SQLException("DatabaseMetaData bombed");
317     return it.getMaxIndexLength();
318   }
319 
320   public int getMaxProcedureNameLength() throws SQLException {
321     if (shouldThrow(this.getClass().getInterfaces()[0], "getMaxProcedureNameLength"))
322       throw new SQLException("DatabaseMetaData bombed");
323     return it.getMaxProcedureNameLength();
324   }
325 
326   public int getMaxRowSize() throws SQLException {
327     if (shouldThrow(this.getClass().getInterfaces()[0], "getMaxRowSize"))
328       throw new SQLException("DatabaseMetaData bombed");
329     return it.getMaxRowSize();
330   }
331 
332   public int getMaxSchemaNameLength() throws SQLException {
333     if (shouldThrow(this.getClass().getInterfaces()[0], "getMaxSchemaNameLength"))
334       throw new SQLException("DatabaseMetaData bombed");
335     return it.getMaxSchemaNameLength();
336   }
337 
338   public int getMaxStatementLength() throws SQLException {
339     if (shouldThrow(this.getClass().getInterfaces()[0], "getMaxStatementLength"))
340       throw new SQLException("DatabaseMetaData bombed");
341     return it.getMaxStatementLength();
342   }
343 
344   public int getMaxStatements() throws SQLException {
345     if (shouldThrow(this.getClass().getInterfaces()[0], "getMaxStatements"))
346       throw new SQLException("DatabaseMetaData bombed");
347     return it.getMaxStatements();
348   }
349 
350   public int getMaxTableNameLength() throws SQLException {
351     if (shouldThrow(this.getClass().getInterfaces()[0], "getMaxTableNameLength"))
352       throw new SQLException("DatabaseMetaData bombed");
353     return it.getMaxTableNameLength();
354   }
355 
356   public int getMaxTablesInSelect() throws SQLException {
357     if (shouldThrow(this.getClass().getInterfaces()[0], "getMaxTablesInSelect"))
358       throw new SQLException("DatabaseMetaData bombed");
359     return it.getMaxTablesInSelect();
360   }
361 
362   public int getMaxUserNameLength() throws SQLException {
363     if (shouldThrow(this.getClass().getInterfaces()[0], "getMaxUserNameLength"))
364       throw new SQLException("DatabaseMetaData bombed");
365     return it.getMaxUserNameLength();
366   }
367 
368   public String getNumericFunctions() throws SQLException {
369     if (shouldThrow(this.getClass().getInterfaces()[0], "getNumericFunctions"))
370       throw new SQLException("DatabaseMetaData bombed");
371     return it.getNumericFunctions();
372   }
373 
374   public ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException {
375     if (shouldThrow(this.getClass().getInterfaces()[0], "getPrimaryKeys"))
376       throw new SQLException("DatabaseMetaData bombed");
377     return new ThrowingResultSet(it.getPrimaryKeys(catalog, schema, table));
378   }
379 
380   public ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) throws SQLException {
381     if (shouldThrow(this.getClass().getInterfaces()[0], "getProcedureColumns"))
382       throw new SQLException("DatabaseMetaData bombed");
383     return new ThrowingResultSet(it.getProcedureColumns(catalog, schemaPattern, procedureNamePattern, columnNamePattern));
384   }
385 
386   public String getProcedureTerm() throws SQLException {
387     if (shouldThrow(this.getClass().getInterfaces()[0], "getProcedureTerm"))
388       throw new SQLException("DatabaseMetaData bombed");
389     return it.getProcedureTerm();
390   }
391 
392   public ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern) throws SQLException {
393     if (shouldThrow(this.getClass().getInterfaces()[0], "getProcedures"))
394       throw new SQLException("DatabaseMetaData bombed");
395     return new ThrowingResultSet(it.getProcedures(catalog, schemaPattern, procedureNamePattern));
396   }
397 
398   public int getResultSetHoldability() throws SQLException {
399     if (shouldThrow(this.getClass().getInterfaces()[0], "getResultSetHoldability"))
400       throw new SQLException("DatabaseMetaData bombed");
401     return it.getResultSetHoldability();
402   }
403 
404   public String getSQLKeywords() throws SQLException {
405     if (shouldThrow(this.getClass().getInterfaces()[0], "getSQLKeywords"))
406       throw new SQLException("DatabaseMetaData bombed");
407     return it.getSQLKeywords();
408   }
409 
410   public int getSQLStateType() throws SQLException {
411     if (shouldThrow(this.getClass().getInterfaces()[0], "getSQLStateType"))
412       throw new SQLException("DatabaseMetaData bombed");
413     return it.getSQLStateType();
414   }
415 
416   public String getSchemaTerm() throws SQLException {
417     if (shouldThrow(this.getClass().getInterfaces()[0], "getSchemaTerm"))
418       throw new SQLException("DatabaseMetaData bombed");
419     return it.getSchemaTerm();
420   }
421 
422   public ResultSet getSchemas() throws SQLException {
423     if (shouldThrow(this.getClass().getInterfaces()[0], "getSchemas"))
424       throw new SQLException("DatabaseMetaData bombed");
425     return new ThrowingResultSet(it.getSchemas());
426   }
427 
428   public String getSearchStringEscape() throws SQLException {
429     if (shouldThrow(this.getClass().getInterfaces()[0], "getSearchStringEscape"))
430       throw new SQLException("DatabaseMetaData bombed");
431     return it.getSearchStringEscape();
432   }
433 
434   public String getStringFunctions() throws SQLException {
435     if (shouldThrow(this.getClass().getInterfaces()[0], "getStringFunctions"))
436       throw new SQLException("DatabaseMetaData bombed");
437     return it.getStringFunctions();
438   }
439 
440   public ResultSet getSuperTables(String catalog, String schemaPattern, String tableNamePattern) throws SQLException {
441     if (shouldThrow(this.getClass().getInterfaces()[0], "getSuperTables"))
442       throw new SQLException("DatabaseMetaData bombed");
443     return new ThrowingResultSet(it.getSuperTables(catalog, schemaPattern, tableNamePattern));
444   }
445 
446   public ResultSet getSuperTypes(String catalog, String schemaPattern, String typeNamePattern) throws SQLException {
447     if (shouldThrow(this.getClass().getInterfaces()[0], "getSuperTypes"))
448       throw new SQLException("DatabaseMetaData bombed");
449     return new ThrowingResultSet(it.getSuperTypes(catalog, schemaPattern, typeNamePattern));
450   }
451 
452   public String getSystemFunctions() throws SQLException {
453     if (shouldThrow(this.getClass().getInterfaces()[0], "getSystemFunctions"))
454       throw new SQLException("DatabaseMetaData bombed");
455     return it.getSystemFunctions();
456   }
457 
458   public ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) throws SQLException {
459     if (shouldThrow(this.getClass().getInterfaces()[0], "getTablePrivileges"))
460       throw new SQLException("DatabaseMetaData bombed");
461     return new ThrowingResultSet(it.getTablePrivileges(catalog, schemaPattern, tableNamePattern));
462   }
463 
464   public ResultSet getTableTypes() throws SQLException {
465     if (shouldThrow(this.getClass().getInterfaces()[0], "getTableTypes"))
466       throw new SQLException("DatabaseMetaData bombed");
467     return new ThrowingResultSet(it.getTableTypes());
468   }
469 
470   public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) throws SQLException {
471     if (shouldThrow(this.getClass().getInterfaces()[0], "getTables"))
472       throw new SQLException("DatabaseMetaData bombed");
473     return new ThrowingResultSet(it.getTables(catalog, schemaPattern, tableNamePattern, types));
474   }
475 
476   public String getTimeDateFunctions() throws SQLException {
477     if (shouldThrow(this.getClass().getInterfaces()[0], "getTimeDateFunctions"))
478       throw new SQLException("DatabaseMetaData bombed");
479     return it.getTimeDateFunctions();
480   }
481 
482   public ResultSet getTypeInfo() throws SQLException {
483     if (shouldThrow(this.getClass().getInterfaces()[0], "getTypeInfo"))
484       throw new SQLException("DatabaseMetaData bombed");
485     return new ThrowingResultSet(it.getTypeInfo());
486   }
487 
488   public ResultSet getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types) throws SQLException {
489     if (shouldThrow(this.getClass().getInterfaces()[0], "getUDTs"))
490       throw new SQLException("DatabaseMetaData bombed");
491     return new ThrowingResultSet(it.getUDTs(catalog, schemaPattern, typeNamePattern, types));
492   }
493 
494   public String getURL() throws SQLException {
495     if (shouldThrow(this.getClass().getInterfaces()[0], "getURL"))
496       throw new SQLException("DatabaseMetaData bombed");
497     return it.getURL();
498   }
499 
500   public String getUserName() throws SQLException {
501     if (shouldThrow(this.getClass().getInterfaces()[0], "getUserName"))
502       throw new SQLException("DatabaseMetaData bombed");
503     return it.getUserName();
504   }
505 
506   public ResultSet getVersionColumns(String catalog, String schema, String table) throws SQLException {
507     if (shouldThrow(this.getClass().getInterfaces()[0], "getVersionColumns"))
508       throw new SQLException("DatabaseMetaData bombed");
509     return new ThrowingResultSet(it.getVersionColumns(catalog, schema, table));
510   }
511 
512   public boolean insertsAreDetected(int type) throws SQLException {
513     if (shouldThrow(this.getClass().getInterfaces()[0], "insertsAreDetected"))
514       throw new SQLException("DatabaseMetaData bombed");
515     return it.insertsAreDetected(type);
516   }
517 
518   public boolean isCatalogAtStart() throws SQLException {
519     if (shouldThrow(this.getClass().getInterfaces()[0], "isCatalogAtStart"))
520       throw new SQLException("DatabaseMetaData bombed");
521     return it.isCatalogAtStart();
522   }
523 
524   public boolean isReadOnly() throws SQLException {
525     if (shouldThrow(this.getClass().getInterfaces()[0], "isReadOnly"))
526       throw new SQLException("DatabaseMetaData bombed");
527     return it.isReadOnly();
528   }
529 
530   public boolean locatorsUpdateCopy() throws SQLException {
531     if (shouldThrow(this.getClass().getInterfaces()[0], "locatorsUpdateCopy"))
532       throw new SQLException("DatabaseMetaData bombed");
533     return it.locatorsUpdateCopy();
534   }
535 
536   public boolean nullPlusNonNullIsNull() throws SQLException {
537     if (shouldThrow(this.getClass().getInterfaces()[0], "nullPlusNonNullIsNull"))
538       throw new SQLException("DatabaseMetaData bombed");
539     return it.nullPlusNonNullIsNull();
540   }
541 
542   public boolean nullsAreSortedAtEnd() throws SQLException {
543     if (shouldThrow(this.getClass().getInterfaces()[0], "nullsAreSortedAtEnd"))
544       throw new SQLException("DatabaseMetaData bombed");
545     return it.nullsAreSortedAtEnd();
546   }
547 
548   public boolean nullsAreSortedAtStart() throws SQLException {
549     if (shouldThrow(this.getClass().getInterfaces()[0], "nullsAreSortedAtStart"))
550       throw new SQLException("DatabaseMetaData bombed");
551     return it.nullsAreSortedAtStart();
552   }
553 
554   public boolean nullsAreSortedHigh() throws SQLException {
555     if (shouldThrow(this.getClass().getInterfaces()[0], "nullsAreSortedHigh"))
556       throw new SQLException("DatabaseMetaData bombed");
557     return it.nullsAreSortedHigh();
558   }
559 
560   public boolean nullsAreSortedLow() throws SQLException {
561     if (shouldThrow(this.getClass().getInterfaces()[0], "nullsAreSortedLow"))
562       throw new SQLException("DatabaseMetaData bombed");
563     return it.nullsAreSortedLow();
564   }
565 
566   public boolean othersDeletesAreVisible(int type) throws SQLException {
567     if (shouldThrow(this.getClass().getInterfaces()[0], "othersDeletesAreVisible"))
568       throw new SQLException("DatabaseMetaData bombed");
569     return it.othersDeletesAreVisible(type);
570   }
571 
572   public boolean othersInsertsAreVisible(int type) throws SQLException {
573     if (shouldThrow(this.getClass().getInterfaces()[0], "othersInsertsAreVisible"))
574       throw new SQLException("DatabaseMetaData bombed");
575     return it.othersInsertsAreVisible(type);
576   }
577 
578   public boolean othersUpdatesAreVisible(int type) throws SQLException {
579 
580     if (shouldThrow(this.getClass().getInterfaces()[0], "othersUpdatesAreVisible"))
581       throw new SQLException("DatabaseMetaData bombed");
582     return it.othersUpdatesAreVisible(type);
583   }
584 
585   public boolean ownDeletesAreVisible(int type) throws SQLException {
586     if (shouldThrow(this.getClass().getInterfaces()[0], "ownDeletesAreVisible"))
587       throw new SQLException("DatabaseMetaData bombed");
588     return it.ownDeletesAreVisible(type);
589   }
590 
591   public boolean ownInsertsAreVisible(int type) throws SQLException {
592     if (shouldThrow(this.getClass().getInterfaces()[0], "ownInsertsAreVisible"))
593       throw new SQLException("DatabaseMetaData bombed");
594     return it.ownInsertsAreVisible(type);
595   }
596 
597   public boolean ownUpdatesAreVisible(int type) throws SQLException {
598     if (shouldThrow(this.getClass().getInterfaces()[0], "ownUpdatesAreVisible"))
599       throw new SQLException("DatabaseMetaData bombed");
600     return it.ownUpdatesAreVisible(type);
601   }
602 
603   public boolean storesLowerCaseIdentifiers() throws SQLException {
604     if (shouldThrow(this.getClass().getInterfaces()[0], "storesLowerCaseIdentifiers"))
605       throw new SQLException("DatabaseMetaData bombed");
606     return it.storesLowerCaseIdentifiers();
607   }
608 
609   public boolean storesLowerCaseQuotedIdentifiers() throws SQLException {
610     if (shouldThrow(this.getClass().getInterfaces()[0], "storesLowerCaseQuotedIdentifiers"))
611       throw new SQLException("DatabaseMetaData bombed");
612     return it.storesLowerCaseQuotedIdentifiers();
613   }
614 
615   public boolean storesMixedCaseIdentifiers() throws SQLException {
616     if (shouldThrow(this.getClass().getInterfaces()[0], "storesMixedCaseIdentifiers"))
617       throw new SQLException("DatabaseMetaData bombed");
618     return it.storesMixedCaseIdentifiers();
619   }
620 
621   public boolean storesMixedCaseQuotedIdentifiers() throws SQLException {
622     if (shouldThrow(this.getClass().getInterfaces()[0], "storesMixedCaseQuotedIdentifiers"))
623       throw new SQLException("DatabaseMetaData bombed");
624     return it.storesMixedCaseQuotedIdentifiers();
625   }
626 
627   public boolean storesUpperCaseIdentifiers() throws SQLException {
628     if (shouldThrow(this.getClass().getInterfaces()[0], "storesUpperCaseIdentifiers"))
629       throw new SQLException("DatabaseMetaData bombed");
630     return it.storesUpperCaseIdentifiers();
631   }
632 
633   public boolean storesUpperCaseQuotedIdentifiers() throws SQLException {
634     if (shouldThrow(this.getClass().getInterfaces()[0], "storesUpperCaseQuotedIdentifiers"))
635       throw new SQLException("DatabaseMetaData bombed");
636     return it.storesUpperCaseQuotedIdentifiers();
637   }
638 
639   public boolean supportsANSI92EntryLevelSQL() throws SQLException {
640     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsANSI92EntryLevelSQL"))
641       throw new SQLException("DatabaseMetaData bombed");
642     return it.supportsANSI92EntryLevelSQL();
643   }
644 
645   public boolean supportsANSI92FullSQL() throws SQLException {
646     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsANSI92FullSQL"))
647       throw new SQLException("DatabaseMetaData bombed");
648     return it.supportsANSI92FullSQL();
649   }
650 
651   public boolean supportsANSI92IntermediateSQL() throws SQLException {
652     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsANSI92IntermediateSQL"))
653       throw new SQLException("DatabaseMetaData bombed");
654     return it.supportsANSI92IntermediateSQL();
655   }
656 
657   public boolean supportsAlterTableWithAddColumn() throws SQLException {
658     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsAlterTableWithAddColumn"))
659       throw new SQLException("DatabaseMetaData bombed");
660     return it.supportsAlterTableWithAddColumn();
661   }
662 
663   public boolean supportsAlterTableWithDropColumn() throws SQLException {
664     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsAlterTableWithDropColumn"))
665       throw new SQLException("DatabaseMetaData bombed");
666     return it.supportsAlterTableWithDropColumn();
667   }
668 
669   public boolean supportsBatchUpdates() throws SQLException {
670     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsBatchUpdates"))
671       throw new SQLException("DatabaseMetaData bombed");
672     return it.supportsBatchUpdates();
673   }
674 
675   public boolean supportsCatalogsInDataManipulation() throws SQLException {
676     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsCatalogsInDataManipulation"))
677       throw new SQLException("DatabaseMetaData bombed");
678     return it.supportsCatalogsInDataManipulation();
679   }
680 
681   public boolean supportsCatalogsInIndexDefinitions() throws SQLException {
682     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsCatalogsInIndexDefinitions"))
683       throw new SQLException("DatabaseMetaData bombed");
684     return it.supportsCatalogsInIndexDefinitions();
685   }
686 
687   public boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException {
688     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsCatalogsInPrivilegeDefinitions"))
689       throw new SQLException("DatabaseMetaData bombed");
690     return it.supportsCatalogsInPrivilegeDefinitions();
691   }
692 
693   public boolean supportsCatalogsInProcedureCalls() throws SQLException {
694     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsCatalogsInProcedureCalls"))
695       throw new SQLException("DatabaseMetaData bombed");
696     return it.supportsCatalogsInProcedureCalls();
697   }
698 
699   public boolean supportsCatalogsInTableDefinitions() throws SQLException {
700     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsCatalogsInTableDefinitions"))
701       throw new SQLException("DatabaseMetaData bombed");
702     return it.supportsCatalogsInTableDefinitions();
703   }
704 
705   public boolean supportsColumnAliasing() throws SQLException {
706     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsColumnAliasing"))
707       throw new SQLException("DatabaseMetaData bombed");
708     return it.supportsColumnAliasing();
709   }
710 
711   public boolean supportsConvert() throws SQLException {
712     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsConvert"))
713       throw new SQLException("DatabaseMetaData bombed");
714     return it.supportsConvert();
715   }
716 
717   public boolean supportsConvert(int fromType, int toType) throws SQLException {
718     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsConvert"))
719       throw new SQLException("DatabaseMetaData bombed");
720     return it.supportsConvert();
721   }
722 
723   public boolean supportsCoreSQLGrammar() throws SQLException {
724     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsCoreSQLGrammar"))
725       throw new SQLException("DatabaseMetaData bombed");
726     return it.supportsCoreSQLGrammar();
727   }
728 
729   public boolean supportsCorrelatedSubqueries() throws SQLException {
730     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsCorrelatedSubqueries"))
731       throw new SQLException("DatabaseMetaData bombed");
732     return it.supportsCorrelatedSubqueries();
733   }
734 
735   public boolean supportsDataDefinitionAndDataManipulationTransactions() throws SQLException {
736     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsDataDefinitionAndDataManipulationTransactions"))
737       throw new SQLException("DatabaseMetaData bombed");
738     return it.supportsDataDefinitionAndDataManipulationTransactions();
739   }
740 
741   public boolean supportsDataManipulationTransactionsOnly() throws SQLException {
742     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsDataManipulationTransactionsOnly"))
743       throw new SQLException("DatabaseMetaData bombed");
744     return it.supportsDataManipulationTransactionsOnly();
745   }
746 
747   public boolean supportsDifferentTableCorrelationNames() throws SQLException {
748     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsDifferentTableCorrelationNames"))
749       throw new SQLException("DatabaseMetaData bombed");
750     return it.supportsDifferentTableCorrelationNames();
751   }
752 
753   public boolean supportsExpressionsInOrderBy() throws SQLException {
754     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsExpressionsInOrderBy"))
755       throw new SQLException("DatabaseMetaData bombed");
756     return it.supportsExpressionsInOrderBy();
757   }
758 
759   public boolean supportsExtendedSQLGrammar() throws SQLException {
760     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsExtendedSQLGrammar"))
761       throw new SQLException("DatabaseMetaData bombed");
762     return it.supportsExtendedSQLGrammar();
763   }
764 
765   public boolean supportsFullOuterJoins() throws SQLException {
766     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsFullOuterJoins"))
767       throw new SQLException("DatabaseMetaData bombed");
768     return it.supportsFullOuterJoins();
769   }
770 
771   public boolean supportsGetGeneratedKeys() throws SQLException {
772     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsGetGeneratedKeys"))
773       throw new SQLException("DatabaseMetaData bombed");
774     return it.supportsGetGeneratedKeys();
775   }
776 
777   public boolean supportsGroupBy() throws SQLException {
778     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsGroupBy"))
779       throw new SQLException("DatabaseMetaData bombed");
780     return it.supportsGroupBy();
781   }
782 
783   public boolean supportsGroupByBeyondSelect() throws SQLException {
784     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsGroupByBeyondSelect"))
785       throw new SQLException("DatabaseMetaData bombed");
786     return it.supportsGroupByBeyondSelect();
787   }
788 
789   public boolean supportsGroupByUnrelated() throws SQLException {
790     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsGroupByUnrelated"))
791       throw new SQLException("DatabaseMetaData bombed");
792     return it.supportsGroupByUnrelated();
793   }
794 
795   public boolean supportsIntegrityEnhancementFacility() throws SQLException {
796     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsIntegrityEnhancementFacility"))
797       throw new SQLException("DatabaseMetaData bombed");
798     return it.supportsIntegrityEnhancementFacility();
799   }
800 
801   public boolean supportsLikeEscapeClause() throws SQLException {
802     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsLikeEscapeClause"))
803       throw new SQLException("DatabaseMetaData bombed");
804     return it.supportsLikeEscapeClause();
805   }
806 
807   public boolean supportsLimitedOuterJoins() throws SQLException {
808     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsLimitedOuterJoins"))
809       throw new SQLException("DatabaseMetaData bombed");
810     return it.supportsLimitedOuterJoins();
811   }
812 
813   public boolean supportsMinimumSQLGrammar() throws SQLException {
814     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsMinimumSQLGrammar"))
815       throw new SQLException("DatabaseMetaData bombed");
816     return it.supportsMinimumSQLGrammar();
817   }
818 
819   public boolean supportsMixedCaseIdentifiers() throws SQLException {
820     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsMixedCaseIdentifiers"))
821       throw new SQLException("DatabaseMetaData bombed");
822     return it.supportsMixedCaseIdentifiers();
823   }
824 
825   public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException {
826     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsMixedCaseQuotedIdentifiers"))
827       throw new SQLException("DatabaseMetaData bombed");
828     return it.supportsMixedCaseQuotedIdentifiers();
829   }
830 
831   public boolean supportsMultipleOpenResults() throws SQLException {
832     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsMultipleOpenResults"))
833       throw new SQLException("DatabaseMetaData bombed");
834     return it.supportsMultipleOpenResults();
835   }
836 
837   public boolean supportsMultipleResultSets() throws SQLException {
838     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsMultipleResultSets"))
839       throw new SQLException("DatabaseMetaData bombed");
840     return it.supportsMultipleResultSets();
841   }
842 
843   public boolean supportsMultipleTransactions() throws SQLException {
844     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsMultipleTransactions"))
845       throw new SQLException("DatabaseMetaData bombed");
846     return it.supportsMultipleTransactions();
847   }
848 
849   public boolean supportsNamedParameters() throws SQLException {
850     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsNamedParameters"))
851       throw new SQLException("DatabaseMetaData bombed");
852     return it.supportsNamedParameters();
853   }
854 
855   public boolean supportsNonNullableColumns() throws SQLException {
856     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsNonNullableColumns"))
857       throw new SQLException("DatabaseMetaData bombed");
858     return it.supportsNonNullableColumns();
859   }
860 
861   public boolean supportsOpenCursorsAcrossCommit() throws SQLException {
862     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsOpenCursorsAcrossCommit"))
863       throw new SQLException("DatabaseMetaData bombed");
864     return it.supportsOpenCursorsAcrossCommit();
865   }
866 
867   public boolean supportsOpenCursorsAcrossRollback() throws SQLException {
868     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsOpenCursorsAcrossRollback"))
869       throw new SQLException("DatabaseMetaData bombed");
870     return it.supportsOpenCursorsAcrossRollback();
871   }
872 
873   public boolean supportsOpenStatementsAcrossCommit() throws SQLException {
874     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsOpenStatementsAcrossCommit"))
875       throw new SQLException("DatabaseMetaData bombed");
876     return it.supportsOpenStatementsAcrossCommit();
877   }
878 
879   public boolean supportsOpenStatementsAcrossRollback() throws SQLException {
880     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsOpenStatementsAcrossRollback"))
881       throw new SQLException("DatabaseMetaData bombed");
882     return it.supportsOpenStatementsAcrossRollback();
883   }
884 
885   public boolean supportsOrderByUnrelated() throws SQLException {
886     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsOrderByUnrelated"))
887       throw new SQLException("DatabaseMetaData bombed");
888     return it.supportsOrderByUnrelated();
889   }
890 
891   public boolean supportsOuterJoins() throws SQLException {
892     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsOuterJoins"))
893       throw new SQLException("DatabaseMetaData bombed");
894     return it.supportsOuterJoins();
895   }
896 
897   public boolean supportsPositionedDelete() throws SQLException {
898     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsPositionedDelete"))
899       throw new SQLException("DatabaseMetaData bombed");
900     return it.supportsPositionedDelete();
901   }
902 
903   public boolean supportsPositionedUpdate() throws SQLException {
904     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsPositionedUpdate"))
905       throw new SQLException("DatabaseMetaData bombed");
906     return it.supportsPositionedUpdate();
907   }
908 
909   public boolean supportsResultSetConcurrency(int type, int concurrency) throws SQLException {
910     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsResultSetConcurrency"))
911       throw new SQLException("DatabaseMetaData bombed");
912     return it.supportsResultSetConcurrency(type, concurrency);
913   }
914 
915   public boolean supportsResultSetHoldability(int holdability) throws SQLException {
916     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsResultSetHoldability"))
917       throw new SQLException("DatabaseMetaData bombed");
918     return it.supportsResultSetHoldability(holdability);
919   }
920 
921   public boolean supportsResultSetType(int type) throws SQLException {
922     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsResultSetType"))
923       throw new SQLException("DatabaseMetaData bombed");
924     return it.supportsResultSetType(type);
925   }
926 
927   public boolean supportsSavepoints() throws SQLException {
928     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsSavepoints"))
929       throw new SQLException("DatabaseMetaData bombed");
930     return it.supportsSavepoints();
931   }
932 
933   public boolean supportsSchemasInDataManipulation() throws SQLException {
934     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsSchemasInDataManipulation"))
935       throw new SQLException("DatabaseMetaData bombed");
936     return it.supportsSchemasInDataManipulation();
937   }
938 
939   public boolean supportsSchemasInIndexDefinitions() throws SQLException {
940     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsSchemasInIndexDefinitions"))
941       throw new SQLException("DatabaseMetaData bombed");
942     return it.supportsSchemasInIndexDefinitions();
943   }
944 
945   public boolean supportsSchemasInPrivilegeDefinitions() throws SQLException {
946     if (shouldThrow(this.getClass().getInterfaces()[0], "supportsSchemasInPrivilegeDefinitions"))
947       throw new SQLException("DatabaseMetaData bombed");