KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > rmijdbc > RJDatabaseMetaDataServer


1
2 /**
3  * RmiJdbc client/server JDBC Driver
4  * (C) GIE Dyade (Groupe BULL / INRIA Research Center) 1997
5  *
6  * @version 1.0
7  * @author Pierre-Yves Gibello (pierreyves.gibello@experlog.com)
8  * Additional SSL Support
9  * Douglas Hammond(djhammond@sympatico.ca)
10  */

11
12 package org.objectweb.rmijdbc;
13
14 import java.sql.*;
15
16 import java.rmi.*;
17 import java.rmi.server.UnicastRemoteObject JavaDoc;
18 import java.rmi.server.Unreferenced JavaDoc;
19
20 /**
21  * This class provides information about the database as a whole.
22  *
23  * <P>Many of the methods here return lists of information in ResultSets.
24  * You can use the normal ResultSet methods such as getString and getInt
25  * to retrieve the data from these ResultSets. If a given form of
26  * metadata is not available, these methods should throw a java.rmi.RemoteException.
27  *
28  * <P>Some of these methods take arguments that are String patterns. These
29  * arguments all have names such as fooPattern. Within a pattern String, "%"
30  * means match any substring of 0 or more characters, and "_" means match
31  * any one character. Only metadata entries matching the search pattern
32  * are returned. If a search pattern argument is set to a null ref, it means
33  * that argument's criteria should be dropped from the search.
34  *
35  * <P>A java.rmi.RemoteException will be thrown if a driver does not support a meta
36  * data method. In the case of methods that return a ResultSet,
37  * either a ResultSet (which may be empty) is returned or a
38  * java.rmi.RemoteException is thrown.
39  */

