KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > lib > ddl > adaptors > DefaultAdaptor


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.lib.ddl.adaptors;
21
22 import java.beans.PropertyChangeListener JavaDoc;
23 import java.beans.PropertyChangeSupport JavaDoc;
24 import java.io.Serializable JavaDoc;
25 import java.sql.Connection JavaDoc;
26 import java.sql.DatabaseMetaData JavaDoc;
27 import java.sql.PreparedStatement JavaDoc;
28 import java.sql.ResultSet JavaDoc;
29 import java.sql.RowIdLifetime JavaDoc;
30 import java.sql.SQLException JavaDoc;
31 import java.util.HashMap JavaDoc;
32 import java.util.Map JavaDoc;
33 import java.util.ResourceBundle JavaDoc;
34
35 import org.openide.util.NbBundle;
36
37 public class DefaultAdaptor implements DatabaseMetaDataAdaptor, Serializable JavaDoc {
38     
39     private transient Connection JavaDoc con;
40     private transient DatabaseMetaData JavaDoc dmd;
41     protected Map JavaDoc properties;
42     private transient PropertyChangeSupport JavaDoc propertySupport;
43
44     private ResourceBundle JavaDoc bundle = NbBundle.getBundle("org.netbeans.lib.ddl.resources.Bundle"); // NOI18N
45

46     public static final int NOT_SET = 0;
47     public static final String JavaDoc NOT_SET_STRING = "";
48
49     public static final int YES = 1;
50     public static final int NO = 2;
51
52     public static final int NULLSORT_HIGH = 1;
53     public static final int NULLSORT_LOW = 2;
54     public static final int NULLSORT_START = 3;
55     public static final int NULLSORT_END = 4;
56
57     public static final int STORE_LOWERCASE = 1;
58     public static final int STORE_UPPERCASE = 2;
59     public static final int STORE_MIXEDCASE = 3;
60
61     // Boolean properties
62

63     public static final String JavaDoc PROP_PROCEDURES_ARE_CALLABLE = "proceduresAreCallable"; // NOI18N
64
public static final String JavaDoc PROP_TABLES_ARE_SELECTABLE = "tablesAreSelectable"; // NOI18N
65
public static final String JavaDoc PROP_READONLY = "readOnly"; // NOI18N
66
public static final String JavaDoc PROP_LOCAL_FILES = "localFiles"; // NOI18N
67
public static final String JavaDoc PROP_FILE_PER_TABLE = "localFilePerTable"; // NOI18N
68
public static final String JavaDoc PROP_MIXEDCASE_IDENTIFIERS = "mixedCaseIdentifiers"; // NOI18N
69
public static final String JavaDoc PROP_MIXEDCASE_QUOTED_IDENTIFIERS = "mixedCaseQuotedIdentifiers"; // NOI18N
70
public static final String JavaDoc PROP_ALTER_ADD = "alterTableWithAddColumn"; // NOI18N
71
public static final String JavaDoc PROP_ALTER_DROP = "alterTableWithDropColumn"; // NOI18N
72
public static final String JavaDoc PROP_COLUMN_ALIASING = "columnAliasing"; // NOI18N
73
public static final String JavaDoc PROP_NULL_PLUS_NULL_IS_NULL = "nullPlusNonNullIsNull"; // NOI18N
74
public static final String JavaDoc PROP_CONVERT = "convert"; // NOI18N
75
public static final String JavaDoc PROP_TABLE_CORRELATION_NAMES = "tableCorrelationNames"; // NOI18N
76
public static final String JavaDoc PROP_DIFF_TABLE_CORRELATION_NAMES = "differentTableCorrelationNames"; // NOI18N
77
public static final String JavaDoc PROP_EXPRESSIONS_IN_ORDERBY = "expressionsInOrderBy"; // NOI18N
78
public static final String JavaDoc PROP_ORDER_BY_UNRELATED = "orderByUnrelated"; // NOI18N
79
public static final String JavaDoc PROP_GROUP_BY = "groupBy"; // NOI18N
80
public static final String JavaDoc PROP_UNRELATED_GROUP_BY = "groupByUnrelated"; // NOI18N
81
public static final String JavaDoc PROP_BEYOND_GROUP_BY = "groupByBeyondSelect"; // NOI18N
82
public static final String JavaDoc PROP_ESCAPE_LIKE = "likeEscapeClause"; // NOI18N
83
public static final String JavaDoc PROP_MULTIPLE_RS = "multipleResultSets"; // NOI18N
84
public static final String JavaDoc PROP_MULTIPLE_TRANSACTIONS = "multipleTransactions"; // NOI18N
85
public static final String JavaDoc PROP_NON_NULL_COLUMNSS = "nonNullableColumns"; // NOI18N
86
public static final String JavaDoc PROP_MINUMUM_SQL_GRAMMAR = "minimumSQLGrammar"; // NOI18N
87
public static final String JavaDoc PROP_CORE_SQL_GRAMMAR = "coreSQLGrammar"; // NOI18N
88
public static final String JavaDoc PROP_EXTENDED_SQL_GRAMMAR = "extendedSQLGrammar"; // NOI18N
89
public static final String JavaDoc PROP_ANSI_SQL_GRAMMAR = "ANSI92EntryLevelSQL"; // NOI18N
90
public static final String JavaDoc PROP_INTERMEDIATE_SQL_GRAMMAR = "ANSI92IntermediateSQL"; // NOI18N
91
public static final String JavaDoc PROP_FULL_SQL_GRAMMAR = "ANSI92FullSQL"; // NOI18N
92
public static final String JavaDoc PROP_INTEGRITY_ENHANCEMENT = "IntegrityEnhancementFacility"; // NOI18N
93
public static final String JavaDoc PROP_OUTER_JOINS = "outerJoins"; // NOI18N
94
public static final String JavaDoc PROP_FULL_OUTER_JOINS = "fullOuterJoins"; // NOI18N
95
public static final String JavaDoc PROP_LIMITED_OUTER_JOINS = "limitedOuterJoins"; // NOI18N
96
public static final String JavaDoc PROP_CATALOG_AT_START = "catalogAtStart"; // NOI18N
97
public static final String JavaDoc PROP_SCHEMAS_IN_DML = "schemasInDataManipulation"; // NOI18N
98
public static final String JavaDoc PROP_SCHEMAS_IN_PROCEDURE_CALL = "schemasInProcedureCalls"; // NOI18N
99
public static final String JavaDoc PROP_SCHEMAS_IN_TABLE_DEFINITION = "schemasInTableDefinitions"; // NOI18N
100
public static final String JavaDoc PROP_SCHEMAS_IN_INDEX = "schemasInIndexDefinitions"; // NOI18N
101
public static final String JavaDoc PROP_SCHEMAS_IN_PRIVILEGE_DEFINITION = "schemasInPrivilegeDefinitions"; // NOI18N
102
public static final String JavaDoc PROP_CATALOGS_IN_DML = "catalogsInDataManipulation"; // NOI18N
103
public static final String JavaDoc PROP_CATALOGS_IN_PROCEDURE_CALL = "catalogsInProcedureCalls"; // NOI18N
104
public static final String JavaDoc PROP_CATALOGS_IN_TABLE_DEFINITION = "catalogsInTableDefinitions"; // NOI18N
105
public static final String JavaDoc PROP_CATALOGS_IN_INDEX = "catalogsInIndexDefinitions"; // NOI18N
106
public static final String JavaDoc PROP_CATALOGS_IN_PRIVILEGE_DEFINITION = "catalogsInPrivilegeDefinitions"; // NOI18N
107
public static final String JavaDoc PROP_POSITIONED_DELETE = "positionedDelete"; // NOI18N
108
public static final String JavaDoc PROP_POSITIONED_UPDATE = "positionedUpdate"; // NOI18N
109
public static final String JavaDoc PROP_SELECT_FOR_UPDATE = "selectForUpdate"; // NOI18N
110
public static final String JavaDoc PROP_STORED_PROCEDURES = "storedProcedures"; // NOI18N
111
public static final String JavaDoc PROP_SUBQUERY_IN_COMPARSIONS = "subqueriesInComparisons"; // NOI18N
112
public static final String JavaDoc PROP_SUBQUERY_IN_EXISTS = "subqueriesInExists"; // NOI18N
113
public static final String JavaDoc PROP_SUBQUERY_IN_INS = "subqueriesInIns"; // NOI18N
114
public static final String JavaDoc PROP_SUBQUERY_IN_QUANTIFIEDS = "subqueriesInQuantifieds"; // NOI18N
115
public static final String JavaDoc PROP_CORRELATED_SUBQUERIES = "correlatedSubqueries"; // NOI18N
116
public static final String JavaDoc PROP_UNION = "union"; // NOI18N
117
public static final String JavaDoc PROP_UNION_ALL = "unionAll"; // NOI18N
118
public static final String JavaDoc PROP_OPEN_CURSORS_ACROSS_COMMIT = "openCursorsAcrossCommit"; // NOI18N
119
public static final String JavaDoc PROP_OPEN_CURSORS_ACROSS_ROLLBACK = "openCursorsAcrossRollback"; // NOI18N
120
public static final String JavaDoc PROP_OPEN_STATEMENTS_ACROSS_COMMIT = "openStatementsAcrossCommit"; // NOI18N
121
public static final String JavaDoc PROP_OPEN_STATEMENTS_ACROSS_ROLLBACK = "openStatementsAcrossRollback"; // NOI18N
122
public static final String JavaDoc PROP_ROWSIZE_INCLUDING_BLOBS = "maxRowSizeIncludeBlobs"; // NOI18N
123
public static final String JavaDoc PROP_TRANSACTIONS = "transactions"; // NOI18N
124
public static final String JavaDoc PROP_DDL_AND_DML_TRANSACTIONS = "dataDefinitionAndDataManipulationTransactions"; // NOI18N
125
public static final String JavaDoc PROP_DML_TRANSACTIONS_ONLY = "dataManipulationTransactionsOnly"; // NOI18N
126
public static final String JavaDoc PROP_DDL_CAUSES_COMMIT = "dataDefinitionCausesTransactionCommit"; // NOI18N
127
public static final String JavaDoc PROP_DDL_IGNORED_IN_TRANSACTIONS = "dataDefinitionIgnoredInTransactions"; // NOI18N
128
public static final String JavaDoc PROP_BATCH_UPDATES = "batchUpdates"; // NOI18N
129

130     // Integer properties
131

132     public static final String JavaDoc PROP_NULL_SORT = "nullSort"; // NOI18N
133
public static final String JavaDoc PROP_IDENTIFIER_STORE = "identifierStore"; // NOI18N
134
public static final String JavaDoc PROP_QUOTED_IDENTS = "quotedIdentifierStore"; // NOI18N
135
public static final String JavaDoc PROP_MAX_BINARY_LITERAL_LENGTH = "maxBinaryLiteralLength"; // NOI18N
136
public static final String JavaDoc PROP_MAX_CHAR_LITERAL_LENGTH = "maxCharLiteralLength"; // NOI18N
137
public static final String JavaDoc PROP_MAX_COLUMN_NAME_LENGTH = "maxColumnNameLength"; // NOI18N
138
public static final String JavaDoc PROP_MAX_COLUMNS_IN_GROUPBY = "maxColumnsInGroupBy"; // NOI18N
139
public static final String JavaDoc PROP_MAX_COLUMNS_IN_INDEX = "maxColumnsInIndex"; // NOI18N
140
public static final String JavaDoc PROP_MAX_COLUMNS_IN_ORDERBY = "maxColumnsInOrderBy"; // NOI18N
141
public static final String JavaDoc PROP_MAX_COLUMNS_IN_SELECT = "maxColumnsInSelect"; // NOI18N
142
public static final String JavaDoc PROP_MAX_COLUMNS_IN_TABLE = "maxColumnsInTable"; // NOI18N
143
public static final String JavaDoc PROP_MAX_CONNECTIONS = "maxConnections"; // NOI18N
144
public static final String JavaDoc PROP_MAX_CURSORNAME_LENGTH = "maxCursorNameLength"; // NOI18N
145
public static final String JavaDoc PROP_MAX_INDEX_LENGTH = "maxIndexLength"; // NOI18N
146
public static final String JavaDoc PROP_MAX_SCHEMA_NAME = "maxSchemaNameLength"; // NOI18N
147
public static final String JavaDoc PROP_MAX_PROCEDURE_NAME = "maxProcedureNameLength"; // NOI18N
148
public static final String JavaDoc PROP_MAX_CATALOG_NAME = "maxCatalogNameLength"; // NOI18N
149
public static final String JavaDoc PROP_MAX_ROW_SIZE = "maxRowSize"; // NOI18N
150
public static final String JavaDoc PROP_MAX_STATEMENT_LENGTH = "maxStatementLength"; // NOI18N
151
public static final String JavaDoc PROP_MAX_STATEMENTS = "maxStatements"; // NOI18N
152
public static final String JavaDoc PROP_MAX_TABLENAME_LENGTH = "maxTableNameLength"; // NOI18N
153
public static final String JavaDoc PROP_MAX_TABLES_IN_SELECT = "maxTablesInSelect"; // NOI18N
154
public static final String JavaDoc PROP_MAX_USERNAME = "maxUserNameLength"; // NOI18N
155
public static final String JavaDoc PROP_DEFAULT_ISOLATION = "defaultTransactionIsolation"; // NOI18N
156

157     // String properties
158

159     public static final String JavaDoc PROP_URL = "URL"; // NOI18N
160
public static final String JavaDoc PROP_USERNAME = "userName"; // NOI18N
161
public static final String JavaDoc PROP_PRODUCTNAME = "databaseProductName"; // NOI18N
162
public static final String JavaDoc PROP_PRODUCTVERSION = "databaseProductVersion"; // NOI18N
163
public static final String JavaDoc PROP_DRIVERNAME = "driverName"; // NOI18N
164
public static final String JavaDoc PROP_DRIVER_VERSION = "driverVersion"; // NOI18N
165
public static final String JavaDoc PROP_DRIVER_MAJOR_VERSION = "driverMajorVersion"; // NOI18N
166
public static final String JavaDoc PROP_DRIVER_MINOR_VERSION = "driverMinorVersion"; // NOI18N
167
public static final String JavaDoc PROP_IDENTIFIER_QUOTE = "identifierQuoteString"; // NOI18N
168
public static final String JavaDoc PROP_SQL_KEYWORDS = "SQLKeywords"; // NOI18N
169
public static final String JavaDoc PROP_NUMERIC_FUNCTIONS = "numericFunctions"; // NOI18N
170
public static final String JavaDoc PROP_STRING_FUNCTIONS = "stringFunctions"; // NOI18N
171
public static final String JavaDoc PROP_SYSTEM_FUNCTIONS = "systemFunctions"; // NOI18N
172
public static final String JavaDoc PROP_TIME_FUNCTIONS = "timeDateFunctions"; // NOI18N
173
public static final String JavaDoc PROP_STRING_ESCAPE = "searchStringEscape"; // NOI18N
174
public static final String JavaDoc PROP_EXTRA_CHARACTERS = "extraNameCharacters"; // NOI18N
175
public static final String JavaDoc PROP_SCHEMA_TERM = "schemaTerm"; // NOI18N
176
public static final String JavaDoc PROP_PROCEDURE_TERM = "procedureTerm"; // NOI18N
177
public static final String JavaDoc PROP_CATALOG_TERM = "catalogTerm"; // NOI18N
178
public static final String JavaDoc PROP_CATALOGS_SEPARATOR = "catalogSeparator"; // NOI18N
179

180     // Queries
181

182     public static final String JavaDoc PROP_PROCEDURES_QUERY = "proceduresQuery"; // NOI18N
183
public static final String JavaDoc PROP_PROCEDURE_COLUMNS_QUERY = "procedureColumnsQuery"; // NOI18N
184
public static final String JavaDoc PROP_SCHEMAS_QUERY = "schemasQuery"; // NOI18N
185
public static final String JavaDoc PROP_CATALOGS_QUERY = "catalogsQuery"; // NOI18N
186
public static final String JavaDoc PROP_TABLES_QUERY = "tablesQuery"; // NOI18N
187
public static final String JavaDoc PROP_TABLE_TYPES_QUERY = "tableTypesQuery"; // NOI18N
188
public static final String JavaDoc PROP_COLUMNS_QUERY = "columnsQuery"; // NOI18N
189
public static final String JavaDoc PROP_COLUMNS_PRIVILEGES_QUERY = "columnPrivilegesQuery"; // NOI18N
190
public static final String JavaDoc PROP_TABLE_PRIVILEGES_QUERY = "tablePrivilegesQuery"; // NOI18N
191
public static final String JavaDoc PROP_BEST_ROW_IDENTIFIER = "bestRowIdentifierQuery"; // NOI18N
192
public static final String JavaDoc PROP_VERSION_COLUMNS = "versionColumnsQuery"; // NOI18N
193
public static final String JavaDoc PROP_PK_QUERY = "primaryKeysQuery"; // NOI18N
194
public static final String JavaDoc PROP_IK_QUERY = "importedKeysQuery"; // NOI18N
195
public static final String JavaDoc PROP_EK_QUERY = "exportedKeysQuery"; // NOI18N
196
public static final String JavaDoc PROP_CROSSREF_QUERY = "crossReferenceQuery"; // NOI18N
197
public static final String JavaDoc PROP_TYPE_INFO_QUERY = "typeInfoQuery"; // NOI18N
198
public static final String JavaDoc PROP_INDEX_INFO_QUERY = "indexInfoQuery"; // NOI18N
199
public static final String JavaDoc PROP_UDT_QUERY = "UDTsQuery"; // NOI18N
200

201     // Extended
202

203     public static final String JavaDoc PROP_CAPITALIZE_USERNAME = "capitializeUsername"; // NOI18N
204

205     static final long serialVersionUID =2490518619095829944L;
206     public DefaultAdaptor()
207     {
208         propertySupport = new PropertyChangeSupport JavaDoc(this);
209         properties = new HashMap JavaDoc();
210     }
211
212     public DefaultAdaptor(Connection JavaDoc conn) throws SQLException JavaDoc
213     {
214         propertySupport = new PropertyChangeSupport JavaDoc(this);
215         properties = new HashMap JavaDoc();
216         con = conn;
217         if (con != null) dmd = con.getMetaData();
218         else dmd = null;
219     }
220
221     public void addPropertyChangeListener(PropertyChangeListener JavaDoc listener)
222     {
223         propertySupport.addPropertyChangeListener(listener);
224     }
225
226     public void removePropertyChangeListener(PropertyChangeListener JavaDoc listener)
227     {
228         propertySupport.removePropertyChangeListener(listener);
229     }
230
231     public DatabaseMetaData JavaDoc getMetaData()
232     {
233         return this;
234     }
235
236     /**
237     * Retrieves the connection that produced this metadata object.
238     * @return the connection that produced this metadata object
239     */

240     public Connection JavaDoc getConnection() throws SQLException JavaDoc
241     {
242         return con;
243     }
244
245     /**
246     * Sets the connection that produced this metadata object.
247     * @return the connection that produced this metadata object
248     */

249     public void setConnection(Connection JavaDoc conn) throws SQLException JavaDoc
250     {
251         con = conn;
252         if (con != null) dmd = con.getMetaData();
253         else dmd = null;
254     }
255
256     private int getBoolean(String JavaDoc key)
257     {
258         Boolean JavaDoc val = (Boolean JavaDoc)properties.get(key);
259         if (val != null) return (val.booleanValue() ? YES : NO);
260         return NOT_SET;
261     }
262
263     private void setBoolean(String JavaDoc key, int value)
264     {
265         Boolean JavaDoc newValue, oldValue = (Boolean JavaDoc)properties.get(key);
266         if (value != NOT_SET) {
267             newValue = value == YES ? Boolean.TRUE : Boolean.FALSE;
268             properties.put(key, newValue);
269         } else {
270             newValue = null;
271             properties.remove(key);
272         }
273
274         propertySupport.firePropertyChange(key, oldValue, newValue);
275     }
276
277     private int getInt(String JavaDoc key)
278     {
279         Integer JavaDoc val = (Integer JavaDoc)properties.get(key);
280         if (val == null) return NOT_SET;
281         return val.intValue();
282     }
283
284     private void setInt(String JavaDoc key, int value)
285     {
286         Integer JavaDoc newValue, oldValue = (Integer JavaDoc)properties.get(key);
287         if (value != NOT_SET) {
288             newValue = new Integer JavaDoc(value);
289             properties.put(key, newValue);
290         } else {
291             newValue = null;
292             properties.remove(key);
293         }
294
295         propertySupport.firePropertyChange(key, oldValue, newValue);
296     }
297
298     private String JavaDoc getString(String JavaDoc key)
299     {
300         String JavaDoc val = (String JavaDoc)properties.get(key);
301         if (val == null) return NOT_SET_STRING;
302         return val;
303     }
304
305     private void setString(String JavaDoc key, String JavaDoc value)
306     {
307         String JavaDoc newValue, oldValue = (String JavaDoc)properties.get(key);
308         if (value.length() > 0) {
309             newValue = value;
310             properties.put(key, newValue);
311         } else {
312             newValue = null;
313             properties.remove(key);
314         }
315
316         propertySupport.firePropertyChange(key, oldValue, newValue);
317     }
318
319     // proceduresAreCallable
320

321     public boolean allProceduresAreCallable() throws SQLException JavaDoc
322     {
323         Boolean JavaDoc proceduresAreCallable = (Boolean JavaDoc)properties.get(PROP_PROCEDURES_ARE_CALLABLE);
324         if (proceduresAreCallable == null) {
325             if (dmd != null) proceduresAreCallable = dmd.allProceduresAreCallable() ? Boolean.TRUE : Boolean.FALSE;
326             else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
327
properties.put(PROP_PROCEDURES_ARE_CALLABLE, proceduresAreCallable);
328         }
329
330         return proceduresAreCallable.booleanValue();
331     }
332
333     public int getProceduresAreCallable()
334     {
335         return getBoolean(PROP_PROCEDURES_ARE_CALLABLE);
336     }
337
338     public void setProceduresAreCallable(int value) throws SQLException JavaDoc
339     {
340         setBoolean(PROP_PROCEDURES_ARE_CALLABLE, value);
341     }
342
343     // tablesAreSelectable
344

345     public boolean allTablesAreSelectable() throws SQLException JavaDoc
346     {
347         Boolean JavaDoc tablesAreSelectable = (Boolean JavaDoc)properties.get(PROP_TABLES_ARE_SELECTABLE);
348         if (tablesAreSelectable == null) {
349             if (dmd != null) tablesAreSelectable = dmd.allTablesAreSelectable() ? Boolean.TRUE : Boolean.FALSE;
350             else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
351
properties.put(PROP_TABLES_ARE_SELECTABLE, tablesAreSelectable);
352         }
353
354         return tablesAreSelectable.booleanValue();
355     }
356
357     public int getTablesAreSelectable()
358     {
359         return getBoolean(PROP_TABLES_ARE_SELECTABLE);
360     }
361
362     public void setTablesAreSelectable(int value)
363     {
364         setBoolean(PROP_TABLES_ARE_SELECTABLE, value);
365     }
366
367     // url
368

369     public String JavaDoc getURL() throws SQLException JavaDoc
370     {
371         String JavaDoc url = (String JavaDoc)properties.get(PROP_URL);
372         if (url == null) {
373             if (dmd != null) url = dmd.getURL();
374             else return NOT_SET_STRING;
375             properties.put(PROP_URL, url);
376         }
377
378         return url;
379     }
380
381     public void setURL(String JavaDoc value)
382     {
383         setString(PROP_URL, value);
384     }
385
386     // username
387

388     public String JavaDoc getUserName() throws SQLException JavaDoc
389     {
390         String JavaDoc username = (String JavaDoc)properties.get(PROP_USERNAME);
391         if (username == null) {
392             if (dmd != null) username = dmd.getUserName();
393             else return NOT_SET_STRING;
394             properties.put(PROP_USERNAME, username);
395         }
396
397         return username;
398     }
399
400     public void setUserName(String JavaDoc value)
401     {
402         setString(PROP_USERNAME, value);
403     }
404
405     // readonly
406

407     public boolean isReadOnly() throws SQLException JavaDoc {
408         Boolean JavaDoc readonly = (Boolean JavaDoc)properties.get(PROP_READONLY);
409         if (readonly == null) {
410             if (dmd != null)
411                 readonly = dmd.isReadOnly() ? Boolean.TRUE : Boolean.FALSE;
412             else
413                 throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
414
properties.put(PROP_READONLY, readonly);
415         }
416
417         return readonly.booleanValue();
418     }
419
420     // public int getReadOnly() {
421
public int getreadOnly() {
422         return getBoolean(PROP_READONLY);
423     }
424
425     // public void setReadOnly(int flag) {
426
public void setreadOnly(int flag) {
427         setBoolean(PROP_READONLY, flag);
428     }
429
430     // nullSort
431

432     public int getNullSort()
433     {
434         return getInt(PROP_NULL_SORT);
435     }
436
437     public void setNullSort(int value)
438     {
439         setInt(PROP_NULL_SORT, value);
440     }
441
442     public boolean nullsAreSortedHigh() throws SQLException JavaDoc
443     {
444         Integer JavaDoc nullSort = (Integer JavaDoc)properties.get(PROP_NULL_SORT);
445         if (nullSort != null) return (nullSort.intValue() == NULLSORT_HIGH);
446         if (dmd != null) return dmd.nullsAreSortedAtStart();
447         throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
448
}
449
450     public boolean nullsAreSortedLow() throws SQLException JavaDoc
451     {
452         Integer JavaDoc nullSort = (Integer JavaDoc)properties.get(PROP_NULL_SORT);
453         if (nullSort != null) return (nullSort.intValue() == NULLSORT_LOW);
454         if (dmd != null) return dmd.nullsAreSortedLow();
455         throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
456
}
457
458     public boolean nullsAreSortedAtStart() throws SQLException JavaDoc
459     {
460         Integer JavaDoc nullSort = (Integer JavaDoc)properties.get(PROP_NULL_SORT);
461         if (nullSort != null) return (nullSort.intValue() == NULLSORT_START);
462         if (dmd != null) return dmd.nullsAreSortedAtStart();
463         throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
464
}
465
466     public boolean nullsAreSortedAtEnd() throws SQLException JavaDoc
467     {
468         Integer JavaDoc nullSort = (Integer JavaDoc)properties.get(PROP_NULL_SORT);
469         if (nullSort != null) return (nullSort.intValue() == NULLSORT_END);
470         if (dmd != null) return dmd.nullsAreSortedAtEnd();
471         throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
472
}
473
474     // product
475

476     public String JavaDoc getDatabaseProductName() throws SQLException JavaDoc
477     {
478         String JavaDoc product = (String JavaDoc)properties.get(PROP_PRODUCTNAME);
479         if (product == null) {
480             if (dmd != null) product = dmd.getDatabaseProductName().trim();
481             else return NOT_SET_STRING;
482             properties.put(PROP_PRODUCTNAME, product);
483         }
484
485         return product;
486     }
487
488     public void setDatabaseProductName(String JavaDoc value)
489     {
490         setString(PROP_PRODUCTNAME, value);
491     }
492
493     // version
494

495     public String JavaDoc getDatabaseProductVersion() throws SQLException JavaDoc
496     {
497         String JavaDoc version = (String JavaDoc)properties.get(PROP_PRODUCTVERSION);
498         if (version == null) {
499             if (dmd != null) version = dmd.getDatabaseProductVersion();
500             else return NOT_SET_STRING;
501             properties.put(PROP_PRODUCTVERSION, version);
502         }
503
504         return version;
505     }
506
507     public void setDatabaseProductVersion(String JavaDoc value)
508     {
509         setString(PROP_PRODUCTVERSION, value);
510     }
511
512     // driverName
513

514     public String JavaDoc getDriverName() throws SQLException JavaDoc
515     {
516         String JavaDoc driverName = (String JavaDoc)properties.get(PROP_DRIVERNAME);
517         if (driverName == null) {
518             if (dmd != null) driverName = dmd.getDriverName();
519             else return NOT_SET_STRING;
520             properties.put(PROP_DRIVERNAME, driverName);
521         }
522
523         return driverName;
524     }
525
526     public void setDriverName(String JavaDoc value)
527     {
528         setString(PROP_DRIVERNAME, value);
529     }
530
531     /**
532     * What's the version of this JDBC driver?
533     * @return JDBC driver version
534     * @exception SQLException if a database access error occurs
535     */

536     public String JavaDoc getDriverVersion() throws SQLException JavaDoc
537     {
538         String JavaDoc driverVersion = (String JavaDoc)properties.get(PROP_DRIVER_VERSION);
539         if (driverVersion == null) {
540             if (dmd != null) driverVersion = dmd.getDriverVersion();
541             else return NOT_SET_STRING;
542             properties.put(PROP_DRIVER_VERSION, driverVersion);
543         }
544
545         return driverVersion;
546     }
547
548     public void setDriverVersion(String JavaDoc value)
549     {
550         setString(PROP_DRIVER_VERSION, value);
551     }
552
553     /**
554     * What's this JDBC driver's major version number?
555     * @return JDBC driver major version
556     */

557     public int getDriverMajorVersion()
558     {
559         Integer JavaDoc driverMajorVersion = (Integer JavaDoc)properties.get(PROP_DRIVER_MAJOR_VERSION);
560         if (driverMajorVersion == null) {
561             if (dmd != null) driverMajorVersion = new Integer JavaDoc(dmd.getDriverMajorVersion());
562             else driverMajorVersion = new Integer JavaDoc(NOT_SET);
563             properties.put(PROP_DRIVER_MAJOR_VERSION, driverMajorVersion);
564         }
565
566         return driverMajorVersion.intValue();
567     }
568
569     public void setDriverMajorVersion(int value)
570     {
571         setInt(PROP_DRIVER_MAJOR_VERSION, value);
572     }
573
574     /**
575     * What's this JDBC driver's minor version number?
576     * @return JDBC driver minor version number
577     */

578     public int getDriverMinorVersion()
579     {
580         Integer JavaDoc driverMinorVersion = (Integer JavaDoc)properties.get(PROP_DRIVER_MINOR_VERSION);
581         if (driverMinorVersion == null) {
582             if (dmd != null) driverMinorVersion = new Integer JavaDoc(dmd.getDriverMinorVersion());
583             else driverMinorVersion = new Integer JavaDoc(NOT_SET);
584             properties.put(PROP_DRIVER_MINOR_VERSION, driverMinorVersion);
585         }
586
587         return driverMinorVersion.intValue();
588     }
589
590     public void setDriverMinorVersion(int value)
591     {
592         setInt(PROP_DRIVER_MINOR_VERSION, value);
593     }
594
595     /**
596     * Does the database store tables in a local file?
597     * @return <code>true</code> if so
598     * @exception SQLException if a database access error occurs
599     */

600     public boolean usesLocalFiles() throws SQLException JavaDoc
601     {
602         Boolean JavaDoc localFiles = (Boolean JavaDoc)properties.get(PROP_LOCAL_FILES);
603         if (localFiles == null) {
604             if (dmd != null) localFiles = dmd.usesLocalFiles() ? Boolean.TRUE : Boolean.FALSE;
605             else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
606
properties.put(PROP_LOCAL_FILES, localFiles);
607         }
608
609         return localFiles.booleanValue();
610     }
611
612     public int getLocalFiles()
613     {
614         return getBoolean(PROP_LOCAL_FILES);
615     }
616
617     public void setLocalFiles(int value)
618     {
619         setBoolean(PROP_LOCAL_FILES, value);
620     }
621
622     /**
623     * Does the database use a file for each table?
624     * @return true if the database uses a local file for each table
625     * @exception SQLException if a database access error occurs
626     */

627     public boolean usesLocalFilePerTable() throws SQLException JavaDoc
628     {
629         Boolean JavaDoc filePerTable = (Boolean JavaDoc)properties.get(PROP_FILE_PER_TABLE);
630         if (filePerTable == null) {
631             if (dmd != null) filePerTable = dmd.usesLocalFilePerTable() ? Boolean.TRUE : Boolean.FALSE;
632             else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
633
properties.put(PROP_FILE_PER_TABLE, filePerTable);
634         }
635
636         return filePerTable.booleanValue();
637     }
638
639     public int getLocalFilePerTable()
640     {
641         return getBoolean(PROP_FILE_PER_TABLE);
642     }
643
644     public void setLocalFilePerTable(int value)
645     {
646         setBoolean(PROP_FILE_PER_TABLE, value);
647     }
648
649     /**
650     * Does the database treat mixed case unquoted SQL identifiers as
651     * case sensitive and as a result store them in mixed case?
652     * @return <code>true</code> if so
653     */

654     public boolean supportsMixedCaseIdentifiers() throws SQLException JavaDoc
655     {
656         Boolean JavaDoc mixedCaseIdentifiers = (Boolean JavaDoc)properties.get(PROP_MIXEDCASE_IDENTIFIERS);
657         if (mixedCaseIdentifiers == null) {
658             if (dmd != null) mixedCaseIdentifiers = dmd.supportsMixedCaseIdentifiers() ? Boolean.TRUE : Boolean.FALSE;
659             else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
660
properties.put(PROP_MIXEDCASE_IDENTIFIERS, mixedCaseIdentifiers);
661         }
662
663         return mixedCaseIdentifiers.booleanValue();
664     }
665
666     public int getMixedCaseIdentifiers()
667     {
668         return getBoolean(PROP_MIXEDCASE_IDENTIFIERS);
669     }
670
671     public void setMixedCaseIdentifiers(int value)
672     {
673         setBoolean(PROP_MIXEDCASE_IDENTIFIERS, value);
674     }
675
676     // identifier store
677

678     public int getIdentifierStore()
679     {
680         return getInt(PROP_IDENTIFIER_STORE);
681     }
682
683     public void setIdentifierStore(int value)
684     {
685         setInt(PROP_IDENTIFIER_STORE, value);
686     }
687
688     /**
689     * Does the database treat mixed case unquoted SQL identifiers as
690     * case insensitive and store them in upper case?
691     * @return <code>true</code> if so
692     * @exception SQLException if a database access error occurs
693     */

694     public boolean storesUpperCaseIdentifiers() throws SQLException JavaDoc
695     {
696         Integer JavaDoc identStore = (Integer JavaDoc)properties.get(PROP_IDENTIFIER_STORE);
697         if (identStore != null) return (identStore.intValue() == STORE_UPPERCASE);
698         if (dmd != null) return dmd.storesUpperCaseIdentifiers();
699         else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
700
}
701
702     /**
703     * Does the database treat mixed case unquoted SQL identifiers as
704     * case insensitive and store them in lower case?
705     * @return <code>true</code> if so
706     * @exception SQLException if a database access error occurs
707     */

708     public boolean storesLowerCaseIdentifiers() throws SQLException JavaDoc
709     {
710         Integer JavaDoc identStore = (Integer JavaDoc)properties.get(PROP_IDENTIFIER_STORE);
711         if (identStore != null) return (identStore.intValue() == STORE_LOWERCASE);
712         if (dmd != null) return dmd.storesLowerCaseIdentifiers();
713         else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
714
}
715
716     /**
717     * Does the database treat mixed case unquoted SQL identifiers as
718     * case insensitive and store them in mixed case?
719     * @return <code>true</code> if so
720     * @exception SQLException if a database access error occurs
721     */

722     public boolean storesMixedCaseIdentifiers() throws SQLException JavaDoc
723     {
724         Integer JavaDoc identStore = (Integer JavaDoc)properties.get(PROP_IDENTIFIER_STORE);
725         if (identStore != null) return (identStore.intValue() == STORE_MIXEDCASE);
726         if (dmd != null) return dmd.storesLowerCaseIdentifiers();
727         else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
728
}
729
730     /**
731     * Does the database treat mixed case quoted SQL identifiers as
732     * case sensitive and as a result store them in mixed case?
733     * A JDBC Compliant<sup><font size=-2>TM</font></sup> driver will always return true.
734     * @return <code>true</code> if so
735     * @exception SQLException if a database access error occurs
736     */

737     public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException JavaDoc
738     {
739         Boolean JavaDoc mixedCaseQuotedIdentifiers = (Boolean JavaDoc)properties.get(PROP_MIXEDCASE_QUOTED_IDENTIFIERS);
740         if (mixedCaseQuotedIdentifiers == null) {
741             if (dmd != null) mixedCaseQuotedIdentifiers = dmd.supportsMixedCaseQuotedIdentifiers() ? Boolean.TRUE : Boolean.FALSE;
742             else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
743
properties.put(PROP_MIXEDCASE_QUOTED_IDENTIFIERS, mixedCaseQuotedIdentifiers);
744         }
745
746         return mixedCaseQuotedIdentifiers.booleanValue();
747     }
748
749     public int getMixedCaseQuotedIdentifiers()
750     {
751         return getBoolean(PROP_MIXEDCASE_QUOTED_IDENTIFIERS);
752     }
753
754     public void setMixedCaseQuotedIdentifiers(int value)
755     {
756         setBoolean(PROP_MIXEDCASE_QUOTED_IDENTIFIERS, value);
757     }
758
759     // quoted store
760

761     public int getQuotedIdentifierStore()
762     {
763         return getInt(PROP_QUOTED_IDENTS);
764     }
765
766     public void setQuotedIdentifierStore(int value)
767     {
768         setInt(PROP_QUOTED_IDENTS, value);
769     }
770
771     /**
772     * Does the database treat mixed case quoted SQL identifiers as
773     * case insensitive and store them in upper case?
774     * @return <code>true</code> if so
775     * @exception SQLException if a database access error occurs
776     */

777     public boolean storesUpperCaseQuotedIdentifiers() throws SQLException JavaDoc
778     {
779         Integer JavaDoc identQuotedStore = (Integer JavaDoc)properties.get(PROP_QUOTED_IDENTS);
780         if (identQuotedStore != null) return (identQuotedStore.intValue() == STORE_UPPERCASE);
781         if (dmd != null) return dmd.storesUpperCaseQuotedIdentifiers();
782         throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
783
}
784
785     /**
786     * Does the database treat mixed case quoted SQL identifiers as
787     * case insensitive and store them in lower case?
788     * @return <code>true</code> if so
789     * @exception SQLException if a database access error occurs
790     */

791     public boolean storesLowerCaseQuotedIdentifiers() throws SQLException JavaDoc
792     {
793         Integer JavaDoc identQuotedStore = (Integer JavaDoc)properties.get(PROP_QUOTED_IDENTS);
794         if (identQuotedStore != null) return (identQuotedStore.intValue() == STORE_LOWERCASE);
795         if (dmd != null) return dmd.storesLowerCaseQuotedIdentifiers();
796         throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
797
}
798
799     /**
800     * Does the database treat mixed case quoted SQL identifiers as
801     * case insensitive and store them in mixed case?
802     * @return <code>true</code> if so
803     */

804     public boolean storesMixedCaseQuotedIdentifiers() throws SQLException JavaDoc
805     {
806         Integer JavaDoc identQuotedStore = (Integer JavaDoc)properties.get(PROP_QUOTED_IDENTS);
807         if (identQuotedStore != null) return (identQuotedStore.intValue() == STORE_MIXEDCASE);
808         if (dmd != null) return dmd.storesMixedCaseQuotedIdentifiers();
809         throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
810
}
811
812     /**
813     * What's the string used to quote SQL identifiers?
814     * This returns a space " " if identifier quoting isn't supported.
815     * @return the quoting string
816     * @exception SQLException if a database access error occurs
817     */

818     public String JavaDoc getIdentifierQuoteString() throws SQLException JavaDoc
819     {
820         String JavaDoc identifierQuoteString = (String JavaDoc)properties.get(PROP_IDENTIFIER_QUOTE);
821         if (identifierQuoteString == null) {
822             if (dmd != null) identifierQuoteString = dmd.getIdentifierQuoteString();
823             else return NOT_SET_STRING;
824             properties.put(PROP_IDENTIFIER_QUOTE, identifierQuoteString);
825         }
826
827         return identifierQuoteString;
828     }
829
830     public void setIdentifierQuoteString(String JavaDoc value)
831     {
832         setString(PROP_IDENTIFIER_QUOTE, value);
833     }
834
835     /**
836     * Gets a comma-separated list of all a database's SQL keywords
837     * that are NOT also SQL92 keywords.
838     * @return the list
839     * @exception SQLException if a database access error occurs
840     */

841     public String JavaDoc getSQLKeywords() throws SQLException JavaDoc
842     {
843         String JavaDoc sqlKeywords = (String JavaDoc)properties.get(PROP_SQL_KEYWORDS);
844         if (sqlKeywords == null) {
845             if (dmd != null) sqlKeywords = dmd.getSQLKeywords();
846             else return NOT_SET_STRING;
847             properties.put(PROP_SQL_KEYWORDS, sqlKeywords);
848         }
849
850         return sqlKeywords;
851     }
852
853     public void setSQLKeywords(String JavaDoc value)
854     {
855         setString(PROP_SQL_KEYWORDS, value);
856     }
857
858     /**
859     * Gets a comma-separated list of math functions. These are the
860     * X/Open CLI math function names used in the JDBC function escape
861     * clause.
862     * @return the list
863     * @exception SQLException if a database access error occurs
864     */

865     public String JavaDoc getNumericFunctions() throws SQLException JavaDoc
866     {
867         String JavaDoc numericFunctions = (String JavaDoc)properties.get(PROP_NUMERIC_FUNCTIONS);
868         if (numericFunctions == null) {
869             if (dmd != null) numericFunctions = dmd.getNumericFunctions();
870             else return NOT_SET_STRING;
871             properties.put(PROP_NUMERIC_FUNCTIONS, numericFunctions);
872         }
873
874         return numericFunctions;
875     }
876
877     public void setNumericFunctions(String JavaDoc value)
878     {
879         setString(PROP_NUMERIC_FUNCTIONS, value);
880     }
881
882     /**
883     * Gets a comma-separated list of string functions. These are the
884     * X/Open CLI string function names used in the JDBC function escape
885     * clause.
886     * @return the list
887     * @exception SQLException if a database access error occurs
888     */

889     public String JavaDoc getStringFunctions() throws SQLException JavaDoc
890     {
891         String JavaDoc stringFunctions = (String JavaDoc)properties.get(PROP_STRING_FUNCTIONS);
892         if (stringFunctions == null) {
893             if (dmd != null) stringFunctions = dmd.getStringFunctions();
894             else return NOT_SET_STRING;
895             properties.put(PROP_STRING_FUNCTIONS, stringFunctions);
896         }
897
898         return stringFunctions;
899     }
900
901     public void setStringFunctions(String JavaDoc value)
902     {
903         setString(PROP_STRING_FUNCTIONS, value);
904     }
905
906     /**
907     * Gets a comma-separated list of system functions. These are the
908     * X/Open CLI system function names used in the JDBC function escape
909     * clause.
910     * @return the list
911     * @exception SQLException if a database access error occurs
912     */

913     public String JavaDoc getSystemFunctions() throws SQLException JavaDoc
914     {
915         String JavaDoc systemFunctions = (String JavaDoc)properties.get(PROP_SYSTEM_FUNCTIONS);
916         if (systemFunctions == null) {
917             if (dmd != null) systemFunctions = dmd.getSystemFunctions();
918             else return NOT_SET_STRING;
919             properties.put(PROP_SYSTEM_FUNCTIONS, systemFunctions);
920         }
921
922         return systemFunctions;
923     }
924
925     public void setSystemFunctions(String JavaDoc value)
926     {
927         setString(PROP_SYSTEM_FUNCTIONS, value);
928     }
929
930     /**
931     * Gets a comma-separated list of time and date functions.
932     * @return the list
933     * @exception SQLException if a database access error occurs
934     */

935     public String JavaDoc getTimeDateFunctions() throws SQLException JavaDoc
936     {
937         String JavaDoc timeFunctions = (String JavaDoc)properties.get(PROP_TIME_FUNCTIONS);
938         if (timeFunctions == null) {
939             if (dmd != null) timeFunctions = dmd.getTimeDateFunctions();
940             else return NOT_SET_STRING;
941             properties.put(PROP_TIME_FUNCTIONS, timeFunctions);
942         }
943
944         return timeFunctions;
945     }
946
947     public void setTimeDateFunctions(String JavaDoc value)
948     {
949         setString(PROP_TIME_FUNCTIONS, value);
950     }
951
952     /**
953     * Gets the string that can be used to escape wildcard characters.
954     * This is the string that can be used to escape '_' or '%' in
955     * the string pattern style catalog search parameters.
956     * <P>The '_' character represents any single character.
957     * <P>The '%' character represents any sequence of zero or
958     * more characters.
959     * @return the string used to escape wildcard characters
960     * @exception SQLException if a database access error occurs
961     */

962     public String JavaDoc getSearchStringEscape() throws SQLException JavaDoc
963     {
964         String JavaDoc stringEscape = (String JavaDoc)properties.get(PROP_STRING_ESCAPE);
965         if (stringEscape == null) {
966             if (dmd != null) stringEscape = dmd.getSearchStringEscape();
967             else return NOT_SET_STRING;
968             properties.put(PROP_STRING_ESCAPE, stringEscape);
969         }
970
971         return stringEscape;
972     }
973
974     public void setSearchStringEscape(String JavaDoc value)
975     {
976         setString(PROP_STRING_ESCAPE, value);
977     }
978
979     /**
980     * Gets all the "extra" characters that can be used in unquoted
981     * identifier names (those beyond a-z, A-Z, 0-9 and _).
982     * @return the string containing the extra characters
983     * @exception SQLException if a database access error occurs
984     */

985     public String JavaDoc getExtraNameCharacters() throws SQLException JavaDoc
986     {
987         String JavaDoc extraCharacters = (String JavaDoc)properties.get(PROP_EXTRA_CHARACTERS);
988         if (extraCharacters == null) {
989             if (dmd != null) extraCharacters = dmd.getExtraNameCharacters();
990             else return NOT_SET_STRING;
991             properties.put(PROP_EXTRA_CHARACTERS, extraCharacters);
992         }
993
994         return extraCharacters;
995     }
996
997     public void setExtraNameCharacters(String JavaDoc value)
998     {
999         setString(PROP_EXTRA_CHARACTERS, value);
1000    }
1001
1002    /**
1003    * Is "ALTER TABLE" with add column supported?
1004    * @return <code>true</code> if so
1005    */

1006    public boolean supportsAlterTableWithAddColumn() throws SQLException JavaDoc
1007    {
1008        Boolean JavaDoc alterAdd = (Boolean JavaDoc)properties.get(PROP_ALTER_ADD);
1009        if (alterAdd == null) {
1010            if (dmd != null) alterAdd = dmd.supportsAlterTableWithAddColumn() ? Boolean.TRUE : Boolean.FALSE;
1011            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1012
properties.put(PROP_ALTER_ADD, alterAdd);
1013        }
1014
1015        return alterAdd.booleanValue();
1016    }
1017
1018    public int getAlterTableWithAddColumn()
1019    {
1020        return getBoolean(PROP_ALTER_ADD);
1021    }
1022
1023    public void setAlterTableWithAddColumn(int value)
1024    {
1025        setBoolean(PROP_ALTER_ADD, value);
1026    }
1027
1028    /**
1029    * Is "ALTER TABLE" with drop column supported?
1030    * @return <code>true</code> if so
1031    * @exception SQLException if a database access error occurs
1032    */

1033    public boolean supportsAlterTableWithDropColumn() throws SQLException JavaDoc
1034    {
1035        Boolean JavaDoc alterDrop = (Boolean JavaDoc)properties.get(PROP_ALTER_DROP);
1036        if (alterDrop == null) {
1037            if (dmd != null) alterDrop = dmd.supportsAlterTableWithDropColumn() ? Boolean.TRUE : Boolean.FALSE;
1038            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1039
properties.put(PROP_ALTER_DROP, alterDrop);
1040        }
1041
1042        return alterDrop.booleanValue();
1043    }
1044
1045    public int getAlterTableWithDropColumn()
1046    {
1047        return getBoolean(PROP_ALTER_DROP);
1048    }
1049
1050    public void setAlterTableWithDropColumn(int value)
1051    {
1052        setBoolean(PROP_ALTER_DROP, value);
1053    }
1054
1055    /**
1056    * Is column aliasing supported?
1057    * <P>If so, the SQL AS clause can be used to provide names for
1058    * computed columns or to provide alias names for columns as
1059    * required.
1060    * @return <code>true</code> if so
1061    */

1062    public boolean supportsColumnAliasing() throws SQLException JavaDoc
1063    {
1064        Boolean JavaDoc columnAliasing = (Boolean JavaDoc)properties.get(PROP_COLUMN_ALIASING);
1065        if (columnAliasing == null) {
1066            if (dmd != null) columnAliasing = dmd.supportsColumnAliasing() ? Boolean.TRUE : Boolean.FALSE;
1067            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1068
properties.put(PROP_COLUMN_ALIASING, columnAliasing);
1069        }
1070
1071        return columnAliasing.booleanValue();
1072    }
1073
1074    public int getColumnAliasing()
1075    {
1076        return getBoolean(PROP_COLUMN_ALIASING);
1077    }
1078
1079    public void setColumnAliasing(int value)
1080    {
1081        setBoolean(PROP_COLUMN_ALIASING, value);
1082    }
1083
1084    /**
1085    * Are concatenations between NULL and non-NULL values NULL?
1086    * A JDBC Compliant<sup><font size=-2>TM</font></sup> driver always returns true.
1087    * @return <code>true</code> if so
1088    */

1089    public boolean nullPlusNonNullIsNull() throws SQLException JavaDoc
1090    {
1091        Boolean JavaDoc nullPlusNull = (Boolean JavaDoc)properties.get(PROP_NULL_PLUS_NULL_IS_NULL);
1092        if (nullPlusNull == null) {
1093            if (dmd != null) nullPlusNull = dmd.nullPlusNonNullIsNull() ? Boolean.TRUE : Boolean.FALSE;
1094            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1095
properties.put(PROP_NULL_PLUS_NULL_IS_NULL, nullPlusNull);
1096        }
1097
1098        return nullPlusNull.booleanValue();
1099    }
1100
1101    public int getNullPlusNonNullIsNull()
1102    {
1103        return getBoolean(PROP_NULL_PLUS_NULL_IS_NULL);
1104    }
1105
1106    public void setNullPlusNonNullIsNull(int value)
1107    {
1108        setBoolean(PROP_NULL_PLUS_NULL_IS_NULL, value);
1109    }
1110
1111    /**
1112    * Is the CONVERT function between SQL types supported?
1113    * @return <code>true</code> if so
1114    * @exception SQLException if a database access error occurs
1115    */

1116    public boolean supportsConvert() throws SQLException JavaDoc
1117    {
1118        Boolean JavaDoc supportsConvert = (Boolean JavaDoc)properties.get(PROP_CONVERT);
1119        if (supportsConvert == null) {
1120            if (dmd != null) supportsConvert = dmd.supportsConvert() ? Boolean.TRUE : Boolean.FALSE;
1121            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1122
properties.put(PROP_CONVERT, supportsConvert);
1123        }
1124
1125        return supportsConvert.booleanValue();
1126    }
1127
1128    public int getConvert()
1129    {
1130        return getBoolean(PROP_CONVERT);
1131    }
1132
1133    public void setConvert(int value)
1134    {
1135        setBoolean(PROP_CONVERT, value);
1136    }
1137
1138    /**
1139    * Is CONVERT between the given SQL types supported?
1140    * @param fromType the type to convert from
1141    * @param toType the type to convert to
1142    * @return <code>true</code> if so
1143    */

1144    public boolean supportsConvert(int fromType, int toType) throws SQLException JavaDoc
1145    {
1146        if (dmd != null) return dmd.supportsConvert(fromType, toType);
1147        else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1148
}
1149
1150    /**
1151    * Are table correlation names supported?
1152    * A JDBC Compliant<sup><font size=-2>TM</font></sup> driver always returns true.
1153    * @return <code>true</code> if so
1154    * @exception SQLException if a database access error occurs
1155    */

1156    public boolean supportsTableCorrelationNames() throws SQLException JavaDoc
1157    {
1158        Boolean JavaDoc nameCorrelation = (Boolean JavaDoc)properties.get(PROP_TABLE_CORRELATION_NAMES);
1159        if (nameCorrelation == null) {
1160            if (dmd != null) nameCorrelation = dmd.supportsTableCorrelationNames() ? Boolean.TRUE : Boolean.FALSE;
1161            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1162
properties.put(PROP_TABLE_CORRELATION_NAMES, nameCorrelation);
1163        }
1164
1165        return nameCorrelation.booleanValue();
1166    }
1167
1168    public int getTableCorrelationNames()
1169    {
1170        return getBoolean(PROP_TABLE_CORRELATION_NAMES);
1171    }
1172
1173    public void setTableCorrelationNames(int value)
1174    {
1175        setBoolean(PROP_TABLE_CORRELATION_NAMES, value);
1176    }
1177
1178    /**
1179    * If table correlation names are supported, are they restricted
1180    * to be different from the names of the tables?
1181    * @exception SQLException if a database access error occurs
1182    */

1183    public boolean supportsDifferentTableCorrelationNames() throws SQLException JavaDoc
1184    {
1185        Boolean JavaDoc tableCorrelation = (Boolean JavaDoc)properties.get(PROP_DIFF_TABLE_CORRELATION_NAMES);
1186        if (tableCorrelation == null) {
1187            if (dmd != null) tableCorrelation = dmd.supportsDifferentTableCorrelationNames() ? Boolean.TRUE : Boolean.FALSE;
1188            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1189
properties.put(PROP_DIFF_TABLE_CORRELATION_NAMES, tableCorrelation);
1190        }
1191
1192        return tableCorrelation.booleanValue();
1193    }
1194
1195    public int getDifferentTableCorrelationNames()
1196    {
1197        return getBoolean(PROP_DIFF_TABLE_CORRELATION_NAMES);
1198    }
1199
1200    public void setDifferentTableCorrelationNames(int value)
1201    {
1202        setBoolean(PROP_DIFF_TABLE_CORRELATION_NAMES, value);
1203    }
1204
1205    /**
1206    * Are expressions in "ORDER BY" lists supported?
1207    * @return <code>true</code> if so
1208    * @exception SQLException if a database access error occurs
1209    */

1210    public boolean supportsExpressionsInOrderBy() throws SQLException JavaDoc
1211    {
1212        Boolean JavaDoc ordering = (Boolean JavaDoc)properties.get(PROP_EXPRESSIONS_IN_ORDERBY);
1213        if (ordering == null) {
1214            if (dmd != null) ordering = dmd.supportsExpressionsInOrderBy() ? Boolean.TRUE : Boolean.FALSE;
1215            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1216
properties.put(PROP_EXPRESSIONS_IN_ORDERBY, ordering);
1217        }
1218
1219        return ordering.booleanValue();
1220    }
1221
1222    public int getExpressionsInOrderBy()
1223    {
1224        return getBoolean(PROP_EXPRESSIONS_IN_ORDERBY);
1225    }
1226
1227    public void setExpressionsInOrderBy(int value)
1228    {
1229        setBoolean(PROP_EXPRESSIONS_IN_ORDERBY, value);
1230    }
1231
1232    /**
1233    * Can an "ORDER BY" clause use columns not in the SELECT statement?
1234    * @return <code>true</code> if so
1235    * @exception SQLException if a database access error occurs
1236    */

1237    public boolean supportsOrderByUnrelated() throws SQLException JavaDoc
1238    {
1239        Boolean JavaDoc unrelatedOrdering = (Boolean JavaDoc)properties.get(PROP_ORDER_BY_UNRELATED);
1240        if (unrelatedOrdering == null) {
1241            if (dmd != null) unrelatedOrdering = dmd.supportsOrderByUnrelated() ? Boolean.TRUE : Boolean.FALSE;
1242            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1243
properties.put(PROP_ORDER_BY_UNRELATED, unrelatedOrdering);
1244        }
1245
1246        return unrelatedOrdering.booleanValue();
1247    }
1248
1249    public int getOrderByUnrelated()
1250    {
1251        return getBoolean(PROP_ORDER_BY_UNRELATED);
1252    }
1253
1254    public void setOrderByUnrelated(int value)
1255    {
1256        setBoolean(PROP_ORDER_BY_UNRELATED, value);
1257    }
1258
1259    /**
1260    * Is some form of "GROUP BY" clause supported?
1261    * @return <code>true</code> if so
1262    */

1263    public boolean supportsGroupBy() throws SQLException JavaDoc
1264    {
1265        Boolean JavaDoc groupBy = (Boolean JavaDoc)properties.get(PROP_GROUP_BY);
1266        if (groupBy == null) {
1267            if (dmd != null) groupBy = dmd.supportsGroupBy() ? Boolean.TRUE : Boolean.FALSE;
1268            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1269
properties.put(PROP_GROUP_BY, groupBy);
1270        }
1271
1272        return groupBy.booleanValue();
1273    }
1274
1275    public int getGroupBy()
1276    {
1277        return getBoolean(PROP_GROUP_BY);
1278    }
1279
1280    public void setGroupBy(int value)
1281    {
1282        setBoolean(PROP_GROUP_BY, value);
1283    }
1284
1285    /**
1286    * Can a "GROUP BY" clause use columns not in the SELECT?
1287    * @return <code>true</code> if so
1288    * @exception SQLException if a database access error occurs
1289    */

1290    public boolean supportsGroupByUnrelated() throws SQLException JavaDoc
1291    {
1292        Boolean JavaDoc unrelatedGroupBy = (Boolean JavaDoc)properties.get(PROP_UNRELATED_GROUP_BY);
1293        if (unrelatedGroupBy == null) {
1294            if (dmd != null) unrelatedGroupBy = dmd.supportsGroupByUnrelated() ? Boolean.TRUE : Boolean.FALSE;
1295            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1296
properties.put(PROP_UNRELATED_GROUP_BY, unrelatedGroupBy);
1297        }
1298
1299        return unrelatedGroupBy.booleanValue();
1300    }
1301
1302    public int getGroupByUnrelated()
1303    {
1304        return getBoolean(PROP_UNRELATED_GROUP_BY);
1305    }
1306
1307    public void setGroupByUnrelated(int value)
1308    {
1309        setBoolean(PROP_UNRELATED_GROUP_BY, value);
1310    }
1311
1312    /**
1313    * Can a "GROUP BY" clause add columns not in the SELECT
1314    * provided it specifies all the columns in the SELECT?
1315    * @return <code>true</code> if so
1316    */

1317    public boolean supportsGroupByBeyondSelect() throws SQLException JavaDoc
1318    {
1319        Boolean JavaDoc beyondGroupBy = (Boolean JavaDoc)properties.get(PROP_BEYOND_GROUP_BY);
1320        if (beyondGroupBy == null) {
1321            if (dmd != null) beyondGroupBy = dmd.supportsGroupByBeyondSelect() ? Boolean.TRUE : Boolean.FALSE;
1322            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1323
properties.put(PROP_BEYOND_GROUP_BY, beyondGroupBy);
1324        }
1325
1326        return beyondGroupBy.booleanValue();
1327    }
1328
1329    public int getGroupByBeyondSelect()
1330    {
1331        return getBoolean(PROP_BEYOND_GROUP_BY);
1332    }
1333
1334    public void setGroupByBeyondSelect(int value)
1335    {
1336        setBoolean(PROP_BEYOND_GROUP_BY, value);
1337    }
1338
1339    /**
1340    * Is the escape character in "LIKE" clauses supported?
1341    * A JDBC Compliant<sup><font size=-2>TM</font></sup> driver always returns true.
1342    * @return <code>true</code> if so
1343    * @exception SQLException if a database access error occurs
1344    */

1345    public boolean supportsLikeEscapeClause() throws SQLException JavaDoc
1346    {
1347        Boolean JavaDoc escapeLike = (Boolean JavaDoc)properties.get(PROP_ESCAPE_LIKE);
1348        if (escapeLike == null) {
1349            if (dmd != null) escapeLike = dmd.supportsLikeEscapeClause() ? Boolean.TRUE : Boolean.FALSE;
1350            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1351
properties.put(PROP_ESCAPE_LIKE, escapeLike);
1352        }
1353
1354        return escapeLike.booleanValue();
1355    }
1356
1357    public int getLikeEscapeClause()
1358    {
1359        return getBoolean(PROP_ESCAPE_LIKE);
1360    }
1361
1362    public void setLikeEscapeClause(int value)
1363    {
1364        setBoolean(PROP_ESCAPE_LIKE, value);
1365    }
1366
1367    /**
1368    * Are multiple ResultSets from a single execute supported?
1369    * @return <code>true</code> if so
1370    * @exception SQLException if a database access error occurs
1371    */

1372    public boolean supportsMultipleResultSets() throws SQLException JavaDoc
1373    {
1374        Boolean JavaDoc multipleResultSets = (Boolean JavaDoc)properties.get(PROP_MULTIPLE_RS);
1375        if (multipleResultSets == null) {
1376            if (dmd != null) multipleResultSets = dmd.supportsMultipleResultSets() ? Boolean.TRUE : Boolean.FALSE;
1377            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1378
properties.put(PROP_MULTIPLE_RS, multipleResultSets);
1379        }
1380
1381        return multipleResultSets.booleanValue();
1382    }
1383
1384    public int getMultipleResultSets()
1385    {
1386        return getBoolean(PROP_MULTIPLE_RS);
1387    }
1388
1389    public void setMultipleResultSets(int value)
1390    {
1391        setBoolean(PROP_MULTIPLE_RS, value);
1392    }
1393
1394    /**
1395    * Can we have multiple transactions open at once (on different
1396    * connections)?
1397    * @return <code>true</code> if so
1398    * @exception SQLException if a database access error occurs
1399    */

1400    public boolean supportsMultipleTransactions() throws SQLException JavaDoc
1401    {
1402        Boolean JavaDoc multipleTransactions = (Boolean JavaDoc)properties.get(PROP_MULTIPLE_TRANSACTIONS);
1403        if (multipleTransactions == null) {
1404            if (dmd != null) multipleTransactions = dmd.supportsMultipleTransactions() ? Boolean.TRUE : Boolean.FALSE;
1405            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1406
properties.put(PROP_MULTIPLE_TRANSACTIONS, multipleTransactions);
1407        }
1408
1409        return multipleTransactions.booleanValue();
1410    }
1411
1412    public int getMultipleTransactions()
1413    {
1414        return getBoolean(PROP_MULTIPLE_TRANSACTIONS);
1415    }
1416
1417    public void setMultipleTransactions(int value)
1418    {
1419        setBoolean(PROP_MULTIPLE_TRANSACTIONS, value);
1420    }
1421
1422    /**
1423    * Can columns be defined as non-nullable?
1424    * A JDBC Compliant<sup><font size=-2>TM</font></sup> driver always returns true.
1425    * @exception SQLException if a database access error occurs
1426    */

1427    public boolean supportsNonNullableColumns() throws SQLException JavaDoc
1428    {
1429        Boolean JavaDoc nunNullableColumns = (Boolean JavaDoc)properties.get(PROP_NON_NULL_COLUMNSS);
1430        if (nunNullableColumns == null) {
1431            if (dmd != null) nunNullableColumns = dmd.supportsNonNullableColumns() ? Boolean.TRUE : Boolean.FALSE;
1432            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1433
properties.put(PROP_NON_NULL_COLUMNSS, nunNullableColumns);
1434        }
1435
1436        return nunNullableColumns.booleanValue();
1437    }
1438
1439    public int getNonNullableColumns()
1440    {
1441        return getBoolean(PROP_NON_NULL_COLUMNSS);
1442    }
1443
1444    public void setNonNullableColumns(int value)
1445    {
1446        setBoolean(PROP_NON_NULL_COLUMNSS, value);
1447    }
1448
1449    /**
1450    * Is the ODBC Minimum SQL grammar supported?
1451    * All JDBC Compliant<sup><font size=-2>TM</font></sup> drivers must return true.
1452    * @return <code>true</code> if so
1453    * @exception SQLException if a database access error occurs
1454    */

1455    public boolean supportsMinimumSQLGrammar() throws SQLException JavaDoc
1456    {
1457        Boolean JavaDoc minimumSQLGrammar = (Boolean JavaDoc)properties.get(PROP_MINUMUM_SQL_GRAMMAR);
1458        if (minimumSQLGrammar == null) {
1459            if (dmd != null) minimumSQLGrammar = dmd.supportsMinimumSQLGrammar() ? Boolean.TRUE : Boolean.FALSE;
1460            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1461
properties.put(PROP_MINUMUM_SQL_GRAMMAR, minimumSQLGrammar);
1462        }
1463
1464        return minimumSQLGrammar.booleanValue();
1465    }
1466
1467    public int getMinimumSQLGrammar()
1468    {
1469        return getBoolean(PROP_MINUMUM_SQL_GRAMMAR);
1470    }
1471
1472    public void setMinimumSQLGrammar(int value)
1473    {
1474        setBoolean(PROP_MINUMUM_SQL_GRAMMAR, value);
1475    }
1476
1477    /**
1478    * Is the ODBC Core SQL grammar supported?
1479    * @return <code>true</code> if so
1480    * @exception SQLException if a database access error occurs
1481    */

1482    public boolean supportsCoreSQLGrammar() throws SQLException JavaDoc
1483    {
1484        Boolean JavaDoc coreSQLGrammar = (Boolean JavaDoc)properties.get(PROP_CORE_SQL_GRAMMAR);
1485        if (coreSQLGrammar == null) {
1486            if (dmd != null) coreSQLGrammar = dmd.supportsCoreSQLGrammar() ? Boolean.TRUE : Boolean.FALSE;
1487            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1488
properties.put(PROP_CORE_SQL_GRAMMAR, coreSQLGrammar);
1489        }
1490
1491        return coreSQLGrammar.booleanValue();
1492    }
1493
1494    public int getCoreSQLGrammar()
1495    {
1496        return getBoolean(PROP_CORE_SQL_GRAMMAR);
1497    }
1498
1499    public void setCoreSQLGrammar(int value)
1500    {
1501        setBoolean(PROP_CORE_SQL_GRAMMAR, value);
1502    }
1503
1504    /**
1505    * Is the ODBC Extended SQL grammar supported?
1506    * @return <code>true</code> if so
1507    */

1508    public boolean supportsExtendedSQLGrammar() throws SQLException JavaDoc
1509    {
1510        Boolean JavaDoc extendedSQLGrammar = (Boolean JavaDoc)properties.get(PROP_EXTENDED_SQL_GRAMMAR);
1511        if (extendedSQLGrammar == null) {
1512            if (dmd != null) extendedSQLGrammar = dmd.supportsExtendedSQLGrammar() ? Boolean.TRUE : Boolean.FALSE;
1513            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1514
properties.put(PROP_EXTENDED_SQL_GRAMMAR, extendedSQLGrammar);
1515        }
1516
1517        return extendedSQLGrammar.booleanValue();
1518    }
1519
1520    public int getExtendedSQLGrammar()
1521    {
1522        return getBoolean(PROP_EXTENDED_SQL_GRAMMAR);
1523    }
1524
1525    public void setExtendedSQLGrammar(int value)
1526    {
1527        setBoolean(PROP_EXTENDED_SQL_GRAMMAR, value);
1528    }
1529
1530    /**
1531    * Is the ANSI92 entry level SQL grammar supported?
1532    * All JDBC Compliant<sup><font size=-2>TM</font></sup> drivers must return true.
1533    * @return <code>true</code> if so
1534    * @exception SQLException if a database access error occurs
1535    */

1536    public boolean supportsANSI92EntryLevelSQL() throws SQLException JavaDoc
1537    {
1538        Boolean JavaDoc ansiSQLGrammar = (Boolean JavaDoc)properties.get(PROP_ANSI_SQL_GRAMMAR);
1539        if (ansiSQLGrammar == null) {
1540            if (dmd != null) ansiSQLGrammar = dmd.supportsANSI92EntryLevelSQL() ? Boolean.TRUE : Boolean.FALSE;
1541            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1542
properties.put(PROP_ANSI_SQL_GRAMMAR, ansiSQLGrammar);
1543        }
1544
1545        return ansiSQLGrammar.booleanValue();
1546    }
1547
1548    public int getANSI92EntryLevelSQL()
1549    {
1550        return getBoolean(PROP_ANSI_SQL_GRAMMAR);
1551    }
1552
1553    public void setANSI92EntryLevelSQL(int value)
1554    {
1555        setBoolean(PROP_ANSI_SQL_GRAMMAR, value);
1556    }
1557
1558    /**
1559    * Is the ANSI92 intermediate SQL grammar supported?
1560    * @exception SQLException if a database access error occurs
1561    */

1562    public boolean supportsANSI92IntermediateSQL() throws SQLException JavaDoc
1563    {
1564        Boolean JavaDoc ansiInterSQLGrammar = (Boolean JavaDoc)properties.get(PROP_INTERMEDIATE_SQL_GRAMMAR);
1565        if (ansiInterSQLGrammar == null) {
1566            if (dmd != null) ansiInterSQLGrammar = dmd.supportsANSI92IntermediateSQL() ? Boolean.TRUE : Boolean.FALSE;
1567            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1568
properties.put(PROP_INTERMEDIATE_SQL_GRAMMAR, ansiInterSQLGrammar);
1569        }
1570
1571        return ansiInterSQLGrammar.booleanValue();
1572    }
1573
1574    public int getANSI92IntermediateSQL()
1575    {
1576        return getBoolean(PROP_INTERMEDIATE_SQL_GRAMMAR);
1577    }
1578
1579    public void setANSI92IntermediateSQL(int value)
1580    {
1581        setBoolean(PROP_INTERMEDIATE_SQL_GRAMMAR, value);
1582    }
1583
1584    /**
1585    * Is the ANSI92 full SQL grammar supported?
1586    * @return <code>true</code> if so
1587    */

1588    public boolean supportsANSI92FullSQL() throws SQLException JavaDoc
1589    {
1590        Boolean JavaDoc ansiFullSQLGrammar = (Boolean JavaDoc)properties.get(PROP_FULL_SQL_GRAMMAR);
1591        if (ansiFullSQLGrammar == null) {
1592            if (dmd != null) ansiFullSQLGrammar = dmd.supportsANSI92FullSQL() ? Boolean.TRUE : Boolean.FALSE;
1593            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1594
properties.put(PROP_FULL_SQL_GRAMMAR, ansiFullSQLGrammar);
1595        }
1596
1597        return ansiFullSQLGrammar.booleanValue();
1598    }
1599
1600    public int getANSI92FullSQL()
1601    {
1602        return getBoolean(PROP_FULL_SQL_GRAMMAR);
1603    }
1604
1605    public void setANSI92FullSQL(int value)
1606    {
1607        setBoolean(PROP_FULL_SQL_GRAMMAR, value);
1608    }
1609
1610    /**
1611    * Is the SQL Integrity Enhancement Facility supported?
1612    * @return <code>true</code> if so
1613    * @exception SQLException if a database access error occurs
1614    */

1615    public boolean supportsIntegrityEnhancementFacility() throws SQLException JavaDoc
1616    {
1617        Boolean JavaDoc integrityEnh = (Boolean JavaDoc)properties.get(PROP_INTEGRITY_ENHANCEMENT);
1618        if (integrityEnh == null) {
1619            if (dmd != null) integrityEnh = dmd.supportsIntegrityEnhancementFacility() ? Boolean.TRUE : Boolean.FALSE;
1620            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1621
properties.put(PROP_INTEGRITY_ENHANCEMENT, integrityEnh);
1622        }
1623
1624        return integrityEnh.booleanValue();
1625    }
1626
1627    public int getIntegrityEnhancementFacility()
1628    {
1629        return getBoolean(PROP_INTEGRITY_ENHANCEMENT);
1630    }
1631
1632    public void setIntegrityEnhancementFacility(int value)
1633    {
1634        setBoolean(PROP_INTEGRITY_ENHANCEMENT, value);
1635    }
1636
1637    /**
1638    * Is some form of outer join supported?
1639    * @return <code>true</code> if so
1640    * @exception SQLException if a database access error occurs
1641    */

1642    public boolean supportsOuterJoins() throws SQLException JavaDoc
1643    {
1644        Boolean JavaDoc outerJoins = (Boolean JavaDoc)properties.get(PROP_OUTER_JOINS);
1645        if (outerJoins == null) {
1646            if (dmd != null) outerJoins = dmd.supportsOuterJoins() ? Boolean.TRUE : Boolean.FALSE;
1647            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1648
properties.put(PROP_OUTER_JOINS, outerJoins);
1649        }
1650
1651        return outerJoins.booleanValue();
1652    }
1653
1654    public int getOuterJoins()
1655    {
1656        return getBoolean(PROP_OUTER_JOINS);
1657    }
1658
1659    public void setOuterJoins(int value)
1660    {
1661        setBoolean(PROP_OUTER_JOINS, value);
1662    }
1663
1664    /**
1665    * Are full nested outer joins supported?
1666    * @return <code>true</code> if so
1667    * @exception SQLException if a database access error occurs
1668        */

1669    public boolean supportsFullOuterJoins() throws SQLException JavaDoc
1670    {
1671        Boolean JavaDoc fullOuterJoins = (Boolean JavaDoc)properties.get(PROP_FULL_OUTER_JOINS);
1672        if (fullOuterJoins == null) {
1673            if (dmd != null) fullOuterJoins = dmd.supportsFullOuterJoins() ? Boolean.TRUE : Boolean.FALSE;
1674            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1675
properties.put(PROP_FULL_OUTER_JOINS, fullOuterJoins);
1676        }
1677
1678        return fullOuterJoins.booleanValue();
1679    }
1680
1681    public int getFullOuterJoins()
1682    {
1683        return getBoolean(PROP_FULL_OUTER_JOINS);
1684    }
1685
1686    public void setFullOuterJoins(int value)
1687    {
1688        setBoolean(PROP_FULL_OUTER_JOINS, value);
1689    }
1690
1691    /**
1692    * Is there limited support for outer joins? (This will be true
1693    * if supportFullOuterJoins is true.)
1694    * @return <code>true</code> if so
1695    * @exception SQLException if a database access error occurs
1696    */

1697    public boolean supportsLimitedOuterJoins() throws SQLException JavaDoc
1698    {
1699        Boolean JavaDoc limiterOuterJoins = (Boolean JavaDoc)properties.get(PROP_LIMITED_OUTER_JOINS);
1700        if (limiterOuterJoins == null) {
1701            if (dmd != null) limiterOuterJoins = dmd.supportsLimitedOuterJoins() ? Boolean.TRUE : Boolean.FALSE;
1702            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1703
properties.put(PROP_LIMITED_OUTER_JOINS, limiterOuterJoins);
1704        }
1705
1706        return limiterOuterJoins.booleanValue();
1707    }
1708
1709    public int getLimitedOuterJoins()
1710    {
1711        return getBoolean(PROP_LIMITED_OUTER_JOINS);
1712    }
1713
1714    public void setLimitedOuterJoins(int value)
1715    {
1716        setBoolean(PROP_LIMITED_OUTER_JOINS, value);
1717    }
1718
1719    /**
1720    * What's the database vendor's preferred term for "schema"?
1721        *
1722        * @return the vendor term
1723        * @exception SQLException if a database access error occurs
1724        */

1725    public String JavaDoc getSchemaTerm() throws SQLException JavaDoc
1726    {
1727        String JavaDoc schemaTerm = (String JavaDoc)properties.get(PROP_SCHEMA_TERM);
1728        if (schemaTerm == null) {
1729            if (dmd != null) schemaTerm = dmd.getSchemaTerm();
1730            else return NOT_SET_STRING;
1731            properties.put(PROP_SCHEMA_TERM, schemaTerm);
1732        }
1733
1734        return schemaTerm;
1735    }
1736
1737    public void setSchemaTerm(String JavaDoc value)
1738    {
1739        setString(PROP_SCHEMA_TERM, value);
1740    }
1741
1742    /**
1743        * What's the database vendor's preferred term for "procedure"?
1744        *
1745        * @return the vendor term
1746        * @exception SQLException if a database access error occurs
1747        */

1748    public String JavaDoc getProcedureTerm() throws SQLException JavaDoc
1749    {
1750        String JavaDoc procedureTerm = (String JavaDoc)properties.get(PROP_PROCEDURE_TERM);
1751        if (procedureTerm == null) {
1752            if (dmd != null) procedureTerm = dmd.getProcedureTerm();
1753            else return NOT_SET_STRING;
1754            properties.put(PROP_PROCEDURE_TERM, procedureTerm);
1755        }
1756
1757        return procedureTerm;
1758    }
1759
1760    public void setProcedureTerm(String JavaDoc value)
1761    {
1762        setString(PROP_PROCEDURE_TERM, value);
1763    }
1764
1765    /**
1766        * What's the database vendor's preferred term for "catalog"?
1767        *
1768        * @return the vendor term
1769        * @exception SQLException if a database access error occurs
1770        */

1771    public String JavaDoc getCatalogTerm() throws SQLException JavaDoc
1772    {
1773        String JavaDoc catalogTerm = (String JavaDoc)properties.get(PROP_CATALOG_TERM);
1774        if (catalogTerm == null) {
1775            if (dmd != null) catalogTerm = dmd.getCatalogTerm();
1776            else return NOT_SET_STRING;
1777            properties.put(PROP_CATALOG_TERM, catalogTerm);
1778        }
1779
1780        return catalogTerm;
1781    }
1782
1783    public void setCatalogTerm(String JavaDoc value)
1784    {
1785        setString(PROP_CATALOG_TERM, value);
1786    }
1787
1788    /**
1789    * Does a catalog appear at the start of a qualified table name?
1790    * (Otherwise it appears at the end)
1791    * @return true if it appears at the start
1792    * @exception SQLException if a database access error occurs
1793    */

1794
1795    public boolean isCatalogAtStart() throws SQLException JavaDoc {
1796        Boolean JavaDoc catalogAtStart = (Boolean JavaDoc)properties.get(PROP_CATALOG_AT_START);
1797        if (catalogAtStart == null) {
1798            if (dmd != null)
1799                catalogAtStart = dmd.isCatalogAtStart() ? Boolean.TRUE : Boolean.FALSE;
1800            else
1801                throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1802
properties.put(PROP_CATALOG_AT_START, catalogAtStart);
1803        }
1804
1805        return catalogAtStart.booleanValue();
1806    }
1807
1808    // public int getCatalogAtStart() {
1809
public int getcatalogAtStart() {
1810        return getBoolean(PROP_CATALOG_AT_START);
1811    }
1812
1813    // public void setCatalogAtStart(int value) {
1814
public void setcatalogAtStart(int value) {
1815        setBoolean(PROP_CATALOG_AT_START, value);
1816    }
1817
1818    /**
1819    * What's the separator between catalog and table name?
1820    * @return the separator string
1821    * @exception SQLException if a database access error occurs
1822    */

1823    public String JavaDoc getCatalogSeparator() throws SQLException JavaDoc
1824    {
1825        String JavaDoc catalogSeparator = (String JavaDoc)properties.get(PROP_CATALOGS_SEPARATOR);
1826        if (catalogSeparator == null) {
1827            if (dmd != null) catalogSeparator = dmd.getCatalogSeparator();
1828            else return NOT_SET_STRING;
1829            properties.put(PROP_CATALOGS_SEPARATOR, catalogSeparator);
1830        }
1831
1832        return catalogSeparator;
1833    }
1834
1835    public void setCatalogSeparator(String JavaDoc value)
1836    {
1837        setString(PROP_CATALOGS_SEPARATOR, value);
1838    }
1839
1840    /**
1841    * Can a schema name be used in a data manipulation statement?
1842    * @return <code>true</code> if so
1843    * @exception SQLException if a database access error occurs
1844    */

1845    public boolean supportsSchemasInDataManipulation() throws SQLException JavaDoc
1846    {
1847        Boolean JavaDoc schemasInDM = (Boolean JavaDoc)properties.get(PROP_SCHEMAS_IN_DML);
1848        if (schemasInDM == null) {
1849            if (dmd != null) schemasInDM = dmd.supportsSchemasInDataManipulation() ? Boolean.TRUE : Boolean.FALSE;
1850            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1851
properties.put(PROP_SCHEMAS_IN_DML, schemasInDM);
1852        }
1853
1854        return schemasInDM.booleanValue();
1855    }
1856
1857    public int getSchemasInDataManipulation()
1858    {
1859        return getBoolean(PROP_SCHEMAS_IN_DML);
1860    }
1861
1862    public void setSchemasInDataManipulation(int value)
1863    {
1864        setBoolean(PROP_SCHEMAS_IN_DML, value);
1865    }
1866
1867    /**
1868    * Can a schema name be used in a procedure call statement?
1869    * @return <code>true</code> if so
1870    * @exception SQLException if a database access error occurs
1871    */

1872    public boolean supportsSchemasInProcedureCalls() throws SQLException JavaDoc
1873    {
1874        Boolean JavaDoc schemasInProcedureCalls = (Boolean JavaDoc)properties.get(PROP_SCHEMAS_IN_PROCEDURE_CALL);
1875        if (schemasInProcedureCalls == null) {
1876            if (dmd != null) schemasInProcedureCalls = dmd.supportsSchemasInProcedureCalls() ? Boolean.TRUE : Boolean.FALSE;
1877            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1878
properties.put(PROP_SCHEMAS_IN_PROCEDURE_CALL, schemasInProcedureCalls);
1879        }
1880
1881        return schemasInProcedureCalls.booleanValue();
1882    }
1883
1884    public int getSchemasInProcedureCalls()
1885    {
1886        return getBoolean(PROP_SCHEMAS_IN_PROCEDURE_CALL);
1887    }
1888
1889    public void setSchemasInProcedureCalls(int value)
1890    {
1891        setBoolean(PROP_SCHEMAS_IN_PROCEDURE_CALL, value);
1892    }
1893
1894    /**
1895    * Can a schema name be used in a table definition statement?
1896    * @return <code>true</code> if so
1897    * @exception SQLException if a database access error occurs
1898    */

1899    public boolean supportsSchemasInTableDefinitions() throws SQLException JavaDoc
1900    {
1901        Boolean JavaDoc schemasInTable = (Boolean JavaDoc)properties.get(PROP_SCHEMAS_IN_TABLE_DEFINITION);
1902        if (schemasInTable == null) {
1903            if (dmd != null) schemasInTable = dmd.supportsSchemasInTableDefinitions() ? Boolean.TRUE : Boolean.FALSE;
1904            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1905
properties.put(PROP_SCHEMAS_IN_TABLE_DEFINITION, schemasInTable);
1906        }
1907
1908        return schemasInTable.booleanValue();
1909    }
1910
1911    public int getSchemasInTableDefinitions()
1912    {
1913        return getBoolean(PROP_SCHEMAS_IN_TABLE_DEFINITION);
1914    }
1915
1916    public void setSchemasInTableDefinitions(int value)
1917    {
1918        setBoolean(PROP_SCHEMAS_IN_TABLE_DEFINITION, value);
1919    }
1920
1921    /**
1922    * Can a schema name be used in an index definition statement?
1923    * @return <code>true</code> if so
1924    * @exception SQLException if a database access error occurs
1925    */

1926    public boolean supportsSchemasInIndexDefinitions() throws SQLException JavaDoc
1927    {
1928        Boolean JavaDoc schemasInIndex = (Boolean JavaDoc)properties.get(PROP_SCHEMAS_IN_INDEX);
1929        if (schemasInIndex == null) {
1930            if (dmd != null) schemasInIndex = dmd.supportsSchemasInIndexDefinitions() ? Boolean.TRUE : Boolean.FALSE;
1931            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1932
properties.put(PROP_SCHEMAS_IN_INDEX, schemasInIndex);
1933        }
1934
1935        return schemasInIndex.booleanValue();
1936    }
1937
1938    public int getSchemasInIndexDefinitions()
1939    {
1940        return getBoolean(PROP_SCHEMAS_IN_INDEX);
1941    }
1942
1943    public void setSchemasInIndexDefinitions(int value)
1944    {
1945        setBoolean(PROP_SCHEMAS_IN_INDEX, value);
1946    }
1947
1948    /**
1949    * Can a schema name be used in a privilege definition statement?
1950    * @return <code>true</code> if so
1951    * @exception SQLException if a database access error occurs
1952    */

1953    public boolean supportsSchemasInPrivilegeDefinitions() throws SQLException JavaDoc
1954    {
1955        Boolean JavaDoc schemasInPriv = (Boolean JavaDoc)properties.get(PROP_SCHEMAS_IN_PRIVILEGE_DEFINITION);
1956        if (schemasInPriv == null) {
1957            if (dmd != null) schemasInPriv = dmd.supportsSchemasInPrivilegeDefinitions() ? Boolean.TRUE : Boolean.FALSE;
1958            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1959
properties.put(PROP_SCHEMAS_IN_PRIVILEGE_DEFINITION, schemasInPriv);
1960        }
1961
1962        return schemasInPriv.booleanValue();
1963    }
1964
1965    public int getSchemasInPrivilegeDefinitions()
1966    {
1967        return getBoolean(PROP_SCHEMAS_IN_PRIVILEGE_DEFINITION);
1968    }
1969
1970    public void setSchemasInPrivilegeDefinitions(int value)
1971    {
1972        setBoolean(PROP_SCHEMAS_IN_PRIVILEGE_DEFINITION, value);
1973    }
1974
1975    /**
1976    * Can a catalog name be used in a data manipulation statement?
1977    * @return <code>true</code> if so
1978    * @exception SQLException if a database access error occurs
1979    */

1980    public boolean supportsCatalogsInDataManipulation() throws SQLException JavaDoc
1981    {
1982        Boolean JavaDoc catalogInDM = (Boolean JavaDoc)properties.get(PROP_CATALOGS_IN_DML);
1983        if (catalogInDM == null) {
1984            if (dmd != null) catalogInDM = dmd.supportsCatalogsInDataManipulation() ? Boolean.TRUE : Boolean.FALSE;
1985            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
1986
properties.put(PROP_CATALOGS_IN_DML, catalogInDM);
1987        }
1988
1989        return catalogInDM.booleanValue();
1990    }
1991
1992    public int getCatalogsInDataManipulation()
1993    {
1994        return getBoolean(PROP_CATALOGS_IN_DML);
1995    }
1996
1997    public void setCatalogsInDataManipulation(int value)
1998    {
1999        setBoolean(PROP_CATALOGS_IN_DML, value);
2000    }
2001
2002    /**
2003    * Can a catalog name be used in a procedure call statement?
2004    * @return <code>true</code> if so
2005    * @exception SQLException if a database access error occurs
2006    */

2007    public boolean supportsCatalogsInProcedureCalls() throws SQLException JavaDoc
2008    {
2009        Boolean JavaDoc catalogInProc = (Boolean JavaDoc)properties.get(PROP_CATALOGS_IN_PROCEDURE_CALL);
2010        if (catalogInProc == null) {
2011            if (dmd != null) catalogInProc = dmd.supportsCatalogsInProcedureCalls() ? Boolean.TRUE : Boolean.FALSE;
2012            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
2013
properties.put(PROP_CATALOGS_IN_PROCEDURE_CALL, catalogInProc);
2014        }
2015
2016        return catalogInProc.booleanValue();
2017    }
2018
2019    public int getCatalogsInProcedureCalls()
2020    {
2021        return getBoolean(PROP_CATALOGS_IN_PROCEDURE_CALL);
2022    }
2023
2024    public void setCatalogsInProcedureCalls(int value)
2025    {
2026        setBoolean(PROP_CATALOGS_IN_PROCEDURE_CALL, value);
2027    }
2028
2029    /**
2030    * Can a catalog name be used in a table definition statement?
2031    * @return <code>true</code> if so
2032    * @exception SQLException if a database access error occurs
2033    */

2034    public boolean supportsCatalogsInTableDefinitions() throws SQLException JavaDoc
2035    {
2036        Boolean JavaDoc catalogInTable = (Boolean JavaDoc)properties.get(PROP_CATALOGS_IN_TABLE_DEFINITION);
2037        if (catalogInTable == null) {
2038            if (dmd != null) catalogInTable = dmd.supportsCatalogsInTableDefinitions() ? Boolean.TRUE : Boolean.FALSE;
2039            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
2040
properties.put(PROP_CATALOGS_IN_TABLE_DEFINITION, catalogInTable);
2041        }
2042
2043        return catalogInTable.booleanValue();
2044    }
2045
2046    public int getCatalogsInTableDefinitions()
2047    {
2048        return getBoolean(PROP_CATALOGS_IN_TABLE_DEFINITION);
2049    }
2050
2051    public void setCatalogsInTableDefinitions(int value)
2052    {
2053        setBoolean(PROP_CATALOGS_IN_TABLE_DEFINITION, value);
2054    }
2055
2056    /**
2057    * Can a catalog name be used in an index definition statement?
2058    * @return <code>true</code> if so
2059    * @exception SQLException if a database access error occurs
2060    */

2061    public boolean supportsCatalogsInIndexDefinitions() throws SQLException JavaDoc
2062    {
2063        Boolean JavaDoc catalogInIndex = (Boolean JavaDoc)properties.get(PROP_CATALOGS_IN_INDEX);
2064        if (catalogInIndex == null) {
2065            if (dmd != null) catalogInIndex = dmd.supportsCatalogsInIndexDefinitions() ? Boolean.TRUE : Boolean.FALSE;
2066            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
2067
properties.put(PROP_CATALOGS_IN_INDEX, catalogInIndex);
2068        }
2069
2070        return catalogInIndex.booleanValue();
2071    }
2072
2073    public int getCatalogsInIndexDefinitions()
2074    {
2075        return getBoolean(PROP_CATALOGS_IN_INDEX);
2076    }
2077
2078    public void setCatalogsInIndexDefinitions(int value)
2079    {
2080        setBoolean(PROP_CATALOGS_IN_INDEX, value);
2081    }
2082
2083    /**
2084    * Can a catalog name be used in a privilege definition statement?
2085    * @return <code>true</code> if so
2086    * @exception SQLException if a database access error occurs
2087    */

2088    public boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException JavaDoc
2089    {
2090        Boolean JavaDoc catalogInPriv = (Boolean JavaDoc)properties.get(PROP_CATALOGS_IN_PRIVILEGE_DEFINITION);
2091        if (catalogInPriv == null) {
2092            if (dmd != null) catalogInPriv = dmd.supportsCatalogsInPrivilegeDefinitions() ? Boolean.TRUE : Boolean.FALSE;
2093            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
2094
properties.put(PROP_CATALOGS_IN_PRIVILEGE_DEFINITION, catalogInPriv);
2095        }
2096
2097        return catalogInPriv.booleanValue();
2098    }
2099
2100    public int getCatalogsInPrivilegeDefinitions()
2101    {
2102        return getBoolean(PROP_CATALOGS_IN_PRIVILEGE_DEFINITION);
2103    }
2104
2105    public void setCatalogsInPrivilegeDefinitions(int value)
2106    {
2107        setBoolean(PROP_CATALOGS_IN_PRIVILEGE_DEFINITION, value);
2108    }
2109
2110    /**
2111    * Is positioned DELETE supported?
2112    * @return <code>true</code> if so
2113    * @exception SQLException if a database access error occurs
2114    */

2115    public boolean supportsPositionedDelete() throws SQLException JavaDoc
2116    {
2117        Boolean JavaDoc posDelete = (Boolean JavaDoc)properties.get(PROP_POSITIONED_DELETE);
2118        if (posDelete == null) {
2119            if (dmd != null) posDelete = dmd.supportsPositionedDelete() ? Boolean.TRUE : Boolean.FALSE;
2120            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
2121
properties.put(PROP_POSITIONED_DELETE, posDelete);
2122        }
2123
2124        return posDelete.booleanValue();
2125    }
2126
2127    public int getPositionedDelete()
2128    {
2129        return getBoolean(PROP_POSITIONED_DELETE);
2130    }
2131
2132    public void setPositionedDelete(int value)
2133    {
2134        setBoolean(PROP_POSITIONED_DELETE, value);
2135    }
2136
2137    /**
2138    * Is positioned UPDATE supported?
2139    * @return <code>true</code> if so
2140    * @exception SQLException if a database access error occurs
2141    */

2142    public boolean supportsPositionedUpdate() throws SQLException JavaDoc
2143    {
2144        Boolean JavaDoc posUpdate = (Boolean JavaDoc)properties.get(PROP_POSITIONED_UPDATE);
2145        if (posUpdate == null) {
2146            if (dmd != null) posUpdate = dmd.supportsPositionedUpdate() ? Boolean.TRUE : Boolean.FALSE;
2147            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
2148
properties.put(PROP_POSITIONED_UPDATE, posUpdate);
2149        }
2150
2151        return posUpdate.booleanValue();
2152    }
2153
2154    public int getPositionedUpdate()
2155    {
2156        return getBoolean(PROP_POSITIONED_UPDATE);
2157    }
2158
2159    public void setPositionedUpdate(int value)
2160    {
2161        setBoolean(PROP_POSITIONED_UPDATE, value);
2162    }
2163
2164    /**
2165    * Is SELECT for UPDATE supported?
2166    * @return <code>true</code> if so
2167    * @exception SQLException if a database access error occurs
2168    */

2169    public boolean supportsSelectForUpdate() throws SQLException JavaDoc
2170    {
2171        Boolean JavaDoc selectForUpdate = (Boolean JavaDoc)properties.get(PROP_SELECT_FOR_UPDATE);
2172        if (selectForUpdate == null) {
2173            if (dmd != null) selectForUpdate = dmd.supportsSelectForUpdate() ? Boolean.TRUE : Boolean.FALSE;
2174            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
2175
properties.put(PROP_SELECT_FOR_UPDATE, selectForUpdate);
2176        }
2177
2178        return selectForUpdate.booleanValue();
2179    }
2180
2181    public int getSelectForUpdate()
2182    {
2183        return getBoolean(PROP_SELECT_FOR_UPDATE);
2184    }
2185
2186    public void setSelectForUpdate(int value)
2187    {
2188        setBoolean(PROP_SELECT_FOR_UPDATE, value);
2189    }
2190
2191    /**
2192    * Are stored procedure calls using the stored procedure escape
2193    * syntax supported?
2194    * @return <code>true</code> if so
2195    * @exception SQLException if a database access error occurs
2196    */

2197    public boolean supportsStoredProcedures() throws SQLException JavaDoc
2198    {
2199        Boolean JavaDoc storedProcedures = (Boolean JavaDoc)properties.get(PROP_STORED_PROCEDURES);
2200        if (storedProcedures == null) {
2201            if (dmd != null) storedProcedures = dmd.supportsStoredProcedures() ? Boolean.TRUE : Boolean.FALSE;
2202            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
2203
properties.put(PROP_STORED_PROCEDURES, storedProcedures);
2204        }
2205
2206        return storedProcedures.booleanValue();
2207    }
2208
2209    public int getStoredProcedures()
2210    {
2211        return getBoolean(PROP_STORED_PROCEDURES);
2212    }
2213
2214    public void setStoredProcedures(int value)
2215    {
2216        setBoolean(PROP_STORED_PROCEDURES, value);
2217    }
2218
2219    /**
2220    * Are subqueries in comparison expressions supported?
2221    * A JDBC Compliant<sup><font size=-2>TM</font></sup> driver always returns true.
2222    * @return <code>true</code> if so
2223    * @exception SQLException if a database access error occurs
2224    */

2225    public boolean supportsSubqueriesInComparisons() throws SQLException JavaDoc
2226    {
2227        Boolean JavaDoc subqueryComp = (Boolean JavaDoc)properties.get(PROP_SUBQUERY_IN_COMPARSIONS);
2228        if (subqueryComp == null) {
2229            if (dmd != null) subqueryComp = dmd.supportsSubqueriesInComparisons() ? Boolean.TRUE : Boolean.FALSE;
2230            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
2231
properties.put(PROP_SUBQUERY_IN_COMPARSIONS, subqueryComp);
2232        }
2233
2234        return subqueryComp.booleanValue();
2235    }
2236
2237    public int getSubqueriesInComparisons()
2238    {
2239        return getBoolean(PROP_SUBQUERY_IN_COMPARSIONS);
2240    }
2241
2242    public void setSubqueriesInComparisons(int value)
2243    {
2244        setBoolean(PROP_SUBQUERY_IN_COMPARSIONS, value);
2245    }
2246
2247    /**
2248    * Are subqueries in 'exists' expressions supported?
2249    * A JDBC Compliant<sup><font size=-2>TM</font></sup> driver always returns true.
2250    * @return <code>true</code> if so
2251    * @exception SQLException if a database access error occurs
2252    */

2253    public boolean supportsSubqueriesInExists() throws SQLException JavaDoc
2254    {
2255        Boolean JavaDoc subqueryExist = (Boolean JavaDoc)properties.get(PROP_SUBQUERY_IN_EXISTS);
2256        if (subqueryExist == null) {
2257            if (dmd != null) subqueryExist = dmd.supportsSubqueriesInExists() ? Boolean.TRUE : Boolean.FALSE;
2258            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
2259
properties.put(PROP_SUBQUERY_IN_EXISTS, subqueryExist);
2260        }
2261
2262        return subqueryExist.booleanValue();
2263    }
2264
2265    public int getSubqueriesInExists()
2266    {
2267        return getBoolean(PROP_SUBQUERY_IN_EXISTS);
2268    }
2269
2270    public void setSubqueriesInExists(int value)
2271    {
2272        setBoolean(PROP_SUBQUERY_IN_EXISTS, value);
2273    }
2274
2275    /**
2276    * Are subqueries in 'in' statements supported?
2277    * A JDBC Compliant<sup><font size=-2>TM</font></sup> driver always returns true.
2278    * @return <code>true</code> if so
2279    */

2280    public boolean supportsSubqueriesInIns() throws SQLException JavaDoc
2281    {
2282        Boolean JavaDoc subqueryIns = (Boolean JavaDoc)properties.get(PROP_SUBQUERY_IN_INS);
2283        if (subqueryIns == null) {
2284            if (dmd != null) subqueryIns = dmd.supportsSubqueriesInIns() ? Boolean.TRUE : Boolean.FALSE;
2285            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
2286
properties.put(PROP_SUBQUERY_IN_INS, subqueryIns);
2287        }
2288
2289        return subqueryIns.booleanValue();
2290    }
2291
2292    public int getSubqueriesInIns()
2293    {
2294        return getBoolean(PROP_SUBQUERY_IN_INS);
2295    }
2296
2297    public void setSubqueriesInIns(int value)
2298    {
2299        setBoolean(PROP_SUBQUERY_IN_INS, value);
2300    }
2301
2302    /**
2303    * Are subqueries in quantified expressions supported?
2304    * A JDBC Compliant<sup><font size=-2>TM</font></sup> driver always returns true.
2305    * @return <code>true</code> if so
2306    * @exception SQLException if a database access error occurs
2307    */

2308    public boolean supportsSubqueriesInQuantifieds() throws SQLException JavaDoc
2309    {
2310        Boolean JavaDoc subqueryQuant = (Boolean JavaDoc)properties.get(PROP_SUBQUERY_IN_QUANTIFIEDS);
2311        if (subqueryQuant == null) {
2312            if (dmd != null) subqueryQuant = dmd.supportsSubqueriesInQuantifieds() ? Boolean.TRUE : Boolean.FALSE;
2313            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
2314
properties.put(PROP_SUBQUERY_IN_QUANTIFIEDS, subqueryQuant);
2315        }
2316
2317        return subqueryQuant.booleanValue();
2318    }
2319
2320    public int getSubqueriesInQuantifieds()
2321    {
2322        return getBoolean(PROP_SUBQUERY_IN_QUANTIFIEDS);
2323    }
2324
2325    public void setSubqueriesInQuantifieds(int value)
2326    {
2327        setBoolean(PROP_SUBQUERY_IN_QUANTIFIEDS, value);
2328    }
2329
2330    /**
2331    * Are correlated subqueries supported?
2332    * A JDBC Compliant<sup><font size=-2>TM</font></sup> driver always returns true.
2333    * @return <code>true</code> if so
2334    * @exception SQLException if a database access error occurs
2335    */

2336    public boolean supportsCorrelatedSubqueries() throws SQLException JavaDoc
2337    {
2338        Boolean JavaDoc subqueryCorr = (Boolean JavaDoc)properties.get(PROP_CORRELATED_SUBQUERIES);
2339        if (subqueryCorr == null) {
2340            if (dmd != null) subqueryCorr = dmd.supportsCorrelatedSubqueries() ? Boolean.TRUE : Boolean.FALSE;
2341            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
2342
properties.put(PROP_CORRELATED_SUBQUERIES, subqueryCorr);
2343        }
2344
2345        return subqueryCorr.booleanValue();
2346    }
2347
2348    public int getCorrelatedSubqueries()
2349    {
2350        return getBoolean(PROP_CORRELATED_SUBQUERIES);
2351    }
2352
2353    public void setCorrelatedSubqueries(int value)
2354    {
2355        setBoolean(PROP_CORRELATED_SUBQUERIES, value);
2356    }
2357
2358    /**
2359    * Is SQL UNION supported?
2360    * @return <code>true</code> if so
2361    * @exception SQLException if a database access error occurs
2362    */

2363    public boolean supportsUnion() throws SQLException JavaDoc
2364    {
2365        Boolean JavaDoc union = (Boolean JavaDoc)properties.get(PROP_UNION);
2366        if (union == null) {
2367            if (dmd != null) union = dmd.supportsUnion() ? Boolean.TRUE : Boolean.FALSE;
2368            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
2369
properties.put(PROP_UNION, union);
2370        }
2371
2372        return union.booleanValue();
2373    }
2374
2375    public int getUnion()
2376    {
2377        return getBoolean(PROP_UNION);
2378    }
2379
2380    public void setUnion(int value)
2381    {
2382        setBoolean(PROP_UNION, value);
2383    }
2384
2385    /**
2386    * Is SQL UNION ALL supported?
2387    * @return <code>true</code> if so
2388    * @exception SQLException if a database access error occurs
2389    */

2390    public boolean supportsUnionAll() throws SQLException JavaDoc
2391    {
2392        Boolean JavaDoc unionAll = (Boolean JavaDoc)properties.get(PROP_UNION_ALL);
2393        if (unionAll == null) {
2394            if (dmd != null) unionAll = dmd.supportsUnionAll() ? Boolean.TRUE : Boolean.FALSE;
2395            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
2396
properties.put(PROP_UNION_ALL, unionAll);
2397        }
2398
2399        return unionAll.booleanValue();
2400    }
2401
2402    public int getUnionAll()
2403    {
2404        return getBoolean(PROP_UNION_ALL);
2405    }
2406
2407    public void setUnionAll(int value)
2408    {
2409        setBoolean(PROP_UNION_ALL, value);
2410    }
2411
2412    /**
2413    * Can cursors remain open across commits?
2414    * @return <code>true</code> if cursors always remain open
2415    * @exception SQLException if a database access error occurs
2416    */

2417    public boolean supportsOpenCursorsAcrossCommit() throws SQLException JavaDoc
2418    {
2419        Boolean JavaDoc cursorInCommit = (Boolean JavaDoc)properties.get(PROP_OPEN_CURSORS_ACROSS_COMMIT);
2420        if (cursorInCommit == null) {
2421            if (dmd != null) cursorInCommit = dmd.supportsOpenCursorsAcrossCommit() ? Boolean.TRUE : Boolean.FALSE;
2422            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
2423
properties.put(PROP_OPEN_CURSORS_ACROSS_COMMIT, cursorInCommit);
2424        }
2425
2426        return cursorInCommit.booleanValue();
2427    }
2428
2429    public int getOpenCursorsAcrossCommit()
2430    {
2431        return getBoolean(PROP_OPEN_CURSORS_ACROSS_COMMIT);
2432    }
2433
2434    public void setOpenCursorsAcrossCommit(int value)
2435    {
2436        setBoolean(PROP_OPEN_CURSORS_ACROSS_COMMIT, value);
2437    }
2438
2439    /**
2440    * Can cursors remain open across rollbacks?
2441    * @return <code>true</code> if cursors always remain open
2442    * @exception SQLException if a database access error occurs
2443    */

2444    public boolean supportsOpenCursorsAcrossRollback() throws SQLException JavaDoc
2445    {
2446        Boolean JavaDoc cursorInRollback = (Boolean JavaDoc)properties.get(PROP_OPEN_CURSORS_ACROSS_ROLLBACK);
2447        if (cursorInRollback == null) {
2448            if (dmd != null) cursorInRollback = dmd.supportsOpenCursorsAcrossRollback() ? Boolean.TRUE : Boolean.FALSE;
2449            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
2450
properties.put(PROP_OPEN_CURSORS_ACROSS_ROLLBACK, cursorInRollback);
2451        }
2452
2453        return cursorInRollback.booleanValue();
2454    }
2455
2456    public int getOpenCursorsAcrossRollback()
2457    {
2458        return getBoolean(PROP_OPEN_CURSORS_ACROSS_ROLLBACK);
2459    }
2460
2461    public void setOpenCursorsAcrossRollback(int value)
2462    {
2463        setBoolean(PROP_OPEN_CURSORS_ACROSS_ROLLBACK, value);
2464    }
2465
2466    /**
2467    * Can statements remain open across commits?
2468    * @return <code>true</code> if statements always remain open
2469    * @exception SQLException if a database access error occurs
2470    */

2471    public boolean supportsOpenStatementsAcrossCommit() throws SQLException JavaDoc
2472    {
2473        Boolean JavaDoc statementInCommit = (Boolean JavaDoc)properties.get(PROP_OPEN_STATEMENTS_ACROSS_COMMIT);
2474        if (statementInCommit == null) {
2475            if (dmd != null) statementInCommit = dmd.supportsOpenStatementsAcrossCommit() ? Boolean.TRUE : Boolean.FALSE;
2476            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
2477
properties.put(PROP_OPEN_STATEMENTS_ACROSS_COMMIT, statementInCommit);
2478        }
2479
2480        return statementInCommit.booleanValue();
2481    }
2482
2483    public int getOpenStatementsAcrossCommit()
2484    {
2485        return getBoolean(PROP_OPEN_STATEMENTS_ACROSS_COMMIT);
2486    }
2487
2488    public void setOpenStatementsAcrossCommit(int value)
2489    {
2490        setBoolean(PROP_OPEN_STATEMENTS_ACROSS_COMMIT, value);
2491    }
2492
2493    /**
2494    * Can statements remain open across rollbacks?
2495    * @return <code>true</code> if statements always remain open
2496    * @exception SQLException if a database access error occurs
2497    */

2498    public boolean supportsOpenStatementsAcrossRollback() throws SQLException JavaDoc
2499    {
2500        Boolean JavaDoc statementInRollback = (Boolean JavaDoc)properties.get(PROP_OPEN_STATEMENTS_ACROSS_ROLLBACK);
2501        if (statementInRollback == null) {
2502            if (dmd != null) statementInRollback = dmd.supportsOpenStatementsAcrossRollback() ? Boolean.TRUE : Boolean.FALSE;
2503            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
2504
properties.put(PROP_OPEN_STATEMENTS_ACROSS_ROLLBACK, statementInRollback);
2505        }
2506
2507        return statementInRollback.booleanValue();
2508    }
2509
2510    public int getOpenStatementsAcrossRollback()
2511    {
2512        return getBoolean(PROP_OPEN_STATEMENTS_ACROSS_ROLLBACK);
2513    }
2514
2515    public void setOpenStatementsAcrossRollback(int value)
2516    {
2517        setBoolean(PROP_OPEN_STATEMENTS_ACROSS_ROLLBACK, value);
2518    }
2519
2520    /**
2521    * How many hex characters can you have in an inline binary literal?
2522    * @return max binary literal length in hex characters
2523    * @exception SQLException if a database access error occurs
2524    */

2525    public int getMaxBinaryLiteralLength() throws SQLException JavaDoc
2526    {
2527        Integer JavaDoc binaryLiteral = (Integer JavaDoc)properties.get(PROP_MAX_BINARY_LITERAL_LENGTH);
2528        if (binaryLiteral == null && dmd != null) {
2529            binaryLiteral = new Integer JavaDoc(dmd.getMaxBinaryLiteralLength());
2530            properties.put(PROP_MAX_BINARY_LITERAL_LENGTH, binaryLiteral);
2531        }
2532
2533        if (binaryLiteral != null) return binaryLiteral.intValue();
2534        return 0;
2535    }
2536
2537    public void setMaxBinaryLiteralLength(int value)
2538    {
2539        setInt(PROP_MAX_BINARY_LITERAL_LENGTH, value);
2540    }
2541
2542    /**
2543    * What's the max length for a character literal?
2544    * @return max literal length
2545    * @exception SQLException if a database access error occurs
2546    */

2547    public int getMaxCharLiteralLength() throws SQLException JavaDoc
2548    {
2549        Integer JavaDoc maxCharLiteral = (Integer JavaDoc)properties.get(PROP_MAX_CHAR_LITERAL_LENGTH);
2550        if (maxCharLiteral == null && dmd != null) {
2551            maxCharLiteral = new Integer JavaDoc(dmd.getMaxCharLiteralLength());
2552            properties.put(PROP_MAX_CHAR_LITERAL_LENGTH, maxCharLiteral);
2553        }
2554
2555        if (maxCharLiteral != null) return maxCharLiteral.intValue();
2556        return 0;
2557    }
2558
2559    public void setMaxCharLiteralLength(int value)
2560    {
2561        setInt(PROP_MAX_CHAR_LITERAL_LENGTH, value);
2562    }
2563
2564    /**
2565    * What's the limit on column name length?
2566    * @return max column name length
2567    * @exception SQLException if a database access error occurs
2568    */

2569    public int getMaxColumnNameLength() throws SQLException JavaDoc
2570    {
2571        Integer JavaDoc maxColumnName = (Integer JavaDoc)properties.get(PROP_MAX_COLUMN_NAME_LENGTH);
2572        if (maxColumnName == null && dmd != null) {
2573            maxColumnName = new Integer JavaDoc(dmd.getMaxColumnNameLength());
2574            properties.put(PROP_MAX_COLUMN_NAME_LENGTH, maxColumnName);
2575        }
2576
2577        if (maxColumnName != null) return maxColumnName.intValue();
2578        return 0;
2579    }
2580
2581    public void setMaxColumnNameLength(int value)
2582    {
2583        setInt(PROP_MAX_COLUMN_NAME_LENGTH, value);
2584    }
2585
2586    /**
2587    * What's the maximum number of columns in a "GROUP BY" clause?
2588    * @return max number of columns
2589    * @exception SQLException if a database access error occurs
2590    */

2591    public int getMaxColumnsInGroupBy() throws SQLException JavaDoc
2592    {
2593        Integer JavaDoc maxColumnGroup = (Integer JavaDoc)properties.get(PROP_MAX_COLUMNS_IN_GROUPBY);
2594        if (maxColumnGroup == null && dmd != null) {
2595            maxColumnGroup = new Integer JavaDoc(dmd.getMaxColumnsInGroupBy());
2596            properties.put(PROP_MAX_COLUMNS_IN_GROUPBY, maxColumnGroup);
2597        }
2598
2599        if (maxColumnGroup != null) return maxColumnGroup.intValue();
2600        return 0;
2601    }
2602
2603    public void setMaxColumnsInGroupBy(int value)
2604    {
2605        setInt(PROP_MAX_COLUMNS_IN_GROUPBY, value);
2606    }
2607
2608    /**
2609    * What's the maximum number of columns allowed in an index?
2610    * @return max number of columns
2611    * @exception SQLException if a database access error occurs
2612    */

2613    public int getMaxColumnsInIndex() throws SQLException JavaDoc
2614    {
2615        Integer JavaDoc maxColumnIndex = (Integer JavaDoc)properties.get(PROP_MAX_COLUMNS_IN_INDEX);
2616        if (maxColumnIndex == null && dmd != null) {
2617            maxColumnIndex = new Integer JavaDoc(dmd.getMaxColumnsInIndex());
2618            properties.put(PROP_MAX_COLUMNS_IN_INDEX, maxColumnIndex);
2619        }
2620
2621        if (maxColumnIndex != null) return maxColumnIndex.intValue();
2622        return 0;
2623    }
2624
2625    public void setMaxColumnsInIndex(int value)
2626    {
2627        setInt(PROP_MAX_COLUMNS_IN_INDEX, value);
2628    }
2629
2630    /**
2631    * What's the maximum number of columns in an "ORDER BY" clause?
2632    * @return max number of columns
2633    * @exception SQLException if a database access error occurs
2634    */

2635    public int getMaxColumnsInOrderBy() throws SQLException JavaDoc
2636    {
2637        Integer JavaDoc maxColumnOrderBy = (Integer JavaDoc)properties.get(PROP_MAX_COLUMNS_IN_ORDERBY);
2638        if (maxColumnOrderBy == null && dmd != null) {
2639            maxColumnOrderBy = new Integer JavaDoc(dmd.getMaxColumnsInOrderBy());
2640            properties.put(PROP_MAX_COLUMNS_IN_ORDERBY, maxColumnOrderBy);
2641        }
2642
2643        if (maxColumnOrderBy != null) return maxColumnOrderBy.intValue();
2644        return 0;
2645    }
2646
2647    public void setMaxColumnsInOrderBy(int value)
2648    {
2649        setInt(PROP_MAX_COLUMNS_IN_ORDERBY, value);
2650    }
2651
2652    /**
2653    * What's the maximum number of columns in a "SELECT" list?
2654    * @return max number of columns
2655    * @exception SQLException if a database access error occurs
2656    */

2657    public int getMaxColumnsInSelect() throws SQLException JavaDoc
2658    {
2659        Integer JavaDoc maxColumnSelect = (Integer JavaDoc)properties.get(PROP_MAX_COLUMNS_IN_SELECT);
2660        if (maxColumnSelect == null && dmd != null) {
2661            maxColumnSelect = new Integer JavaDoc(dmd.getMaxColumnsInSelect());
2662            properties.put(PROP_MAX_COLUMNS_IN_SELECT, maxColumnSelect);
2663        }
2664
2665        if (maxColumnSelect != null) return maxColumnSelect.intValue();
2666        return 0;
2667    }
2668
2669    public void setMaxColumnsInSelect(int value)
2670    {
2671        setInt(PROP_MAX_COLUMNS_IN_SELECT, value);
2672    }
2673
2674    /**
2675    * What's the maximum number of columns in a table?
2676    * @return max number of columns
2677    * @exception SQLException if a database access error occurs
2678    */

2679    public int getMaxColumnsInTable() throws SQLException JavaDoc
2680    {
2681        Integer JavaDoc maxColumnTable = (Integer JavaDoc)properties.get(PROP_MAX_COLUMNS_IN_TABLE);
2682        if (maxColumnTable == null && dmd != null) {
2683            maxColumnTable = new Integer JavaDoc(dmd.getMaxColumnsInTable());
2684            properties.put(PROP_MAX_COLUMNS_IN_TABLE, maxColumnTable);
2685        }
2686
2687        if (maxColumnTable != null) return maxColumnTable.intValue();
2688        return 0;
2689    }
2690
2691    public void setMaxColumnsInTable(int value)
2692    {
2693        setInt(PROP_MAX_COLUMNS_IN_TABLE, value);
2694    }
2695
2696    /**
2697    * How many active connections can we have at a time to this database?
2698    * @return max number of active connections
2699    * @exception SQLException if a database access error occurs
2700    */

2701    public int getMaxConnections() throws SQLException JavaDoc
2702    {
2703        Integer JavaDoc maxConnections = (Integer JavaDoc)properties.get(PROP_MAX_CONNECTIONS);
2704        if (maxConnections == null && dmd != null) {
2705            maxConnections = new Integer JavaDoc(dmd.getMaxConnections());
2706            properties.put(PROP_MAX_CONNECTIONS, maxConnections);
2707        }
2708
2709        if (maxConnections != null) return maxConnections.intValue();
2710        return 0;
2711    }
2712
2713    public void setMaxConnections(int value)
2714    {
2715        setInt(PROP_MAX_CONNECTIONS, value);
2716    }
2717
2718    /**
2719    * What's the maximum cursor name length?
2720    * @return max cursor name length in bytes
2721    * @exception SQLException if a database access error occurs
2722    */

2723    public int getMaxCursorNameLength() throws SQLException JavaDoc
2724    {
2725        Integer JavaDoc maxCursorName = (Integer JavaDoc)properties.get(PROP_MAX_CURSORNAME_LENGTH);
2726        if (maxCursorName == null && dmd != null) {
2727            maxCursorName = new Integer JavaDoc(dmd.getMaxCursorNameLength());
2728            properties.put(PROP_MAX_CURSORNAME_LENGTH, maxCursorName);
2729        }
2730
2731        if (maxCursorName != null) return maxCursorName.intValue();
2732        return 0;
2733    }
2734
2735    public void setMaxCursorNameLength(int value)
2736    {
2737        setInt(PROP_MAX_CURSORNAME_LENGTH, value);
2738    }
2739
2740    /**
2741    * What's the maximum length of an index (in bytes)?
2742    * @return max index length in bytes
2743    * @exception SQLException if a database access error occurs
2744    */

2745    public int getMaxIndexLength() throws SQLException JavaDoc
2746    {
2747        Integer JavaDoc maxIndex = (Integer JavaDoc)properties.get(PROP_MAX_INDEX_LENGTH);
2748        if (maxIndex == null && dmd != null) {
2749            maxIndex = new Integer JavaDoc(dmd.getMaxIndexLength());
2750            properties.put(PROP_MAX_INDEX_LENGTH, maxIndex);
2751        }
2752
2753        if (maxIndex != null) return maxIndex.intValue();
2754        return 0;
2755    }
2756
2757    public void setMaxIndexLength(int value)
2758    {
2759        setInt(PROP_MAX_INDEX_LENGTH, value);
2760    }
2761
2762    /**
2763    * What's the maximum length allowed for a schema name?
2764    * @return max name length in bytes
2765    * @exception SQLException if a database access error occurs
2766    */

2767    public int getMaxSchemaNameLength() throws SQLException JavaDoc
2768    {
2769        Integer JavaDoc maxSchemaName = (Integer JavaDoc)properties.get(PROP_MAX_SCHEMA_NAME);
2770        if (maxSchemaName == null && dmd != null) {
2771            maxSchemaName = new Integer JavaDoc(dmd.getMaxSchemaNameLength());
2772            properties.put(PROP_MAX_SCHEMA_NAME, maxSchemaName);
2773        }
2774
2775        if (maxSchemaName != null) return maxSchemaName.intValue();
2776        return 0;
2777    }
2778
2779    public void setMaxSchemaNameLength(int value)
2780    {
2781        setInt(PROP_MAX_SCHEMA_NAME, value);
2782    }
2783
2784    /**
2785    * What's the maximum length of a procedure name?
2786    * @return max name length in bytes
2787    * @exception SQLException if a database access error occurs
2788    */

2789    public int getMaxProcedureNameLength() throws SQLException JavaDoc
2790    {
2791        Integer JavaDoc maxProcName = (Integer JavaDoc)properties.get(PROP_MAX_PROCEDURE_NAME);
2792        if (maxProcName == null && dmd != null) {
2793            maxProcName = new Integer JavaDoc(dmd.getMaxProcedureNameLength());
2794            properties.put(PROP_MAX_PROCEDURE_NAME, maxProcName);
2795        }
2796
2797        if (maxProcName != null) return maxProcName.intValue();
2798        return 0;
2799    }
2800
2801    public void setMaxProcedureNameLength(int value)
2802    {
2803        setInt(PROP_MAX_PROCEDURE_NAME, value);
2804    }
2805
2806    /**
2807    * What's the maximum length of a catalog name?
2808    * @return max name length in bytes
2809    * @exception SQLException if a database access error occurs
2810    */

2811    public int getMaxCatalogNameLength() throws SQLException JavaDoc
2812    {
2813        Integer JavaDoc maxCatalogName = (Integer JavaDoc)properties.get(PROP_MAX_CATALOG_NAME);
2814        if (maxCatalogName == null && dmd != null) {
2815            maxCatalogName = new Integer JavaDoc(dmd.getMaxProcedureNameLength());
2816            properties.put(PROP_MAX_CATALOG_NAME, maxCatalogName);
2817        }
2818
2819        if (maxCatalogName != null) return maxCatalogName.intValue();
2820        return 0;
2821    }
2822
2823    public void setMaxCatalogNameLength(int value)
2824    {
2825        setInt(PROP_MAX_CATALOG_NAME, value);
2826    }
2827
2828    /**
2829    * What's the maximum length of a single row?
2830    * @return max row size in bytes
2831    * @exception SQLException if a database access error occurs
2832    */

2833    public int getMaxRowSize() throws SQLException JavaDoc
2834    {
2835        Integer JavaDoc maxRowSize = (Integer JavaDoc)properties.get(PROP_MAX_ROW_SIZE);
2836        if (maxRowSize == null && dmd != null) {
2837            maxRowSize = new Integer JavaDoc(dmd.getMaxProcedureNameLength());
2838            properties.put(PROP_MAX_ROW_SIZE, maxRowSize);
2839        }
2840
2841        if (maxRowSize != null) return maxRowSize.intValue();
2842        return 0;
2843    }
2844
2845    public void setMaxRowSize(int value)
2846    {
2847        setInt(PROP_MAX_ROW_SIZE, value);
2848    }
2849
2850    /**
2851    * Did getMaxRowSize() include LONGVARCHAR and LONGVARBINARY
2852    * blobs?
2853    * @return <code>true</code> if so
2854    * @exception SQLException if a database access error occurs
2855    */

2856    public boolean doesMaxRowSizeIncludeBlobs() throws SQLException JavaDoc
2857    {
2858        Boolean JavaDoc rowSizeBlobs = (Boolean JavaDoc)properties.get(PROP_ROWSIZE_INCLUDING_BLOBS);
2859        if (rowSizeBlobs == null) {
2860            if (dmd != null) rowSizeBlobs = dmd.doesMaxRowSizeIncludeBlobs() ? Boolean.TRUE : Boolean.FALSE;
2861            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
2862
properties.put(PROP_ROWSIZE_INCLUDING_BLOBS, rowSizeBlobs);
2863        }
2864
2865        return rowSizeBlobs.booleanValue();
2866    }
2867
2868    public int getMaxRowSizeIncludeBlobs()
2869    {
2870        return getBoolean(PROP_ROWSIZE_INCLUDING_BLOBS);
2871    }
2872
2873    public void setMaxRowSizeIncludeBlobs(int value)
2874    {
2875        setBoolean(PROP_ROWSIZE_INCLUDING_BLOBS, value);
2876    }
2877
2878    /**
2879    * What's the maximum length of a SQL statement?
2880    * @return max length in bytes
2881    * @exception SQLException if a database access error occurs
2882    */

2883    public int getMaxStatementLength() throws SQLException JavaDoc
2884    {
2885        Integer JavaDoc maxStatement = (Integer JavaDoc)properties.get(PROP_MAX_STATEMENT_LENGTH);
2886        if (maxStatement == null && dmd != null) {
2887            maxStatement = new Integer JavaDoc(dmd.getMaxStatementLength());
2888            properties.put(PROP_MAX_STATEMENT_LENGTH, maxStatement);
2889        }
2890
2891        if (maxStatement != null) return maxStatement.intValue();
2892        return 0;
2893    }
2894
2895    public void setMaxStatementLength(int value)
2896    {
2897        setInt(PROP_MAX_STATEMENT_LENGTH, value);
2898    }
2899
2900    /**
2901    * How many active statements can we have open at one time to this
2902    * database?
2903    * @return the maximum number of statements that can be open at one time
2904    * @exception SQLException if a database access error occurs
2905    */

2906    public int getMaxStatements() throws SQLException JavaDoc
2907    {
2908        Integer JavaDoc maxStatements = (Integer JavaDoc)properties.get(PROP_MAX_STATEMENTS);
2909        if (maxStatements == null && dmd != null) {
2910            maxStatements = new Integer JavaDoc(dmd.getMaxStatementLength());
2911            properties.put(PROP_MAX_STATEMENTS, maxStatements);
2912        }
2913
2914        if (maxStatements != null) return maxStatements.intValue();
2915        return 0;
2916    }
2917
2918    public void setMaxStatements(int value)
2919    {
2920        setInt(PROP_MAX_STATEMENTS, value);
2921    }
2922
2923    /**
2924    * What's the maximum length of a table name?
2925    * @return max name length in bytes
2926    * @exception SQLException if a database access error occurs
2927    */

2928    public int getMaxTableNameLength() throws SQLException JavaDoc
2929    {
2930        Integer JavaDoc maxTable = (Integer JavaDoc)properties.get(PROP_MAX_TABLENAME_LENGTH);
2931        if (maxTable == null && dmd != null) {
2932            maxTable = new Integer JavaDoc(dmd.getMaxStatementLength());
2933            properties.put(PROP_MAX_TABLENAME_LENGTH, maxTable);
2934        }
2935
2936        if (maxTable != null) return maxTable.intValue();
2937        return 0;
2938    }
2939
2940    public void setMaxTableNameLength(int value)
2941    {
2942        setInt(PROP_MAX_TABLENAME_LENGTH, value);
2943    }
2944
2945    /**
2946    * What's the maximum number of tables in a SELECT statement?
2947    * @return the maximum number of tables allowed in a SELECT statement
2948    * @exception SQLException if a database access error occurs
2949    */

2950    public int getMaxTablesInSelect() throws SQLException JavaDoc
2951    {
2952        Integer JavaDoc maxTable = (Integer JavaDoc)properties.get(PROP_MAX_TABLES_IN_SELECT);
2953        if (maxTable == null && dmd != null) {
2954            maxTable = new Integer JavaDoc(dmd.getMaxStatementLength());
2955            properties.put(PROP_MAX_TABLES_IN_SELECT, maxTable);
2956        }
2957
2958        if (maxTable != null) return maxTable.intValue();
2959        return 0;
2960    }
2961
2962    public void setMaxTablesInSelect(int value)
2963    {
2964        setInt(PROP_MAX_TABLES_IN_SELECT, value);
2965    }
2966
2967    /**
2968    * What's the maximum length of a user name?
2969    * @return max user name length in bytes
2970    * @exception SQLException if a database access error occurs
2971    */

2972    public int getMaxUserNameLength() throws SQLException JavaDoc
2973    {
2974        Integer JavaDoc maxUserName = (Integer JavaDoc)properties.get(PROP_MAX_USERNAME);
2975        if (maxUserName == null && dmd != null) {
2976            maxUserName = new Integer JavaDoc(dmd.getMaxUserNameLength());
2977            properties.put(PROP_MAX_USERNAME, maxUserName);
2978        }
2979
2980        if (maxUserName != null) return maxUserName.intValue();
2981        return 0;
2982    }
2983
2984    public void setMaxUserNameLength(int value)
2985    {
2986        setInt(PROP_MAX_USERNAME, value);
2987    }
2988
2989    /**
2990    * What's the database's default transaction isolation level? The
2991    * values are defined in <code>java.sql.Connection</code>.
2992    * @return the default isolation level
2993    * @exception SQLException if a database access error occurs
2994    */

2995    public int getDefaultTransactionIsolation() throws SQLException JavaDoc
2996    {
2997        Integer JavaDoc maxTransaction = (Integer JavaDoc)properties.get(PROP_DEFAULT_ISOLATION);
2998        if (maxTransaction == null && dmd != null) {
2999            maxTransaction = new Integer JavaDoc(dmd.getDefaultTransactionIsolation());
3000            properties.put(PROP_DEFAULT_ISOLATION, maxTransaction);
3001        }
3002
3003        if (maxTransaction != null) return maxTransaction.intValue();
3004        return 0;
3005    }
3006
3007    public void setDefaultTransactionIsolation(int value)
3008    {
3009        setInt(PROP_DEFAULT_ISOLATION, value);
3010    }
3011
3012    /**
3013    * Are transactions supported? If not, invoking the method
3014    * @return <code>true</code> if transactions are supported
3015    * @exception SQLException if a database access error occurs
3016    */

3017    public boolean supportsTransactions() throws SQLException JavaDoc
3018    {
3019        Boolean JavaDoc trans = (Boolean JavaDoc)properties.get(PROP_TRANSACTIONS);
3020        if (trans == null) {
3021            if (dmd != null) trans = dmd.doesMaxRowSizeIncludeBlobs() ? Boolean.TRUE : Boolean.FALSE;
3022            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3023
properties.put(PROP_TRANSACTIONS, trans);
3024        }
3025
3026        return trans.booleanValue();
3027    }
3028
3029    public int getTransactions()
3030    {
3031        return getBoolean(PROP_TRANSACTIONS);
3032    }
3033
3034    public void setTransactions(int value)
3035    {
3036        setBoolean(PROP_TRANSACTIONS, value);
3037    }
3038
3039    /**
3040    * Does this database support the given transaction isolation level?
3041    * @param level the values are defined in <code>java.sql.Connection</code>
3042    * @return <code>true</code> if so
3043    * @exception SQLException if a database access error occurs
3044    */

3045    public boolean supportsTransactionIsolationLevel(int level) throws SQLException JavaDoc
3046    {
3047        if (dmd != null) return dmd.supportsTransactionIsolationLevel(level);
3048        else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3049
}
3050
3051    /**
3052    * Are both data definition and data manipulation statements
3053    * within a transaction supported?
3054    * @return <code>true</code> if so
3055    * @exception SQLException if a database access error occurs
3056    */

3057    public boolean supportsDataDefinitionAndDataManipulationTransactions() throws SQLException JavaDoc
3058    {
3059        Boolean JavaDoc flag = (Boolean JavaDoc)properties.get(PROP_DDL_AND_DML_TRANSACTIONS);
3060        if (flag == null) {
3061            if (dmd != null) flag = dmd.doesMaxRowSizeIncludeBlobs() ? Boolean.TRUE : Boolean.FALSE;
3062            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3063
properties.put(PROP_DDL_AND_DML_TRANSACTIONS, flag);
3064        }
3065
3066        return flag.booleanValue();
3067    }
3068
3069    public int getDataDefinitionAndDataManipulationTransactions()
3070    {
3071        return getBoolean(PROP_DDL_AND_DML_TRANSACTIONS);
3072    }
3073
3074    public void setDataDefinitionAndDataManipulationTransactions(int value)
3075    {
3076        setBoolean(PROP_DDL_AND_DML_TRANSACTIONS, value);
3077    }
3078
3079    /**
3080    * Are only data manipulation statements within a transaction
3081    * supported?
3082    * @return <code>true</code> if so
3083    * @exception SQLException if a database access error occurs
3084    */

3085    public boolean supportsDataManipulationTransactionsOnly() throws SQLException JavaDoc
3086    {
3087        Boolean JavaDoc flag = (Boolean JavaDoc)properties.get(PROP_DML_TRANSACTIONS_ONLY);
3088        if (flag == null) {
3089            if (dmd != null) flag = dmd.supportsDataManipulationTransactionsOnly() ? Boolean.TRUE : Boolean.FALSE;
3090            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3091
properties.put(PROP_DML_TRANSACTIONS_ONLY, flag);
3092        }
3093
3094        return flag.booleanValue();
3095    }
3096
3097    public int getDataManipulationTransactionsOnly()
3098    {
3099        return getBoolean(PROP_DML_TRANSACTIONS_ONLY);
3100    }
3101
3102    public void setDataManipulationTransactionsOnly(int value)
3103    {
3104        setBoolean(PROP_DML_TRANSACTIONS_ONLY, value);
3105    }
3106
3107    /**
3108    * Does a data definition statement within a transaction force the
3109    * transaction to commit?
3110    * @return <code>true</code> if so
3111    * @exception SQLException if a database access error occurs
3112    */

3113    public boolean dataDefinitionCausesTransactionCommit() throws SQLException JavaDoc
3114    {
3115        Boolean JavaDoc flag = (Boolean JavaDoc)properties.get(PROP_DDL_CAUSES_COMMIT);
3116        if (flag == null) {
3117            if (dmd != null) flag = dmd.dataDefinitionCausesTransactionCommit() ? Boolean.TRUE : Boolean.FALSE;
3118            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3119
properties.put(PROP_DDL_CAUSES_COMMIT, flag);
3120        }
3121
3122        return flag.booleanValue();
3123    }
3124
3125    public int getDataDefinitionCausesTransactionCommit()
3126    {
3127        return getBoolean(PROP_DDL_CAUSES_COMMIT);
3128    }
3129
3130    public void setDataDefinitionCausesTransactionCommit(int value)
3131    {
3132        setBoolean(PROP_DDL_CAUSES_COMMIT, value);
3133    }
3134
3135    /**
3136     * Is a data definition statement within a transaction ignored?
3137     * @return <code>true</code> if so
3138     * @exception SQLException if a database access error occurs
3139     */

3140    public boolean dataDefinitionIgnoredInTransactions() throws SQLException JavaDoc
3141    {
3142        Boolean JavaDoc flag = (Boolean JavaDoc)properties.get(PROP_DDL_IGNORED_IN_TRANSACTIONS);
3143        if (flag == null) {
3144            if (dmd != null) flag = dmd.dataDefinitionIgnoredInTransactions() ? Boolean.TRUE : Boolean.FALSE;
3145            else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3146
properties.put(PROP_DDL_IGNORED_IN_TRANSACTIONS, flag);
3147        }
3148
3149        return flag.booleanValue();
3150    }
3151
3152    public int getDataDefinitionIgnoredInTransactions()
3153    {
3154        return getBoolean(PROP_DDL_IGNORED_IN_TRANSACTIONS);
3155    }
3156
3157    public void setDataDefinitionIgnoredInTransactions(int value)
3158    {
3159        setBoolean(PROP_DDL_IGNORED_IN_TRANSACTIONS, value);
3160    }
3161
3162    /**
3163    * Gets a description of the stored procedures available in a
3164    * catalog.
3165    */

3166    public ResultSet JavaDoc getProcedures(String JavaDoc catalog, String JavaDoc schemaPattern, String JavaDoc procedureNamePattern) throws SQLException JavaDoc
3167    {
3168        if (getCapitializeUsername() && schemaPattern != null) schemaPattern = schemaPattern.toUpperCase();
3169        String JavaDoc query = (String JavaDoc)properties.get(PROP_PROCEDURES_QUERY);
3170        if (query != null) {
3171            if (con != null) {
3172                PreparedStatement JavaDoc stmt = con.prepareStatement(query);
3173                stmt.setString(1, catalog);
3174                stmt.setString(2, schemaPattern);
3175                stmt.setString(3, procedureNamePattern);
3176                return stmt.executeQuery();
3177            } else throw new SQLException JavaDoc(bundle.getString("EXC_NoConnection")); // NOI18N
3178
}
3179
3180        if (dmd == null) throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3181
return dmd.getProcedures(catalog, schemaPattern, procedureNamePattern);
3182    }
3183
3184    public String JavaDoc getProceduresQuery()
3185    {
3186        return getString(PROP_PROCEDURES_QUERY);
3187    }
3188
3189    public void setProceduresQuery(String JavaDoc value)
3190    {
3191        setString(PROP_PROCEDURES_QUERY, value);
3192    }
3193
3194    /**
3195    * Gets a description of a catalog's stored procedure parameters
3196    * and result columns.
3197    */

3198    public ResultSet JavaDoc getProcedureColumns(String JavaDoc catalog, String JavaDoc schemaPattern, String JavaDoc procedureNamePattern, String JavaDoc columnNamePattern) throws SQLException JavaDoc
3199    {
3200        if (getCapitializeUsername() && schemaPattern != null) schemaPattern = schemaPattern.toUpperCase();
3201        String JavaDoc query = (String JavaDoc)properties.get(PROP_PROCEDURE_COLUMNS_QUERY);
3202        if (query != null) {
3203            if (con != null) {
3204                PreparedStatement JavaDoc stmt = con.prepareStatement(query);
3205                stmt.setString(1, catalog);
3206                stmt.setString(2, schemaPattern);
3207                stmt.setString(3, procedureNamePattern);
3208                stmt.setString(4, columnNamePattern);
3209                return stmt.executeQuery();
3210            } else throw new SQLException JavaDoc(bundle.getString("EXC_NoConnection")); // NOI18N
3211
}
3212
3213        if (dmd == null) throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3214
return dmd.getProcedureColumns(catalog, schemaPattern, procedureNamePattern, columnNamePattern);
3215    }
3216
3217    public String JavaDoc getProcedureColumnsQuery()
3218    {
3219        return getString(PROP_PROCEDURE_COLUMNS_QUERY);
3220    }
3221
3222    public void setProcedureColumnsQuery(String JavaDoc value)
3223    {
3224        setString(PROP_PROCEDURE_COLUMNS_QUERY, value);
3225    }
3226
3227    /**
3228    * Gets the schema names available in this database. The results
3229    * are ordered by schema name.
3230    */

3231    public ResultSet JavaDoc getSchemas() throws SQLException JavaDoc
3232    {
3233        String JavaDoc query = (String JavaDoc)properties.get(PROP_PROCEDURE_COLUMNS_QUERY);
3234        if (query != null) {
3235            if (con != null) return con.createStatement().executeQuery(query);
3236            else throw new SQLException JavaDoc(bundle.getString("EXC_NoConnection")); // NOI18N
3237
}
3238
3239        if (dmd == null) throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3240
return dmd.getSchemas();
3241    }
3242
3243    public String JavaDoc getSchemasQuery()
3244    {
3245        return getString(PROP_SCHEMAS_QUERY);
3246    }
3247
3248    public void setSchemasQuery(String JavaDoc value)
3249    {
3250        setString(PROP_SCHEMAS_QUERY, value);
3251    }
3252
3253    /**
3254    * Gets the catalog names available in this database. The results
3255    * are ordered by catalog name.
3256    * @exception SQLException if a database access error occurs
3257    */

3258    public ResultSet JavaDoc getCatalogs() throws SQLException JavaDoc
3259    {
3260        String JavaDoc query = (String JavaDoc)properties.get(PROP_CATALOGS_QUERY);
3261        if (query != null) {
3262            if (con != null) return con.createStatement().executeQuery(query);
3263            else throw new SQLException JavaDoc(bundle.getString("EXC_NoConnection")); // NOI18N
3264
}
3265
3266        if (dmd == null) throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3267
return dmd.getCatalogs();
3268    }
3269
3270    public String JavaDoc getCatalogsQuery()
3271    {
3272        return getString(PROP_CATALOGS_QUERY);
3273    }
3274
3275    public void setCatalogsQuery(String JavaDoc value)
3276    {
3277        setString(PROP_CATALOGS_QUERY, value);
3278    }
3279
3280    /**
3281    * Gets the table types available in this database. The results
3282    * are ordered by table type.
3283    */

3284    public ResultSet JavaDoc getTableTypes() throws SQLException JavaDoc
3285    {
3286        String JavaDoc query = (String JavaDoc)properties.get(PROP_TABLE_TYPES_QUERY);
3287        if (query != null) {
3288            if (con != null) return con.createStatement().executeQuery(query);
3289            else throw new SQLException JavaDoc(bundle.getString("EXC_NoConnection")); // NOI18N
3290
}
3291
3292        if (dmd == null) throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3293
return dmd.getCatalogs();
3294    }
3295
3296    public String JavaDoc getTableTypesQuery()
3297    {
3298        return getString(PROP_TABLE_TYPES_QUERY);
3299    }
3300
3301    public void setTableTypesQuery(String JavaDoc value)
3302    {
3303        setString(PROP_TABLE_TYPES_QUERY, value);
3304    }
3305
3306    /**
3307    * Gets a description of table columns available in
3308    * the specified catalog.
3309    */

3310    public ResultSet JavaDoc getColumns(String JavaDoc catalog, String JavaDoc schemaPattern, String JavaDoc tableNamePattern, String JavaDoc columnNamePattern) throws SQLException JavaDoc
3311    {
3312        if (getCapitializeUsername() && schemaPattern != null) schemaPattern = schemaPattern.toUpperCase();
3313        String JavaDoc query = (String JavaDoc)properties.get(PROP_COLUMNS_QUERY);
3314        if (query != null) {
3315            if (con != null) {
3316                PreparedStatement JavaDoc stmt = con.prepareStatement(query);
3317                stmt.setString(1, catalog);
3318                stmt.setString(2, schemaPattern);
3319                stmt.setString(3, tableNamePattern);
3320                stmt.setString(4, columnNamePattern);
3321                return stmt.executeQuery();
3322            } else throw new SQLException JavaDoc(bundle.getString("EXC_NoConnection")); // NOI18N
3323
}
3324
3325        if (dmd == null) throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3326
return dmd.getColumns(catalog, schemaPattern, tableNamePattern, columnNamePattern);
3327    }
3328
3329    public String JavaDoc getColumnsQuery()
3330    {
3331        return getString(PROP_COLUMNS_QUERY);
3332    }
3333
3334    public void setColumnsQuery(String JavaDoc value)
3335    {
3336        setString(PROP_COLUMNS_QUERY, value);
3337    }
3338
3339    /**
3340    * Gets a description of the access rights for a table's columns.
3341    */

3342    public ResultSet JavaDoc getColumnPrivileges(String JavaDoc catalog, String JavaDoc schema, String JavaDoc table, String JavaDoc columnNamePattern) throws SQLException JavaDoc
3343    {
3344        if (getCapitializeUsername() && schema != null) schema = schema.toUpperCase();
3345        String JavaDoc query = (String JavaDoc)properties.get(PROP_COLUMNS_PRIVILEGES_QUERY);
3346        if (query != null) {
3347            if (con != null) {
3348                PreparedStatement JavaDoc stmt = con.prepareStatement(query);
3349                stmt.setString(1, catalog);
3350                stmt.setString(2, schema);
3351                stmt.setString(3, table);
3352                stmt.setString(4, columnNamePattern);
3353                return stmt.executeQuery();
3354            } else throw new SQLException JavaDoc(bundle.getString("EXC_NoConnection")); // NOI18N
3355
}
3356
3357        if (dmd == null) throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3358
return dmd.getColumnPrivileges(catalog, schema, table, columnNamePattern);
3359    }
3360
3361    public String JavaDoc getColumnPrivilegesQuery()
3362    {
3363        return getString(PROP_COLUMNS_PRIVILEGES_QUERY);
3364    }
3365
3366    public void setColumnPrivilegesQuery(String JavaDoc value)
3367    {
3368        setString(PROP_COLUMNS_PRIVILEGES_QUERY, value);
3369    }
3370
3371    /**
3372    * Gets a description of tables available in a catalog.
3373    * Only table descriptions matching the catalog, schema, table
3374    * name and type criteria are returned. They are ordered by TABLE_TYPE,
3375    * TABLE_SCHEM and TABLE_NAME.
3376    */

3377    public ResultSet JavaDoc getTables(String JavaDoc catalog, String JavaDoc schemaPattern, String JavaDoc tableNamePattern, String JavaDoc[] types) throws SQLException JavaDoc
3378    {
3379        if (getCapitializeUsername() && schemaPattern!= null) schemaPattern = schemaPattern.toUpperCase();
3380        String JavaDoc query = (String JavaDoc)properties.get(PROP_TABLES_QUERY);
3381        if (query != null) {
3382            if (con != null) {
3383                StringBuffer JavaDoc typebuff = new StringBuffer JavaDoc();
3384                PreparedStatement JavaDoc stmt = con.prepareStatement(query);
3385                stmt.setString(1, catalog);
3386                stmt.setString(2, schemaPattern);
3387                stmt.setString(3, tableNamePattern);
3388
3389                for (int i=0; i<types.length; i++) {
3390                    if (i > 0) typebuff.append(", ");
3391                    typebuff.append("'");
3392                    typebuff.append(types[i]);
3393                    typebuff.append("'");
3394                }
3395
3396                stmt.setString(4, typebuff.toString());
3397                return stmt.executeQuery();
3398            } else throw new SQLException JavaDoc(bundle.getString("EXC_NoConnection")); // NOI18N
3399
}
3400
3401        if (dmd == null) throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3402
return dmd.getTables(catalog, schemaPattern, tableNamePattern, types);
3403    }
3404
3405    public String JavaDoc getTablesQuery()
3406    {
3407        return getString(PROP_TABLES_QUERY);
3408    }
3409
3410    public void setTablesQuery(String JavaDoc value)
3411    {
3412        setString(PROP_TABLES_QUERY, value);
3413    }
3414
3415    /**
3416    * Gets a description of the access rights for each table available
3417    * in a catalog. Note that a table privilege applies to one or
3418    * more columns in the table. It would be wrong to assume that
3419    * this priviledge applies to all columns (this may be true for
3420    * some systems but is not true for all.)
3421    */

3422    public ResultSet JavaDoc getTablePrivileges(String JavaDoc catalog, String JavaDoc schemaPattern, String JavaDoc tableNamePattern) throws SQLException JavaDoc
3423    {
3424        if (getCapitializeUsername() && schemaPattern!= null) schemaPattern = schemaPattern.toUpperCase();
3425        String JavaDoc query = (String JavaDoc)properties.get(PROP_TABLE_PRIVILEGES_QUERY);
3426        if (query != null) {
3427            if (con != null) {
3428                PreparedStatement JavaDoc stmt = con.prepareStatement(query);
3429                stmt.setString(1, catalog);
3430                stmt.setString(2, schemaPattern);
3431                stmt.setString(3, tableNamePattern);
3432                return stmt.executeQuery();
3433            } else throw new SQLException JavaDoc(bundle.getString("EXC_NoConnection")); // NOI18N
3434
}
3435
3436        if (dmd == null) throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3437
return dmd.getTablePrivileges(catalog, schemaPattern, tableNamePattern);
3438    }
3439
3440    public String JavaDoc getTablePrivilegesQuery()
3441    {
3442        return getString(PROP_TABLE_PRIVILEGES_QUERY);
3443    }
3444
3445    public void setTablePrivilegesQuery(String JavaDoc value)
3446    {
3447        setString(PROP_TABLE_PRIVILEGES_QUERY, value);
3448    }
3449
3450    /**
3451    * Gets a description of a table's optimal set of columns that
3452    * uniquely identifies a row. They are ordered by SCOPE.
3453    */

3454    public ResultSet JavaDoc getBestRowIdentifier(String JavaDoc catalog, String JavaDoc schema, String JavaDoc table, int scope, boolean nullable) throws SQLException JavaDoc
3455    {
3456        if (getCapitializeUsername() && schema != null) schema = schema.toUpperCase();
3457        String JavaDoc query = (String JavaDoc)properties.get(PROP_BEST_ROW_IDENTIFIER);
3458        if (query != null) {
3459            if (con != null) {
3460                PreparedStatement JavaDoc stmt = con.prepareStatement(query);
3461                stmt.setString(1, catalog);
3462                stmt.setString(2, schema);
3463                stmt.setString(3, table);
3464                stmt.setInt(4, scope);
3465                stmt.setBoolean(5, nullable);
3466                return stmt.executeQuery();
3467            } else throw new SQLException JavaDoc(bundle.getString("EXC_NoConnection")); // NOI18N
3468
}
3469
3470        if (dmd == null) throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3471
return dmd.getBestRowIdentifier(catalog, schema, table, scope, nullable);
3472    }
3473
3474    public String JavaDoc getBestRowIdentifierQuery()
3475    {
3476        return getString(PROP_BEST_ROW_IDENTIFIER);
3477    }
3478
3479    public void setBestRowIdentifierQuery(String JavaDoc value)
3480    {
3481        setString(PROP_BEST_ROW_IDENTIFIER, value);
3482    }
3483
3484    /**
3485    * Gets a description of a table's columns that are automatically
3486    * updated when any value in a row is updated. They are
3487    * unordered.
3488    */

3489    public ResultSet JavaDoc getVersionColumns(String JavaDoc catalog, String JavaDoc schema, String JavaDoc table) throws SQLException JavaDoc
3490    {
3491        if (getCapitializeUsername() && schema != null) schema = schema.toUpperCase();
3492        String JavaDoc query = (String JavaDoc)properties.get(PROP_VERSION_COLUMNS);
3493        if (query != null) {
3494            if (con != null) {
3495                PreparedStatement JavaDoc stmt = con.prepareStatement(query);
3496                stmt.setString(1, catalog);
3497                stmt.setString(2, schema);
3498                stmt.setString(3, table);
3499                return stmt.executeQuery();
3500            } else throw new SQLException JavaDoc(bundle.getString("EXC_NoConnection")); // NOI18N
3501
}
3502
3503        if (dmd == null) throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3504
return dmd.getVersionColumns(catalog, schema, table);
3505    }
3506
3507    public String JavaDoc getVersionColumnsQuery()
3508    {
3509        return getString(PROP_VERSION_COLUMNS);
3510    }
3511
3512    public void setVersionColumnsQuery(String JavaDoc value)
3513    {
3514        setString(PROP_VERSION_COLUMNS, value);
3515    }
3516
3517    /**
3518    * Gets a description of a table's primary key columns. They
3519    * are ordered by COLUMN_NAME.
3520    */

3521    public ResultSet JavaDoc getPrimaryKeys(String JavaDoc catalog, String JavaDoc schema, String JavaDoc table) throws SQLException JavaDoc
3522    {
3523        if (getCapitializeUsername() && schema != null) schema = schema.toUpperCase();
3524        String JavaDoc query = (String JavaDoc)properties.get(PROP_PK_QUERY);
3525        if (query != null) {
3526            if (con != null) {
3527                PreparedStatement JavaDoc stmt = con.prepareStatement(query);
3528                stmt.setString(1, catalog);
3529                stmt.setString(2, schema);
3530                stmt.setString(3, table);
3531                return stmt.executeQuery();
3532            } else throw new SQLException JavaDoc(bundle.getString("EXC_NoConnection")); // NOI18N
3533
}
3534
3535        if (dmd == null) throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3536
return dmd.getPrimaryKeys(catalog, schema, table);
3537    }
3538
3539    public String JavaDoc getPrimaryKeysQuery()
3540    {
3541        return getString(PROP_PK_QUERY);
3542    }
3543
3544    public void setPrimaryKeysQuery(String JavaDoc value)
3545    {
3546        setString(PROP_PK_QUERY, value);
3547    }
3548
3549    /**
3550    * Gets a description of the primary key columns that are
3551    * referenced by a table's foreign key columns (the primary keys
3552    * imported by a table). They are ordered by PKTABLE_CAT,
3553    * PKTABLE_SCHEM, PKTABLE_NAME, and KEY_SEQ.
3554    * @see #getExportedKeys
3555    */

3556    public ResultSet JavaDoc getImportedKeys(String JavaDoc catalog, String JavaDoc schema, String JavaDoc table) throws SQLException JavaDoc
3557    {
3558        if (getCapitializeUsername() && schema != null) schema = schema.toUpperCase();
3559        String JavaDoc query = (String JavaDoc)properties.get(PROP_IK_QUERY);
3560        if (query != null) {
3561            if (con != null) {
3562                PreparedStatement JavaDoc stmt = con.prepareStatement(query);
3563                stmt.setString(1, catalog);
3564                stmt.setString(2, schema);
3565                stmt.setString(3, table);
3566                return stmt.executeQuery();
3567            } else throw new SQLException JavaDoc(bundle.getString("EXC_NoConnection")); // NOI18N
3568
}
3569
3570        if (dmd == null) throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3571
return dmd.getImportedKeys(catalog, schema, table);
3572    }
3573
3574    public String JavaDoc getImportedKeysQuery()
3575    {
3576        return getString(PROP_IK_QUERY);
3577    }
3578
3579    public void setImportedKeysQuery(String JavaDoc value)
3580    {
3581        setString(PROP_IK_QUERY, value);
3582    }
3583
3584    /**
3585    * Gets a description of the foreign key columns that reference a
3586    * table's primary key columns (the foreign keys exported by a
3587    * table). They are ordered by FKTABLE_CAT, FKTABLE_SCHEM,
3588    * FKTABLE_NAME, and KEY_SEQ.
3589    * @see #getImportedKeys
3590    */

3591    public ResultSet JavaDoc getExportedKeys(String JavaDoc catalog, String JavaDoc schema, String JavaDoc table) throws SQLException JavaDoc
3592    {
3593        if (getCapitializeUsername() && schema != null) schema = schema.toUpperCase();
3594        String JavaDoc query = (String JavaDoc)properties.get(PROP_EK_QUERY);
3595        if (query != null) {
3596            if (con != null) {
3597                PreparedStatement JavaDoc stmt = con.prepareStatement(query);
3598                stmt.setString(1, catalog);
3599                stmt.setString(2, schema);
3600                stmt.setString(3, table);
3601                return stmt.executeQuery();
3602            } else throw new SQLException JavaDoc(bundle.getString("EXC_NoConnection")); // NOI18N
3603
}
3604
3605        if (dmd == null) throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3606
return dmd.getExportedKeys(catalog, schema, table);
3607    }
3608
3609    public String JavaDoc getExportedKeysQuery()
3610    {
3611        return getString(PROP_EK_QUERY);
3612    }
3613
3614    public void setExportedKeysQuery(String JavaDoc value)
3615    {
3616        setString(PROP_EK_QUERY, value);
3617    }
3618
3619    /**
3620    * Gets a description of the foreign key columns in the foreign key
3621    * table that reference the primary key columns of the primary key
3622    * table (describe how one table imports another's key.) This
3623    * should normally return a single foreign key/primary key pair
3624    * (most tables only import a foreign key from a table once.) They
3625    * are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and
3626    * KEY_SEQ.
3627    */

3628    public ResultSet JavaDoc getCrossReference(String JavaDoc catalog, String JavaDoc schema, String JavaDoc table, String JavaDoc foreignCatalog, String JavaDoc foreignSchema, String JavaDoc foreignTable) throws SQLException JavaDoc
3629    {
3630        if (getCapitializeUsername() && schema != null) schema = schema.toUpperCase();
3631        String JavaDoc query = (String JavaDoc)properties.get(PROP_CROSSREF_QUERY);
3632        if (query != null) {
3633            if (con != null) {
3634                PreparedStatement JavaDoc stmt = con.prepareStatement(query);
3635                stmt.setString(1, catalog);
3636                stmt.setString(2, schema);
3637                stmt.setString(3, table);
3638                stmt.setString(4, foreignCatalog);
3639                stmt.setString(5, foreignSchema);
3640                stmt.setString(6, foreignTable);
3641                return stmt.executeQuery();
3642            } else throw new SQLException JavaDoc(bundle.getString("EXC_NoConnection")); // NOI18N
3643
}
3644
3645        if (dmd == null) throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3646
return dmd.getCrossReference(catalog, schema, table, foreignCatalog, foreignSchema, foreignTable);
3647    }
3648
3649    public String JavaDoc getCrossReferenceQuery()
3650    {
3651        return getString(PROP_CROSSREF_QUERY);
3652    }
3653
3654    public void setCrossReferenceQuery(String JavaDoc value)
3655    {
3656        setString(PROP_CROSSREF_QUERY, value);
3657    }
3658
3659    /**
3660    * Gets a description of all the standard SQL types supported by
3661    * this database. They are ordered by DATA_TYPE and then by how
3662    * closely the data type maps to the corresponding JDBC SQL type.
3663    */

3664    public ResultSet JavaDoc getTypeInfo() throws SQLException JavaDoc
3665    {
3666        String JavaDoc query = (String JavaDoc)properties.get(PROP_TYPE_INFO_QUERY);
3667        if (query != null) {
3668            if (con != null) return con.createStatement().executeQuery(query);
3669            else throw new SQLException JavaDoc(bundle.getString("EXC_NoConnection")); // NOI18N
3670
}
3671
3672        if (dmd == null) throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3673
return dmd.getTypeInfo();
3674    }
3675
3676    public String JavaDoc getTypeInfoQuery()
3677    {
3678        return getString(PROP_TYPE_INFO_QUERY);
3679    }
3680
3681    public void setTypeInfoQuery(String JavaDoc value)
3682    {
3683        setString(PROP_TYPE_INFO_QUERY, value);
3684    }
3685
3686    /**
3687    * Gets a description of a table's indices and statistics. They are
3688    * ordered by NON_UNIQUE, TYPE, INDEX_NAME, and ORDINAL_POSITION.
3689    *
3690    */

3691    public ResultSet JavaDoc getIndexInfo(String JavaDoc catalog, String JavaDoc schema, String JavaDoc table, boolean unique, boolean approximate) throws SQLException JavaDoc
3692    {
3693        if (getCapitializeUsername() && schema != null) schema = schema.toUpperCase();
3694        String JavaDoc query = (String JavaDoc)properties.get(PROP_INDEX_INFO_QUERY);
3695        if (query != null) {
3696            if (con != null) {
3697                PreparedStatement JavaDoc stmt = con.prepareStatement(query);
3698                stmt.setString(1, catalog);
3699                stmt.setString(2, schema);
3700                stmt.setString(3, table);
3701                stmt.setBoolean(4, unique);
3702                stmt.setBoolean(5, approximate);
3703                return stmt.executeQuery();
3704            } else throw new SQLException JavaDoc(bundle.getString("EXC_NoConnection")); // NOI18N
3705
}
3706
3707        if (dmd == null) throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3708
return dmd.getIndexInfo(catalog, schema, table, unique, approximate);
3709    }
3710
3711    public String JavaDoc getIndexInfoQuery()
3712    {
3713        return getString(PROP_INDEX_INFO_QUERY);
3714    }
3715
3716    public void setIndexInfoQuery(String JavaDoc value)
3717    {
3718        setString(PROP_INDEX_INFO_QUERY, value);
3719    }
3720
3721    /**
3722    * Does the database support the given result set type?
3723    * @param type defined in <code>java.sql.ResultSet</code>
3724    * @return <code>true</code> if so
3725    * @exception SQLException if a database access error occurs
3726    * @see Connection
3727    */

3728    public boolean supportsResultSetType(int type) throws SQLException JavaDoc
3729    {
3730        if (dmd != null) return dmd.supportsResultSetType(type);
3731        else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3732
}
3733
3734    /**
3735    * Does the database support the concurrency type in combination
3736    * with the given result set type?
3737    * @param type defined in <code>java.sql.ResultSet</code>
3738    * @param concurrency type defined in <code>java.sql.ResultSet</code>
3739    * @return <code>true</code> if so
3740    * @exception SQLException if a database access error occurs
3741    * @see Connection
3742    */

3743    public boolean supportsResultSetConcurrency(int type, int concurrency) throws SQLException JavaDoc
3744    {
3745        if (dmd != null) return dmd.supportsResultSetConcurrency(type, concurrency);
3746        else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3747
}
3748
3749    /**
3750    * Indicates whether a result set's own updates are visible.
3751    * @param result set type, i.e. ResultSet.TYPE_XXX
3752    * @exception SQLException if a database access error occurs
3753    */

3754    public boolean ownUpdatesAreVisible(int type) throws SQLException JavaDoc
3755    {
3756        if (dmd != null) return dmd.ownUpdatesAreVisible(type);
3757        else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3758
}
3759
3760    /**
3761    * Indicates whether a result set's own deletes are visible.
3762    * @param result set type, i.e. ResultSet.TYPE_XXX
3763    * @return <code>true</code> if deletes are visible for the result set type
3764    * @exception SQLException if a database access error occurs
3765    */

3766    public boolean ownDeletesAreVisible(int type) throws SQLException JavaDoc
3767    {
3768        if (dmd != null) return dmd.ownDeletesAreVisible(type);
3769        else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3770
}
3771
3772    /**
3773    * Indicates whether a result set's own inserts are visible.
3774    * @param result set type, i.e. ResultSet.TYPE_XXX
3775    * @return <code>true</code> if inserts are visible for the result set type
3776    * @exception SQLException if a database access error occurs
3777    */

3778    public boolean ownInsertsAreVisible(int type) throws SQLException JavaDoc
3779    {
3780        if (dmd != null) return dmd.ownInsertsAreVisible(type);
3781        else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3782
}
3783
3784    /**
3785    * Indicates whether updates made by others are visible.
3786    * @param result set type, i.e. ResultSet.TYPE_XXX
3787    * @return <code>true</code> if updates made by others
3788    * are visible for the result set type
3789    * @exception SQLException if a database access error occurs
3790    */

3791    public boolean othersUpdatesAreVisible(int type) throws SQLException JavaDoc
3792    {
3793        if (dmd != null) return dmd.othersUpdatesAreVisible(type);
3794        else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3795
}
3796
3797    /**
3798    * Indicates whether deletes made by others are visible.
3799    * @param result set type, i.e. ResultSet.TYPE_XXX
3800    * @return <code>true</code> if deletes made by others
3801    * are visible for the result set type
3802    * @exception SQLException if a database access error occurs
3803    */

3804    public boolean othersDeletesAreVisible(int type) throws SQLException JavaDoc
3805    {
3806        if (dmd != null) return dmd.othersDeletesAreVisible(type);
3807        else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3808
}
3809
3810    /**
3811    * Indicates whether inserts made by others are visible.
3812    * @param result set type, i.e. ResultSet.TYPE_XXX
3813    * @return true if updates are visible for the result set type
3814    * @return <code>true</code> if inserts made by others
3815    * are visible for the result set type
3816    * @exception SQLException if a database access error occurs
3817    */

3818    public boolean othersInsertsAreVisible(int type) throws SQLException JavaDoc
3819    {
3820        if (dmd != null) return dmd.othersInsertsAreVisible(type);
3821        else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3822
}
3823
3824    /**
3825    * Indicates whether or not a visible row update can be detected by
3826    * calling the method <code>ResultSet.rowUpdated</code>.
3827    * @param result set type, i.e. ResultSet.TYPE_XXX
3828    * @return <code>true</code> if changes are detected by the result set type
3829    * @exception SQLException if a database access error occurs
3830    */

3831    public boolean updatesAreDetected(int type) throws SQLException JavaDoc
3832    {
3833        if (dmd != null) return dmd.updatesAreDetected(type);
3834        else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3835
}
3836
3837    /**
3838    * Indicates whether or not a visible row delete can be detected by
3839    * calling ResultSet.rowDeleted(). If deletesAreDetected()
3840    * returns false, then deleted rows are removed from the result set.
3841    * @param result set type, i.e. ResultSet.TYPE_XXX
3842    * @return true if changes are detected by the resultset type
3843    * @exception SQLException if a database access error occurs
3844    */

3845    public boolean deletesAreDetected(int type) throws SQLException JavaDoc
3846    {
3847        if (dmd != null) return dmd.deletesAreDetected(type);
3848        else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3849
}
3850
3851    /**
3852    * Indicates whether or not a visible row insert can be detected
3853    * by calling ResultSet.rowInserted().
3854    * @param result set type, i.e. ResultSet.TYPE_XXX
3855    * @return true if changes are detected by the resultset type
3856    * @exception SQLException if a database access error occurs
3857    */

3858    public boolean insertsAreDetected(int type) throws SQLException JavaDoc
3859    {
3860        if (dmd != null) return dmd.insertsAreDetected(type);
3861        else throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3862
}
3863
3864    /**
3865    * Indicates whether the driver supports batch updates.
3866    * @return true if the driver supports batch updates
3867    */

3868    public boolean supportsBatchUpdates() throws SQLException JavaDoc {
3869        Boolean JavaDoc flag = (Boolean JavaDoc)properties.get(PROP_BATCH_UPDATES);
3870        if (flag == null) {
3871            if (dmd != null)
3872                try {
3873                    flag = dmd.supportsBatchUpdates() ? Boolean.TRUE : Boolean.FALSE;
3874                } catch (AbstractMethodError JavaDoc exc) {
3875                    //PENDING - unknown problem with AbstractMethodError
3876
//bug #27858 (http://db.netbeans.org/issues/show_bug.cgi?id=27858)
3877
}
3878            else
3879                throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3880
properties.put(PROP_BATCH_UPDATES, flag);
3881        }
3882
3883        return flag.booleanValue();
3884    }
3885
3886    public int getBatchUpdates()
3887    {
3888        return getBoolean(PROP_BATCH_UPDATES);
3889    }
3890
3891    public void setBatchUpdates(int value)
3892    {
3893        setBoolean(PROP_BATCH_UPDATES, value);
3894    }
3895
3896    /**
3897    * Gets a description of the user-defined types defined in a particular
3898    * schema. Schema-specific UDTs may have type JAVA_OBJECT, STRUCT,
3899    * or DISTINCT.
3900    */

3901    public ResultSet JavaDoc getUDTs(String JavaDoc catalog, String JavaDoc schemaPattern, String JavaDoc typeNamePattern, int[] types) throws SQLException JavaDoc
3902    {
3903        if (getCapitializeUsername() && schemaPattern != null) schemaPattern = schemaPattern.toUpperCase();
3904        String JavaDoc query = (String JavaDoc)properties.get(PROP_UDT_QUERY);
3905        if (query != null) {
3906            if (con != null) {
3907                StringBuffer JavaDoc typebuff = new StringBuffer JavaDoc();
3908                PreparedStatement JavaDoc stmt = con.prepareStatement(query);
3909                stmt.setString(1, catalog);
3910                stmt.setString(2, schemaPattern);
3911                stmt.setString(3, typeNamePattern);
3912
3913                for (int i=0; i<types.length; i++) {
3914                    if (i > 0) typebuff.append(", ");
3915                    typebuff.append(types[i]);
3916                }
3917
3918                stmt.setString(4, typebuff.toString());
3919                return stmt.executeQuery();
3920            } else throw new SQLException JavaDoc(bundle.getString("EXC_NoConnection")); // NOI18N
3921
}
3922
3923        if (dmd == null) throw new SQLException JavaDoc(bundle.getString("EXC_NoDBMetadata")); // NOI18N
3924
return dmd.getUDTs(catalog, schemaPattern, typeNamePattern, types);
3925    }
3926
3927    public String JavaDoc getUDTsQuery()
3928    {
3929        return getString(PROP_UDT_QUERY);
3930    }
3931
3932    public void setUDTsQuery(String JavaDoc value)
3933    {
3934        setString(PROP_UDT_QUERY, value);
3935    }
3936
3937    // Extended properties
3938

3939    public boolean getCapitializeUsername() {
3940        Boolean JavaDoc flag = (Boolean JavaDoc) properties.get("capitializeUsername");
3941        if(flag == null) {
3942            //flag = Boolean.TRUE;
3943
flag = Boolean.FALSE;
3944            properties.put("capitializeUsername", flag);
3945        }
3946        return flag.booleanValue();
3947    }
3948
3949    public void setCapitializeUsername(boolean value)
3950    {
3951        Boolean JavaDoc newValue, oldValue = (Boolean JavaDoc)properties.get(PROP_CAPITALIZE_USERNAME);
3952        newValue = value ? Boolean.TRUE : Boolean.FALSE;
3953        properties.put(PROP_CAPITALIZE_USERNAME, newValue);
3954        propertySupport.firePropertyChange(PROP_CAPITALIZE_USERNAME, oldValue, newValue);
3955    }
3956
3957    
3958    //JDK 1.4 / JDBC 3.0
3959
// workaround to be compilable under JDK 1.4
3960
// the following methods don't return real values
3961

3962    public ResultSet JavaDoc getAttributes(String JavaDoc catalog, String JavaDoc schemaPattern, String JavaDoc typeNamePattern, String JavaDoc attributeNamePattern) throws SQLException JavaDoc {
3963        return null;
3964    }
3965    
3966    public int getDatabaseMajorVersion() throws SQLException JavaDoc {
3967        return dmd.getDatabaseMajorVersion();
3968    }
3969    
3970    public int getDatabaseMinorVersion() throws SQLException JavaDoc {
3971        return -1;
3972    }
3973    
3974    public int getJDBCMajorVersion() throws SQLException JavaDoc {
3975        return -1;
3976    }
3977    
3978    public int getJDBCMinorVersion() throws SQLException JavaDoc {
3979        return -1;
3980    }
3981    
3982    public int getResultSetHoldability() throws SQLException JavaDoc {
3983        return -1;
3984    }
3985    
3986    public int getSQLStateType() throws SQLException JavaDoc {
3987        return -1;
3988    }
3989    
3990    public ResultSet JavaDoc getSuperTables(String JavaDoc catalog, String JavaDoc schemaPattern, String JavaDoc tableNamePattern) throws SQLException JavaDoc {
3991        return null;
3992    }
3993    
3994    public ResultSet JavaDoc getSuperTypes(String JavaDoc catalog, String JavaDoc schemaPattern, String JavaDoc typeNamePattern) throws SQLException JavaDoc {
3995        return null;
3996    }
3997    
3998    public boolean locatorsUpdateCopy() throws SQLException JavaDoc {
3999        return false;
4000    }
4001    
4002    public boolean supportsGetGeneratedKeys() throws SQLException JavaDoc {
4003        return false;
4004    }
4005    
4006    public boolean supportsMultipleOpenResults() throws SQLException JavaDoc {
4007        return false;
4008    }
4009    
4010    public boolean supportsNamedParameters() throws SQLException JavaDoc {
4011        return false;
4012    }
4013    
4014    public boolean supportsResultSetHoldability(int holdability) throws SQLException JavaDoc {
4015        return false;
4016    }
4017    
4018    public boolean supportsSavepoints() throws SQLException JavaDoc {
4019        return false;
4020    }
4021    
4022    public boolean supportsStatementPooling() throws SQLException JavaDoc {
4023        return false;
4024    }
4025    
4026    //JDK 1.6 / JDBC 4.0
4027

4028    public boolean supportsStoredFunctionsUsingCallSyntax() throws SQLException JavaDoc {
4029        return false;
4030    }
4031    
4032    public boolean isWrapperFor (Class JavaDoc clazz) {
4033        return false;
4034    }
4035
4036    public Object JavaDoc unwrap(java.lang.Class JavaDoc iface) throws java.sql.SQLException JavaDoc {
4037        return null;
4038    }
4039    
4040    public java.sql.RowIdLifetime JavaDoc getRowIdLifetime() throws SQLException JavaDoc {
4041        return null;
4042    }
4043
4044    public ResultSet JavaDoc getSchemas(String JavaDoc catalog, String JavaDoc schemaPattern) throws SQLException JavaDoc {
4045        return null;
4046    }
4047    
4048    public ResultSet JavaDoc getClientInfoProperties() throws SQLException JavaDoc {
4049        return null;
4050    }
4051    
4052    public ResultSet JavaDoc getFunctionColumns(String JavaDoc catalog, String JavaDoc schemaPattern, String JavaDoc functionNamePattern, String JavaDoc columnNamePattern) throws SQLException JavaDoc {
4053        return null;
4054    }
4055    
4056    public ResultSet JavaDoc getFunctions(String JavaDoc catalog, String JavaDoc schemaPattern, String JavaDoc functionNamePattern) throws SQLException JavaDoc {
4057        return null;
4058    }
4059    
4060    public boolean providesQueryObjectGenerator() throws SQLException JavaDoc {
4061        return false;
4062    }
4063    
4064    public boolean autoCommitFailureClosesAllResultSets() throws SQLException JavaDoc {
4065        return false;
4066    }
4067}
4068
Popular Tags