View Javadoc

1   /*
2    * Copyright (c) 1998, 2005 Gargoyle Software Inc. All rights reserved.
3    *
4    * Redistribution and use in source and binary forms, with or without
5    * modification, are permitted provided that the following conditions are met:
6    *
7    * 1. Redistributions of source code must retain the above copyright notice,
8    *    this list of conditions and the following disclaimer.
9    * 2. Redistributions in binary form must reproduce the above copyright notice,
10   *    this list of conditions and the following disclaimer in the documentation
11   *    and/or other materials provided with the distribution.
12   * 3. The end-user documentation included with the redistribution, if any, must
13   *    include the following acknowledgment:
14   *
15   *       "This product includes software developed by Gargoyle Software Inc.
16   *        (http://www.GargoyleSoftware.com/)."
17   *
18   *    Alternately, this acknowledgment may appear in the software itself, if
19   *    and wherever such third-party acknowledgments normally appear.
20   * 4. The name "Gargoyle Software" must not be used to endorse or promote
21   *    products derived from this software without prior written permission.
22   *    For written permission, please contact info@GargoyleSoftware.com.
23   * 5. Products derived from this software may not be called "GSBase", nor may
24   *    "GSBase" appear in their name, without prior written permission of
25   *    Gargoyle Software Inc.
26   *
27   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
28   * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
29   * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARGOYLE
30   * SOFTWARE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
31   * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
32   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
33   * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34   * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35   * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
36   * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37   */
38  package com.gargoylesoftware.base.resource.jdbc;
39  
40  import java.sql.Connection;
41  import java.sql.DatabaseMetaData;
42  import java.sql.ResultSet;
43  import java.sql.SQLException;
44  import java.util.ArrayList;
45  import java.util.Iterator;
46  import java.util.List;
47  
48  /***
49   *  Wrapper for DatabaseMetaData
50   *
51   * @version  $Revision: 1.5 $
52   * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
53   */
54  public final class DatabaseMetaDataWrapper implements DatabaseMetaData {
55  
56      private final DatabaseMetaData delegate_;
57      private boolean isOpen_ = true;
58      private ConnectionWrapper connection_;
59      private final List openResultSets_ = new ArrayList();
60  
61  
62      /***
63       *  Create a wrapper
64       *
65       * @param  metaData The object to be wrapped
66       */
67      public DatabaseMetaDataWrapper( final DatabaseMetaData metaData ) {
68          if( metaData == null ) {
69              throw new NullPointerException( "metaData" );
70          }
71          delegate_ = metaData;
72      }
73  
74  
75      /***
76       *  Set the connection that will be returned by getConnection()
77       *
78       * @param  connection the connection
79       */
80      public final void setConnection( final ConnectionWrapper connection ) {
81          connection_ = connection;
82      }
83  
84  
85      /***
86       *  Return the wrapped object
87       *
88       * @return  The wrapped object
89       */
90      public final DatabaseMetaData getDelegate() {
91          return delegate_;
92      }
93  
94  
95      /***
96       *  What's the url for this database?
97       *
98       * @return  the url or null if it cannot be generated
99       * @exception  SQLException if a database access error occurs
100      */
101     public final String getURL()
102         throws SQLException {
103         checkIsOpen();
104         return delegate_.getURL();
105     }
106 
107 
108     /***
109      *  What's our user name as known to the database?
110      *
111      * @return  our database user name
112      * @exception  SQLException if a database access error occurs
113      */
114     public final String getUserName()
115         throws SQLException {
116         checkIsOpen();
117         return delegate_.getUserName();
118     }
119 
120 
121     /***
122      *  Is the database in read-only mode?
123      *
124      * @return  <code>true</code> if so; <code>false</code> otherwise
125      * @exception  SQLException if a database access error occurs
126      */
127     public final boolean isReadOnly()
128         throws SQLException {
129         checkIsOpen();
130         return delegate_.isReadOnly();
131     }
132 
133 
134     /***
135      *  What's the name of this database product?
136      *
137      * @return  database product name
138      * @exception  SQLException if a database access error occurs
139      */
140     public final String getDatabaseProductName()
141         throws SQLException {
142         checkIsOpen();
143         return delegate_.getDatabaseProductName();
144     }
145 
146 
147     /***
148      *  What's the version of this database product?
149      *
150      * @return  database version
151      * @exception  SQLException if a database access error occurs
152      */
153     public final String getDatabaseProductVersion()
154         throws SQLException {
155         checkIsOpen();
156         return delegate_.getDatabaseProductVersion();
157     }
158 
159 
160     /***
161      *  What's the name of this JDBC driver?
162      *
163      * @return  JDBC driver name
164      * @exception  SQLException if a database access error occurs
165      */
166     public final String getDriverName()
167         throws SQLException {
168         checkIsOpen();
169         return delegate_.getDriverName();
170     }
171 
172 
173     /***
174      *  What's the version of this JDBC driver?
175      *
176      * @return  JDBC driver version
177      * @exception  SQLException if a database access error occurs
178      */
179     public final String getDriverVersion()
180         throws SQLException {
181         checkIsOpen();
182         return delegate_.getDriverVersion();
183     }
184 
185 
186     /***
187      *  What's this JDBC driver's major version number?
188      *
189      * @return  JDBC driver major version
190      */
191     public final int getDriverMajorVersion() {
192         try {
193             checkIsOpen();
194         }
195         catch( final SQLException e ) {
196             throw new IllegalStateException( e.getMessage() );
197         }
198         return delegate_.getDriverMajorVersion();
199     }
200 
201 
202     /***
203      *  What's this JDBC driver's minor version number?
204      *
205      * @return  JDBC driver minor version number
206      */
207     public final int getDriverMinorVersion() {
208         try {
209             checkIsOpen();
210         }
211         catch( final SQLException e ) {
212             throw new IllegalStateException( e.getMessage() );
213         }
214         return delegate_.getDriverMinorVersion();
215     }
216 
217 
218     /***
219      *  Return the string used to quote SQL identifiers.  This returns a space "
220      *  " if identifier quoting isn't supported. A JDBC Compliant<sup><font
221      *  size=-2>TM</font></sup> driver always uses a double quote character.
222      *
223      * @return  the quoting string
224      * @exception  SQLException if a database access error occurs
225      */
226     public final String getIdentifierQuoteString()
227         throws SQLException {
228         checkIsOpen();
229         return delegate_.getIdentifierQuoteString();
230     }
231 
232 
233     /***
234      *  Gets a comma-separated list of all a database's SQL keywords that are
235      *  NOT also SQL92 keywords.
236      *
237      * @return  the list
238      * @exception  SQLException if a database access error occurs
239      */
240     public final String getSQLKeywords()
241         throws SQLException {
242         checkIsOpen();
243         return delegate_.getSQLKeywords();
244     }
245 
246 
247     /***
248      *  Gets a comma-separated list of math functions. These are the X/Open CLI
249      *  math function names used in the JDBC function escape clause.
250      *
251      * @return  the list
252      * @exception  SQLException if a database access error occurs
253      */
254     public final String getNumericFunctions()
255         throws SQLException {
256         checkIsOpen();
257         return delegate_.getNumericFunctions();
258     }
259 
260 
261     /***
262      *  Gets a comma-separated list of string functions. These are the X/Open
263      *  CLI string function names used in the JDBC function escape clause.
264      *
265      * @return  the list
266      * @exception  SQLException if a database access error occurs
267      */
268     public final String getStringFunctions()
269         throws SQLException {
270         checkIsOpen();
271         return delegate_.getStringFunctions();
272     }
273 
274 
275     /***
276      *  Gets a comma-separated list of system functions. These are the X/Open
277      *  CLI system function names used in the JDBC function escape clause.
278      *
279      * @return  the list
280      * @exception  SQLException if a database access error occurs
281      */
282     public final String getSystemFunctions()
283         throws SQLException {
284         checkIsOpen();
285         return delegate_.getSystemFunctions();
286     }
287 
288 
289     /***
290      *  Gets a comma-separated list of time and date functions.
291      *
292      * @return  the list
293      * @exception  SQLException if a database access error occurs
294      */
295     public final String getTimeDateFunctions()
296         throws SQLException {
297         checkIsOpen();
298         return delegate_.getTimeDateFunctions();
299     }
300 
301 
302     /***
303      *  Gets the string that can be used to escape wildcard characters. This is
304      *  the string that can be used to escape '_' or '%' in the string pattern
305      *  style catalog search parameters. <P>
306      *
307      *  The '_' character represents any single character. <P>
308      *
309      *  The '%' character represents any sequence of zero or more characters.
310      *
311      * @return  the string used to escape wildcard characters
312      * @exception  SQLException if a database access error occurs
313      */
314     public final String getSearchStringEscape()
315         throws SQLException {
316         checkIsOpen();
317         return delegate_.getSearchStringEscape();
318     }
319 
320 
321     /***
322      *  Gets all the "extra" characters that can be used in unquoted identifier
323      *  names (those beyond a-z, A-Z, 0-9 and _).
324      *
325      * @return  the string containing the extra characters
326      * @exception  SQLException if a database access error occurs
327      */
328     public final String getExtraNameCharacters()
329         throws SQLException {
330         checkIsOpen();
331         return delegate_.getExtraNameCharacters();
332     }
333 
334 
335     /***
336      *  What's the database vendor's preferred term for "schema"?
337      *
338      * @return  the vendor term
339      * @exception  SQLException if a database access error occurs
340      */
341     public final String getSchemaTerm()
342         throws SQLException {
343         checkIsOpen();
344         return delegate_.getSchemaTerm();
345     }
346 
347 
348     /***
349      *  What's the database vendor's preferred term for "procedure"?
350      *
351      * @return  the vendor term
352      * @exception  SQLException if a database access error occurs
353      */
354     public final String getProcedureTerm()
355         throws SQLException {
356         checkIsOpen();
357         return delegate_.getProcedureTerm();
358     }
359 
360 
361     /***
362      *  What's the database vendor's preferred term for "catalog"?
363      *
364      * @return  the vendor term
365      * @exception  SQLException if a database access error occurs
366      */
367     public final String getCatalogTerm()
368         throws SQLException {
369         checkIsOpen();
370         return delegate_.getCatalogTerm();
371     }
372 
373 
374     /***
375      *  Return true if a catalog appears at the start of a qualified table name. (Otherwise
376      *  it appears at the end)
377      *
378      * @return  true if it appears at the start
379      * @exception  SQLException if a database access error occurs
380      */
381     public final boolean isCatalogAtStart()
382         throws SQLException {
383         checkIsOpen();
384         return delegate_.isCatalogAtStart();
385     }
386 
387 
388     /***
389      *  What's the separator between catalog and table name?
390      *
391      * @return  the separator string
392      * @exception  SQLException if a database access error occurs
393      */
394     public final String getCatalogSeparator()
395         throws SQLException {
396         checkIsOpen();
397         return delegate_.getCatalogSeparator();
398     }
399 
400 
401     //----------------------------------------------------------------------
402     // The following group of methods exposes various limitations
403     // based on the target database with the current driver.
404     // Unless otherwise specified, a result of zero means there is no
405     // limit, or the limit is not known.
406 
407     /***
408      *  How many hex characters can you have in an inline binary literal?
409      *
410      * @return  max binary literal length in hex characters; a result of zero
411      *      means that there is no limit or the limit is not known
412      * @exception  SQLException if a database access error occurs
413      */
414     public final int getMaxBinaryLiteralLength()
415         throws SQLException {
416         checkIsOpen();
417         return delegate_.getMaxBinaryLiteralLength();
418     }
419 
420 
421     /***
422      *  What's the max length for a character literal?
423      *
424      * @return  max literal length; a result of zero means that there is no
425      *      limit or the limit is not known
426      * @exception  SQLException if a database access error occurs
427      */
428     public final int getMaxCharLiteralLength()
429         throws SQLException {
430         checkIsOpen();
431         return delegate_.getMaxCharLiteralLength();
432     }
433 
434 
435     /***
436      *  What's the limit on column name length?
437      *
438      * @return  max column name length; a result of zero means that there is no
439      *      limit or the limit is not known
440      * @exception  SQLException if a database access error occurs
441      */
442     public final int getMaxColumnNameLength()
443         throws SQLException {
444         checkIsOpen();
445         return delegate_.getMaxColumnNameLength();
446     }
447 
448 
449     /***
450      *  What's the maximum number of columns in a "GROUP BY" clause?
451      *
452      * @return  max number of columns; a result of zero means that there is no
453      *      limit or the limit is not known
454      * @exception  SQLException if a database access error occurs
455      */
456     public final int getMaxColumnsInGroupBy()
457         throws SQLException {
458         checkIsOpen();
459         return delegate_.getMaxColumnsInGroupBy();
460     }
461 
462 
463     /***
464      *  What's the maximum number of columns allowed in an index?
465      *
466      * @return  max number of columns; a result of zero means that there is no
467      *      limit or the limit is not known
468      * @exception  SQLException if a database access error occurs
469      */
470     public final int getMaxColumnsInIndex()
471         throws SQLException {
472         checkIsOpen();
473         return delegate_.getMaxColumnsInIndex();
474     }
475 
476 
477     /***
478      *  What's the maximum number of columns in an "ORDER BY" clause?
479      *
480      * @return  max number of columns; a result of zero means that there is no
481      *      limit or the limit is not known
482      * @exception  SQLException if a database access error occurs
483      */
484     public final int getMaxColumnsInOrderBy()
485         throws SQLException {
486         checkIsOpen();
487         return delegate_.getMaxColumnsInOrderBy();
488     }
489 
490 
491     /***
492      *  What's the maximum number of columns in a "SELECT" list?
493      *
494      * @return  max number of columns; a result of zero means that there is no
495      *      limit or the limit is not known
496      * @exception  SQLException if a database access error occurs
497      */
498     public final int getMaxColumnsInSelect()
499         throws SQLException {
500         checkIsOpen();
501         return delegate_.getMaxColumnsInSelect();
502     }
503 
504 
505     /***
506      *  What's the maximum number of columns in a table?
507      *
508      * @return  max number of columns; a result of zero means that there is no
509      *      limit or the limit is not known
510      * @exception  SQLException if a database access error occurs
511      */
512     public final int getMaxColumnsInTable()
513         throws SQLException {
514         checkIsOpen();
515         return delegate_.getMaxColumnsInTable();
516     }
517 
518 
519     /***
520      *  How many active connections can we have at a time to this database?
521      *
522      * @return  max number of active connections; a result of zero means that
523      *      there is no limit or the limit is not known
524      * @exception  SQLException if a database access error occurs
525      */
526     public final int getMaxConnections()
527         throws SQLException {
528         checkIsOpen();
529         return delegate_.getMaxConnections();
530     }
531 
532 
533     /***
534      *  What's the maximum cursor name length?
535      *
536      * @return  max cursor name length in bytes; a result of zero means that
537      *      there is no limit or the limit is not known
538      * @exception  SQLException if a database access error occurs
539      */
540     public final int getMaxCursorNameLength()
541         throws SQLException {
542         checkIsOpen();
543         return delegate_.getMaxCursorNameLength();
544     }
545 
546 
547     /***
548      *  Retrieves the maximum number of bytes for an index, including all of the
549      *  parts of the index.
550      *
551      * @return  max index length in bytes, which includes the composite of all
552      *      the constituent parts of the index; a result of zero means that
553      *      there is no limit or the limit is not known
554      * @exception  SQLException if a database access error occurs
555      */
556     public final int getMaxIndexLength()
557         throws SQLException {
558         checkIsOpen();
559         return delegate_.getMaxIndexLength();
560     }
561 
562 
563     /***
564      *  What's the maximum length allowed for a schema name?
565      *
566      * @return  max name length in bytes; a result of zero means that there is
567      *      no limit or the limit is not known
568      * @exception  SQLException if a database access error occurs
569      */
570     public final int getMaxSchemaNameLength()
571         throws SQLException {
572         checkIsOpen();
573         return delegate_.getMaxSchemaNameLength();
574     }
575 
576 
577     /***
578      *  What's the maximum length of a procedure name?
579      *
580      * @return  max name length in bytes; a result of zero means that there is
581      *      no limit or the limit is not known
582      * @exception  SQLException if a database access error occurs
583      */
584     public final int getMaxProcedureNameLength()
585         throws SQLException {
586         checkIsOpen();
587         return delegate_.getMaxProcedureNameLength();
588     }
589 
590 
591     /***
592      *  What's the maximum length of a catalog name?
593      *
594      * @return  max name length in bytes; a result of zero means that there is
595      *      no limit or the limit is not known
596      * @exception  SQLException if a database access error occurs
597      */
598     public final int getMaxCatalogNameLength()
599         throws SQLException {
600         checkIsOpen();
601         return delegate_.getMaxCatalogNameLength();
602     }
603 
604 
605     /***
606      *  What's the maximum length of a single row?
607      *
608      * @return  max row size in bytes; a result of zero means that there is no
609      *      limit or the limit is not known
610      * @exception  SQLException if a database access error occurs
611      */
612     public final int getMaxRowSize()
613         throws SQLException {
614         checkIsOpen();
615         return delegate_.getMaxRowSize();
616     }
617 
618 
619     /***
620      *  What's the maximum length of an SQL statement?
621      *
622      * @return  max length in bytes; a result of zero means that there is no
623      *      limit or the limit is not known
624      * @exception  SQLException if a database access error occurs
625      */
626     public final int getMaxStatementLength()
627         throws SQLException {
628         checkIsOpen();
629         return delegate_.getMaxStatementLength();
630     }
631 
632 
633     /***
634      *  How many active statements can we have open at one time to this
635      *  database?
636      *
637      * @return  the maximum number of statements that can be open at one time; a
638      *      result of zero means that there is no limit or the limit is not
639      *      known
640      * @exception  SQLException if a database access error occurs
641      */
642     public final int getMaxStatements()
643         throws SQLException {
644         checkIsOpen();
645         return delegate_.getMaxStatements();
646     }
647 
648 
649     /***
650      *  What's the maximum length of a table name?
651      *
652      * @return  max name length in bytes; a result of zero means that there is
653      *      no limit or the limit is not known
654      * @exception  SQLException if a database access error occurs
655      */
656     public final int getMaxTableNameLength()
657         throws SQLException {
658         checkIsOpen();
659         return delegate_.getMaxTableNameLength();
660     }
661 
662 
663     /***
664      *  What's the maximum number of tables in a SELECT statement?
665      *
666      * @return  the maximum number of tables allowed in a SELECT statement; a
667      *      result of zero means that there is no limit or the limit is not
668      *      known
669      * @exception  SQLException if a database access error occurs
670      */
671     public final int getMaxTablesInSelect()
672         throws SQLException {
673         checkIsOpen();
674         return delegate_.getMaxTablesInSelect();
675     }
676 
677 
678     /***
679      *  What's the maximum length of a user name?
680      *
681      * @return  max user name length in bytes; a result of zero means that there
682      *      is no limit or the limit is not known
683      * @exception  SQLException if a database access error occurs
684      */
685     public final int getMaxUserNameLength()
686         throws SQLException {
687         checkIsOpen();
688         return delegate_.getMaxUserNameLength();
689     }
690 
691     //----------------------------------------------------------------------
692 
693     /***
694      *  Return the database's default transaction isolation level.  The values
695      *  are defined in <code>java.sql.Connection</code>.
696      *
697      * @return  the default isolation level
698      * @exception  SQLException if a database access error occurs
699      */
700     public final int getDefaultTransactionIsolation()
701         throws SQLException {
702         checkIsOpen();
703         return delegate_.getDefaultTransactionIsolation();
704     }
705 
706 
707     /***
708      *  Gets a description of the stored procedures available in a catalog. <P>
709      *
710      *  Only procedure descriptions matching the schema and procedure name
711      *  criteria are returned. They are ordered by PROCEDURE_SCHEM, and
712      *  PROCEDURE_NAME. <P>
713      *
714      *  Each procedure description has the the following columns:
715      *  <OL>
716      *    <LI> <B>PROCEDURE_CAT</B> String => procedure catalog (may be null)
717      *
718      *    <LI> <B>PROCEDURE_SCHEM</B> String => procedure schema (may be null)
719      *
720      *    <LI> <B>PROCEDURE_NAME</B> String => procedure name
721      *    <LI> reserved for future use
722      *    <LI> reserved for future use
723      *    <LI> reserved for future use
724      *    <LI> <B>REMARKS</B> String => explanatory comment on the procedure
725      *
726      *    <LI> <B>PROCEDURE_TYPE</B> short => kind of procedure:
727      *    <UL>
728      *      <LI> procedureResultUnknown - May return a result
729      *      <LI> procedureNoResult - Does not return a result
730      *      <LI> procedureReturnsResult - Returns a result
731      *    </UL>
732      *
733      *  </OL>
734      *
735      *
736      * @param  catalog a catalog name; "" retrieves those without a catalog;
737      *      null means drop catalog name from the selection criteria
738      * @param  schemaPattern a schema name pattern; "" retrieves those without a
739      *      schema
740      * @param  procedureNamePattern a procedure name pattern
741      * @return  <code>ResultSet</code> - each row is a procedure description
742      * @exception  SQLException if a database access error occurs
743      */
744     public final ResultSet getProcedures( String catalog, String schemaPattern,
745             String procedureNamePattern )
746         throws SQLException {
747         checkIsOpen();
748         return wrap( delegate_.getProcedures( catalog, schemaPattern, procedureNamePattern ) );
749     }
750 
751 
752     /***
753      *  Gets a description of a catalog's stored procedure parameters and result
754      *  columns. <P>
755      *
756      *  Only descriptions matching the schema, procedure and parameter name
757      *  criteria are returned. They are ordered by PROCEDURE_SCHEM and
758      *  PROCEDURE_NAME. Within this, the return value, if any, is first. Next
759      *  are the parameter descriptions in call order. The column descriptions
760      *  follow in column number order. <P>
761      *
762      *  Each row in the <code>ResultSet</code> is a parameter description or
763      *  column description with the following fields:
764      *  <OL>
765      *    <LI> <B>PROCEDURE_CAT</B> String => procedure catalog (may be null)
766      *
767      *    <LI> <B>PROCEDURE_SCHEM</B> String => procedure schema (may be null)
768      *
769      *    <LI> <B>PROCEDURE_NAME</B> String => procedure name
770      *    <LI> <B>COLUMN_NAME</B> String => column/parameter name
771      *    <LI> <B>COLUMN_TYPE</B> Short => kind of column/parameter:
772      *    <UL>
773      *      <LI> procedureColumnUnknown - nobody knows
774      *      <LI> procedureColumnIn - IN parameter
775      *      <LI> procedureColumnInOut - INOUT parameter
776      *      <LI> procedureColumnOut - OUT parameter
777      *      <LI> procedureColumnReturn - procedure return value
778      *      <LI> procedureColumnResult - result column in <code>ResultSet</code>
779      *
780      *    </UL>
781      *
782      *    <LI> <B>DATA_TYPE</B> short => SQL type from java.sql.Types
783      *    <LI> <B>TYPE_NAME</B> String => SQL type name, for a UDT type the type
784      *    name is fully qualified
785      *    <LI> <B>PRECISION</B> int => precision
786      *    <LI> <B>LENGTH</B> int => length in bytes of data
787      *    <LI> <B>SCALE</B> short => scale
788      *    <LI> <B>RADIX</B> short => radix
789      *    <LI> <B>NULLABLE</B> short => can it contain NULL?
790      *    <UL>
791      *      <LI> procedureNoNulls - does not allow NULL values
792      *      <LI> procedureNullable - allows NULL values
793      *      <LI> procedureNullableUnknown - nullability unknown
794      *    </UL>
795      *
796      *    <LI> <B>REMARKS</B> String => comment describing parameter/column
797      *
798      *  </OL>
799      *  <P>
800      *
801      *  <B>Note:</B> Some databases may not return the column descriptions for a
802      *  procedure. Additional columns beyond REMARKS can be defined by the
803      *  database.
804      *
805      * @param  catalog a catalog name; "" retrieves those without a catalog;
806      *      null means drop catalog name from the selection criteria
807      * @param  schemaPattern a schema name pattern; "" retrieves those without a
808      *      schema
809      * @param  procedureNamePattern a procedure name pattern
810      * @param  columnNamePattern a column name pattern
811      * @return  <code>ResultSet</code> - each row describes a stored procedure
812      *      parameter or column
813      * @exception  SQLException if a database access error occurs
814      */
815     public final ResultSet getProcedureColumns( String catalog,
816             String schemaPattern,
817             String procedureNamePattern,
818             String columnNamePattern )
819         throws SQLException {
820         checkIsOpen();
821         return wrap( delegate_.getProcedureColumns( catalog, schemaPattern, procedureNamePattern, columnNamePattern ) );
822     }
823 
824 
825     /***
826      *  Gets a description of tables available in a catalog. <P>
827      *
828      *  Only table descriptions matching the catalog, schema, table name and
829      *  type criteria are returned. They are ordered by TABLE_TYPE, TABLE_SCHEM
830      *  and TABLE_NAME. <P>
831      *
832      *  Each table description has the following columns:
833      *  <OL>
834      *    <LI> <B>TABLE_CAT</B> String => table catalog (may be null)
835      *    <LI> <B>TABLE_SCHEM</B> String => table schema (may be null)
836      *    <LI> <B>TABLE_NAME</B> String => table name
837      *    <LI> <B>TABLE_TYPE</B> String => table type. Typical types are
838      *    "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL
839      *    TEMPORARY", "ALIAS", "SYNONYM".
840      *    <LI> <B>REMARKS</B> String => explanatory comment on the table
841      *  </OL>
842      *  <P>
843      *
844      *  <B>Note:</B> Some databases may not return information for all tables.
845      *
846      * @param  catalog a catalog name; "" retrieves those without a catalog;
847      *      null means drop catalog name from the selection criteria
848      * @param  schemaPattern a schema name pattern; "" retrieves those without a
849      *      schema
850      * @param  tableNamePattern a table name pattern
851      * @param  types a list of table types to include; null returns all types
852      * @return  <code>ResultSet</code> - each row is a table description
853      * @exception  SQLException if a database access error occurs
854      */
855     public final ResultSet getTables( String catalog, String schemaPattern,
856             String tableNamePattern, String types[] )
857         throws SQLException {
858         checkIsOpen();
859         return wrap( delegate_.getTables( catalog, schemaPattern, tableNamePattern, types ) );
860     }
861 
862 
863     /***
864      *  Gets the schema names available in this database. The results are
865      *  ordered by schema name. <P>
866      *
867      *  The schema column is:
868      *  <OL>
869      *    <LI> <B>TABLE_SCHEM</B> String => schema name
870      *  </OL>
871      *
872      *
873      * @return  <code>ResultSet</code> - each row has a single String column
874      *      that is a schema name
875      * @exception  SQLException if a database access error occurs
876      */
877     public final ResultSet getSchemas()
878         throws SQLException {
879         checkIsOpen();
880         return wrap( delegate_.getSchemas() );
881     }
882 
883 
884     /***
885      *  Gets the catalog names available in this database. The results are
886      *  ordered by catalog name. <P>
887      *
888      *  The catalog column is:
889      *  <OL>
890      *    <LI> <B>TABLE_CAT</B> String => catalog name
891      *  </OL>
892      *
893      *
894      * @return  <code>ResultSet</code> - each row has a single String column
895      *      that is a catalog name
896      * @exception  SQLException if a database access error occurs
897      */
898     public final ResultSet getCatalogs()
899         throws SQLException {
900         checkIsOpen();
901         return wrap( delegate_.getCatalogs() );
902     }
903 
904 
905     /***
906      *  Gets the table types available in this database. The results are ordered
907      *  by table type. <P>
908      *
909      *  The table type is:
910      *  <OL>
911      *    <LI> <B>TABLE_TYPE</B> String => table type. Typical types are
912      *    "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL
913      *    TEMPORARY", "ALIAS", "SYNONYM".
914      *  </OL>
915      *
916      *
917      * @return  <code>ResultSet</code> - each row has a single String column
918      *      that is a table type
919      * @exception  SQLException if a database access error occurs
920      */
921     public final ResultSet getTableTypes()
922         throws SQLException {
923         checkIsOpen();
924         return wrap( delegate_.getTableTypes() );
925     }
926 
927 
928     /***
929      *  Gets a description of table columns available in the specified catalog.
930      *  <P>
931      *
932      *  Only column descriptions matching the catalog, schema, table and column
933      *  name criteria are returned. They are ordered by TABLE_SCHEM, TABLE_NAME
934      *  and ORDINAL_POSITION. <P>
935      *
936      *  Each column description has the following columns:
937      *  <OL>
938      *    <LI> <B>TABLE_CAT</B> String => table catalog (may be null)
939      *    <LI> <B>TABLE_SCHEM</B> String => table schema (may be null)
940      *    <LI> <B>TABLE_NAME</B> String => table name
941      *    <LI> <B>COLUMN_NAME</B> String => column name
942      *    <LI> <B>DATA_TYPE</B> short => SQL type from java.sql.Types
943      *    <LI> <B>TYPE_NAME</B> String => Data source dependent type name, for a
944      *    UDT the type name is fully qualified
945      *    <LI> <B>COLUMN_SIZE</B> int => column size. For char or date types
946      *    this is the maximum number of characters, for numeric or decimal types
947      *    this is precision.
948      *    <LI> <B>BUFFER_LENGTH</B> is not used.
949      *    <LI> <B>DECIMAL_DIGITS</B> int => the number of fractional digits
950      *    <LI> <B>NUM_PREC_RADIX</B> int => Radix (typically either 10 or 2)
951      *
952      *    <LI> <B>NULLABLE</B> int => is NULL allowed?
953      *    <UL>
954      *      <LI> columnNoNulls - might not allow NULL values
955      *      <LI> columnNullable - definitely allows NULL values
956      *      <LI> columnNullableUnknown - nullability unknown
957      *    </UL>
958      *
959      *    <LI> <B>REMARKS</B> String => comment describing column (may be null)
960      *
961      *    <LI> <B>COLUMN_DEF</B> String => default value (may be null)
962      *    <LI> <B>SQL_DATA_TYPE</B> int => unused
963      *    <LI> <B>SQL_DATETIME_SUB</B> int => unused
964      *    <LI> <B>CHAR_OCTET_LENGTH</B> int => for char types the maximum number
965      *    of bytes in the column
966      *    <LI> <B>ORDINAL_POSITION</B> int => index of column in table (starting
967      *    at 1)
968      *    <LI> <B>IS_NULLABLE</B> String => "NO" means column definitely does
969      *    not allow NULL values; "YES" means the column might allow NULL values.
970      *    An empty string means nobody knows.
971      *  </OL>
972      *
973      *
974      * @param  catalog a catalog name; "" retrieves those without a catalog;
975      *      null means drop catalog name from the selection criteria
976      * @param  schemaPattern a schema name pattern; "" retrieves those without a
977      *      schema
978      * @param  tableNamePattern a table name pattern
979      * @param  columnNamePattern a column name pattern
980      * @return  <code>ResultSet</code> - each row is a column description
981      * @exception  SQLException if a database access error occurs
982      */
983     public final ResultSet getColumns( String catalog, String schemaPattern,
984             String tableNamePattern, String columnNamePattern )
985         throws SQLException {
986         checkIsOpen();
987         return wrap( delegate_.getColumns( catalog, schemaPattern, tableNamePattern, columnNamePattern ) );
988     }
989 
990 
991     /***
992      *  Gets a description of the access rights for a table's columns. <P>
993      *
994      *  Only privileges matching the column name criteria are returned. They are
995      *  ordered by COLUMN_NAME and PRIVILEGE. <P>
996      *
997      *  Each privilige description has the following columns:
998      *  <OL>
999      *    <LI> <B>TABLE_CAT</B> String => table catalog (may be null)
1000      *    <LI> <B>TABLE_SCHEM</B> String => table schema (may be null)
1001      *    <LI> <B>TABLE_NAME</B> String => table name
1002      *    <LI> <B>COLUMN_NAME</B> String => column name
1003      *    <LI> <B>GRANTOR</B> => grantor of access (may be null)
1004      *    <LI> <B>GRANTEE</B> String => grantee of access
1005      *    <LI> <B>PRIVILEGE</B> String => name of access (SELECT, INSERT,
1006      *    UPDATE, REFRENCES, ...)
1007      *    <LI> <B>IS_GRANTABLE</B> String => "YES" if grantee is permitted to
1008      *    grant to others; "NO" if not; null if unknown
1009      *  </OL>
1010      *
1011      *
1012      * @param  catalog a catalog name; "" retrieves those without a catalog;
1013      *      null means drop catalog name from the selection criteria
1014      * @param  schema a schema name; "" retrieves those without a schema
1015      * @param  table a table name
1016      * @param  columnNamePattern a column name pattern
1017      * @return  <code>ResultSet</code> - each row is a column privilege
1018      *      description
1019      * @exception  SQLException if a database access error occurs
1020      */
1021     public final ResultSet getColumnPrivileges( String catalog, String schema,
1022             String table, String columnNamePattern )
1023         throws SQLException {
1024         checkIsOpen();
1025         return wrap( delegate_.getColumnPrivileges( catalog, schema, table, columnNamePattern ) );
1026     }
1027 
1028 
1029     /***
1030      *  Gets a description of the access rights for each table available in a
1031      *  catalog. Note that a table privilege applies to one or more columns in
1032      *  the table. It would be wrong to assume that this priviledge applies to
1033      *  all columns (this may be true for some systems but is not true for all.)
1034      *  <P>
1035      *
1036      *  Only privileges matching the schema and table name criteria are
1037      *  returned. They are ordered by TABLE_SCHEM, TABLE_NAME, and PRIVILEGE.
1038      *  <P>
1039      *
1040      *  Each privilige description has the following columns:
1041      *  <OL>
1042      *    <LI> <B>TABLE_CAT</B> String => table catalog (may be null)
1043      *    <LI> <B>TABLE_SCHEM</B> String => table schema (may be null)
1044      *    <LI> <B>TABLE_NAME</B> String => table name
1045      *    <LI> <B>GRANTOR</B> => grantor of access (may be null)
1046      *    <LI> <B>GRANTEE</B> String => grantee of access
1047      *    <LI> <B>PRIVILEGE</B> String => name of access (SELECT, INSERT,
1048      *    UPDATE, REFRENCES, ...)
1049      *    <LI> <B>IS_GRANTABLE</B> String => "YES" if grantee is permitted to
1050      *    grant to others; "NO" if not; null if unknown
1051      *  </OL>
1052      *
1053      *
1054      * @param  catalog a catalog name; "" retrieves those without a catalog;
1055      *      null means drop catalog name from the selection criteria
1056      * @param  schemaPattern a schema name pattern; "" retrieves those without a
1057      *      schema
1058      * @param  tableNamePattern a table name pattern
1059      * @return  <code>ResultSet</code> - each row is a table privilege
1060      *      description
1061      * @exception  SQLException if a database access error occurs
1062      */
1063     public final ResultSet getTablePrivileges( String catalog, String schemaPattern,
1064             String tableNamePattern )
1065         throws SQLException {
1066         checkIsOpen();
1067         return wrap( delegate_.getTablePrivileges( catalog, schemaPattern, tableNamePattern ) );
1068     }
1069 
1070 
1071     /***
1072      *  Gets a description of a table's optimal set of columns that uniquely
1073      *  identifies a row. They are ordered by SCOPE. <P>
1074      *
1075      *  Each column description has the following columns:
1076      *  <OL>
1077      *    <LI> <B>SCOPE</B> short => actual scope of result
1078      *    <UL>
1079      *      <LI> bestRowTemporary - very temporary, while using row
1080      *      <LI> bestRowTransaction - valid for remainder of current transaction
1081      *
1082      *      <LI> bestRowSession - valid for remainder of current session
1083      *    </UL>
1084      *
1085      *    <LI> <B>COLUMN_NAME</B> String => column name
1086      *    <LI> <B>DATA_TYPE</B> short => SQL data type from java.sql.Types
1087      *    <LI> <B>TYPE_NAME</B> String => Data source dependent type name, for a
1088      *    UDT the type name is fully qualified
1089      *    <LI> <B>COLUMN_SIZE</B> int => precision
1090      *    <LI> <B>BUFFER_LENGTH</B> int => not used
1091      *    <LI> <B>DECIMAL_DIGITS</B> short => scale
1092      *    <LI> <B>PSEUDO_COLUMN</B> short => is this a pseudo column like an
1093      *    Oracle ROWID
1094      *    <UL>
1095      *      <LI> bestRowUnknown - may or may not be pseudo column
1096      *      <LI> bestRowNotPseudo - is NOT a pseudo column
1097      *      <LI> bestRowPseudo - is a pseudo column
1098      *    </UL>
1099      *
1100      *  </OL>
1101      *
1102      *
1103      * @param  catalog a catalog name; "" retrieves those without a catalog;
1104      *      null means drop catalog name from the selection criteria
1105      * @param  schema a schema name; "" retrieves those without a schema
1106      * @param  table a table name
1107      * @param  scope the scope of interest; use same values as SCOPE
1108      * @param  nullable include columns that are nullable?
1109      * @return  <code>ResultSet</code> - each row is a column description
1110      * @exception  SQLException if a database access error occurs
1111      */
1112     public final ResultSet getBestRowIdentifier( String catalog, String schema,
1113             String table, int scope, boolean nullable )
1114         throws SQLException {
1115         checkIsOpen();
1116         return wrap( delegate_.getBestRowIdentifier( catalog, schema, table, scope, nullable ) );
1117     }
1118 
1119 
1120     /***
1121      *  Gets a description of a table's columns that are automatically updated
1122      *  when any value in a row is updated. They are unordered. <P>
1123      *
1124      *  Each column description has the following columns:
1125      *  <OL>
1126      *    <LI> <B>SCOPE</B> short => is not used
1127      *    <LI> <B>COLUMN_NAME</B> String => column name
1128      *    <LI> <B>DATA_TYPE</B> short => SQL data type from java.sql.Types
1129      *    <LI> <B>TYPE_NAME</B> String => Data source dependent type name
1130      *    <LI> <B>COLUMN_SIZE</B> int => precision
1131      *    <LI> <B>BUFFER_LENGTH</B> int => length of column value in bytes
1132      *    <LI> <B>DECIMAL_DIGITS</B> short => scale
1133      *    <LI> <B>PSEUDO_COLUMN</B> short => is this a pseudo column like an
1134      *    Oracle ROWID
1135      *    <UL>
1136      *      <LI> versionColumnUnknown - may or may not be pseudo column
1137      *      <LI> versionColumnNotPseudo - is NOT a pseudo column
1138      *      <LI> versionColumnPseudo - is a pseudo column
1139      *    </UL>
1140      *
1141      *  </OL>
1142      *
1143      *
1144      * @param  catalog a catalog name; "" retrieves those without a catalog;
1145      *      null means drop catalog name from the selection criteria
1146      * @param  schema a schema name; "" retrieves those without a schema
1147      * @param  table a table name
1148      * @return  <code>ResultSet</code> - each row is a column description
1149      * @exception  SQLException if a database access error occurs
1150      */
1151     public final ResultSet getVersionColumns( String catalog, String schema,
1152             String table )
1153         throws SQLException {
1154         checkIsOpen();
1155         return wrap( delegate_.getVersionColumns( catalog, schema, table ) );
1156     }
1157 
1158 
1159     /***
1160      *  Gets a description of a table's primary key columns. They are ordered by
1161      *  COLUMN_NAME. <P>
1162      *
1163      *  Each primary key column description has the following columns:
1164      *  <OL>
1165      *    <LI> <B>TABLE_CAT</B> String => table catalog (may be null)
1166      *    <LI> <B>TABLE_SCHEM</B> String => table schema (may be null)
1167      *    <LI> <B>TABLE_NAME</B> String => table name
1168      *    <LI> <B>COLUMN_NAME</B> String => column name
1169      *    <LI> <B>KEY_SEQ</B> short => sequence number within primary key
1170      *    <LI> <B>PK_NAME</B> String => primary key name (may be null)
1171      *  </OL>
1172      *
1173      *
1174      * @param  catalog a catalog name; "" retrieves those without a catalog;
1175      *      null means drop catalog name from the selection criteria
1176      * @param  schema a schema name; "" retrieves those without a schema
1177      * @param  table a table name
1178      * @return  <code>ResultSet</code> - each row is a primary key column
1179      *      description
1180      * @exception  SQLException if a database access error occurs
1181      */
1182     public final ResultSet getPrimaryKeys( String catalog, String schema,
1183             String table )
1184         throws SQLException {
1185         checkIsOpen();
1186         return wrap( delegate_.getPrimaryKeys( catalog, schema, table ) );
1187     }
1188 
1189 
1190     /***
1191      *  Gets a description of the primary key columns that are referenced by a
1192      *  table's foreign key columns (the primary keys imported by a table). They
1193      *  are ordered by PKTABLE_CAT, PKTABLE_SCHEM, PKTABLE_NAME, and KEY_SEQ.
1194      *  <P>
1195      *
1196      *  Each primary key column description has the following columns:
1197      *  <OL>
1198      *    <LI> <B>PKTABLE_CAT</B> String => primary key table catalog being
1199      *    imported (may be null)
1200      *    <LI> <B>PKTABLE_SCHEM</B> String => primary key table schema being
1201      *    imported (may be null)
1202      *    <LI> <B>PKTABLE_NAME</B> String => primary key table name being
1203      *    imported
1204      *    <LI> <B>PKCOLUMN_NAME</B> String => primary key column name being
1205      *    imported
1206      *    <LI> <B>FKTABLE_CAT</B> String => foreign key table catalog (may be
1207      *    null)
1208      *    <LI> <B>FKTABLE_SCHEM</B> String => foreign key table schema (may be
1209      *    null)
1210      *    <LI> <B>FKTABLE_NAME</B> String => foreign key table name
1211      *    <LI> <B>FKCOLUMN_NAME</B> String => foreign key column name
1212      *    <LI> <B>KEY_SEQ</B> short => sequence number within foreign key
1213      *    <LI> <B>UPDATE_RULE</B> short => What happens to foreign key when
1214      *    primary is updated:
1215      *    <UL>
1216      *      <LI> importedNoAction - do not allow update of primary key if it has
1217      *      been imported
1218      *      <LI> importedKeyCascade - change imported key to agree with primary
1219      *      key update
1220      *      <LI> importedKeySetNull - change imported key to NULL if its primary
1221      *      key has been updated
1222      *      <LI> importedKeySetDefault - change imported key to default values
1223      *      if its primary key has been updated
1224      *      <LI> importedKeyRestrict - same as importedKeyNoAction (for ODBC 2.x
1225      *      compatibility)
1226      *    </UL>
1227      *
1228      *    <LI> <B>DELETE_RULE</B> short => What happens to the foreign key when
1229      *    primary is deleted.
1230      *    <UL>
1231      *      <LI> importedKeyNoAction - do not allow delete of primary key if it
1232      *      has been imported
1233      *      <LI> importedKeyCascade - delete rows that import a deleted key
1234      *      <LI> importedKeySetNull - change imported key to NULL if its primary
1235      *      key has been deleted
1236      *      <LI> importedKeyRestrict - same as importedKeyNoAction (for ODBC 2.x
1237      *      compatibility)
1238      *      <LI> importedKeySetDefault - change imported key to default if its
1239      *      primary key has been deleted
1240      *    </UL>
1241      *
1242      *    <LI> <B>FK_NAME</B> String => foreign key name (may be null)
1243      *    <LI> <B>PK_NAME</B> String => primary key name (may be null)
1244      *    <LI> <B>DEFERRABILITY</B> short => can the evaluation of foreign key
1245      *    constraints be deferred until commit
1246      *    <UL>
1247      *      <LI> importedKeyInitiallyDeferred - see SQL92 for definition
1248      *      <LI> importedKeyInitiallyImmediate - see SQL92 for definition
1249      *      <LI> importedKeyNotDeferrable - see SQL92 for definition
1250      *    </UL>
1251      *
1252      *  </OL>
1253      *
1254      *
1255      * @param  catalog a catalog name; "" retrieves those without a catalog;
1256      *      null means drop catalog name from the selection criteria
1257      * @param  schema a schema name; "" retrieves those without a schema
1258      * @param  table a table name
1259      * @return  <code>ResultSet</code> - each row is a primary key column
1260      *      description
1261      * @exception  SQLException if a database access error occurs
1262      */
1263     public final ResultSet getImportedKeys( String catalog, String schema,
1264             String table )
1265         throws SQLException {
1266         checkIsOpen();
1267         return wrap( delegate_.getImportedKeys( catalog, schema, table ) );
1268     }
1269 
1270 
1271     /***
1272      *  Gets a description of the foreign key columns that reference a table's
1273      *  primary key columns (the foreign keys exported by a table). They are
1274      *  ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and KEY_SEQ. <P>
1275      *
1276      *  Each foreign key column description has the following columns:
1277      *  <OL>
1278      *    <LI> <B>PKTABLE_CAT</B> String => primary key table catalog (may be
1279      *    null)
1280      *    <LI> <B>PKTABLE_SCHEM</B> String => primary key table schema (may be
1281      *    null)
1282      *    <LI> <B>PKTABLE_NAME</B> String => primary key table name
1283      *    <LI> <B>PKCOLUMN_NAME</B> String => primary key column name
1284      *    <LI> <B>FKTABLE_CAT</B> String => foreign key table catalog (may be
1285      *    null) being exported (may be null)
1286      *    <LI> <B>FKTABLE_SCHEM</B> String => foreign key table schema (may be
1287      *    null) being exported (may be null)
1288      *    <LI> <B>FKTABLE_NAME</B> String => foreign key table name being
1289      *    exported
1290      *    <LI> <B>FKCOLUMN_NAME</B> String => foreign key column name being
1291      *    exported
1292      *    <LI> <B>KEY_SEQ</B> short => sequence number within foreign key
1293      *    <LI> <B>UPDATE_RULE</B> short => What happens to foreign key when
1294      *    primary is updated:
1295      *    <UL>
1296      *      <LI> importedNoAction - do not allow update of primary key if it has
1297      *      been imported
1298      *      <LI> importedKeyCascade - change imported key to agree with primary
1299      *      key update
1300      *      <LI> importedKeySetNull - change imported key to NULL if its primary
1301      *      key has been updated
1302      *      <LI> importedKeySetDefault - change imported key to default values
1303      *      if its primary key has been updated
1304      *      <LI> importedKeyRestrict - same as importedKeyNoAction (for ODBC 2.x
1305      *      compatibility)
1306      *    </UL>
1307      *
1308      *    <LI> <B>DELETE_RULE</B> short => What happens to the foreign key when
1309      *    primary is deleted.
1310      *    <UL>
1311      *      <LI> importedKeyNoAction - do not allow delete of primary key if it
1312      *      has been imported
1313      *      <LI> importedKeyCascade - delete rows that import a deleted key
1314      *      <LI> importedKeySetNull - change imported key to NULL if its primary
1315      *      key has been deleted
1316      *      <LI> importedKeyRestrict - same as importedKeyNoAction (for ODBC 2.x
1317      *      compatibility)
1318      *      <LI> importedKeySetDefault - change imported key to default if its
1319      *      primary key has been deleted
1320      *    </UL>
1321      *
1322      *    <LI> <B>FK_NAME</B> String => foreign key name (may be null)
1323      *    <LI> <B>PK_NAME</B> String => primary key name (may be null)
1324      *    <LI> <B>DEFERRABILITY</B> short => can the evaluation of foreign key
1325      *    constraints be deferred until commit
1326      *    <UL>
1327      *      <LI> importedKeyInitiallyDeferred - see SQL92 for definition
1328      *      <LI> importedKeyInitiallyImmediate - see SQL92 for definition
1329      *      <LI> importedKeyNotDeferrable - see SQL92 for definition
1330      *    </UL>
1331      *
1332      *  </OL>
1333      *
1334      *
1335      * @param  catalog a catalog name; "" retrieves those without a catalog;
1336      *      null means drop catalog name from the selection criteria
1337      * @param  schema a schema name; "" retrieves those without a schema
1338      * @param  table a table name
1339      * @return  <code>ResultSet</code> - each row is a foreign key column
1340      *      description
1341      * @exception  SQLException if a database access error occurs
1342      */
1343     public final ResultSet getExportedKeys( String catalog, String schema,
1344             String table )
1345         throws SQLException {
1346         checkIsOpen();
1347         return wrap( delegate_.getExportedKeys( catalog, schema, table ) );
1348     }
1349 
1350 
1351     /***
1352      *  Gets a description of the foreign key columns in the foreign key table
1353      *  that reference the primary key columns of the primary key table
1354      *  (describe how one table imports another's key). This should normally
1355      *  return a single foreign key/primary key pair (most tables only import a
1356      *  foreign key from a table once.) They are ordered by FKTABLE_CAT,
1357      *  FKTABLE_SCHEM, FKTABLE_NAME, and KEY_SEQ. <P>
1358      *
1359      *  Each foreign key column description has the following columns:
1360      *  <OL>
1361      *    <LI> <B>PKTABLE_CAT</B> String => primary key table catalog (may be
1362      *    null)
1363      *    <LI> <B>PKTABLE_SCHEM</B> String => primary key table schema (may be
1364      *    null)
1365      *    <LI> <B>PKTABLE_NAME</B> String => primary key table name
1366      *    <LI> <B>PKCOLUMN_NAME</B> String => primary key column name
1367      *    <LI> <B>FKTABLE_CAT</B> String => foreign key table catalog (may be
1368      *    null) being exported (may be null)
1369      *    <LI> <B>FKTABLE_SCHEM</B> String => foreign key table schema (may be
1370      *    null) being exported (may be null)
1371      *    <LI> <B>FKTABLE_NAME</B> String => foreign key table name being
1372      *    exported
1373      *    <LI> <B>FKCOLUMN_NAME</B> String => foreign key column name being
1374      *    exported
1375      *    <LI> <B>KEY_SEQ</B> short => sequence number within foreign key
1376      *    <LI> <B>UPDATE_RULE</B> short => What happens to foreign key when
1377      *    primary is updated:
1378      *    <UL>
1379      *      <LI> importedNoAction - do not allow update of primary key if it has
1380      *      been imported
1381      *      <LI> importedKeyCascade - change imported key to agree with primary
1382      *      key update
1383      *      <LI> importedKeySetNull - change imported key to NULL if its primary
1384      *      key has been updated
1385      *      <LI> importedKeySetDefault - change imported key to default values
1386      *      if its primary key has been updated
1387      *      <LI> importedKeyRestrict - same as importedKeyNoAction (for ODBC 2.x
1388      *      compatibility)
1389      *    </UL>
1390      *
1391      *    <LI> <B>DELETE_RULE</B> short => What happens to the foreign key when
1392      *    primary is deleted.
1393      *    <UL>
1394      *      <LI> importedKeyNoAction - do not allow delete of primary key if it
1395      *      has been imported
1396      *      <LI> importedKeyCascade - delete rows that import a deleted key
1397      *      <LI> importedKeySetNull - change imported key to NULL if its primary
1398      *      key has been deleted
1399      *      <LI> importedKeyRestrict - same as importedKeyNoAction (for ODBC 2.x
1400      *      compatibility)
1401      *      <LI> importedKeySetDefault - change imported key to default if its
1402      *      primary key has been deleted
1403      *    </UL>
1404      *
1405      *    <LI> <B>FK_NAME</B> String => foreign key name (may be null)
1406      *    <LI> <B>PK_NAME</B> String => primary key name (may be null)
1407      *    <LI> <B>DEFERRABILITY</B> short => can the evaluation of foreign key
1408      *    constraints be deferred until commit
1409      *    <UL>
1410      *      <LI> importedKeyInitiallyDeferred - see SQL92 for definition
1411      *      <LI> importedKeyInitiallyImmediate - see SQL92 for definition
1412      *      <LI> importedKeyNotDeferrable - see SQL92 for definition
1413      *    </UL>
1414      *
1415      *  </OL>
1416      *
1417      *
1418      * @param  primaryCatalog a catalog name; "" retrieves those without a
1419      *      catalog; null means drop catalog name from the selection criteria
1420      * @param  primarySchema a schema name; "" retrieves those without a schema
1421      * @param  primaryTable the table name that exports the key
1422      * @param  foreignCatalog a catalog name; "" retrieves those without a
1423      *      catalog; null means drop catalog name from the selection criteria
1424      * @param  foreignSchema a schema name; "" retrieves those without a schema
1425      * @param  foreignTable the table name that imports the key
1426      * @return  <code>ResultSet</code> - each row is a foreign key column
1427      *      description
1428      * @exception  SQLException if a database access error occurs
1429      */
1430     public final ResultSet getCrossReference(
1431             String primaryCatalog, String primarySchema, String primaryTable,
1432             String foreignCatalog, String foreignSchema, String foreignTable
1433              )
1434         throws SQLException {
1435         checkIsOpen();
1436         return wrap( delegate_.getCrossReference( primaryCatalog, primarySchema, primaryTable,
1437                 foreignCatalog, foreignSchema, foreignTable ) );
1438     }
1439 
1440 
1441     /***
1442      *  Gets a description of all the standard SQL types supported by this
1443      *  database. They are ordered by DATA_TYPE and then by how closely the data
1444      *  type maps to the corresponding JDBC SQL type. <P>
1445      *
1446      *  Each type description has the following columns:
1447      *  <OL>
1448      *    <LI> <B>TYPE_NAME</B> String => Type name
1449      *    <LI> <B>DATA_TYPE</B> short => SQL data type from java.sql.Types
1450      *    <LI> <B>PRECISION</B> int => maximum precision
1451      *    <LI> <B>LITERAL_PREFIX</B> String => prefix used to quote a literal
1452      *    (may be null)
1453      *    <LI> <B>LITERAL_SUFFIX</B> String => suffix used to quote a literal
1454      *    (may be null)
1455      *    <LI> <B>CREATE_PARAMS</B> String => parameters used in creating the
1456      *    type (may be null)
1457      *    <LI> <B>NULLABLE</B> short => can you use NULL for this type?
1458      *    <UL>
1459      *      <LI> typeNoNulls - does not allow NULL values
1460      *      <LI> typeNullable - allows NULL values
1461      *      <LI> typeNullableUnknown - nullability unknown
1462      *    </UL>
1463      *
1464      *    <LI> <B>CASE_SENSITIVE</B> boolean=> is it case sensitive?
1465      *    <LI> <B>SEARCHABLE</B> short => can you use "WHERE" based on this
1466      *    type:
1467      *    <UL>
1468      *      <LI> typePredNone - No support
1469      *      <LI> typePredChar - Only supported with WHERE .. LIKE
1470      *      <LI> typePredBasic - Supported except for WHERE .. LIKE
1471      *      <LI> typeSearchable - Supported for all WHERE ..
1472      *    </UL>
1473      *
1474      *    <LI> <B>UNSIGNED_ATTRIBUTE</B> boolean => is it unsigned?
1475      *    <LI> <B>FIXED_PREC_SCALE</B> boolean => can it be a money value?
1476      *    <LI> <B>AUTO_INCREMENT</B> boolean => can it be used for an
1477      *    auto-increment value?
1478      *    <LI> <B>LOCAL_TYPE_NAME</B> String => localized version of type name
1479      *    (may be null)
1480      *    <LI> <B>MINIMUM_SCALE</B> short => minimum scale supported
1481      *    <LI> <B>MAXIMUM_SCALE</B> short => maximum scale supported
1482      *    <LI> <B>SQL_DATA_TYPE</B> int => unused
1483      *    <LI> <B>SQL_DATETIME_SUB</B> int => unused
1484      *    <LI> <B>NUM_PREC_RADIX</B> int => usually 2 or 10
1485      *  </OL>
1486      *
1487      *
1488      * @return  <code>ResultSet</code> - each row is an SQL type description
1489      * @exception  SQLException if a database access error occurs
1490      */
1491     public final ResultSet getTypeInfo()
1492         throws SQLException {
1493         checkIsOpen();
1494         return wrap( delegate_.getTypeInfo() );
1495     }
1496 
1497 
1498     /***
1499      *  Gets a description of a table's indices and statistics. They are ordered
1500      *  by NON_UNIQUE, TYPE, INDEX_NAME, and ORDINAL_POSITION. <P>
1501      *
1502      *  Each index column description has the following columns:
1503      *  <OL>
1504      *    <LI> <B>TABLE_CAT</B> String => table catalog (may be null)
1505      *    <LI> <B>TABLE_SCHEM</B> String => table schema (may be null)
1506      *    <LI> <B>TABLE_NAME</B> String => table name
1507      *    <LI> <B>NON_UNIQUE</B> boolean => Can index values be non-unique?
1508      *    false when TYPE is tableIndexStatistic
1509      *    <LI> <B>INDEX_QUALIFIER</B> String => index catalog (may be null);
1510      *    null when TYPE is tableIndexStatistic
1511      *    <LI> <B>INDEX_NAME</B> String => index name; null when TYPE is
1512      *    tableIndexStatistic
1513      *    <LI> <B>TYPE</B> short => index type:
1514      *    <UL>
1515      *      <LI> tableIndexStatistic - this identifies table statistics that are
1516      *      returned in conjuction with a table's index descriptions
1517      *      <LI> tableIndexClustered - this is a clustered index
1518      *      <LI> tableIndexHashed - this is a hashed index
1519      *      <LI> tableIndexOther - this is some other style of index
1520      *    </UL>
1521      *
1522      *    <LI> <B>ORDINAL_POSITION</B> short => column sequence number within
1523      *    index; zero when TYPE is tableIndexStatistic
1524      *    <LI> <B>COLUMN_NAME</B> String => column name; null when TYPE is
1525      *    tableIndexStatistic
1526      *    <LI> <B>ASC_OR_DESC</B> String => column sort sequence, "A" =>
1527      *    ascending, "D" => descending, may be null if sort sequence is not
1528      *    supported; null when TYPE is tableIndexStatistic
1529      *    <LI> <B>CARDINALITY</B> int => When TYPE is tableIndexStatistic, then
1530      *    this is the number of rows in the table; otherwise, it is the number
1531      *    of unique values in the index.
1532      *    <LI> <B>PAGES</B> int => When TYPE is tableIndexStatisic then this is
1533      *    the number of pages used for the table, otherwise it is the number of
1534      *    pages used for the current index.
1535      *    <LI> <B>FILTER_CONDITION</B> String => Filter condition, if any. (may
1536      *    be null)
1537      *  </OL>
1538      *
1539      *
1540      * @param  catalog a catalog name; "" retrieves those without a catalog;
1541      *      null means drop catalog name from the selection criteria
1542      * @param  schema a schema name; "" retrieves those without a schema
1543      * @param  table a table name
1544      * @param  unique when true, return only indices for unique values; when
1545      *      false, return indices regardless of whether unique or not
1546      * @param  approximate when true, result is allowed to reflect approximate
1547      *      or out of data values; when false, results are requested to be
1548      *      accurate
1549      * @return  <code>ResultSet</code> - each row is an index column description
1550      * @exception  SQLException if a database access error occurs
1551      */
1552     public final ResultSet getIndexInfo( String catalog, String schema, String table,
1553             boolean unique, boolean approximate )
1554         throws SQLException {
1555         checkIsOpen();
1556         return wrap( delegate_.getIndexInfo( catalog, schema, table, unique, approximate ) );
1557     }
1558 
1559 
1560     /***
1561      *  Gets a description of the user-defined types defined in a particular
1562      *  schema. Schema-specific UDTs may have type JAVA_OBJECT, STRUCT, or
1563      *  DISTINCT. <P>
1564      *
1565      *  Only types matching the catalog, schema, type name and type criteria are
1566      *  returned. They are ordered by DATA_TYPE, TYPE_SCHEM and TYPE_NAME. The
1567      *  type name parameter may be a fully-qualified name. In this case, the
1568      *  catalog and schemaPattern parameters are ignored. <P>
1569      *
1570      *  Each type description has the following columns:
1571      *  <OL>
1572      *    <LI> <B>TYPE_CAT</B> String => the type's catalog (may be null)
1573      *    <LI> <B>TYPE_SCHEM</B> String => type's schema (may be null)
1574      *    <LI> <B>TYPE_NAME</B> String => type name
1575      *    <LI> <B>CLASS_NAME</B> String => Java class name
1576      *    <LI> <B>DATA_TYPE</B> String => type value defined in java.sql.Types.
1577      *    One of JAVA_OBJECT, STRUCT, or DISTINCT
1578      *    <LI> <B>REMARKS</B> String => explanatory comment on the type
1579      *  </OL>
1580      *  <P>
1581      *
1582      *  <B>Note:</B> If the driver does not support UDTs, an empty result set is
1583      *  returned.
1584      *
1585      * @param  catalog a catalog name; "" retrieves those without a catalog;
1586      *      null means drop catalog name from the selection criteria
1587      * @param  schemaPattern a schema name pattern; "" retrieves those without a
1588      *      schema
1589      * @param  typeNamePattern a type name pattern; may be a fully-qualified
1590      *      name
1591      * @param  types a list of user-named types to include (JAVA_OBJECT, STRUCT,
1592      *      or DISTINCT); null returns all types
1593      * @return  <code>ResultSet</code> - each row is a type description
1594      * @exception  SQLException if a database access error occurs
1595      */
1596     public final ResultSet getUDTs( String catalog, String schemaPattern,
1597             String typeNamePattern, int[] types )
1598         throws SQLException {
1599         checkIsOpen();
1600         return wrap( delegate_.getUDTs( catalog, schemaPattern, typeNamePattern, types ) );
1601     }
1602 
1603 
1604     /***
1605      *  Retrieves the connection that produced this metadata object.
1606      *
1607      * @return  the connection that produced this metadata object
1608      * @exception  SQLException If an error occurs
1609      */
1610     public final Connection getConnection()
1611         throws SQLException {
1612         checkIsOpen();
1613         return connection_;
1614     }
1615 
1616 
1617     /***
1618      *  Close this object and any result sets that it created
1619      *
1620      * @exception  SQLException If an error occurs
1621      */
1622     public final void close()
1623         throws SQLException {
1624         if( isOpen_ ) {
1625             ResultSetWrapper resultSetWrapper;
1626             final Iterator iterator = openResultSets_.iterator();
1627             while( iterator.hasNext() ) {
1628                 resultSetWrapper = (ResultSetWrapper)iterator.next();
1629                 if( resultSetWrapper.isClosed() == false ) {
1630                     resultSetWrapper.close();
1631                 }
1632             }
1633             openResultSets_.clear();
1634         }
1635         else {
1636             throw new AlreadyClosedException( "object is already closed" );
1637         }
1638         isOpen_ = false;
1639     }
1640 
1641 
1642     /***
1643      *  Return true if all the procedures returned by getProcedures can be called by the
1644      *  current user.
1645      *
1646      * @return  <code>true</code> if so; <code>false</code> otherwise
1647      * @exception  SQLException if a database access error occurs
1648      */
1649     public final boolean allProceduresAreCallable()
1650         throws SQLException {
1651         checkIsOpen();
1652         return delegate_.allProceduresAreCallable();
1653     }
1654 
1655 
1656     /***
1657      *  Return true if all the tables returned by getTable can be SELECTed by the current user.
1658      *
1659      * @return  <code>true</code> if so; <code>false</code> otherwise
1660      * @exception  SQLException if a database access error occurs
1661      */
1662     public final boolean allTablesAreSelectable()
1663         throws SQLException {
1664         checkIsOpen();
1665         return delegate_.allTablesAreSelectable();
1666     }
1667 
1668 
1669     /***
1670      *  Return true if NULL values are sorted high.
1671      *
1672      * @return  <code>true</code> if so; <code>false</code> otherwise
1673      * @exception  SQLException if a database access error occurs
1674      */
1675     public final boolean nullsAreSortedHigh()
1676         throws SQLException {
1677         checkIsOpen();
1678         return delegate_.nullsAreSortedHigh();
1679     }
1680 
1681 
1682     /***
1683      *  Return true if NULL values are sorted low.
1684      *
1685      * @return  <code>true</code> if so; <code>false</code> otherwise
1686      * @exception  SQLException if a database access error occurs
1687      */
1688     public final boolean nullsAreSortedLow()
1689         throws SQLException {
1690         checkIsOpen();
1691         return delegate_.nullsAreSortedLow();
1692     }
1693 
1694 
1695     /***
1696      *  Return true if NULL values are sorted at the start regardless of sort order.
1697      *
1698      * @return  <code>true</code> if so; <code>false</code> otherwise
1699      * @exception  SQLException if a database access error occurs
1700      */
1701     public final boolean nullsAreSortedAtStart()
1702         throws SQLException {
1703         checkIsOpen();
1704         return delegate_.nullsAreSortedAtStart();
1705     }
1706 
1707 
1708     /***
1709      *  Return true if NULL values are sorted at the end regardless of sort order.
1710      *
1711      * @return  <code>true</code> if so; <code>false</code> otherwise
1712      * @exception  SQLException if a database access error occurs
1713      */
1714     public final boolean nullsAreSortedAtEnd()
1715         throws SQLException {
1716         checkIsOpen();
1717         return delegate_.nullsAreSortedAtEnd();
1718     }
1719 
1720 
1721     /***
1722      *  Return true if the database stores tables in a local file.
1723      *
1724      * @return  <code>true</code> if so; <code>false</code> otherwise
1725      * @exception  SQLException if a database access error occurs
1726      */
1727     public final boolean usesLocalFiles()
1728         throws SQLException {
1729         checkIsOpen();
1730         return delegate_.usesLocalFiles();
1731     }
1732 
1733 
1734     /***
1735      *  Return true if the database uses a file for each table.
1736      *
1737      * @return  true if the database uses a local file for each table
1738      * @exception  SQLException if a database access error occurs
1739      */
1740     public final boolean usesLocalFilePerTable()
1741         throws SQLException {
1742         checkIsOpen();
1743         return delegate_.usesLocalFilePerTable();
1744     }
1745 
1746 
1747     /***
1748      *  Return true if the database treats mixed case unquoted SQL identifiers as case
1749      *  sensitive and as a result stores them in mixed case.  A JDBC Compliant
1750      *  <sup><font size=-2>TM</font></sup> driver will always return false.
1751      *
1752      * @return  <code>true</code> if so; <code>false</code> otherwise
1753      * @exception  SQLException if a database access error occurs
1754      */
1755     public final boolean supportsMixedCaseIdentifiers()
1756         throws SQLException {
1757         checkIsOpen();
1758         return delegate_.supportsMixedCaseIdentifiers();
1759     }
1760 
1761 
1762     /***
1763      *  Return true if the database treats mixed case unquoted SQL identifiers as case
1764      *  insensitive and stores them in upper case.
1765      *
1766      * @return  <code>true</code> if so; <code>false</code> otherwise
1767      * @exception  SQLException if a database access error occurs
1768      */
1769     public final boolean storesUpperCaseIdentifiers()
1770         throws SQLException {
1771         checkIsOpen();
1772         return delegate_.storesUpperCaseIdentifiers();
1773     }
1774 
1775 
1776     /***
1777      *  Return true if the database treats mixed case unquoted SQL identifiers as case
1778      *  insensitive and stores them in lower case.
1779      *
1780      * @return  <code>true</code> if so; <code>false</code> otherwise
1781      * @exception  SQLException if a database access error occurs
1782      */
1783     public final boolean storesLowerCaseIdentifiers()
1784         throws SQLException {
1785         checkIsOpen();
1786         return delegate_.storesLowerCaseIdentifiers();
1787     }
1788 
1789 
1790     /***
1791      *  Return true if the database treats mixed case unquoted SQL identifiers as case
1792      *  insensitive and stores them in mixed case.
1793      *
1794      * @return  <code>true</code> if so; <code>false</code> otherwise
1795      * @exception  SQLException if a database access error occurs
1796      */
1797     public final boolean storesMixedCaseIdentifiers()
1798         throws SQLException {
1799         checkIsOpen();
1800         return delegate_.storesMixedCaseIdentifiers();
1801     }
1802 
1803 
1804     /***
1805      *  Return true if the database treats mixed case quoted SQL identifiers as case
1806      *  sensitive and as a result stores them in mixed case. A JDBC Compliant
1807      *  <sup><font size=-2>TM</font></sup> driver will always return true.
1808      *
1809      * @return  <code>true</code> if so; <code>false</code> otherwise
1810      * @exception  SQLException if a database access error occurs
1811      */
1812     public final boolean supportsMixedCaseQuotedIdentifiers()
1813         throws SQLException {
1814         checkIsOpen();
1815         return delegate_.supportsMixedCaseQuotedIdentifiers();
1816     }
1817 
1818 
1819     /***
1820      *  Return true if the database treats mixed case quoted SQL identifiers as case
1821      *  insensitive and stores them in upper case.
1822      *
1823      * @return  <code>true</code> if so; <code>false</code> otherwise
1824      * @exception  SQLException if a database access error occurs
1825      */
1826     public final boolean storesUpperCaseQuotedIdentifiers()
1827         throws SQLException {
1828         checkIsOpen();
1829         return delegate_.storesUpperCaseQuotedIdentifiers();
1830     }
1831 
1832 
1833     /***
1834      *  Return true if the database treats mixed case quoted SQL identifiers as case
1835      *  insensitive and store them in lower case.
1836      *
1837      * @return  <code>true</code> if so; <code>false</code> otherwise
1838      * @exception  SQLException if a database access error occurs
1839      */
1840     public final boolean storesLowerCaseQuotedIdentifiers()
1841         throws SQLException {
1842         checkIsOpen();
1843         return delegate_.storesLowerCaseQuotedIdentifiers();
1844     }
1845 
1846 
1847     /***
1848      *  Return true if the database treats mixed case quoted SQL identifiers as case
1849      *  insensitive and stores them in mixed case.
1850      *
1851      * @return  <code>true</code> if so; <code>false</code> otherwise
1852      * @exception  SQLException if a database access error occurs
1853      */
1854     public final boolean storesMixedCaseQuotedIdentifiers()
1855         throws SQLException {
1856         checkIsOpen();
1857         return delegate_.storesMixedCaseQuotedIdentifiers();
1858     }
1859 
1860     //--------------------------------------------------------------------
1861     // Functions describing which features are supported.
1862 
1863     /***
1864      *  Return true if "ALTER TABLE" with add column is supported.
1865      *
1866      * @return  <code>true</code> if so; <code>false</code> otherwise
1867      * @exception  SQLException if a database access error occurs
1868      */
1869     public final boolean supportsAlterTableWithAddColumn()
1870         throws SQLException {
1871         checkIsOpen();
1872         return delegate_.supportsAlterTableWithAddColumn();
1873     }
1874 
1875 
1876     /***
1877      *  Return true if "ALTER TABLE" with drop column is supported.
1878      *
1879      * @return  <code>true</code> if so; <code>false</code> otherwise
1880      * @exception  SQLException if a database access error occurs
1881      */
1882     public final boolean supportsAlterTableWithDropColumn()
1883         throws SQLException {
1884         checkIsOpen();
1885         return delegate_.supportsAlterTableWithDropColumn();
1886     }
1887 
1888 
1889     /***
1890      *  Return true if column aliasing is supported. <P>
1891      *
1892      *  If so, the SQL AS clause can be used to provide names for computed
1893      *  columns or to provide alias names for columns as required. A JDBC
1894      *  Compliant<sup><font size=-2>TM</font></sup> driver always returns true.
1895      *
1896      * @return  <code>true</code> if so; <code>false</code> otherwise
1897      * @exception  SQLException if a database access error occurs
1898      */
1899     public final boolean supportsColumnAliasing()
1900         throws SQLException {
1901         checkIsOpen();
1902         return delegate_.supportsColumnAliasing();
1903     }
1904 
1905 
1906     /***
1907      *  Return true if concatenations between NULL and non-NULL values are NULL. For SQL-92
1908      *  compliance, a JDBC technology-enabled driver will return <code>true</code>
1909      *  .
1910      *
1911      * @return  <code>true</code> if so; <code>false</code> otherwise
1912      * @exception  SQLException if a database access error occurs
1913      */
1914     public final boolean nullPlusNonNullIsNull()
1915         throws SQLException {
1916         checkIsOpen();
1917         return delegate_.nullPlusNonNullIsNull();
1918     }
1919 
1920 
1921     /***
1922      *  Return true if the CONVERT function between SQL types supported.
1923      *
1924      * @return  <code>true</code> if so; <code>false</code> otherwise
1925      * @exception  SQLException if a database access error occurs
1926      */
1927     public final boolean supportsConvert()
1928         throws SQLException {
1929         checkIsOpen();
1930         return delegate_.supportsConvert();
1931     }
1932 
1933 
1934     /***
1935      *  Return true if CONVERT between the given SQL types supported.
1936      *
1937      * @param  fromType the type to convert from
1938      * @param  toType the type to convert to
1939      * @return  <code>true</code> if so; <code>false</code> otherwise
1940      * @exception  SQLException if a database access error occurs
1941      */
1942     public final boolean supportsConvert( int fromType, int toType )
1943         throws SQLException {
1944         checkIsOpen();
1945         return delegate_.supportsConvert( fromType, toType );
1946     }
1947 
1948 
1949     /***
1950      *  Return true if table correlation names supported. A JDBC
1951      * Compliant<sup><font size=-2>TM</font></sup> driver always returns true.
1952      *
1953      * @return  <code>true</code> if so; <code>false</code> otherwise
1954      * @exception  SQLException if a database access error occurs
1955      */
1956     public final boolean supportsTableCorrelationNames()
1957         throws SQLException {
1958         checkIsOpen();
1959         return delegate_.supportsTableCorrelationNames();
1960     }
1961 
1962 
1963     /***
1964      *  If table correlation names are supported, are they restricted to be
1965      *  different from the names of the tables?
1966      *
1967      * @return  <code>true</code> if so; <code>false</code> otherwise
1968      * @exception  SQLException if a database access error occurs
1969      */
1970     public final boolean supportsDifferentTableCorrelationNames()
1971         throws SQLException {
1972         checkIsOpen();
1973         return delegate_.supportsDifferentTableCorrelationNames();
1974     }
1975 
1976 
1977     /***
1978      *  Are expressions in "ORDER BY" lists supported?
1979      *
1980      * @return  <code>true</code> if so; <code>false</code> otherwise
1981      * @exception  SQLException if a database access error occurs
1982      */
1983     public final boolean supportsExpressionsInOrderBy()
1984         throws SQLException {
1985         checkIsOpen();
1986         return delegate_.supportsExpressionsInOrderBy();
1987     }
1988 
1989 
1990     /***
1991      *  Can an "ORDER BY" clause use columns not in the SELECT statement?
1992      *
1993      * @return  <code>true</code> if so; <code>false</code> otherwise
1994      * @exception  SQLException if a database access error occurs
1995      */
1996     public final boolean supportsOrderByUnrelated()
1997         throws SQLException {
1998         checkIsOpen();
1999         return delegate_.supportsOrderByUnrelated();
2000     }
2001 
2002 
2003     /***
2004      *  Is some form of "GROUP BY" clause supported?
2005      *
2006      * @return  <code>true</code> if so; <code>false</code> otherwise
2007      * @exception  SQLException if a database access error occurs
2008      */
2009     public final boolean supportsGroupBy()
2010         throws SQLException {
2011         checkIsOpen();
2012         return delegate_.supportsGroupBy();
2013     }
2014 
2015 
2016     /***
2017      *  Can a "GROUP BY" clause use columns not in the SELECT?
2018      *
2019      * @return  <code>true</code> if so; <code>false</code> otherwise
2020      * @exception  SQLException if a database access error occurs
2021      */
2022     public final boolean supportsGroupByUnrelated()
2023         throws SQLException {
2024         checkIsOpen();
2025         return delegate_.supportsGroupByUnrelated();
2026     }
2027 
2028 
2029     /***
2030      *  Return true if a "GROUP BY" clause can add columns not in the SELECT provided it
2031      *  specifies all the columns in the SELECT.
2032      *
2033      * @return  <code>true</code> if so; <code>false</code> otherwise
2034      * @exception  SQLException if a database access error occurs
2035      */
2036     public final boolean supportsGroupByBeyondSelect()
2037         throws SQLException {
2038         checkIsOpen();
2039         return delegate_.supportsGroupByBeyondSelect();
2040     }
2041 
2042 
2043     /***
2044      *  Return true if the escape character in "LIKE" clauses is supported.  A JDBC Compliant
2045      *  <sup><font size=-2>TM</font></sup> driver always returns true.
2046      *
2047      * @return  <code>true</code> if so; <code>false</code> otherwise
2048      * @exception  SQLException if a database access error occurs
2049      */
2050     public final boolean supportsLikeEscapeClause()
2051         throws SQLException {
2052         checkIsOpen();
2053         return delegate_.supportsLikeEscapeClause();
2054     }
2055 
2056 
2057     /***
2058      *  Are multiple <code>ResultSet</code> from a single execute supported?
2059      *
2060      * @return  <code>true</code> if so; <code>false</code> otherwise
2061      * @exception  SQLException if a database access error occurs
2062      */
2063     public final boolean supportsMultipleResultSets()
2064         throws SQLException {
2065         checkIsOpen();
2066         return delegate_.supportsMultipleResultSets();
2067     }
2068 
2069 
2070     /***
2071      *  Can we have multiple transactions open at once (on different
2072      *  connections)?
2073      *
2074      * @return  <code>true</code> if so; <code>false</code> otherwise
2075      * @exception  SQLException if a database access error occurs
2076      */
2077     public final boolean supportsMultipleTransactions()
2078         throws SQLException {
2079         checkIsOpen();
2080         return delegate_.supportsMultipleTransactions();
2081     }
2082 
2083 
2084     /***
2085      *  Return true if columns can be defined as non-nullable. A JDBC Compliant<sup><font
2086      *  size=-2>TM</font></sup> driver always returns true.
2087      *
2088      * @return  <code>true</code> if so; <code>false</code> otherwise
2089      * @exception  SQLException if a database access error occurs
2090      */
2091     public final boolean supportsNonNullableColumns()
2092         throws SQLException {
2093         checkIsOpen();
2094         return delegate_.supportsNonNullableColumns();
2095     }
2096 
2097 
2098     /***
2099      *  Return true if the ODBC Minimum SQL grammar is supported. All JDBC Compliant<sup><font
2100      *  size=-2>TM</font></sup> drivers must return true.
2101      *
2102      * @return  <code>true</code> if so; <code>false</code> otherwise
2103      * @exception  SQLException if a database access error occurs
2104      */
2105     public final boolean supportsMinimumSQLGrammar()
2106         throws SQLException {
2107         checkIsOpen();
2108         return delegate_.supportsMinimumSQLGrammar();
2109     }
2110 
2111 
2112     /***
2113      *  Is the ODBC Core SQL grammar supported?
2114      *
2115      * @return  <code>true</code> if so; <code>false</code> otherwise
2116      * @exception  SQLException if a database access error occurs
2117      */
2118     public final boolean supportsCoreSQLGrammar()
2119         throws SQLException {
2120         checkIsOpen();
2121         return delegate_.supportsCoreSQLGrammar();
2122     }
2123 
2124 
2125     /***
2126      *  Is the ODBC Extended SQL grammar supported?
2127      *
2128      * @return  <code>true</code> if so; <code>false</code> otherwise
2129      * @exception  SQLException if a database access error occurs
2130      */
2131     public final boolean supportsExtendedSQLGrammar()
2132         throws SQLException {
2133         checkIsOpen();
2134         return delegate_.supportsExtendedSQLGrammar();
2135     }
2136 
2137 
2138     /***
2139      *  Return true if the ANSI92 entry level SQL grammar is supported. All JDBC Compliant<sup>
2140      *  <font size=-2>TM</font></sup> drivers must return true.
2141      *
2142      * @return  <code>true</code> if so; <code>false</code> otherwise
2143      * @exception  SQLException if a database access error occurs
2144      */
2145     public final boolean supportsANSI92EntryLevelSQL()
2146         throws SQLException {
2147         checkIsOpen();
2148         return delegate_.supportsANSI92EntryLevelSQL();
2149     }
2150 
2151 
2152     /***
2153      *  Is the ANSI92 intermediate SQL grammar supported?
2154      *
2155      * @return  <code>true</code> if so; <code>false</code> otherwise
2156      * @exception  SQLException if a database access error occurs
2157      */
2158     public final boolean supportsANSI92IntermediateSQL()
2159         throws SQLException {
2160         checkIsOpen();
2161         return delegate_.supportsANSI92IntermediateSQL();
2162     }
2163 
2164 
2165     /***
2166      *  Is the ANSI92 full SQL grammar supported?
2167      *
2168      * @return  <code>true</code> if so; <code>false</code> otherwise
2169      * @exception  SQLException if a database access error occurs
2170      */
2171     public final boolean supportsANSI92FullSQL()
2172         throws SQLException {
2173         checkIsOpen();
2174         return delegate_.supportsANSI92FullSQL();
2175     }
2176 
2177 
2178     /***
2179      *  Is the SQL Integrity Enhancement Facility supported?
2180      *
2181      * @return  <code>true</code> if so; <code>false</code> otherwise
2182      * @exception  SQLException if a database access error occurs
2183      */
2184     public final boolean supportsIntegrityEnhancementFacility()
2185         throws SQLException {
2186         checkIsOpen();
2187         return delegate_.supportsIntegrityEnhancementFacility();
2188     }
2189 
2190 
2191     /***
2192      *  Is some form of outer join supported?
2193      *
2194      * @return  <code>true</code> if so; <code>false</code> otherwise
2195      * @exception  SQLException if a database access error occurs
2196      */
2197     public final boolean supportsOuterJoins()
2198         throws SQLException {
2199         checkIsOpen();
2200         return delegate_.supportsOuterJoins();
2201     }
2202 
2203 
2204     /***
2205      *  Are full nested outer joins supported?
2206      *
2207      * @return  <code>true</code> if so; <code>false</code> otherwise
2208      * @exception  SQLException if a database access error occurs
2209      */
2210     public final boolean supportsFullOuterJoins()
2211         throws SQLException {
2212         checkIsOpen();
2213         return delegate_.supportsFullOuterJoins();
2214     }
2215 
2216 
2217     /***
2218      *  Return true if there is limited support for outer joins.  This will be true if
2219      *  supportFullOuterJoins is true.
2220      *
2221      * @return  <code>true</code> if so; <code>false</code> otherwise
2222      * @exception  SQLException if a database access error occurs
2223      */
2224     public final boolean supportsLimitedOuterJoins()
2225         throws SQLException {
2226         checkIsOpen();
2227         return delegate_.supportsLimitedOuterJoins();
2228     }
2229 
2230 
2231     /***
2232      *  Can a schema name be used in a data manipulation statement?
2233      *
2234      * @return  <code>true</code> if so; <code>false</code> otherwise
2235      * @exception  SQLException if a database access error occurs
2236      */
2237     public final boolean supportsSchemasInDataManipulation()
2238         throws SQLException {
2239         checkIsOpen();
2240         return delegate_.supportsSchemasInDataManipulation();
2241     }
2242 
2243 
2244     /***
2245      *  Can a schema name be used in a procedure call statement?
2246      *
2247      * @return  <code>true</code> if so; <code>false</code> otherwise
2248      * @exception  SQLException if a database access error occurs
2249      */
2250     public final boolean supportsSchemasInProcedureCalls()
2251         throws SQLException {
2252         checkIsOpen();
2253         return delegate_.supportsSchemasInProcedureCalls();
2254     }
2255 
2256 
2257     /***
2258      *  Can a schema name be used in a table definition statement?
2259      *
2260      * @return  <code>true</code> if so; <code>false</code> otherwise
2261      * @exception  SQLException if a database access error occurs
2262      */
2263     public final boolean supportsSchemasInTableDefinitions()
2264         throws SQLException {
2265         checkIsOpen();
2266         return delegate_.supportsSchemasInTableDefinitions();
2267     }
2268 
2269 
2270     /***
2271      *  Can a schema name be used in an index definition statement?
2272      *
2273      * @return  <code>true</code> if so; <code>false</code> otherwise
2274      * @exception  SQLException if a database access error occurs
2275      */
2276     public final boolean supportsSchemasInIndexDefinitions()
2277         throws SQLException {
2278         checkIsOpen();
2279         return delegate_.supportsSchemasInIndexDefinitions();
2280     }
2281 
2282 
2283     /***
2284      *  Can a schema name be used in a privilege definition statement?
2285      *
2286      * @return  <code>true</code> if so; <code>false</code> otherwise
2287      * @exception  SQLException if a database access error occurs
2288      */
2289     public final boolean supportsSchemasInPrivilegeDefinitions()
2290         throws SQLException {
2291         checkIsOpen();
2292         return delegate_.supportsSchemasInPrivilegeDefinitions();
2293     }
2294 
2295 
2296     /***
2297      *  Can a catalog name be used in a data manipulation statement?
2298      *
2299      * @return  <code>true</code> if so; <code>false</code> otherwise
2300      * @exception  SQLException if a database access error occurs
2301      */
2302     public final boolean supportsCatalogsInDataManipulation()
2303         throws SQLException {
2304         checkIsOpen();
2305         return delegate_.supportsCatalogsInDataManipulation();
2306     }
2307 
2308 
2309     /***
2310      *  Can a catalog name be used in a procedure call statement?
2311      *
2312      * @return  <code>true</code> if so; <code>false</code> otherwise
2313      * @exception  SQLException if a database access error occurs
2314      */
2315     public final boolean supportsCatalogsInProcedureCalls()
2316         throws SQLException {
2317         checkIsOpen();
2318         return delegate_.supportsCatalogsInProcedureCalls();
2319     }
2320 
2321 
2322     /***
2323      *  Can a catalog name be used in a table definition statement?
2324      *
2325      * @return  <code>true</code> if so; <code>false</code> otherwise
2326      * @exception  SQLException if a database access error occurs
2327      */
2328     public final boolean supportsCatalogsInTableDefinitions()
2329         throws SQLException {
2330         checkIsOpen();
2331         return delegate_.supportsCatalogsInTableDefinitions();
2332     }
2333 
2334 
2335     /***
2336      *  Can a catalog name be used in an index definition statement?
2337      *
2338      * @return  <code>true</code> if so; <code>false</code> otherwise
2339      * @exception  SQLException if a database access error occurs
2340      */
2341     public final boolean supportsCatalogsInIndexDefinitions()
2342         throws SQLException {
2343         checkIsOpen();
2344         return delegate_.supportsCatalogsInIndexDefinitions();
2345     }
2346 
2347 
2348     /***
2349      *  Can a catalog name be used in a privilege definition statement?
2350      *
2351      * @return  <code>true</code> if so; <code>false</code> otherwise
2352      * @exception  SQLException if a database access error occurs
2353      */
2354     public final boolean supportsCatalogsInPrivilegeDefinitions()
2355         throws SQLException {
2356         checkIsOpen();
2357         return delegate_.supportsCatalogsInPrivilegeDefinitions();
2358     }
2359 
2360 
2361     /***
2362      *  Is positioned DELETE supported?
2363      *
2364      * @return  <code>true</code> if so; <code>false</code> otherwise
2365      * @exception  SQLException if a database access error occurs
2366      */
2367     public final boolean supportsPositionedDelete()
2368         throws SQLException {
2369         checkIsOpen();
2370         return delegate_.supportsPositionedDelete();
2371     }
2372 
2373 
2374     /***
2375      *  Is positioned UPDATE supported?
2376      *
2377      * @return  <code>true</code> if so; <code>false</code> otherwise
2378      * @exception  SQLException if a database access error occurs
2379      */
2380     public final boolean supportsPositionedUpdate()
2381         throws SQLException {
2382         checkIsOpen();
2383         return delegate_.supportsPositionedUpdate();
2384     }
2385 
2386 
2387     /***
2388      *  Is SELECT for UPDATE supported?
2389      *
2390      * @return  <code>true</code> if so; <code>false</code> otherwise
2391      * @exception  SQLException if a database access error occurs
2392      */
2393     public final boolean supportsSelectForUpdate()
2394         throws SQLException {
2395         checkIsOpen();
2396         return delegate_.supportsSelectForUpdate();
2397     }
2398 
2399 
2400     /***
2401      *  Return true if stored procedure calls using the stored procedure escape syntax
2402      *  are supported.
2403      *
2404      * @return  <code>true</code> if so; <code>false</code> otherwise
2405      * @exception  SQLException if a database access error occurs
2406      */
2407     public final boolean supportsStoredProcedures()
2408         throws SQLException {
2409         checkIsOpen();
2410         return delegate_.supportsStoredProcedures();
2411     }
2412 
2413 
2414     /***
2415      *  Return true if subqueries in comparison expressions are supported. A JDBC Compliant
2416      *  <sup><font size=-2>TM</font></sup> driver always returns true.
2417      *
2418      * @return  <code>true</code> if so; <code>false</code> otherwise
2419      * @exception  SQLException if a database access error occurs
2420      */
2421     public final boolean supportsSubqueriesInComparisons()
2422         throws SQLException {
2423         checkIsOpen();
2424         return delegate_.supportsSubqueriesInComparisons();
2425     }
2426 
2427 
2428     /***
2429      *  Return true if subqueries in 'exists' expressions are supported. A JDBC Compliant<sup>
2430      *  <font size=-2>TM</font></sup> driver always returns true.
2431      *
2432      * @return  <code>true</code> if so; <code>false</code> otherwise
2433      * @exception  SQLException if a database access error occurs
2434      */
2435     public final boolean supportsSubqueriesInExists()
2436         throws SQLException {
2437         checkIsOpen();
2438         return delegate_.supportsSubqueriesInExists();
2439     }
2440 
2441 
2442     /***
2443      *  Return true if subqueries in 'in' statements are supported.  A JDBC Compliant<sup><font
2444      *  size=-2>TM</font></sup> driver always returns true.
2445      *
2446      * @return  <code>true</code> if so; <code>false</code> otherwise
2447      * @exception  SQLException if a database access error occurs
2448      */
2449     public final boolean supportsSubqueriesInIns()
2450         throws SQLException {
2451         checkIsOpen();
2452         return delegate_.supportsSubqueriesInIns();
2453     }
2454 
2455 
2456     /***
2457      *  Return true if subqueries in quantified expressions are supported.  A JDBC Compliant
2458      *  <sup><font size=-2>TM</font></sup> driver always returns true.
2459      *
2460      * @return  <code>true</code> if so; <code>false</code> otherwise
2461      * @exception  SQLException if a database access error occurs
2462      */
2463     public final boolean supportsSubqueriesInQuantifieds()
2464         throws SQLException {
2465         checkIsOpen();
2466         return delegate_.supportsSubqueriesInQuantifieds();
2467     }
2468 
2469 
2470     /***
2471      *  Return true if correlated subqueries are supported.  A JDBC Compliant<sup><font size=-2>
2472      *  TM</font></sup> driver always returns true.
2473      *
2474      * @return  <code>true</code> if so; <code>false</code> otherwise
2475      * @exception  SQLException if a database access error occurs
2476      */
2477     public final boolean supportsCorrelatedSubqueries()
2478         throws SQLException {
2479         checkIsOpen();
2480         return delegate_.supportsCorrelatedSubqueries();
2481     }
2482 
2483 
2484     /***
2485      *  Return true if SQL UNION is supported.
2486      *
2487      * @return  <code>true</code> if so; <code>false</code> otherwise
2488      * @exception  SQLException if a database access error occurs
2489      */
2490     public final boolean supportsUnion()
2491         throws SQLException {
2492         checkIsOpen();
2493         return delegate_.supportsUnion();
2494     }
2495 
2496 
2497     /***
2498      *  Return true if SQL UNION ALL is supported.
2499      *
2500      * @return  <code>true</code> if so; <code>false</code> otherwise
2501      * @exception  SQLException if a database access error occurs
2502      */
2503     public final boolean supportsUnionAll()
2504         throws SQLException {
2505         checkIsOpen();
2506         return delegate_.supportsUnionAll();
2507     }
2508 
2509 
2510     /***
2511      *  Return true if cursors can remain open across commits.
2512      *
2513      * @return  <code>true</code> if cursors always remain open; <code>false</code>
2514      *      if they might not remain open
2515      * @exception  SQLException if a database access error occurs
2516      */
2517     public final boolean supportsOpenCursorsAcrossCommit()
2518         throws SQLException {
2519         checkIsOpen();
2520         return delegate_.supportsOpenCursorsAcrossCommit();
2521     }
2522 
2523 
2524     /***
2525      *  Return true if cursors can remain open across rollbacks.
2526      *
2527      * @return  <code>true</code> if cursors always remain open; <code>false</code>
2528      *      if they might not remain open
2529      * @exception  SQLException if a database access error occurs
2530      */
2531     public final boolean supportsOpenCursorsAcrossRollback()
2532         throws SQLException {
2533         checkIsOpen();
2534         return delegate_.supportsOpenCursorsAcrossRollback();
2535     }
2536 
2537 
2538     /***
2539      *  Return true if statements can remain open across commits.
2540      *
2541      * @return  <code>true</code> if statements always remain open; <code>false</code>
2542      *      if they might not remain open
2543      * @exception  SQLException if a database access error occurs
2544      */
2545     public final boolean supportsOpenStatementsAcrossCommit()
2546         throws SQLException {
2547         checkIsOpen();
2548         return delegate_.supportsOpenStatementsAcrossCommit();
2549     }
2550 
2551 
2552     /***
2553      *  Return true if statements can remain open across rollbacks.
2554      *
2555      * @return  <code>true</code> if statements always remain open; <code>false</code>
2556      *      if they might not remain open
2557      * @exception  SQLException if a database access error occurs
2558      */
2559     public final boolean supportsOpenStatementsAcrossRollback()
2560         throws SQLException {
2561         checkIsOpen();
2562         return delegate_.supportsOpenStatementsAcrossRollback();
2563     }
2564 
2565 
2566     /***
2567      *  Return true if getMaxRowSize() included LONGVARCHAR and LONGVARBINARY blobs.
2568      *
2569      * @return  <code>true</code> if so; <code>false</code> otherwise
2570      * @exception  SQLException if a database access error occurs
2571      */
2572     public final boolean doesMaxRowSizeIncludeBlobs()
2573         throws SQLException {
2574         checkIsOpen();
2575         return delegate_.doesMaxRowSizeIncludeBlobs();
2576     }
2577 
2578 
2579     /***
2580      *  Return true if transactions are supported. If not, invoking the method <code>commit</code>
2581      *  is a noop and the isolation level is TRANSACTION_NONE.
2582      *
2583      * @return  <code>true</code> if transactions are supported; <code>false</code>
2584      *      otherwise
2585      * @exception  SQLException if a database access error occurs
2586      */
2587     public final boolean supportsTransactions()
2588         throws SQLException {
2589         checkIsOpen();
2590         return delegate_.supportsTransactions();
2591     }
2592 
2593 
2594     /***
2595      *  Does this database support the given transaction isolation level?
2596      *
2597      * @param  level the values are defined in <code>java.sql.Connection</code>
2598      * @return  <code>true</code> if so; <code>false</code> otherwise
2599      * @exception  SQLException if a database access error occurs
2600      */
2601     public final boolean supportsTransactionIsolationLevel( int level )
2602         throws SQLException {
2603         checkIsOpen();
2604         return delegate_.supportsTransactionIsolationLevel( level );
2605     }
2606 
2607 
2608     /***
2609      *  Are both data definition and data manipulation statements within a
2610      *  transaction supported?
2611      *
2612      * @return  <code>true</code> if so; <code>false</code> otherwise
2613      * @exception  SQLException if a database access error occurs
2614      */
2615     public final boolean supportsDataDefinitionAndDataManipulationTransactions()
2616         throws SQLException {
2617         checkIsOpen();
2618         return delegate_.supportsDataDefinitionAndDataManipulationTransactions();
2619     }
2620 
2621 
2622     /***
2623      *  Are only data manipulation statements within a transaction supported?
2624      *
2625      * @return  <code>true</code> if so; <code>false</code> otherwise
2626      * @exception  SQLException if a database access error occurs
2627      */
2628     public final boolean supportsDataManipulationTransactionsOnly()
2629         throws SQLException {
2630         checkIsOpen();
2631         return delegate_.supportsDataManipulationTransactionsOnly();
2632     }
2633 
2634 
2635     /***
2636      *  Does a data definition statement within a transaction force the
2637      *  transaction to commit?
2638      *
2639      * @return  <code>true</code> if so; <code>false</code> otherwise
2640      * @exception  SQLException if a database access error occurs
2641      */
2642     public final boolean dataDefinitionCausesTransactionCommit()
2643         throws SQLException {
2644         checkIsOpen();
2645         return delegate_.dataDefinitionCausesTransactionCommit();
2646     }
2647 
2648 
2649     /***
2650      *  Is a data definition statement within a transaction ignored?
2651      *
2652      * @return  <code>true</code> if so; <code>false</code> otherwise
2653      * @exception  SQLException if a database access error occurs
2654      */
2655     public final boolean dataDefinitionIgnoredInTransactions()
2656         throws SQLException {
2657         checkIsOpen();
2658         return delegate_.dataDefinitionIgnoredInTransactions();
2659     }
2660 
2661 
2662     /***
2663      *  Does the database support the given result set type?
2664      *
2665      * @param  type defined in <code>java.sql.ResultSet</code>
2666      * @return  <code>true</code> if so; <code>false</code> otherwise
2667      * @exception  SQLException if a database access error occurs
2668      */
2669     public final boolean supportsResultSetType( int type )
2670         throws SQLException {
2671         checkIsOpen();
2672         return delegate_.supportsResultSetType( type );
2673     }
2674 
2675 
2676     /***
2677      *  Does the database support the concurrency type in combination with the
2678      *  given result set type?
2679      *
2680      * @param  type defined in <code>java.sql.ResultSet</code>
2681      * @param  concurrency type defined in <code>java.sql.ResultSet</code>
2682      * @return  <code>true</code> if so; <code>false</code> otherwise
2683      * @exception  SQLException if a database access error occurs
2684      */
2685     public final boolean supportsResultSetConcurrency( int type, int concurrency )
2686         throws SQLException {
2687         checkIsOpen();
2688         return delegate_.supportsResultSetConcurrency( type, concurrency );
2689     }
2690 
2691 
2692     /***
2693      *  Indicates whether a result set's own updates are visible.
2694      *
2695      * @param  type result set type, i.e. ResultSet.TYPE_XXX
2696      * @return  <code>true</code> if updates are visible for the result set
2697      *      type; <code>false</code> otherwise
2698      * @exception  SQLException if a database access error occurs
2699      */
2700     public final boolean ownUpdatesAreVisible( int type )
2701         throws SQLException {
2702         checkIsOpen();
2703         return delegate_.ownUpdatesAreVisible( type );
2704     }
2705 
2706 
2707     /***
2708      *  Indicates whether a result set's own deletes are visible.
2709      *
2710      * @param  type result set type, i.e. ResultSet.TYPE_XXX
2711      * @return  <code>true</code> if deletes are visible for the result set
2712      *      type; <code>false</code> otherwise
2713      * @exception  SQLException if a database access error occurs
2714      */
2715     public final boolean ownDeletesAreVisible( int type )
2716         throws SQLException {
2717         checkIsOpen();
2718         return delegate_.ownDeletesAreVisible( type );
2719     }
2720 
2721 
2722     /***
2723      *  Indicates whether a result set's own inserts are visible.
2724      *
2725      * @param  type result set type, i.e. ResultSet.TYPE_XXX
2726      * @return  <code>true</code> if inserts are visible for the result set
2727      *      type; <code>false</code> otherwise
2728      * @exception  SQLException if a database access error occurs
2729      */
2730     public final boolean ownInsertsAreVisible( int type )
2731         throws SQLException {
2732         checkIsOpen();
2733         return delegate_.ownInsertsAreVisible( type );
2734     }
2735 
2736 
2737     /***
2738      *  Indicates whether updates made by others are visible.
2739      *
2740      * @param  type result set type, i.e. ResultSet.TYPE_XXX
2741      * @return  <code>true</code> if updates made by others are visible for the
2742      *      result set type; <code>false</code> otherwise
2743      * @exception  SQLException if a database access error occurs
2744      */
2745     public final boolean othersUpdatesAreVisible( int type )
2746         throws SQLException {
2747         checkIsOpen();
2748         return delegate_.othersUpdatesAreVisible( type );
2749     }
2750 
2751 
2752     /***
2753      *  Indicates whether deletes made by others are visible.
2754      *
2755      * @param  type result set type, i.e. ResultSet.TYPE_XXX
2756      * @return  <code>true</code> if deletes made by others are visible for the
2757      *      result set type; <code>false</code> otherwise
2758      * @exception  SQLException if a database access error occurs
2759      */
2760     public final boolean othersDeletesAreVisible( int type )
2761         throws SQLException {
2762         checkIsOpen();
2763         return delegate_.othersDeletesAreVisible( type );
2764     }
2765 
2766 
2767     /***
2768      *  Indicates whether inserts made by others are visible.
2769      *
2770      * @param  type result set type, i.e. ResultSet.TYPE_XXX
2771      * @return  <code>true</code> if inserts made by others are visible for the
2772      *      result set type; <code>false</code> otherwise
2773      * @exception  SQLException if a database access error occurs
2774      */
2775     public final boolean othersInsertsAreVisible( int type )
2776         throws SQLException {
2777         checkIsOpen();
2778         return delegate_.othersInsertsAreVisible( type );
2779     }
2780 
2781 
2782     /***
2783      *  Indicates whether or not a visible row update can be detected by calling
2784      *  the method <code>ResultSet.rowUpdated</code>.
2785      *
2786      * @param  type result set type, i.e. ResultSet.TYPE_XXX
2787      * @return  <code>true</code> if changes are detected by the result set
2788      *      type; <code>false</code> otherwise
2789      * @exception  SQLException if a database access error occurs
2790      */
2791     public final boolean updatesAreDetected( int type )
2792         throws SQLException {
2793         checkIsOpen();
2794         return delegate_.updatesAreDetected( type );
2795     }
2796 
2797 
2798     /***
2799      *  Indicates whether or not a visible row delete can be detected by calling
2800      *  ResultSet.rowDeleted(). If deletesAreDetected() returns false, then
2801      *  deleted rows are removed from the result set.
2802      *
2803      * @param  type result set type, i.e. ResultSet.TYPE_XXX
2804      * @return  true if changes are detected by the resultset type
2805      * @exception  SQLException if a database access error occurs
2806      */
2807     public final boolean deletesAreDetected( int type )
2808         throws SQLException {
2809         checkIsOpen();
2810         return delegate_.deletesAreDetected( type );
2811     }
2812 
2813 
2814     /***
2815      *  Indicates whether or not a visible row insert can be detected by calling
2816      *  ResultSet.rowInserted().
2817      *
2818      * @param  type result set type, i.e. ResultSet.TYPE_XXX
2819      * @return  true if changes are detected by the resultset type
2820      * @exception  SQLException if a database access error occurs
2821      */
2822     public final boolean insertsAreDetected( int type )
2823         throws SQLException {
2824         checkIsOpen();
2825         return delegate_.insertsAreDetected( type );
2826     }
2827 
2828 
2829     /***
2830      *  Indicates whether the driver supports batch updates.
2831      *
2832      * @return  true if the driver supports batch updates; false otherwise
2833      * @exception  SQLException If an error occurs
2834      */
2835     public final boolean supportsBatchUpdates() throws SQLException {
2836         checkIsOpen();
2837         return delegate_.supportsBatchUpdates();
2838     }
2839 
2840 
2841     /***
2842      * @exception  SQLException
2843      */
2844     private void checkIsOpen()
2845         throws SQLException {
2846         if( isOpen_ == false ) {
2847             throw new SQLException( "connection is closed" );
2848         }
2849     }
2850 
2851 
2852     /***
2853      *  Wrap the specified result set
2854      *
2855      * @param  resultSet The result set to wrap
2856      * @return The wrapped result set
2857      */
2858     private ResultSet wrap( final ResultSet resultSet ) {
2859         if( resultSet == null ) {
2860             throw new NullPointerException( "resultSet" );
2861         }
2862         final ResultSetWrapper wrapper = new ResultSetWrapper( resultSet );
2863         openResultSets_.add( wrapper );
2864         return wrapper;
2865     }
2866 
2867 
2868     /***
2869      * Retrieves whether this database supports savepoints.
2870      *
2871      * @return <code>true</code> if savepoints are supported;
2872      *         <code>false</code> otherwise
2873      * @exception SQLException if a database access error occurs
2874      * @since 1.4
2875      */
2876     public boolean supportsSavepoints() throws SQLException {
2877         checkIsOpen();
2878         return delegate_.supportsSavepoints();
2879     }
2880 
2881 
2882     /***
2883      * Retrieves whether this database supports named parameters to callable
2884      * statements.
2885      *
2886      * @return <code>true</code> if named parameters are supported;
2887      *         <code>false</code> otherwise
2888      * @exception SQLException if a database access error occurs
2889      * @since 1.4
2890      */
2891     public boolean supportsNamedParameters() throws SQLException {
2892         checkIsOpen();
2893         return delegate_.supportsNamedParameters();
2894     }
2895 
2896 
2897     /***
2898      * Retrieves whether it is possible to have multiple <code>ResultSet</code> objects
2899      * returned from a <code>CallableStatement</code> object
2900      * simultaneously.
2901      *
2902      * @return <code>true</code> if a <code>CallableStatement</code> object
2903      *         can return multiple <code>ResultSet</code> objects
2904      *         simultaneously; <code>false</code> otherwise
2905      * @exception SQLException if a datanase access error occurs
2906      * @since 1.4
2907      */
2908     public boolean supportsMultipleOpenResults() throws SQLException {
2909         checkIsOpen();
2910         return delegate_.supportsMultipleOpenResults();
2911     }
2912 
2913 
2914     /***
2915      * Retrieves whether auto-generated keys can be retrieved after
2916      * a statement has been executed.
2917      *
2918      * @return <code>true</code> if auto-generated keys can be retrieved
2919      *         after a statement has executed; <code>false</code> otherwise
2920      * @exception SQLException if a database access error occurs
2921      * @since 1.4
2922      */
2923     public boolean supportsGetGeneratedKeys() throws SQLException {
2924         checkIsOpen();
2925         return delegate_.supportsGetGeneratedKeys();
2926     }
2927 
2928 
2929     /***
2930      * Retrieves a description of the user-defined type (UDT) hierarchies defined in a
2931      * particular schema in this database. Only the immediate super type/
2932      * sub type relationship is modeled.
2933      * <P>
2934      * Only supertype information for UDTs matching the catalog,
2935      * schema, and type name is returned. The type name parameter
2936      * may be a fully-qualified name. When the UDT name supplied is a
2937      * fully-qualified name, the catalog and schemaPattern parameters are
2938      * ignored.
2939      * <P>
2940      * If a UDT does not have a direct super type, it is not listed here.
2941      * A row of the <code>ResultSet</code> object returned by this method
2942      * describes the designated UDT and a direct supertype. A row has the following
2943      * columns:
2944      *  <OL>
2945      *  <LI><B>TYPE_CAT</B> String => the UDT's catalog (may be <code>null</code>)
2946      *  <LI><B>TYPE_SCHEM</B> String => UDT's schema (may be <code>null</code>)
2947      *  <LI><B>TYPE_NAME</B> String => type name of the UDT
2948      *  <LI><B>SUPERTYPE_CAT</B> String => the direct super type's catalog
2949      *                           (may be <code>null</code>)
2950      *  <LI><B>SUPERTYPE_SCHEM</B> String => the direct super type's schema
2951      *                             (may be <code>null</code>)
2952      *  <LI><B>SUPERTYPE_NAME</B> String => the direct super type's name
2953      *  </OL>
2954      *
2955      * <P><B>Note:</B> If the driver does not support type hierarchies, an
2956      * empty result set is returned.
2957      *
2958      * @param catalog a catalog name; "" retrieves those without a catalog;
2959      *        <code>null</code> means drop catalog name from the selection criteria
2960      * @param schemaPattern a schema name pattern; "" retrieves those
2961      *        without a schema
2962      * @param typeNamePattern a UDT name pattern; may be a fully-qualified
2963      *        name
2964      * @return a <code>ResultSet</code> object in which a row gives information
2965      *         about the designated UDT
2966      * @throws SQLException if a database access error occurs
2967      * @since 1.4
2968      */
2969     public ResultSet getSuperTypes(String catalog, String schemaPattern,
2970         String typeNamePattern) throws SQLException {
2971         checkIsOpen();
2972         return delegate_.getSuperTypes(catalog, schemaPattern, typeNamePattern);
2973     }
2974 
2975 
2976     /***
2977      * Retrieves a description of the table hierarchies defined in a particular
2978      * schema in this database.
2979      *
2980      * <P>Only supertable information for tables matching the catalog, schema
2981      * and table name are returned. The table name parameter may be a fully-
2982      * qualified name, in which case, the catalog and schemaPattern parameters
2983      * are ignored. If a table does not have a super table, it is not listed here.
2984      * Supertables have to be defined in the same catalog and schema as the
2985      * sub tables. Therefore, the type description does not need to include
2986      * this information for the supertable.
2987      *
2988      * <P>Each type description has the following columns:
2989      *  <OL>
2990      *  <LI><B>TABLE_CAT</B> String => the type's catalog (may be <code>null</code>)
2991      *  <LI><B>TABLE_SCHEM</B> String => type's schema (may be <code>null</code>)
2992      *  <LI><B>TABLE_NAME</B> String => type name
2993      *  <LI><B>SUPERTABLE_NAME</B> String => the direct super type's name
2994      *  </OL>
2995      *
2996      * <P><B>Note:</B> If the driver does not support type hierarchies, an
2997      * empty result set is returned.
2998      *
2999      * @param catalog a catalog name; "" retrieves those without a catalog;
3000      *        <code>null</code> means drop catalog name from the selection criteria
3001      * @param schemaPattern a schema name pattern; "" retrieves those
3002      *        without a schema
3003      * @param tableNamePattern a table name pattern; may be a fully-qualified
3004      *        name
3005      * @return a <code>ResultSet</code> object in which each row is a type description
3006      * @throws SQLException if a database access error occurs
3007      * @since 1.4
3008      */
3009     public ResultSet getSuperTables(String catalog, String schemaPattern,
3010         String tableNamePattern) throws SQLException {
3011         checkIsOpen();
3012         return delegate_.getSuperTables(catalog, schemaPattern, tableNamePattern);
3013     }
3014 
3015 
3016     /***
3017      * Retrieves a description of the given attribute of the given type
3018      * for a user-defined type (UDT) that is available in the given schema
3019      * and catalog.
3020      * <P>
3021      * Descriptions are returned only for attributes of UDTs matching the
3022      * catalog, schema, type, and attribute name criteria. They are ordered by
3023      * TYPE_SCHEM, TYPE_NAME and ORDINAL_POSITION. This description
3024      * does not contain inherited attributes.
3025      * <P>
3026      * The <code>ResultSet</code> object that is returned has the following
3027      * columns:
3028      * <OL>
3029      *  <LI><B>TYPE_CAT</B> String => type catalog (may be <code>null</code>)
3030      *  <LI><B>TYPE_SCHEM</B> String => type schema (may be <code>null</code>)
3031      *  <LI><B>TYPE_NAME</B> String => type name
3032      *  <LI><B>ATTR_NAME</B> String => attribute name
3033      *  <LI><B>DATA_TYPE</B> int => attribute type SQL type from java.sql.Types
3034      *  <LI><B>ATTR_TYPE_NAME</B> String => Data source dependent type name.
3035      *  For a UDT, the type name is fully qualified. For a REF, the type name is
3036      *  fully qualified and represents the target type of the reference type.
3037      *  <LI><B>ATTR_SIZE</B> int => column size.  For char or date
3038      *      types this is the maximum number of characters; for numeric or
3039      *      decimal types this is precision.
3040      *  <LI><B>DECIMAL_DIGITS</B> int => the number of fractional digits
3041      *  <LI><B>NUM_PREC_RADIX</B> int => Radix (typically either 10 or 2)
3042      *  <LI><B>NULLABLE</B> int => whether NULL is allowed
3043      *      <UL>
3044      *      <LI> attributeNoNulls - might not allow NULL values
3045      *      <LI> attributeNullable - definitely allows NULL values
3046      *      <LI> attributeNullableUnknown - nullability unknown
3047      *      </UL>
3048      *  <LI><B>REMARKS</B> String => comment describing column (may be <code>null</code>)
3049      *  <LI><B>ATTR_DEF</B> String => default value (may be <code>null</code>)
3050      *  <LI><B>SQL_DATA_TYPE</B> int => unused
3051      *  <LI><B>SQL_DATETIME_SUB</B> int => unused
3052      *  <LI><B>CHAR_OCTET_LENGTH</B> int => for char types the
3053      *       maximum number of bytes in the column
3054      *  <LI><B>ORDINAL_POSITION</B> int => index of column in table
3055      *      (starting at 1)
3056      *  <LI><B>IS_NULLABLE</B> String => "NO" means column definitely
3057      *      does not allow NULL values; "YES" means the column might
3058      *      allow NULL values.  An empty string means unknown.
3059      *  <LI><B>SCOPE_CATALOG</B> String => catalog of table that is the
3060      *      scope of a reference attribute (<code>null</code> if DATA_TYPE isn't REF)
3061      *  <LI><B>SCOPE_SCHEMA</B> String => schema of table that is the
3062      *      scope of a reference attribute (<code>null</code> if DATA_TYPE isn't REF)
3063      *  <LI><B>SCOPE_TABLE</B> String => table name that is the scope of a
3064      *      reference attribute (<code>null</code> if the DATA_TYPE isn't REF)
3065      * <LI><B>SOURCE_DATA_TYPE</B> short => source type of a distinct type or user-generated
3066      *      Ref type,SQL type from java.sql.Types (<code>null</code> if DATA_TYPE
3067      *      isn't DISTINCT or user-generated REF)
3068      *  </OL>
3069      * @param catalog a catalog name; must match the catalog name as it
3070      *        is stored in the database; "" retrieves those without a catalog;
3071      *        <code>null</code> means that the catalog name should not be used to narrow
3072      *        the search
3073      * @param schemaPattern a schema name pattern; must match the schema name
3074      *        as it is stored in the database; "" retrieves those without a schema;
3075      *        <code>null</code> means that the schema name should not be used to narrow
3076      *        the search
3077      * @param typeNamePattern a type name pattern; must match the
3078      *        type name as it is stored in the database
3079      * @param attributeNamePattern an attribute name pattern; must match the attribute
3080      *        name as it is declared in the database
3081      * @return a <code>ResultSet</code> object in which each row is an
3082      *         attribute description
3083      * @exception SQLException if a database access error occurs
3084      * @since 1.4
3085      */
3086     public ResultSet getAttributes(String catalog, String schemaPattern,
3087         String typeNamePattern, String attributeNamePattern) throws SQLException {
3088         checkIsOpen();
3089         return delegate_.getAttributes(catalog, schemaPattern, typeNamePattern, attributeNamePattern);
3090     }
3091 
3092 
3093     /***
3094      * Retrieves whether this database supports the given result set holdability.
3095      *
3096      * @param holdability one of the following constants:
3097      *          <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or
3098      *          <code>ResultSet.CLOSE_CURSORS_AT_COMMIT<code>
3099      * @return <code>true</code> if so; <code>false</code> otherwise
3100      * @exception SQLException if a database access error occurs
3101      * @see Connection
3102      * @since 1.4
3103      */
3104     public boolean supportsResultSetHoldability(int holdability) throws SQLException {
3105         checkIsOpen();
3106         return delegate_.supportsResultSetHoldability(holdability);
3107     }
3108 
3109 
3110     /***
3111      * Retrieves the default holdability of this <code>ResultSet</code>
3112      * object.
3113      *
3114      * @return the default holdability; either
3115      *         <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or
3116      *         <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>
3117      * @exception SQLException if a database access error occurs
3118      * @since 1.4
3119      */
3120     public int getResultSetHoldability() throws SQLException {
3121         checkIsOpen();
3122         return delegate_.getResultSetHoldability();
3123     }
3124 
3125 
3126     /***
3127      * Retrieves the major version number of the underlying database.
3128      *
3129      * @return the underlying database's major version
3130      * @exception SQLException if a database access error occurs
3131      * @since 1.4
3132      */
3133     public int getDatabaseMajorVersion() throws SQLException {
3134         checkIsOpen();
3135         return delegate_.getDatabaseMajorVersion();
3136     }
3137 
3138 
3139     /***
3140      * Retrieves the minor version number of the underlying database.
3141      *
3142      * @return underlying database's minor version
3143      * @exception SQLException if a database access error occurs
3144      * @since 1.4
3145      */
3146     public int getDatabaseMinorVersion() throws SQLException {
3147         checkIsOpen();
3148         return delegate_.getDatabaseMinorVersion();
3149     }
3150 
3151 
3152     /***
3153      * Retrieves the major JDBC version number for this
3154      * driver.
3155      *
3156      * @return JDBC version major number
3157      * @exception SQLException if a database access error occurs
3158      * @since 1.4
3159      */
3160     public int getJDBCMajorVersion() throws SQLException {
3161         checkIsOpen();
3162         return delegate_.getJDBCMajorVersion();
3163     }
3164 
3165 
3166     /***
3167      * Retrieves the minor JDBC version number for this
3168      * driver.
3169      *
3170      * @return JDBC version minor number
3171      * @exception SQLException if a database access error occurs
3172      * @since 1.4
3173      */
3174     public int getJDBCMinorVersion() throws SQLException {
3175         checkIsOpen();
3176         return delegate_.getJDBCMinorVersion();
3177     }
3178 
3179 
3180     /***
3181      * Indicates whether the SQLSTATE returned by <code>SQLException.getSQLState</code>
3182      * is X/Open (now known as Open Group) SQL CLI or SQL99.
3183      * @return the type of SQLSTATE; one of:
3184      *        sqlStateXOpen or
3185      *        sqlStateSQL99
3186      * @throws SQLException if a database access error occurs
3187      * @since 1.4
3188      */
3189     public int getSQLStateType() throws SQLException {
3190         checkIsOpen();
3191         return delegate_.getSQLStateType();
3192     }
3193 
3194 
3195     /***
3196      * Indicates whether updates made to a LOB are made on a copy or directly
3197      * to the LOB.
3198      * @return <code>true</code> if updates are made to a copy of the LOB;
3199      *         <code>false</code> if updates are made directly to the LOB
3200      * @throws SQLException if a database access error occurs
3201      * @since 1.4
3202      */
3203     public boolean locatorsUpdateCopy() throws SQLException {
3204         checkIsOpen();
3205         return delegate_.locatorsUpdateCopy();
3206     }
3207 
3208 
3209     /***
3210      * Retrieves whether this database supports statement pooling.
3211      *
3212      * @return <code>true</code> if so; <code>false</code> otherwise
3213      * @throws SQLException if a database access error occurs
3214      * @since 1.4
3215      */
3216     public boolean supportsStatementPooling() throws SQLException {
3217         checkIsOpen();
3218         return delegate_.supportsStatementPooling();
3219     }
3220 }
3221 
3222