40 public class RJDatabaseMetaDataServer
41 extends UnicastRemoteObject JavaDoc
42 implements RJDatabaseMetaDataInterface, Unreferenced JavaDoc {
43
44   java.sql.DatabaseMetaData JavaDoc jdbcMetadata_;
45
46   public RJDatabaseMetaDataServer(java.sql.DatabaseMetaData JavaDoc d)
47   throws RemoteException, SQLException {
48        super(RJJdbcServer.rmiJdbcListenerPort, RJJdbcServer.rmiClientSocketFactory, RJJdbcServer.rmiServerSocketFactory);
49     jdbcMetadata_ = d;
50   }
51
52   public void unreferenced() { Runtime.getRuntime().gc(); }
53
54   //----------------------------------------------------------------------
55
// First, a variety of minor information about the target database.
56

57     /**
58      * Can all the procedures returned by getProcedures be called by the
59      * current user?
60      *
61      * @return true if so
62      */

63   public boolean allProceduresAreCallable()
64   throws RemoteException, SQLException {
65     return jdbcMetadata_.allProceduresAreCallable();
66   }
67
68     /**
69      * Can all the tables returned by getTable be SELECTed by the
70      * current user?
71      *
72      * @return true if so
73      */

74   public boolean allTablesAreSelectable() throws RemoteException, SQLException {
75     return jdbcMetadata_.allTablesAreSelectable();
76   }
77
78     /**
79      * What's the url for this database?
80      *
81      * @return the url or null if it can't be generated
82      */

83   public String JavaDoc getURL() throws RemoteException, SQLException {
84     return jdbcMetadata_.getURL();
85   }
86
87     /**
88      * What's our user name as known to the database?
89      *
90      * @return our database user name
91      */

92   public String JavaDoc getUserName() throws RemoteException, SQLException {
93     return jdbcMetadata_.getUserName();
94   }
95
96     /**
97      * Is the database in read-only mode?
98      *
99      * @return true if so
100      */

101   public boolean isReadOnly() throws RemoteException, SQLException {
102     return jdbcMetadata_.isReadOnly();
103   }
104
105     /**
106      * Are NULL values sorted high?
107      *
108      * @return true if so
109      */

110   public boolean nullsAreSortedHigh() throws RemoteException, SQLException {
111     return jdbcMetadata_.nullsAreSortedHigh();
112   }
113
114     /**
115      * Are NULL values sorted low?
116      *
117      * @return true if so
118      */

119   public boolean nullsAreSortedLow() throws RemoteException, SQLException {
120     return jdbcMetadata_.nullsAreSortedLow();
121   }
122
123     /**
124      * Are NULL values sorted at the start regardless of sort order?
125      *
126      * @return true if so
127      */

128   public boolean nullsAreSortedAtStart() throws RemoteException, SQLException {
129     return jdbcMetadata_.nullsAreSortedAtStart();
130   }
131
132     /**
133      * Are NULL values sorted at the end regardless of sort order?
134      *
135      * @return true if so
136      */

137   public boolean nullsAreSortedAtEnd() throws RemoteException, SQLException {
138     return jdbcMetadata_.nullsAreSortedAtEnd();
139   }
140
141     /**
142      * What's the name of this database product?
143      *
144      * @return database product name
145      */

146   public String JavaDoc getDatabaseProductName() throws RemoteException, SQLException {
147     return jdbcMetadata_.getDatabaseProductName();
148   }
149
150     /**
151      * What's the version of this database product?
152      *
153      * @return database version
154      */

155   public String JavaDoc getDatabaseProductVersion() throws RemoteException, SQLException {
156     return jdbcMetadata_.getDatabaseProductVersion();
157   }
158
159     /**
160      * What's the name of this JDBC driver?
161      *
162      * @return JDBC driver name
163      */

164   public String JavaDoc getDriverName() throws RemoteException, SQLException {
165     return "RmiJdbc!" + jdbcMetadata_.getDriverName();
166   }
167
168     /**
169      * What's the version of this JDBC driver?
170      *
171      * @return JDBC driver version
172      */

173   public String JavaDoc getDriverVersion() throws RemoteException, SQLException {
174     return jdbcMetadata_.getDriverVersion();
175   }
176
177     /**
178      * What's this JDBC driver's major version number?
179      *
180      * @return JDBC driver major version
181      */

182   public int getDriverMajorVersion() {
183     return jdbcMetadata_.getDriverMajorVersion();
184   }
185
186     /**
187      * What's this JDBC driver's minor version number?
188      *
189      * @return JDBC driver minor version number
190      */

191   public int getDriverMinorVersion() {
192     return jdbcMetadata_.getDriverMinorVersion();
193   }
194
195     /**
196      * Does the database store tables in a local file?
197      *
198      * @return true if so
199      */

200   public boolean usesLocalFiles() throws RemoteException, SQLException {
201     return jdbcMetadata_.usesLocalFiles();
202   }
203
204     /**
205      * Does the database use a file for each table?
206      *
207      * @return true if the database uses a local file for each table
208      */

209   public boolean usesLocalFilePerTable() throws RemoteException, SQLException {
210     return jdbcMetadata_.usesLocalFilePerTable();
211   }
212
213     /**
214      * Does the database treat mixed case unquoted SQL identifiers as
215      * case sensitive and as a result store them in mixed case?
216      *
217      * A JDBC-Compliant driver will always return false.
218      *
219      * @return true if so
220      */

221   public boolean supportsMixedCaseIdentifiers()
222   throws RemoteException, SQLException {
223     return jdbcMetadata_.supportsMixedCaseIdentifiers();
224   }
225
226     /**
227      * Does the database treat mixed case unquoted SQL identifiers as
228      * case insensitive and store them in upper case?
229      *
230      * @return true if so
231      */

232   public boolean storesUpperCaseIdentifiers() throws RemoteException, SQLException {
233     return jdbcMetadata_.storesUpperCaseIdentifiers();
234   }
235
236     /**
237      * Does the database treat mixed case unquoted SQL identifiers as
238      * case insensitive and store them in lower case?
239      *
240      * @return true if so
241      */

242   public boolean storesLowerCaseIdentifiers() throws RemoteException, SQLException {
243     return jdbcMetadata_.storesLowerCaseIdentifiers();
244   }
245
246     /**
247      * Does the database treat mixed case unquoted SQL identifiers as
248      * case insensitive and store them in mixed case?
249      *
250      * @return true if so
251      */

252   public boolean storesMixedCaseIdentifiers() throws RemoteException, SQLException {
253     return jdbcMetadata_.storesMixedCaseIdentifiers();
254   }
255
256     /**
257      * Does the database treat mixed case quoted SQL identifiers as
258      * case sensitive and as a result store them in mixed case?
259      *
260      * A JDBC-Compliant driver will always return false.
261      *
262      * @return true if so
263      */

264   public boolean supportsMixedCaseQuotedIdentifiers()
265   throws RemoteException, SQLException {
266     return jdbcMetadata_.supportsMixedCaseQuotedIdentifiers();
267   }
268
269     /**
270      * Does the database treat mixed case quoted SQL identifiers as
271      * case insensitive and store them in upper case?
272      *
273      * @return true if so
274      */

275   public boolean storesUpperCaseQuotedIdentifiers()
276   throws RemoteException, SQLException {
277     return jdbcMetadata_.storesUpperCaseQuotedIdentifiers();
278   }
279
280     /**
281      * Does the database treat mixed case quoted SQL identifiers as
282      * case insensitive and store them in lower case?
283      *
284      * @return true if so
285      */

286   public boolean storesLowerCaseQuotedIdentifiers()
287   throws RemoteException, SQLException {
288     return jdbcMetadata_.storesLowerCaseQuotedIdentifiers();
289   }
290
291     /**
292      * Does the database treat mixed case quoted SQL identifiers as
293      * case insensitive and store them in mixed case?
294      *
295      * @return true if so
296      */

297   public boolean storesMixedCaseQuotedIdentifiers()
298   throws RemoteException, SQLException {
299     return jdbcMetadata_.storesMixedCaseQuotedIdentifiers();
300   }
301
302     /**
303      * What's the string used to quote SQL identifiers?
304      * This returns a space " " if identifier quoting isn't supported.
305      *
306      * A JDBC-Compliant driver always uses a double quote character.
307      *
308      * @return the quoting string
309      */

310   public String JavaDoc getIdentifierQuoteString() throws RemoteException, SQLException {
311     return jdbcMetadata_.getIdentifierQuoteString();
312   }
313
314     /**
315      * Get a comma separated list of all a database's SQL keywords
316      * that are NOT also SQL92 keywords.
317      *
318      * @return the list
319      */

320   public String JavaDoc getSQLKeywords() throws RemoteException, SQLException {
321     return jdbcMetadata_.getSQLKeywords();
322   }
323
324     /**
325      * Get a comma separated list of math functions.
326      *
327      * @return the list
328      */

329   public String JavaDoc getNumericFunctions() throws RemoteException, SQLException {
330     return jdbcMetadata_.getNumericFunctions();
331   }
332
333     /**
334      * Get a comma separated list of string functions.
335      *
336      * @return the list
337      */

338   public String JavaDoc getStringFunctions() throws RemoteException, SQLException {
339     return jdbcMetadata_.getStringFunctions();
340   }
341
342     /**
343      * Get a comma separated list of system functions.
344      *
345      * @return the list
346      */

347   public String JavaDoc getSystemFunctions() throws RemoteException, SQLException {
348     return jdbcMetadata_.getSystemFunctions();
349   }
350
351     /**
352      * Get a comma separated list of time and date functions.
353      *
354      * @return the list
355      */

356   public String JavaDoc getTimeDateFunctions() throws RemoteException, SQLException {
357     return jdbcMetadata_.getTimeDateFunctions();
358   }
359
360     /**
361      * This is the string that can be used to escape '_' or '%' in
362      * the string pattern style catalog search parameters.
363      *
364      * <P>The '_' character represents any single character.
365      * <P>The '%' character represents any sequence of zero or
366      * more characters.
367      * @return the string used to escape wildcard characters
368      */

369   public String JavaDoc getSearchStringEscape() throws RemoteException, SQLException {
370     return jdbcMetadata_.getSearchStringEscape();
371   }
372
373     /**
374      * Get all the "extra" characters that can be used in unquoted
375      * identifier names (those beyond a-z, A-Z, 0-9 and _).
376      *
377      * @return the string containing the extra characters
378      */

379   public String JavaDoc getExtraNameCharacters() throws RemoteException, SQLException {
380     return jdbcMetadata_.getExtraNameCharacters();
381   }
382
383     //--------------------------------------------------------------------
384
// Functions describing which features are supported.
385

386     /**
387      * Is "ALTER TABLE" with add column supported?
388      *
389      * @return true if so
390      */

391   public boolean supportsAlterTableWithAddColumn()
392   throws RemoteException, SQLException {
393     return jdbcMetadata_.supportsAlterTableWithAddColumn();
394   }
395
396     /**
397      * Is "ALTER TABLE" with drop column supported?
398      *
399      * @return true if so
400      */

401   public boolean supportsAlterTableWithDropColumn()
402   throws RemoteException, SQLException {
403     return jdbcMetadata_.supportsAlterTableWithDropColumn();
404   }
405
406     /**
407      * Is column aliasing supported?
408      *
409      * <P>If so, the SQL AS clause can be used to provide names for
410      * computed columns or to provide alias names for columns as
411      * required.
412      *
413      * A JDBC-Compliant driver always returns true.
414      *
415      * @return true if so
416      */

417   public boolean supportsColumnAliasing() throws RemoteException, SQLException {
418     return jdbcMetadata_.supportsColumnAliasing();
419   }
420
421     /**
422      * Are concatenations between NULL and non-NULL values NULL?
423      *
424      * A JDBC-Compliant driver always returns true.
425      *
426      * @return true if so
427      */

428   public boolean nullPlusNonNullIsNull() throws RemoteException, SQLException {
429     return jdbcMetadata_.nullPlusNonNullIsNull();
430   }
431
432     /**
433      * Is the CONVERT function between SQL types supported?
434      *
435      * @return true if so
436      */

437   public boolean supportsConvert() throws RemoteException, SQLException {
438     return jdbcMetadata_.supportsConvert();
439   }
440
441     /**
442      * Is CONVERT between the given SQL types supported?
443      *
444      * @param fromType the type to convert from
445      * @param toType the type to convert to
446      * @return true if so
447      * @see Types
448      */

449   public boolean supportsConvert(int fromType, int toType)
450   throws RemoteException, SQLException {
451     return jdbcMetadata_.supportsConvert();
452   }
453
454     /**
455      * Are table correlation names supported?
456      *
457      * A JDBC-Compliant driver always returns true.
458      *
459      * @return true if so
460      */

461   public boolean supportsTableCorrelationNames()
462   throws RemoteException, SQLException {
463     return jdbcMetadata_.supportsTableCorrelationNames();
464   }
465
466     /**
467      * If table correlation names are supported, are they restricted
468      * to be different from the names of the tables?
469      *
470      * @return true if so
471      */

472   public boolean supportsDifferentTableCorrelationNames()
473   throws RemoteException, SQLException {
474     return jdbcMetadata_.supportsDifferentTableCorrelationNames();
475   }
476
477     /**
478      * Are expressions in "ORDER BY" lists supported?
479      *
480      * @return true if so
481      */

482   public boolean supportsExpressionsInOrderBy()
483   throws RemoteException, SQLException {
484     return jdbcMetadata_.supportsExpressionsInOrderBy();
485   }
486
487     /**
488      * Can an "ORDER BY" clause use columns not in the SELECT?
489      *
490      * @return true if so
491      */

492   public boolean supportsOrderByUnrelated() throws RemoteException, SQLException {
493     return jdbcMetadata_.supportsOrderByUnrelated();
494   }
495
496     /**
497      * Is some form of "GROUP BY" clause supported?
498      *
499      * @return true if so
500      */

501   public boolean supportsGroupBy() throws RemoteException, SQLException {
502     return jdbcMetadata_.supportsGroupBy();
503   }
504
505     /**
506      * Can a "GROUP BY" clause use columns not in the SELECT?
507      *
508      * @return true if so
509      */

510   public boolean supportsGroupByUnrelated() throws RemoteException, SQLException {
511     return jdbcMetadata_.supportsGroupByUnrelated();
512   }
513
514     /**
515      * Can a "GROUP BY" clause add columns not in the SELECT
516      * provided it specifies all the columns in the SELECT?
517      *
518      * @return true if so
519      */

520   public boolean supportsGroupByBeyondSelect() throws RemoteException, SQLException {
521     return jdbcMetadata_.supportsGroupByBeyondSelect();
522   }
523
524     /**
525      * Is the escape character in "LIKE" clauses supported?
526      *
527      * A JDBC-Compliant driver always returns true.
528      *
529      * @return true if so
530      */

531   public boolean supportsLikeEscapeClause() throws RemoteException, SQLException {
532     return jdbcMetadata_.supportsLikeEscapeClause();
533   }
534
535     /**
536      * Are multiple ResultSets from a single execute supported?
537      *
538      * @return true if so
539      */

540   public boolean supportsMultipleResultSets() throws RemoteException, SQLException {
541     return jdbcMetadata_.supportsMultipleResultSets();
542   }
543
544     /**
545      * Can we have multiple transactions open at once (on different
546      * connections)?
547      *
548      * @return true if so
549      */

550   public boolean supportsMultipleTransactions()
551   throws RemoteException, SQLException {
552     return jdbcMetadata_.supportsMultipleTransactions();
553   }
554
555     /**
556      * Can columns be defined as non-nullable?
557      *
558      * A JDBC-Compliant driver always returns true.
559      *
560      * @return true if so
561      */

562   public boolean supportsNonNullableColumns() throws RemoteException, SQLException {
563     return jdbcMetadata_.supportsNonNullableColumns();
564   }
565
566     /**
567      * Is the ODBC Minimum SQL grammar supported?
568      *
569      * All JDBC-Compliant drivers must return true.
570      *
571      * @return true if so
572      */

573   public boolean supportsMinimumSQLGrammar() throws RemoteException, SQLException {
574     return jdbcMetadata_.supportsMinimumSQLGrammar();
575   }
576
577     /**
578      * Is the ODBC Core SQL grammar supported?
579      *
580      * @return true if so
581      */

582   public boolean supportsCoreSQLGrammar() throws RemoteException, SQLException {
583     return jdbcMetadata_.supportsCoreSQLGrammar();
584   }
585
586     /**
587      * Is the ODBC Extended SQL grammar supported?
588      *
589      * @return true if so
590      */

591   public boolean supportsExtendedSQLGrammar() throws RemoteException, SQLException {
592     return jdbcMetadata_.supportsExtendedSQLGrammar();
593   }
594
595     /**
596      * Is the ANSI92 entry level SQL grammar supported?
597      *
598      * All JDBC-Compliant drivers must return true.
599      *
600      * @return true if so
601      */

602   public boolean supportsANSI92EntryLevelSQL() throws RemoteException, SQLException {
603     return jdbcMetadata_.supportsANSI92EntryLevelSQL();
604   }
605
606     /**
607      * Is the ANSI92 intermediate SQL grammar supported?
608      *
609      * @return true if so
610      */

611   public boolean supportsANSI92IntermediateSQL()
612   throws RemoteException, SQLException {
613     return jdbcMetadata_.supportsANSI92IntermediateSQL();
614   }
615
616     /**
617      * Is the ANSI92 full SQL grammar supported?
618      *
619      * @return true if so
620      */

621   public boolean supportsANSI92FullSQL() throws RemoteException, SQLException {
622     return jdbcMetadata_.supportsANSI92FullSQL();
623   }
624
625     /**
626      * Is the SQL Integrity Enhancement Facility supported?
627      *
628      * @return true if so
629      */

630   public boolean supportsIntegrityEnhancementFacility()
631   throws RemoteException, SQLException {
632     return jdbcMetadata_.supportsIntegrityEnhancementFacility();
633   }
634
635     /**
636      * Is some form of outer join supported?
637      *
638      * @return true if so
639      */

640   public boolean supportsOuterJoins() throws RemoteException, SQLException {
641     return jdbcMetadata_.supportsOuterJoins();
642   }
643
644     /**
645      * Are full nested outer joins supported?
646      *
647      * @return true if so
648      */

649   public boolean supportsFullOuterJoins() throws RemoteException, SQLException {
650     return jdbcMetadata_.supportsFullOuterJoins();
651   }
652
653     /**
654      * Is there limited support for outer joins? (This will be true
655      * if supportFullOuterJoins is true.)
656      *
657      * @return true if so
658      */

659   public boolean supportsLimitedOuterJoins()
660   throws RemoteException, SQLException {
661     return jdbcMetadata_.supportsLimitedOuterJoins();
662   }
663
664     /**
665      * What's the database vendor's preferred term for "schema"?
666      *
667      * @return the vendor term
668      */

669   public String JavaDoc getSchemaTerm() throws RemoteException, SQLException {
670     return jdbcMetadata_.getSchemaTerm();
671   }
672
673     /**
674      * What's the database vendor's preferred term for "procedure"?
675      *
676      * @return the vendor term
677      */

678   public String JavaDoc getProcedureTerm() throws RemoteException, SQLException {
679     return jdbcMetadata_.getProcedureTerm();
680   }
681
682     /**
683      * What's the database vendor's preferred term for "catalog"?
684      *
685      * @return the vendor term
686      */

687   public String JavaDoc getCatalogTerm() throws RemoteException, SQLException {
688     return jdbcMetadata_.getCatalogTerm();
689   }
690
691     /**
692      * Does a catalog appear at the start of a qualified table name?
693      * (Otherwise it appears at the end)
694      *
695      * @return true if it appears at the start
696      */

697   public boolean isCatalogAtStart() throws RemoteException, SQLException {
698     return jdbcMetadata_.isCatalogAtStart();
699   }
700
701     /**
702      * What's the separator between catalog and table name?
703      *
704      * @return the separator string
705      */

706   public String JavaDoc getCatalogSeparator() throws RemoteException, SQLException {
707     return jdbcMetadata_.getCatalogSeparator();
708   }
709
710     /**
711      * Can a schema name be used in a data manipulation statement?
712      *
713      * @return true if so
714      */

715   public boolean supportsSchemasInDataManipulation()
716   throws RemoteException, SQLException {
717     return jdbcMetadata_.supportsSchemasInDataManipulation();
718   }
719
720     /**
721      * Can a schema name be used in a procedure call statement?
722      *
723      * @return true if so
724      */

725   public boolean supportsSchemasInProcedureCalls()
726   throws RemoteException, SQLException {
727     return jdbcMetadata_.supportsSchemasInProcedureCalls();
728   }
729
730     /**
731      * Can a schema name be used in a table definition statement?
732      *
733      * @return true if so
734      */

735   public boolean supportsSchemasInTableDefinitions()
736   throws RemoteException, SQLException {
737     return jdbcMetadata_.supportsSchemasInTableDefinitions();
738   }
739
740     /**
741      * Can a schema name be used in an index definition statement?
742      *
743      * @return true if so
744      */

745   public boolean supportsSchemasInIndexDefinitions()
746   throws RemoteException, SQLException {
747     return jdbcMetadata_.supportsSchemasInIndexDefinitions();
748   }
749
750     /**
751      * Can a schema name be used in a privilege definition statement?
752      *
753      * @return true if so
754      */

755   public boolean supportsSchemasInPrivilegeDefinitions()
756   throws RemoteException, SQLException {
757     return jdbcMetadata_.supportsSchemasInPrivilegeDefinitions();
758   }
759
760     /**
761      * Can a catalog name be used in a data manipulation statement?
762      *
763      * @return true if so
764      */

765   public boolean supportsCatalogsInDataManipulation()
766   throws RemoteException, SQLException {
767     return jdbcMetadata_.supportsCatalogsInDataManipulation();
768   }
769
770     /**
771      * Can a catalog name be used in a procedure call statement?
772      *
773      * @return true if so
774      */

775   public boolean supportsCatalogsInProcedureCalls()
776   throws RemoteException, SQLException {
777     return jdbcMetadata_.supportsCatalogsInProcedureCalls();
778   }
779
780     /**
781      * Can a catalog name be used in a table definition statement?
782      *
783      * @return true if so
784      */

785   public boolean supportsCatalogsInTableDefinitions()
786   throws RemoteException, SQLException {
787     return jdbcMetadata_.supportsCatalogsInTableDefinitions();
788   }
789
790     /**
791      * Can a catalog name be used in an index definition statement?
792      *
793      * @return true if so
794      */

795   public boolean supportsCatalogsInIndexDefinitions()
796   throws RemoteException, SQLException {
797     return jdbcMetadata_.supportsCatalogsInIndexDefinitions();
798   }
799
800     /**
801      * Can a catalog name be used in a privilege definition statement?
802      *
803      * @return true if so
804      */

805   public boolean supportsCatalogsInPrivilegeDefinitions()
806   throws RemoteException, SQLException {
807     return jdbcMetadata_.supportsCatalogsInPrivilegeDefinitions();
808   }
809
810
811     /**
812      * Is positioned DELETE supported?
813      *
814      * @return true if so
815      */

816   public boolean supportsPositionedDelete()
817   throws RemoteException, SQLException {
818     return jdbcMetadata_.supportsPositionedDelete();
819   }
820
821     /**
822      * Is positioned UPDATE supported?
823      *
824      * @return true if so
825      */

826   public boolean supportsPositionedUpdate()
827   throws RemoteException, SQLException {
828     return jdbcMetadata_.supportsPositionedUpdate();
829   }
830
831     /**
832      * Is SELECT for UPDATE supported?
833      *
834      * @return true if so
835      */

836   public boolean supportsSelectForUpdate()
837   throws RemoteException, SQLException {
838     return jdbcMetadata_.supportsSelectForUpdate();
839   }
840
841     /**
842      * Are stored procedure calls using the stored procedure escape
843      * syntax supported?
844      *
845      * @return true if so
846      */

847   public boolean supportsStoredProcedures()
848   throws RemoteException, SQLException {
849     return jdbcMetadata_.supportsStoredProcedures();
850   }
851
852     /**
853      * Are subqueries in comparison expressions supported?
854      *
855      * A JDBC-Compliant driver always returns true.
856      *
857      * @return true if so
858      */

859   public boolean supportsSubqueriesInComparisons()
860   throws RemoteException, SQLException {
861     return jdbcMetadata_.supportsSubqueriesInComparisons();
862   }
863
864     /**
865      * Are subqueries in 'exists' expressions supported?
866      *
867      * A JDBC-Compliant driver always returns true.
868      *
869      * @return true if so
870      */

871   public boolean supportsSubqueriesInExists()
872   throws RemoteException, SQLException {
873     return jdbcMetadata_.supportsSubqueriesInExists();
874   }
875
876     /**
877      * Are subqueries in 'in' statements supported?
878      *
879      * A JDBC-Compliant driver always returns true.
880      *
881      * @return true if so
882      */

883   public boolean supportsSubqueriesInIns()
884   throws RemoteException, SQLException {
885     return jdbcMetadata_.supportsSubqueriesInIns();
886   }
887
888     /**
889      * Are subqueries in quantified expressions supported?
890      *
891      * A JDBC-Compliant driver always returns true.
892      *
893      * @return true if so
894      */

895   public boolean supportsSubqueriesInQuantifieds()
896   throws RemoteException, SQLException {
897     return jdbcMetadata_.supportsSubqueriesInQuantifieds();
898   }
899
900     /**
901      * Are correlated subqueries supported?
902      *
903      * A JDBC-Compliant driver always returns true.
904      *
905      * @return true if so
906      */

907   public boolean supportsCorrelatedSubqueries()
908   throws RemoteException, SQLException {
909     return jdbcMetadata_.supportsCorrelatedSubqueries();
910   }
911
912     /**
913      * Is SQL UNION supported?
914      *
915      * @return true if so
916      */

917   public boolean supportsUnion() throws RemoteException, SQLException {
918     return jdbcMetadata_.supportsUnion();
919   }
920
921     /**
922      * Is SQL UNION ALL supported?
923      *
924      * @return true if so
925      */

926   public boolean supportsUnionAll() throws RemoteException, SQLException {
927     return jdbcMetadata_.supportsUnionAll();
928   }
929
930     /**
931      * Can cursors remain open across commits?
932      *
933      * @return true if cursors always remain open;
934      * false if they might not remain open
935      */

936   public boolean supportsOpenCursorsAcrossCommit()
937   throws RemoteException, SQLException {
938     return jdbcMetadata_.supportsOpenCursorsAcrossCommit();
939   }
940
941     /**
942      * Can cursors remain open across rollbacks?
943      *
944      * @return true if cursors always remain open;
945      * false if they might not remain open
946      */

947   public boolean supportsOpenCursorsAcrossRollback()
948   throws RemoteException, SQLException {
949     return jdbcMetadata_.supportsOpenCursorsAcrossRollback();
950   }
951
952     /**
953      * Can statements remain open across commits?
954      *
955      * @return true if statements always remain open;
956      * false if they might not remain open
957      */

958   public boolean supportsOpenStatementsAcrossCommit()
959   throws RemoteException, SQLException {
960     return jdbcMetadata_.supportsOpenStatementsAcrossCommit();
961   }
962
963     /**
964      * Can statements remain open across rollbacks?
965      *
966      * @return true if statements always remain open;
967      * false if they might not remain open
968      */

969   public boolean supportsOpenStatementsAcrossRollback()
970   throws RemoteException, SQLException {
971     return jdbcMetadata_.supportsOpenStatementsAcrossRollback();
972   }
973
974     //----------------------------------------------------------------------
975
// The following group of methods exposes various limitations
976
// based on the target database with the current driver.
977
// Unless otherwise specified, a result of zero means there is no
978
// limit, or the limit is not known.
979

980     /**
981      * How many hex characters can you have in an inline binary literal?
982      *
983      * @return max literal length
984      */

985   public int getMaxBinaryLiteralLength() throws RemoteException, SQLException {
986     return jdbcMetadata_.getMaxBinaryLiteralLength();
987   }
988
989     /**
990      * What's the max length for a character literal?
991      *
992      * @return max literal length
993      */

994   public int getMaxCharLiteralLength() throws RemoteException, SQLException {
995     return jdbcMetadata_.getMaxCharLiteralLength();
996   }
997
998     /**
999      * What's the limit on column name length?
1000     *
1001     * @return max literal length
1002     */

1003  public int getMaxColumnNameLength() throws RemoteException, SQLException {
1004    return jdbcMetadata_.getMaxColumnNameLength();
1005  }
1006
1007    /**
1008     * What's the maximum number of columns in a "GROUP BY" clause?
1009     *
1010     * @return max number of columns
1011     */

1012  public int getMaxColumnsInGroupBy() throws RemoteException, SQLException {
1013    return jdbcMetadata_.getMaxColumnsInGroupBy();
1014  }
1015
1016    /**
1017     * What's the maximum number of columns allowed in an index?
1018     *
1019     * @return max columns
1020     */

1021  public int getMaxColumnsInIndex() throws RemoteException, SQLException {
1022    return jdbcMetadata_.getMaxColumnsInIndex();
1023  }
1024
1025    /**
1026     * What's the maximum number of columns in an "ORDER BY" clause?
1027     *
1028     * @return max columns
1029     */

1030  public int getMaxColumnsInOrderBy() throws RemoteException, SQLException {
1031    return jdbcMetadata_.getMaxColumnsInOrderBy();
1032  }
1033
1034    /**
1035     * What's the maximum number of columns in a "SELECT" list?
1036     *
1037     * @return max columns
1038     */

1039  public int getMaxColumnsInSelect() throws RemoteException, SQLException {
1040    return jdbcMetadata_.getMaxColumnsInSelect();
1041  }
1042
1043    /**
1044     * What's the maximum number of columns in a table?
1045     *
1046     * @return max columns
1047     */

1048  public int getMaxColumnsInTable() throws RemoteException, SQLException {
1049    return jdbcMetadata_.getMaxColumnsInTable();
1050  }
1051
1052    /**
1053     * How many active connections can we have at a time to this database?
1054     *
1055     * @return max connections
1056     */

1057  public int getMaxConnections() throws RemoteException, SQLException {
1058    return jdbcMetadata_.getMaxConnections();
1059  }
1060
1061    /**
1062     * What's the maximum cursor name length?
1063     *
1064     * @return max cursor name length in bytes
1065     */

1066  public int getMaxCursorNameLength() throws RemoteException, SQLException {
1067    return jdbcMetadata_.getMaxCursorNameLength();
1068  }
1069
1070    /**
1071     * What's the maximum length of an index (in bytes)?
1072     *
1073     * @return max index length in bytes
1074     */

1075  public int getMaxIndexLength() throws RemoteException, SQLException {
1076    return jdbcMetadata_.getMaxIndexLength();
1077  }
1078
1079    /**
1080     * What's the maximum length allowed for a schema name?
1081     *
1082     * @return max name length in bytes
1083     */

1084  public int getMaxSchemaNameLength() throws RemoteException, SQLException {
1085    return jdbcMetadata_.getMaxSchemaNameLength();
1086  }
1087
1088    /**
1089     * What's the maximum length of a procedure name?
1090     *
1091     * @return max name length in bytes
1092     */

1093  public int getMaxProcedureNameLength() throws RemoteException, SQLException {
1094    return jdbcMetadata_.getMaxProcedureNameLength();
1095  }
1096
1097    /**
1098     * What's the maximum length of a catalog name?
1099     *
1100     * @return max name length in bytes
1101     */

1102  public int getMaxCatalogNameLength() throws RemoteException, SQLException {
1103    return jdbcMetadata_.getMaxCatalogNameLength();
1104  }
1105
1106    /**
1107     * What's the maximum length of a single row?
1108     *
1109     * @return max row size in bytes
1110     */

1111  public int getMaxRowSize() throws RemoteException, SQLException {
1112    return jdbcMetadata_.getMaxRowSize();
1113  }
1114
1115    /**
1116     * Did getMaxRowSize() include LONGVARCHAR and LONGVARBINARY
1117     * blobs?
1118     *
1119     * @return true if so
1120     */

1121  public boolean doesMaxRowSizeIncludeBlobs()
1122  throws RemoteException, SQLException {
1123    return jdbcMetadata_.doesMaxRowSizeIncludeBlobs();
1124  }
1125
1126    /**
1127     * What's the maximum length of a SQL statement?
1128     *
1129     * @return max length in bytes
1130     */

1131  public int getMaxStatementLength() throws RemoteException, SQLException {
1132    return jdbcMetadata_.getMaxStatementLength();
1133  }
1134
1135    /**
1136     * How many active statements can we have open at one time to this
1137     * database?
1138     *
1139     * @return the maximum
1140     */

1141  public int getMaxStatements() throws RemoteException, SQLException {
1142    return jdbcMetadata_.getMaxStatements();
1143  }
1144
1145    /**
1146     * What's the maximum length of a table name?
1147     *
1148     * @return max name length in bytes
1149     */

1150  public int getMaxTableNameLength() throws RemoteException, SQLException {
1151    return jdbcMetadata_.getMaxTableNameLength();
1152  }
1153
1154    /**
1155     * What's the maximum number of tables in a SELECT?
1156     *
1157     * @return the maximum
1158     */

1159  public int getMaxTablesInSelect() throws RemoteException, SQLException {
1160    return jdbcMetadata_.getMaxTablesInSelect();
1161  }
1162
1163    /**
1164     * What's the maximum length of a user name?
1165     *
1166     * @return max name length in bytes
1167     */

1168  public int getMaxUserNameLength() throws RemoteException, SQLException {
1169    return jdbcMetadata_.getMaxUserNameLength();
1170  }
1171
1172    //----------------------------------------------------------------------
1173

1174    /**
1175     * What's the database's default transaction isolation level? The
1176     * values are defined in java.sql.Connection.
1177     *
1178     * @return the default isolation level
1179