001 package com.mockrunner.mock.jdbc;
002
003 import java.sql.Connection;
004 import java.sql.DatabaseMetaData;
005 import java.sql.ResultSet;
006 import java.sql.SQLException;
007 import java.util.Arrays;
008 import java.util.HashMap;
009 import java.util.Iterator;
010 import java.util.Map;
011
012 /**
013 * Mock implementation of <code>DatabaseMetaData</code>.
014 */
015 public class MockDatabaseMetaData implements DatabaseMetaData
016 {
017 private int databaseMajorVersion = 1;
018 private int databaseMinorVersion = 0;
019 private int defaultTransactionLevel = Connection.TRANSACTION_READ_COMMITTED;
020 private int driverMajorVersion = 1;
021 private int driverMinorVersion = 0;
022 private int jdbcMajorVersion = 3;
023 private int jdbcMinorVersion = 0;
024 private int maxBinaryLiteralLength = 0;
025 private int maxCatalogNameLength = 0;
026 private int maxCharLiteralLength = 0;
027 private int maxColumnNameLength = 0;
028 private int maxColumnsInGroupBy = 0;
029 private int maxColumnsInIndex = 0;
030 private int maxColumnsInOrderBy = 0;
031 private int maxColumnsInSelect = 0;
032 private int maxColumnsInTable = 0;
033 private int maxConnections = 0;
034 private int maxCursorNameLength = 0;
035 private int maxIndexLength = 0;
036 private int maxProcedureNameLength = 0;
037 private int maxRowSize = 0;
038 private int maxSchemaNameLength = 0;
039 private int maxStatementLength = 0;
040 private int maxStatements = 0;
041 private int maxTableNameLength = 0;
042 private int maxTablesInSelect = 0;
043 private int maxUserNameLength = 0;
044 private int resultSetHoldability = ResultSet.CONCUR_READ_ONLY;
045 private int sqlStateType = sqlStateSQL99;
046 private boolean allProceduresAreCallable = true;
047 private boolean allTablesAreSelectable = true;
048 private boolean dataDefinitionCausesTransactionCommit = false;
049 private boolean dataDefinitionIgnoredInTransactions = false;
050 private boolean doesMaxRowSizeIncludeBlobs = false;
051 private boolean isCatalogAtStart = false;
052 private boolean isReadOnly = false;
053 private boolean locatorsUpdateCopy = false;
054 private boolean nullPlusNonNullIsNull = false;
055 private boolean nullsAreSortedAtEnd = false;
056 private boolean nullsAreSortedAtStart = false;
057 private boolean nullsAreSortedHigh = false;
058 private boolean nullsAreSortedLow = false;
059 private boolean storesLowerCaseIdentifiers = true;
060 private boolean storesLowerCaseQuotedIdentifiers = true;
061 private boolean storesMixedCaseIdentifiers = true;
062 private boolean storesMixedCaseQuotedIdentifiers = true;
063 private boolean storesUpperCaseIdentifiers = true;
064 private boolean storesUpperCaseQuotedIdentifiers = true;
065 private boolean supportsANSI92EntryLevelSQL = true;
066 private boolean supportsANSI92FullSQL = true;
067 private boolean supportsANSI92IntermediateSQL = true;
068 private boolean supportsAlterTableWithAddColumn = true;
069 private boolean supportsAlterTableWithDropColumn = true;
070 private boolean supportsBatchUpdates = true;
071 private boolean supportsCatalogsInDataManipulation = true;
072 private boolean supportsCatalogsInIndexDefinitions = true;
073 private boolean supportsCatalogsInPrivilegeDefinitions = true;
074 private boolean supportsCatalogsInProcedureCalls = true;
075 private boolean supportsCatalogsInTableDefinitions = true;
076 private boolean supportsColumnAliasing = true;
077 private boolean supportsConvert = true;
078 private boolean supportsCoreSQLGrammar = true;
079 private boolean supportsCorrelatedSubqueries = true;
080 private boolean supportsDataDefinitionAndDataManipulationTransactions = true;
081 private boolean supportsDataManipulationTransactionsOnly = false;
082 private boolean supportsDifferentTableCorrelationNames;
083 private boolean supportsExpressionsInOrderBy = true;
084 private boolean supportsExtendedSQLGrammar = true;
085 private boolean supportsFullOuterJoins = true;
086 private boolean supportsGetGeneratedKeys = true;
087 private boolean supportsGroupBy = true;
088 private boolean supportsGroupByBeyondSelect = true;
089 private boolean supportsGroupByUnrelated = true;
090 private boolean supportsIntegrityEnhancementFacility = true;
091 private boolean supportsLikeEscapeClause = true;
092 private boolean supportsLimitedOuterJoins = true;
093 private boolean supportsMinimumSQLGrammar = true;;
094 private boolean supportsMixedCaseIdentifiers = true;
095 private boolean supportsMixedCaseQuotedIdentifiers = true;
096 private boolean supportsMultipleOpenResults = true;
097 private boolean supportsMultipleResultSets = true;
098 private boolean supportsMultipleTransactions = true;
099 private boolean supportsNamedParameters = true;
100 private boolean supportsNonNullableColumns = true;
101 private boolean supportsOpenCursorsAcrossCommit = true;
102 private boolean supportsOpenCursorsAcrossRollback = true;
103 private boolean supportsOpenStatementsAcrossCommit = true;
104 private boolean supportsOpenStatementsAcrossRollback = true;
105 private boolean supportsOrderByUnrelated = true;
106 private boolean supportsOuterJoins = true;
107 private boolean supportsPositionedDelete = true;
108 private boolean supportsPositionedUpdate = true;
109 private boolean supportsSavepoints = true;
110 private boolean supportsSchemasInDataManipulation = true;
111 private boolean supportsSchemasInIndexDefinitions = true;
112 private boolean supportsSchemasInPrivilegeDefinitions = true;
113 private boolean supportsSchemasInProcedureCalls = true;
114 private boolean supportsSchemasInTableDefinitions = true;
115 private boolean supportsSelectForUpdate = true;
116 private boolean supportsStatementPooling = true;
117 private boolean supportsStoredProcedures = true;
118 private boolean supportsSubqueriesInComparisons = true;
119 private boolean supportsSubqueriesInExists = true;
120 private boolean supportsSubqueriesInIns = true;
121 private boolean supportsSubqueriesInQuantifieds = true;
122 private boolean supportsTableCorrelationNames = true;
123 private boolean supportsTransactions = true;;
124 private boolean supportsUnion = true;
125 private boolean supportsUnionAll = true;
126 private boolean usesLocalFilePerTable = false;
127 private boolean usesLocalFiles = true;
128 private boolean deletesAreDetected = true;
129 private boolean insertsAreDetected = true;
130 private boolean othersDeletesAreVisible = true;
131 private boolean othersInsertsAreVisible = true;
132 private boolean othersUpdatesAreVisible = true;
133 private boolean ownDeletesAreVisible = true;
134 private boolean ownInsertsAreVisible = true;
135 private boolean ownUpdatesAreVisible = true;
136 private boolean supportsResultSetHoldability = true;
137 private boolean supportsResultSetType = true;
138 private boolean supportsTransactionIsolationLevel = true;
139 private boolean updatesAreDetected = true;
140 private boolean supportsResultSetConcurrency = true;
141 private String catalogSeparator = ".";
142 private String catalogTerm = "database";
143 private String databaseProductName = "MockDatabase";
144 private String databaseProductVersion = "1.0";
145 private String driverName = MockDriver.class.getName();
146 private String driverVersion = "1.0";
147 private String extraNameCharacters = "";
148 private String identifierQuoteString = " ";
149 private String numericFunctions = "";
150 private String procedureTerm = "";
151 private String sqlKeywords = "";
152 private String schemaTerm = "";
153 private String searchStringEscape = "\\";
154 private String stringFunctions = "";
155 private String systemFunctions = "";
156 private String timeDateFunctions = "";
157 private String url;
158 private String userName;
159 private Connection connection;
160 private ResultSet catalogs;
161 private ResultSet schemas;
162 private ResultSet tableTypes;
163 private ResultSet typeInfo;
164 private Map exportedKeysMap = new HashMap();
165 private Map importedKeysMap = new HashMap();
166 private Map primaryKeysMap = new HashMap();
167 private Map proceduresMap = new HashMap();
168 private Map superTablesMap = new HashMap();
169 private Map superTypesMap = new HashMap();
170 private Map tablePrivilegesMap = new HashMap();
171 private Map versionColumnsMap = new HashMap();
172 private Map bestRowIdentifierMap = new HashMap();
173 private Map indexInfoMap = new HashMap();
174 private Map udtsMap = new HashMap();
175 private Map attributesMap = new HashMap();
176 private Map columnPrivilegesMap = new HashMap();
177 private Map columnsMap = new HashMap();
178 private Map procedureColumnsMap = new HashMap();
179 private Map tablesMap = new HashMap();
180 private Map crossReferenceMap = new HashMap();
181
182 public int getDatabaseMajorVersion() throws SQLException
183 {
184 return databaseMajorVersion;
185 }
186
187 public void setDatabaseMajorVersion(int version)
188 {
189 databaseMajorVersion = version;
190 }
191
192 public int getDatabaseMinorVersion() throws SQLException
193 {
194 return databaseMinorVersion;
195 }
196
197 public void setDatabaseMinorVersion(int version)
198 {
199 databaseMinorVersion = version;
200 }
201
202 public int getDefaultTransactionIsolation() throws SQLException
203 {
204 return defaultTransactionLevel;
205 }
206
207 public void setDefaultTransactionIsolation(int defaultTransactionLevel)
208 {
209 this.defaultTransactionLevel = defaultTransactionLevel;
210 }
211
212 public int getDriverMajorVersion()
213 {
214 return driverMajorVersion;
215 }
216
217 public void setDriverMajorVersion(int driverMajorVersion)
218 {
219 this.driverMajorVersion = driverMajorVersion;
220 }
221
222 public int getDriverMinorVersion()
223 {
224 return driverMinorVersion;
225 }
226
227 public void setDriverMinorVersion(int driverMinorVersion)
228 {
229 this.driverMinorVersion = driverMinorVersion;
230 }
231
232 public int getJDBCMajorVersion() throws SQLException
233 {
234 return jdbcMajorVersion;
235 }
236
237 public void setJDBCMajorVersion(int jdbcMajorVersion)
238 {
239 this.jdbcMajorVersion = jdbcMajorVersion;
240 }
241
242 public int getJDBCMinorVersion() throws SQLException
243 {
244 return jdbcMinorVersion;
245 }
246
247 public void setJDBCMinorVersion(int jdbcMinorVersion)
248 {
249 this.jdbcMinorVersion = jdbcMinorVersion;
250 }
251
252 public int getMaxBinaryLiteralLength() throws SQLException
253 {
254 return maxBinaryLiteralLength;
255 }
256
257 public void setMaxBinaryLiteralLength(int maxBinaryLiteralLength)
258 {
259 this.maxBinaryLiteralLength = maxBinaryLiteralLength;
260 }
261
262 public int getMaxCatalogNameLength() throws SQLException
263 {
264 return maxCatalogNameLength;
265 }
266
267 public void setetMaxCatalogNameLength(int maxCatalogNameLength)
268 {
269 this.maxCatalogNameLength = maxCatalogNameLength;
270 }
271
272 public int getMaxCharLiteralLength() throws SQLException
273 {
274 return maxCharLiteralLength;
275 }
276
277 public void setMaxCharLiteralLength(int maxCharLiteralLength)
278 {
279 this.maxCharLiteralLength = maxCharLiteralLength;
280 }
281
282 public int getMaxColumnNameLength() throws SQLException
283 {
284 return maxColumnNameLength;
285 }
286
287 public void setMaxColumnNameLength(int maxColumnNameLength)
288 {
289 this.maxColumnNameLength = maxColumnNameLength;
290 }
291
292 public int getMaxColumnsInGroupBy() throws SQLException
293 {
294 return maxColumnsInGroupBy;
295 }
296
297 public void setMaxColumnsInGroupBy(int maxColumnsInGroupBy)
298 {
299 this.maxColumnsInGroupBy = maxColumnsInGroupBy;
300 }
301
302 public int getMaxColumnsInIndex() throws SQLException
303 {
304 return maxColumnsInIndex;
305 }
306
307 public void setMaxColumnsInIndex(int maxColumnsInIndex)
308 {
309 this.maxColumnsInIndex = maxColumnsInIndex;
310 }
311
312 public int getMaxColumnsInOrderBy() throws SQLException
313 {
314 return maxColumnsInOrderBy;
315 }
316
317 public void setMaxColumnsInOrderBy(int maxColumnsInOrderBy)
318 {
319 this.maxColumnsInOrderBy = maxColumnsInOrderBy;
320 }
321
322 public int getMaxColumnsInSelect() throws SQLException
323 {
324 return maxColumnsInSelect;
325 }
326
327 public void setMaxColumnsInSelect(int maxColumnsInSelect)
328 {
329 this.maxColumnsInSelect = maxColumnsInSelect;
330 }
331
332 public int getMaxColumnsInTable() throws SQLException
333 {
334 return maxColumnsInTable;
335 }
336
337 public void setMaxColumnsInTable(int maxColumnsInTable)
338 {
339 this.maxColumnsInTable = maxColumnsInTable;
340 }
341
342 public int getMaxConnections() throws SQLException
343 {
344 return maxConnections;
345 }
346
347 public void setMaxConnections(int maxConnections)
348 {
349 this.maxConnections = maxConnections;
350 }
351
352 public int getMaxCursorNameLength() throws SQLException
353 {
354 return maxCursorNameLength;
355 }
356
357 public void setMaxCursorNameLength(int maxCursorNameLength)
358 {
359 this.maxCursorNameLength = maxCursorNameLength;
360 }
361
362 public int getMaxIndexLength() throws SQLException
363 {
364 return maxIndexLength;
365 }
366
367 public void setMaxIndexLength(int maxIndexLength)
368 {
369 this.maxIndexLength = maxIndexLength;
370 }
371
372 public int getMaxProcedureNameLength() throws SQLException
373 {
374 return maxProcedureNameLength;
375 }
376
377 public void setMaxProcedureNameLength(int maxProcedureNameLength)
378 {
379 this.maxProcedureNameLength = maxProcedureNameLength;
380 }
381
382 public int getMaxRowSize() throws SQLException
383 {
384 return maxRowSize;
385 }
386
387 public void setMaxRowSize(int maxRowSize)
388 {
389 this.maxRowSize = maxRowSize;
390 }
391
392 public int getMaxSchemaNameLength() throws SQLException
393 {
394 return maxSchemaNameLength;
395 }
396
397 public void setMaxSchemaNameLength(int maxSchemaNameLength)
398 {
399 this.maxSchemaNameLength = maxSchemaNameLength;
400 }
401
402 public int getMaxStatementLength() throws SQLException
403 {
404 return maxStatementLength;
405 }
406
407 public void setMaxStatementLength(int maxStatementLength)
408 {
409 this.maxStatementLength = maxStatementLength;
410 }
411
412 public int getMaxStatements() throws SQLException
413 {
414 return maxStatements;
415 }
416
417 public void setMaxStatements(int maxStatements)
418 {
419 this.maxStatements = maxStatements;
420 }
421
422 public int getMaxTableNameLength() throws SQLException
423 {
424 return maxTableNameLength;
425 }
426
427 public void setMaxTableNameLength(int maxTableNameLength)
428 {
429 this.maxTableNameLength = maxTableNameLength;
430 }
431
432 public int getMaxTablesInSelect() throws SQLException
433 {
434 return maxTablesInSelect;
435 }
436
437 public void setMaxTablesInSelect(int maxTablesInSelect)
438 {
439 this.maxTablesInSelect = maxTablesInSelect;
440 }
441
442 public int getMaxUserNameLength() throws SQLException
443 {
444 return maxUserNameLength;
445 }
446
447 public void setMaxUserNameLength(int maxUserNameLength)
448 {
449 this.maxUserNameLength = maxUserNameLength;
450 }
451
452 public int getResultSetHoldability() throws SQLException
453 {
454 return resultSetHoldability;
455 }
456
457 public void setResultSetHoldability(int resultSetHoldability)
458 {
459 this.resultSetHoldability = resultSetHoldability;
460 }
461
462 public int getSQLStateType() throws SQLException
463 {
464 return sqlStateType;
465 }
466
467 public void setSQLStateType(int sqlStateType)
468 {
469 this.sqlStateType = sqlStateType;
470 }
471
472 public boolean allProceduresAreCallable() throws SQLException
473 {
474 return allProceduresAreCallable;
475 }
476
477 public void setAllProceduresAreCallable(boolean callable)
478 {
479 allProceduresAreCallable = callable;
480 }
481
482 public boolean allTablesAreSelectable() throws SQLException
483 {
484 return allTablesAreSelectable;
485 }
486
487 public void setAllTablesAreSelectable(boolean selectable)
488 {
489 allTablesAreSelectable = selectable;
490 }
491
492 public boolean dataDefinitionCausesTransactionCommit() throws SQLException
493 {
494 return dataDefinitionCausesTransactionCommit;
495 }
496
497 public void setDataDefinitionCausesTransactionCommit(boolean causesCommit)
498 {
499 dataDefinitionCausesTransactionCommit = causesCommit;
500 }
501
502 public boolean dataDefinitionIgnoredInTransactions() throws SQLException
503 {
504 return dataDefinitionIgnoredInTransactions;
505 }
506
507 public void setDataDefinitionIgnoredInTransactions(boolean ignored)
508 {
509 dataDefinitionIgnoredInTransactions = ignored;
510 }
511
512 public boolean doesMaxRowSizeIncludeBlobs() throws SQLException
513 {
514 return doesMaxRowSizeIncludeBlobs;
515 }
516
517 public void setDoesMaxRowSizeIncludeBlobs(boolean includeBlobs)
518 {
519 doesMaxRowSizeIncludeBlobs = includeBlobs;
520 }
521
522 public boolean isCatalogAtStart() throws SQLException
523 {
524 return isCatalogAtStart;
525 }
526
527 public void setIsCatalogAtStart(boolean isCatalogAtStart)
528 {
529 this.isCatalogAtStart = isCatalogAtStart;
530 }
531
532 public boolean isReadOnly() throws SQLException
533 {
534 return isReadOnly;
535 }
536
537 public void setIsReadOnly(boolean isReadOnly)
538 {
539 this.isReadOnly = isReadOnly;
540 }
541
542 public boolean locatorsUpdateCopy() throws SQLException
543 {
544 return locatorsUpdateCopy;
545 }
546
547 public void setLocatorsUpdateCopy(boolean locatorsUpdateCopy)
548 {
549 this.locatorsUpdateCopy = locatorsUpdateCopy;
550 }
551
552 public boolean nullPlusNonNullIsNull() throws SQLException
553 {
554 return nullPlusNonNullIsNull;
555 }
556
557 public void setNullPlusNonNullIsNull(boolean nullPlusNonNullIsNull)
558 {
559 this.nullPlusNonNullIsNull = nullPlusNonNullIsNull;
560 }
561
562 public boolean nullsAreSortedAtEnd() throws SQLException
563 {
564 return nullsAreSortedAtEnd;
565 }
566
567 public void setNullsAreSortedAtEnd(boolean nullsAreSortedAtEnd)
568 {
569 this.nullsAreSortedAtEnd = nullsAreSortedAtEnd;
570 }
571
572 public boolean nullsAreSortedAtStart() throws SQLException
573 {
574 return nullsAreSortedAtStart;
575 }
576
577 public void setNullsAreSortedAtStart(boolean nullsAreSortedAtStart)
578 {
579 this.nullsAreSortedAtStart = nullsAreSortedAtStart;
580 }
581
582 public boolean nullsAreSortedHigh() throws SQLException
583 {
584 return nullsAreSortedHigh;
585 }
586
587 public void setNullsAreSortedHigh(boolean nullsAreSortedHigh)
588 {
589 this.nullsAreSortedHigh = nullsAreSortedHigh;
590 }
591
592 public boolean nullsAreSortedLow() throws SQLException
593 {
594 return nullsAreSortedLow;
595 }
596
597 public void setNullsAreSortedLow(boolean nullsAreSortedLow)
598 {
599 this.nullsAreSortedLow = nullsAreSortedLow;
600 }
601
602 public boolean storesLowerCaseIdentifiers() throws SQLException
603 {
604 return storesLowerCaseIdentifiers;
605 }
606
607 public void setStoresLowerCaseIdentifiers(boolean storesLowerCaseIdentifiers)
608 {
609 this.storesLowerCaseIdentifiers = storesLowerCaseIdentifiers;
610 }
611
612 public boolean storesLowerCaseQuotedIdentifiers() throws SQLException
613 {
614 return storesLowerCaseQuotedIdentifiers;
615 }
616
617 public void setStoresLowerCaseQuotedIdentifiers(boolean storesLowerCaseQuotedIdentifiers)
618 {
619 this.storesLowerCaseQuotedIdentifiers = storesLowerCaseQuotedIdentifiers;
620 }
621
622 public boolean storesMixedCaseIdentifiers() throws SQLException
623 {
624 return storesMixedCaseIdentifiers;
625 }
626
627 public void setStoresMixedCaseIdentifiers(boolean storesMixedCaseIdentifiers)
628 {
629 this.storesMixedCaseIdentifiers = storesMixedCaseIdentifiers;
630 }
631
632 public boolean storesMixedCaseQuotedIdentifiers() throws SQLException
633 {
634 return storesMixedCaseQuotedIdentifiers;
635 }
636
637 public void setStoresMixedCaseQuotedIdentifiers(boolean storesMixedCaseQuotedIdentifiers)
638 {
639 this.storesMixedCaseQuotedIdentifiers = storesMixedCaseQuotedIdentifiers;
640 }
641
642 public boolean storesUpperCaseIdentifiers() throws SQLException
643 {
644 return storesUpperCaseIdentifiers;
645 }
646
647 public void setStoresUpperCaseIdentifiers(boolean storesUpperCaseIdentifiers)
648 {
649 this.storesUpperCaseIdentifiers = storesUpperCaseIdentifiers;
650 }
651
652 public boolean storesUpperCaseQuotedIdentifiers() throws SQLException
653 {
654 return storesUpperCaseQuotedIdentifiers;
655 }
656
657 public void setStoresUpperCaseQuotedIdentifiers(boolean storesUpperCaseQuotedIdentifiers)
658 {
659 this.storesUpperCaseQuotedIdentifiers = storesUpperCaseQuotedIdentifiers;
660 }
661
662 public boolean supportsANSI92EntryLevelSQL() throws SQLException
663 {
664 return supportsANSI92EntryLevelSQL;
665 }
666
667 public void setSupportsANSI92EntryLevelSQL(boolean supportsANSI92EntryLevelSQL)
668 {
669 this.supportsANSI92EntryLevelSQL = supportsANSI92EntryLevelSQL;
670 }
671
672 public boolean supportsANSI92FullSQL() throws SQLException
673 {
674 return supportsANSI92FullSQL;
675 }
676
677 public void setSupportsANSI92FullSQL(boolean supportsANSI92FullSQL)
678 {
679 this.supportsANSI92FullSQL = supportsANSI92FullSQL;
680 }
681
682 public boolean supportsANSI92IntermediateSQL() throws SQLException
683 {
684 return supportsANSI92IntermediateSQL;
685 }
686
687 public void setSupportsANSI92IntermediateSQL(boolean supportsANSI92IntermediateSQL)
688 {
689 this.supportsANSI92IntermediateSQL = supportsANSI92IntermediateSQL;
690 }
691
692 public boolean supportsAlterTableWithAddColumn() throws SQLException
693 {
694 return supportsAlterTableWithAddColumn;
695 }
696
697 public void setSupportsAlterTableWithAddColumn(boolean supportsAlterTableWithAddColumn)
698 {
699 this.supportsAlterTableWithAddColumn = supportsAlterTableWithAddColumn;
700 }
701
702 public boolean supportsAlterTableWithDropColumn() throws SQLException
703 {
704 return supportsAlterTableWithDropColumn;
705 }
706
707 public void setSupportsAlterTableWithDropColumn(boolean supportsAlterTableWithDropColumn)
708 {
709 this.supportsAlterTableWithDropColumn = supportsAlterTableWithDropColumn;
710 }
711
712 public boolean supportsBatchUpdates() throws SQLException
713 {
714 return supportsBatchUpdates;
715 }
716
717 public void setSupportsBatchUpdates(boolean supportsBatchUpdates)
718 {
719 this.supportsBatchUpdates = supportsBatchUpdates;
720 }
721
722 public boolean supportsCatalogsInDataManipulation() throws SQLException
723 {
724 return supportsCatalogsInDataManipulation;
725 }
726
727 public void setSupportsCatalogsInDataManipulation(boolean supportsCatalogsInDataManipulation)
728 {
729 this.supportsCatalogsInDataManipulation = supportsCatalogsInDataManipulation;
730 }
731
732 public boolean supportsCatalogsInIndexDefinitions() throws SQLException
733 {
734 return supportsCatalogsInIndexDefinitions;
735 }
736
737 public void setSupportsCatalogsInIndexDefinitions(boolean supportsCatalogsInIndexDefinitions)
738 {
739 this.supportsCatalogsInIndexDefinitions = supportsCatalogsInIndexDefinitions;
740 }
741
742 public boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException
743 {
744 return supportsCatalogsInPrivilegeDefinitions;
745 }
746
747 public void setSupportsCatalogsInPrivilegeDefinitions(boolean supportsCatalogsInPrivilegeDefinitions)
748 {
749 this.supportsCatalogsInPrivilegeDefinitions = supportsCatalogsInPrivilegeDefinitions;
750 }
751
752 public boolean supportsCatalogsInProcedureCalls() throws SQLException
753 {
754 return supportsCatalogsInProcedureCalls;
755 }
756
757 public void setSupportsCatalogsInProcedureCalls(boolean supportsCatalogsInProcedureCalls)
758 {
759 this.supportsCatalogsInProcedureCalls = supportsCatalogsInProcedureCalls;
760 }
761
762 public boolean supportsCatalogsInTableDefinitions() throws SQLException
763 {
764 return supportsCatalogsInTableDefinitions;
765 }
766
767 public void setSupportsCatalogsInTableDefinitions(boolean supportsCatalogsInTableDefinitions)
768 {
769 this.supportsCatalogsInTableDefinitions = supportsCatalogsInTableDefinitions;
770 }
771
772 public boolean supportsColumnAliasing() throws SQLException
773 {
774 return supportsColumnAliasing;
775 }
776
777 public void setSupportsColumnAliasing(boolean supportsColumnAliasing)
778 {
779 this.supportsColumnAliasing = supportsColumnAliasing;
780 }
781
782 public boolean supportsConvert() throws SQLException
783 {
784 return supportsConvert;
785 }
786
787 public void setSupportsConvert(boolean supportsConvert)
788 {
789 this.supportsConvert = supportsConvert;
790 }
791
792 public boolean supportsCoreSQLGrammar() throws SQLException
793 {
794 return supportsCoreSQLGrammar;
795 }
796
797 public void setSupportsCoreSQLGrammar(boolean supportsCoreSQLGrammar)
798 {
799 this.supportsCoreSQLGrammar = supportsCoreSQLGrammar;
800 }
801
802 public boolean supportsCorrelatedSubqueries() throws SQLException
803 {
804 return supportsCorrelatedSubqueries;
805 }
806
807 public void setSupportsCorrelatedSubqueries(boolean supportsCorrelatedSubqueries)
808 {
809 this.supportsCorrelatedSubqueries = supportsCorrelatedSubqueries;
810 }
811
812 public boolean supportsDataDefinitionAndDataManipulationTransactions() throws SQLException
813 {
814 return supportsDataDefinitionAndDataManipulationTransactions;
815 }
816
817 public void setSupportsDataDefinitionAndDataManipulationTransactions(boolean supportsDataDefinitionAndDataManipulationTransactions)
818 {
819 this.supportsDataDefinitionAndDataManipulationTransactions = supportsDataDefinitionAndDataManipulationTransactions;
820 }
821
822 public boolean supportsDataManipulationTransactionsOnly() throws SQLException
823 {
824 return supportsDataManipulationTransactionsOnly;
825 }
826
827 public void setSupportsDataManipulationTransactionsOnly(boolean supportsDataManipulationTransactionsOnly)
828 {
829 this.supportsDataManipulationTransactionsOnly = supportsDataManipulationTransactionsOnly;
830 }
831
832 public boolean supportsDifferentTableCorrelationNames() throws SQLException
833 {
834 return supportsDifferentTableCorrelationNames;
835 }
836
837 public void setSupportsDifferentTableCorrelationNames(boolean supportsDifferentTableCorrelationNames)
838 {
839 this.supportsDifferentTableCorrelationNames = supportsDifferentTableCorrelationNames;
840 }
841
842 public boolean supportsExpressionsInOrderBy() throws SQLException
843 {
844 return supportsExpressionsInOrderBy;
845 }
846
847 public void setSupportsExpressionsInOrderBy(boolean supportsExpressionsInOrderBy)
848 {
849 this.supportsExpressionsInOrderBy = supportsExpressionsInOrderBy;
850 }
851
852 public boolean supportsExtendedSQLGrammar() throws SQLException
853 {
854 return supportsExtendedSQLGrammar;
855 }
856
857 public void setSupportsExtendedSQLGrammar(boolean supportsExtendedSQLGrammar)
858 {
859 this.supportsExtendedSQLGrammar = supportsExtendedSQLGrammar;
860 }
861
862 public boolean supportsFullOuterJoins() throws SQLException
863 {
864 return supportsFullOuterJoins;
865 }
866
867 public void setSupportsFullOuterJoins(boolean supportsFullOuterJoins)
868 {
869 this.supportsFullOuterJoins = supportsFullOuterJoins;
870 }
871
872 public boolean supportsGetGeneratedKeys() throws SQLException
873 {
874 return supportsGetGeneratedKeys;
875 }
876
877 public void setSupportsGetGeneratedKeys(boolean supportsGetGeneratedKeys)
878 {
879 this.supportsGetGeneratedKeys = supportsGetGeneratedKeys;
880 }
881
882 public boolean supportsGroupBy() throws SQLException
883 {
884 return supportsGroupBy;
885 }
886
887 public void setSupportsGroupBy(boolean supportsGroupBy)
888 {
889 this.supportsGroupBy = supportsGroupBy;
890 }
891
892 public boolean supportsGroupByBeyondSelect() throws SQLException
893 {
894 return supportsGroupByBeyondSelect;
895 }
896
897 public void setSupportsGroupByBeyondSelect(boolean supportsGroupByBeyondSelect)
898 {
899 this.supportsGroupByBeyondSelect = supportsGroupByBeyondSelect;
900 }
901
902 public boolean supportsGroupByUnrelated() throws SQLException
903 {
904 return supportsGroupByUnrelated;
905 }
906
907 public void setSupportsGroupByUnrelated(boolean supportsGroupByUnrelated)
908 {
909 this.supportsGroupByUnrelated = supportsGroupByUnrelated;
910 }
911
912 public boolean supportsIntegrityEnhancementFacility() throws SQLException
913 {
914 return supportsIntegrityEnhancementFacility;
915 }
916
917 public void setSupportsIntegrityEnhancementFacility(boolean supportsIntegrityEnhancementFacility)
918 {
919 this.supportsIntegrityEnhancementFacility = supportsIntegrityEnhancementFacility;
920 }
921
922 public boolean supportsLikeEscapeClause() throws SQLException
923 {
924 return supportsLikeEscapeClause;
925 }
926
927 public void setSupportsLikeEscapeClause(boolean supportsLikeEscapeClause)
928 {
929 this.supportsLikeEscapeClause = supportsLikeEscapeClause;
930 }
931
932 public boolean supportsLimitedOuterJoins() throws SQLException
933 {
934 return supportsLimitedOuterJoins;
935 }
936
937 public void setSupportsLimitedOuterJoins(boolean supportsLimitedOuterJoins)
938 {
939 this.supportsLimitedOuterJoins = supportsLimitedOuterJoins;
940 }
941
942 public boolean supportsMinimumSQLGrammar() throws SQLException
943 {
944 return supportsMinimumSQLGrammar;
945 }
946
947 public void setSupportsMinimumSQLGrammar(boolean supportsMinimumSQLGrammar)
948 {
949 this.supportsMinimumSQLGrammar = supportsMinimumSQLGrammar;
950 }
951
952 public boolean supportsMixedCaseIdentifiers() throws SQLException
953 {
954 return supportsMixedCaseIdentifiers;
955 }
956
957 public void setSupportsMixedCaseIdentifiers(boolean supportsMixedCaseIdentifiers)
958 {
959 this.supportsMixedCaseIdentifiers = supportsMixedCaseIdentifiers;
960 }
961
962 public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException
963 {
964 return supportsMixedCaseQuotedIdentifiers;
965 }
966
967 public void setSupportsMixedCaseQuotedIdentifiers(boolean supportsMixedCaseQuotedIdentifiers)
968 {
969 this.supportsMixedCaseQuotedIdentifiers = supportsMixedCaseQuotedIdentifiers;
970 }
971
972 public boolean supportsMultipleOpenResults() throws SQLException
973 {
974 return supportsMultipleOpenResults;
975 }
976
977 public void setSupportsMultipleOpenResults(boolean supportsMultipleOpenResults)
978 {
979 this.supportsMultipleOpenResults = supportsMultipleOpenResults;
980 }
981
982 public boolean supportsMultipleResultSets() throws SQLException
983 {
984 return supportsMultipleResultSets;
985 }
986
987 public void setSupportsMultipleResultSets(boolean supportsMultipleResultSets)
988 {
989 this.supportsMultipleResultSets = supportsMultipleResultSets;
990 }
991
992 public boolean supportsMultipleTransactions() throws SQLException
993 {
994 return supportsMultipleTransactions;
995 }
996
997 public void setSupportsMultipleTransactions(boolean supportsMultipleTransactions)
998 {
999 this.supportsMultipleTransactions = supportsMultipleTransactions;
1000 }
1001
1002 public boolean supportsNamedParameters() throws SQLException
1003 {
1004 return supportsNamedParameters;
1005 }
1006
1007 public void setSupportsNamedParameters(boolean supportsNamedParameters)
1008 {
1009 this.supportsNamedParameters = supportsNamedParameters;
1010 }
1011
1012 public boolean supportsNonNullableColumns() throws SQLException
1013 {
1014 return supportsNonNullableColumns;
1015 }
1016
1017 public void setSupportsNonNullableColumns(boolean supportsNonNullableColumns)
1018 {
1019 this.supportsNonNullableColumns = supportsNonNullableColumns;
1020 }
1021
1022 public boolean supportsOpenCursorsAcrossCommit() throws SQLException
1023 {
1024 return supportsOpenCursorsAcrossCommit;
1025 }
1026
1027 public void setSupportsOpenCursorsAcrossCommit(boolean supportsOpenCursorsAcrossCommit)
1028 {
1029 this.supportsOpenCursorsAcrossCommit = supportsOpenCursorsAcrossCommit;
1030 }
1031
1032 public boolean supportsOpenCursorsAcrossRollback() throws SQLException
1033 {
1034 return supportsOpenCursorsAcrossRollback;
1035 }
1036
1037 public void setSupportsOpenCursorsAcrossRollback(boolean supportsOpenCursorsAcrossRollback)
1038 {
1039 this.supportsOpenCursorsAcrossRollback = supportsOpenCursorsAcrossRollback;
1040 }
1041
1042 public boolean supportsOpenStatementsAcrossCommit() throws SQLException
1043 {
1044 return supportsOpenStatementsAcrossCommit;
1045 }
1046
1047 public void setSupportsOpenStatementsAcrossCommit(boolean supportsOpenStatementsAcrossCommit)
1048 {
1049 this.supportsOpenStatementsAcrossCommit = supportsOpenStatementsAcrossCommit;
1050 }
1051
1052 public boolean supportsOpenStatementsAcrossRollback() throws SQLException
1053 {
1054 return supportsOpenStatementsAcrossRollback;
1055 }
1056
1057 public void setSupportsOpenStatementsAcrossRollback(boolean supportsOpenStatementsAcrossRollback)
1058 {
1059 this.supportsOpenStatementsAcrossRollback = supportsOpenStatementsAcrossRollback;
1060 }
1061
1062 public boolean supportsOrderByUnrelated() throws SQLException
1063 {
1064 return supportsOrderByUnrelated;
1065 }
1066
1067 public void setSupportsOrderByUnrelated(boolean supportsOrderByUnrelated)
1068 {
1069 this.supportsOrderByUnrelated = supportsOrderByUnrelated;
1070 }
1071
1072 public boolean supportsOuterJoins() throws SQLException
1073 {
1074 return supportsOuterJoins;
1075 }
1076
1077 public void setSupportsOuterJoins(boolean supportsOuterJoins)
1078 {
1079 this.supportsOuterJoins = supportsOuterJoins;
1080 }
1081
1082 public boolean supportsPositionedDelete() throws SQLException
1083 {
1084 return supportsPositionedDelete;
1085 }
1086
1087 public void setSupportsPositionedDelete(boolean supportsPositionedDelete)
1088 {
1089 this.supportsPositionedDelete = supportsPositionedDelete;
1090 }
1091
1092 public boolean supportsPositionedUpdate() throws SQLException
1093 {
1094 return supportsPositionedUpdate;
1095 }
1096
1097 public void setSupportsPositionedUpdate(boolean supportsPositionedUpdate)
1098 {
1099 this.supportsPositionedUpdate = supportsPositionedUpdate;
1100 }
1101
1102 public boolean supportsSavepoints() throws SQLException
1103 {
1104 return supportsSavepoints;
1105 }
1106
1107 public void setSupportsSavepoints(boolean supportsSavepoints)
1108 {
1109 this.supportsSavepoints = supportsSavepoints;
1110 }
1111
1112 public boolean supportsSchemasInDataManipulation() throws SQLException
1113 {
1114 return supportsSchemasInDataManipulation;
1115 }
1116
1117 public void setSupportsSchemasInDataManipulation(boolean supportsSchemasInDataManipulation)
1118 {
1119 this.supportsSchemasInDataManipulation = supportsSchemasInDataManipulation;
1120 }
1121
1122 public boolean supportsSchemasInIndexDefinitions() throws SQLException
1123 {
1124 return supportsSchemasInIndexDefinitions;
1125 }
1126
1127 public void setSupportsSchemasInIndexDefinitions(boolean supportsSchemasInIndexDefinitions)
1128 {
1129 this.supportsSchemasInIndexDefinitions = supportsSchemasInIndexDefinitions;
1130 }
1131
1132 public boolean supportsSchemasInPrivilegeDefinitions() throws SQLException
1133 {
1134 return supportsSchemasInPrivilegeDefinitions;
1135 }
1136
1137 public void setSupportsSchemasInPrivilegeDefinitions(boolean supportsSchemasInPrivilegeDefinitions)
1138 {
1139 this.supportsSchemasInPrivilegeDefinitions = supportsSchemasInPrivilegeDefinitions;
1140 }
1141
1142 public boolean supportsSchemasInProcedureCalls() throws SQLException
1143 {
1144 return supportsSchemasInProcedureCalls;
1145 }
1146
1147 public void setSupportsSchemasInProcedureCalls(boolean supportsSchemasInProcedureCalls)
1148 {
1149 this.supportsSchemasInProcedureCalls = supportsSchemasInProcedureCalls;
1150 }
1151
1152 public boolean supportsSchemasInTableDefinitions() throws SQLException
1153 {
1154 return supportsSchemasInTableDefinitions;
1155 }
1156
1157 public void setSupportsSchemasInTableDefinitions(boolean supportsSchemasInTableDefinitions)
1158 {
1159 this.supportsSchemasInTableDefinitions = supportsSchemasInTableDefinitions;
1160 }
1161
1162 public boolean supportsSelectForUpdate() throws SQLException
1163 {
1164 return supportsSelectForUpdate;
1165 }
1166
1167 public void setSupportsSelectForUpdate(boolean supportsSelectForUpdate)
1168 {
1169 this.supportsSelectForUpdate = supportsSelectForUpdate;
1170 }
1171
1172 public boolean supportsStatementPooling() throws SQLException
1173 {
1174 return supportsStatementPooling;
1175 }
1176
1177 public void setSupportsStatementPooling(boolean supportsStatementPooling)
1178 {
1179 this.supportsStatementPooling = supportsStatementPooling;
1180 }
1181
1182 public boolean supportsStoredProcedures() throws SQLException
1183 {
1184 return supportsStoredProcedures;
1185 }
1186
1187 public void setSupportsStoredProcedures(boolean supportsStoredProcedures)
1188 {
1189 this.supportsStoredProcedures = supportsStoredProcedures;
1190 }
1191
1192 public boolean supportsSubqueriesInComparisons() throws SQLException
1193 {
1194 return supportsSubqueriesInComparisons;
1195 }
1196
1197 public void setSupportsSubqueriesInComparisons(boolean supportsSubqueriesInComparisons)
1198 {
1199 this.supportsSubqueriesInComparisons = supportsSubqueriesInComparisons;
1200 }
1201
1202 public boolean supportsSubqueriesInExists() throws SQLException
1203 {
1204 return supportsSubqueriesInExists;
1205 }
1206
1207 public void setSupportsSubqueriesInExists(boolean supportsSubqueriesInExists)
1208 {
1209 this.supportsSubqueriesInExists = supportsSubqueriesInExists;
1210 }
1211
1212 public boolean supportsSubqueriesInIns() throws SQLException
1213 {
1214 return supportsSubqueriesInIns;
1215 }
1216
1217 public void setSupportsSubqueriesInIns(boolean supportsSubqueriesInIns)
1218 {
1219 this.supportsSubqueriesInIns = supportsSubqueriesInIns;
1220 }
1221
1222 public boolean supportsSubqueriesInQuantifieds() throws SQLException
1223 {
1224 return supportsSubqueriesInQuantifieds;
1225 }
1226
1227 public void setSupportsSubqueriesInQuantifieds(boolean supportsSubqueriesInQuantifieds)
1228 {
1229 this.supportsSubqueriesInQuantifieds = supportsSubqueriesInQuantifieds;
1230 }
1231
1232 public boolean supportsTableCorrelationNames() throws SQLException
1233 {
1234 return supportsTableCorrelationNames;
1235 }
1236
1237 public void setSupportsTableCorrelationNames(boolean supportsTableCorrelationNames)
1238 {
1239 this.supportsTableCorrelationNames = supportsTableCorrelationNames;
1240 }
1241
1242 public boolean supportsTransactions() throws SQLException
1243 {
1244 return supportsTransactions;
1245 }
1246
1247 public void setSupportsTransactions(boolean supportsTransactions)
1248 {
1249 this.supportsTransactions = supportsTransactions;
1250 }
1251
1252 public boolean supportsUnion() throws SQLException
1253 {
1254 return supportsUnion;
1255 }
1256
1257 public void setSupportsUnion(boolean supportsUnion)
1258 {
1259 this.supportsUnion = supportsUnion;
1260 }
1261
1262 public boolean supportsUnionAll() throws SQLException
1263 {
1264 return supportsUnionAll;
1265 }
1266
1267 public void setSupportsUnionAll(boolean supportsUnionAll)
1268 {
1269 this.supportsUnionAll = supportsUnionAll;
1270 }
1271
1272 public boolean usesLocalFilePerTable() throws SQLException
1273 {
1274 return usesLocalFilePerTable;
1275 }
1276
1277 public void setUsesLocalFilePerTable(boolean usesLocalFilePerTable)
1278 {
1279 this.usesLocalFilePerTable = usesLocalFilePerTable;
1280 }
1281
1282 public boolean usesLocalFiles() throws SQLException
1283 {
1284 return usesLocalFiles;
1285 }
1286
1287 public void setUsesLocalFiles(boolean usesLocalFiles)
1288 {
1289 this.usesLocalFiles = usesLocalFiles;
1290 }
1291
1292 public boolean deletesAreDetected(int type) throws SQLException
1293 {
1294 return deletesAreDetected;
1295 }
1296
1297 public void setDeletesAreDetected(boolean deletesAreDetected)
1298 {
1299 this.deletesAreDetected = deletesAreDetected;
1300 }
1301
1302 public boolean insertsAreDetected(int type) throws SQLException
1303 {
1304 return insertsAreDetected;
1305 }
1306
1307 public void setInsertsAreDetected(boolean insertsAreDetected)
1308 {
1309 this.insertsAreDetected = insertsAreDetected;
1310 }
1311
1312 public boolean othersDeletesAreVisible(int type) throws SQLException
1313 {
1314 return othersDeletesAreVisible;
1315 }
1316
1317 public void setOthersDeletesAreVisible(boolean othersDeletesAreVisible)
1318 {
1319 this.othersDeletesAreVisible = othersDeletesAreVisible;
1320 }
1321
1322 public boolean othersInsertsAreVisible(int type) throws SQLException
1323 {
1324 return othersInsertsAreVisible;
1325 }
1326
1327 public void setOthersInsertsAreVisible(boolean othersInsertsAreVisible)
1328 {
1329 this.othersInsertsAreVisible = othersInsertsAreVisible;
1330 }
1331
1332 public boolean othersUpdatesAreVisible(int type) throws SQLException
1333 {
1334 return othersUpdatesAreVisible;
1335 }
1336
1337 public void setOthersUpdatesAreVisible(boolean othersUpdatesAreVisible)
1338 {
1339 this.othersUpdatesAreVisible = othersUpdatesAreVisible;
1340 }
1341
1342 public boolean ownDeletesAreVisible(int type) throws SQLException
1343 {
1344 return ownDeletesAreVisible;
1345 }
1346
1347 public void setOwnDeletesAreVisible(boolean ownDeletesAreVisible)
1348 {
1349 this.ownDeletesAreVisible = ownDeletesAreVisible;
1350 }
1351
1352 public boolean ownInsertsAreVisible(int type) throws SQLException
1353 {
1354 return ownInsertsAreVisible;
1355 }
1356
1357 public void setOwnInsertsAreVisible(boolean ownInsertsAreVisible)
1358 {
1359 this.ownInsertsAreVisible = ownInsertsAreVisible;
1360 }
1361
1362 public boolean ownUpdatesAreVisible(int type) throws SQLException
1363 {
1364 return ownUpdatesAreVisible;
1365 }
1366
1367 public void setOwnUpdatesAreVisible(boolean ownUpdatesAreVisible)
1368 {
1369 this.ownUpdatesAreVisible = ownUpdatesAreVisible;
1370 }
1371
1372 public boolean supportsResultSetHoldability(int holdability) throws SQLException
1373 {
1374 return supportsResultSetHoldability;
1375 }
1376
1377 public void setSupportsResultSetHoldability(boolean supportsResultSetHoldability)
1378 {
1379 this.supportsResultSetHoldability = supportsResultSetHoldability;
1380 }
1381
1382 public boolean supportsResultSetType(int type) throws SQLException
1383 {
1384 return supportsResultSetType;
1385 }
1386
1387 public void setSupportsResultSetType(boolean supportsResultSetType)
1388 {
1389 this.supportsResultSetType = supportsResultSetType;
1390 }
1391
1392 public boolean supportsTransactionIsolationLevel(int level) throws SQLException
1393 {
1394 return supportsTransactionIsolationLevel;
1395 }
1396
1397 public void setSupportsTransactionIsolationLevel(boolean supportsTransactionIsolationLevel)
1398 {
1399 this.supportsTransactionIsolationLevel = supportsTransactionIsolationLevel;
1400 }
1401
1402 public boolean updatesAreDetected(int type) throws SQLException
1403 {
1404 return updatesAreDetected;
1405 }
1406
1407 public void setUpdatesAreDetected(boolean updatesAreDetected)
1408 {
1409 this.updatesAreDetected = updatesAreDetected;
1410 }
1411
1412 public boolean supportsConvert(int fromType, int toType) throws SQLException
1413 {
1414 return supportsConvert;
1415 }
1416
1417 public boolean supportsResultSetConcurrency(int type, int concurrency) throws SQLException
1418 {
1419 return supportsResultSetConcurrency;
1420 }
1421
1422 public void setSupportsResultSetConcurrency(boolean supportsResultSetConcurrency)
1423 {
1424 this.supportsResultSetConcurrency = supportsResultSetConcurrency;
1425 }
1426
1427 public String getCatalogSeparator() throws SQLException
1428 {
1429 return catalogSeparator;
1430 }
1431
1432 public void setCatalogSeparator(String catalogSeparator)
1433 {
1434 this.catalogSeparator = catalogSeparator;
1435 }
1436
1437 public String getCatalogTerm() throws SQLException
1438 {
1439 return catalogTerm;
1440 }
1441
1442 public void setCatalogTerm(String catalogTerm)
1443 {
1444 this.catalogTerm = catalogTerm;
1445 }
1446
1447 public String getDatabaseProductName() throws SQLException
1448 {
1449 return databaseProductName;
1450 }
1451
1452 public void setDatabaseProductName(String databaseProductName)
1453 {
1454 this.databaseProductName = databaseProductName;
1455 }
1456
1457 public String getDatabaseProductVersion() throws SQLException
1458 {
1459 return databaseProductVersion;
1460 }
1461
1462 public void setDatabaseProductVersion(String databaseProductVersion)
1463 {
1464 this.databaseProductVersion = databaseProductVersion;
1465 }
1466
1467 public String getDriverName() throws SQLException
1468 {
1469 return driverName;
1470 }
1471
1472 public void setDriverName(String driverName)
1473 {
1474 this.driverName = driverName;
1475 }
1476
1477 public String getDriverVersion() throws SQLException
1478 {
1479 return driverVersion;
1480 }
1481
1482 public void setDriverVersion(String driverVersion)
1483 {
1484 this.driverVersion = driverVersion;
1485 }
1486
1487 public String getExtraNameCharacters() throws SQLException
1488 {
1489 return extraNameCharacters;
1490 }
1491
1492 public void setExtraNameCharacters(String extraNameCharacters)
1493 {
1494 this.extraNameCharacters = extraNameCharacters;
1495 }
1496
1497 public String getIdentifierQuoteString() throws SQLException
1498 {
1499 return identifierQuoteString;
1500 }
1501
1502 public void setIdentifierQuoteString(String identifierQuoteString)
1503 {
1504 this.identifierQuoteString = identifierQuoteString;
1505 }
1506
1507 public String getNumericFunctions() throws SQLException
1508 {
1509 return numericFunctions;
1510 }
1511
1512 public void setNumericFunctions(String numericFunctions)
1513 {
1514 this.numericFunctions = numericFunctions;
1515 }
1516
1517 public String getProcedureTerm() throws SQLException
1518 {
1519 return procedureTerm;
1520 }
1521
1522 public void setProcedureTerm(String procedureTerm)
1523 {
1524 this.procedureTerm = procedureTerm;
1525 }
1526
1527 public String getSQLKeywords() throws SQLException
1528 {
1529 return sqlKeywords;
1530 }
1531
1532 public void setSQLKeywords(String sqlKeywords)
1533 {
1534 this.sqlKeywords = sqlKeywords;
1535 }
1536
1537 public String getSchemaTerm() throws SQLException
1538 {
1539 return schemaTerm;
1540 }
1541
1542 public void setSchemaTerm(String schemaTerm)
1543 {
1544 this.schemaTerm = schemaTerm;
1545 }
1546
1547 public String getSearchStringEscape() throws SQLException
1548 {
1549 return searchStringEscape;
1550 }
1551
1552 public void setSearchStringEscape(String searchStringEscape)
1553 {
1554 this.searchStringEscape = searchStringEscape;
1555 }
1556
1557 public String getStringFunctions() throws SQLException
1558 {
1559 return stringFunctions;
1560 }
1561
1562 public void setStringFunctions(String stringFunctions)
1563 {
1564 this.stringFunctions = stringFunctions;
1565 }
1566
1567 public String getSystemFunctions() throws SQLException
1568 {
1569 return systemFunctions;
1570 }
1571
1572 public void setSystemFunctions(String systemFunctions)
1573 {
1574 this.systemFunctions = systemFunctions;
1575 }
1576
1577 public String getTimeDateFunctions() throws SQLException
1578 {
1579 return timeDateFunctions;
1580 }
1581
1582 public void setTimeDateFunctions(String timeDateFunctions)
1583 {
1584 this.timeDateFunctions = timeDateFunctions;
1585 }
1586
1587 public String getURL() throws SQLException
1588 {
1589 return url;
1590 }
1591
1592 public void setURL(String url)
1593 {
1594 this.url = url;
1595 }
1596
1597 public String getUserName() throws SQLException
1598 {
1599 return userName;
1600 }
1601
1602 public void setUserName(String userName)
1603 {
1604 this.userName = userName;
1605 }
1606
1607 public Connection getConnection() throws SQLException
1608 {
1609 return connection;
1610 }
1611
1612 public void setConnection(Connection connection)
1613 {
1614 this.connection = connection;
1615 }
1616
1617 public ResultSet getCatalogs() throws SQLException
1618 {
1619 return catalogs;
1620 }
1621
1622 public void setCatalogs(ResultSet catalogs)
1623 {
1624 this.catalogs = catalogs;
1625 }
1626
1627 public ResultSet getSchemas() throws SQLException
1628 {
1629 return schemas;
1630 }
1631
1632 public void setSchemas(ResultSet schemas)
1633 {
1634 this.schemas = schemas;
1635 }
1636
1637 public ResultSet getTableTypes() throws SQLException
1638 {
1639 return tableTypes;
1640 }
1641
1642 public void setTableTypes(ResultSet tableTypes)
1643 {
1644 this.tableTypes = tableTypes;
1645 }
1646
1647 public ResultSet getTypeInfo() throws SQLException
1648 {
1649 return typeInfo;
1650 }
1651
1652 public void setTypeInfo(ResultSet typeInfo)
1653 {
1654 this.typeInfo = typeInfo;
1655 }
1656
1657 public ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException
1658 {
1659 DatabaseIdentifier expected = new DatabaseIdentifierImpl(catalog, schema, table);
1660 return findMatchingDatabaseIdentifier(expected, exportedKeysMap);
1661 }
1662
1663 public void setExportedKeys(ResultSet exportedKeys)
1664 {
1665 exportedKeysMap.put(new DatabaseIdentifierImpl(), exportedKeys);
1666 }
1667
1668 public void setExportedKeys(String catalog, String schema, String table, ResultSet exportedKeys)
1669 {
1670 exportedKeysMap.put(new DatabaseIdentifierImpl(catalog, schema, table), exportedKeys);
1671 }
1672
1673 public void clearExportedKeys()
1674 {
1675 exportedKeysMap.clear();
1676 }
1677
1678 public ResultSet getImportedKeys(String catalog, String schema, String table) throws SQLException
1679 {
1680 DatabaseIdentifier expected = new DatabaseIdentifierImpl(catalog, schema, table);
1681 return findMatchingDatabaseIdentifier(expected, importedKeysMap);
1682 }
1683
1684 public void setImportedKeys(ResultSet importedKeys)
1685 {
1686 importedKeysMap.put(new DatabaseIdentifierImpl(), importedKeys);
1687 }
1688
1689 public void setImportedKeys(String catalog, String schema, String table, ResultSet importedKeys)
1690 {
1691 importedKeysMap.put(new DatabaseIdentifierImpl(catalog, schema, table), importedKeys);
1692 }
1693
1694 public void clearImportedKeys()
1695 {
1696 importedKeysMap.clear();
1697 }
1698
1699 public ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException
1700 {
1701 DatabaseIdentifier expected = new DatabaseIdentifierImpl(catalog, schema, table);
1702 return findMatchingDatabaseIdentifier(expected, primaryKeysMap);
1703 }
1704
1705 public void setPrimaryKeys(ResultSet primaryKeys)
1706 {
1707 primaryKeysMap.put(new DatabaseIdentifierImpl(), primaryKeys);
1708 }
1709
1710 public void setPrimaryKeys(String catalog, String schema, String table, ResultSet primaryKeys)
1711 {
1712 primaryKeysMap.put(new DatabaseIdentifierImpl(catalog, schema, table), primaryKeys);
1713 }
1714
1715 public void clearPrimaryKeys()
1716 {
1717 primaryKeysMap.clear();
1718 }
1719
1720 public ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern) throws SQLException
1721 {
1722 DatabaseIdentifier expected = new DatabaseIdentifierImpl(catalog, schemaPattern, procedureNamePattern);
1723 return findMatchingDatabaseIdentifier(expected, proceduresMap);
1724 }
1725
1726 public void setProcedures(ResultSet procedures)
1727 {
1728 proceduresMap.put(new DatabaseIdentifierImpl(), procedures);
1729 }
1730
1731 public void setProcedures(String catalog, String schemaPattern, String procedureNamePattern, ResultSet procedures)
1732 {
1733 proceduresMap.put(new DatabaseIdentifierImpl(catalog, schemaPattern, procedureNamePattern), procedures);
1734 }
1735
1736 public void clearProcedures()
1737 {
1738 proceduresMap.clear();
1739 }
1740
1741 public ResultSet getSuperTables(String catalog, String schemaPattern, String tableNamePattern) throws SQLException
1742 {
1743 DatabaseIdentifier expected = new DatabaseIdentifierImpl(catalog, schemaPattern, tableNamePattern);
1744 return findMatchingDatabaseIdentifier(expected, superTablesMap);
1745 }
1746
1747 public void setSuperTables(ResultSet superTables)
1748 {
1749 superTablesMap.put(new DatabaseIdentifierImpl(), superTables);
1750 }
1751
1752 public void setSuperTables(String catalog, String schemaPattern, String tableName, ResultSet superTables)
1753 {
1754 superTablesMap.put(new DatabaseIdentifierImpl(catalog, schemaPattern, tableName), superTables);
1755 }
1756
1757 public void clearSuperTables()
1758 {
1759 superTablesMap.clear();
1760 }
1761
1762 public ResultSet getSuperTypes(String catalog, String schemaPattern, String typeNamePattern) throws SQLException
1763 {
1764 DatabaseIdentifier expected = new DatabaseIdentifierImpl(catalog, schemaPattern, typeNamePattern);
1765 return findMatchingDatabaseIdentifier(expected, superTypesMap);
1766 }
1767
1768 public void setSuperTypes(ResultSet superTypes)
1769 {
1770 superTypesMap.put(new DatabaseIdentifierImpl(), superTypes);
1771 }
1772
1773 public void setSuperTypes(String catalog, String schemaPattern, String typeNamePattern, ResultSet superTypes)
1774 {
1775 superTypesMap.put(new DatabaseIdentifierImpl(catalog, schemaPattern, typeNamePattern), superTypes);
1776 }
1777
1778 public void clearSuperTypes()
1779 {
1780 superTypesMap.clear();
1781 }
1782
1783 public ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) throws SQLException
1784 {
1785 DatabaseIdentifier expected = new DatabaseIdentifierImpl(catalog, schemaPattern, tableNamePattern);
1786 return findMatchingDatabaseIdentifier(expected, tablePrivilegesMap);
1787 }
1788
1789 public void setTablePrivileges(ResultSet tablePrivileges)
1790 {
1791 tablePrivilegesMap.put(new DatabaseIdentifierImpl(), tablePrivileges);
1792 }
1793
1794 public void setTablePrivileges(String catalog, String schemaPattern, String tableNamePattern, ResultSet tablePrivileges)
1795 {
1796 tablePrivilegesMap.put(new DatabaseIdentifierImpl(catalog, schemaPattern, tableNamePattern), tablePrivileges);
1797 }
1798
1799 public void clearTablePrivileges()
1800 {
1801 tablePrivilegesMap.clear();
1802 }
1803
1804 public ResultSet getVersionColumns(String catalog, String schema, String table) throws SQLException
1805 {
1806 DatabaseIdentifier expected = new DatabaseIdentifierImpl(catalog, schema, table);
1807 return findMatchingDatabaseIdentifier(expected, versionColumnsMap);
1808 }
1809
1810 public void setVersionColumns(ResultSet versionColumns)
1811 {
1812 versionColumnsMap.put(new DatabaseIdentifierImpl(), versionColumns);
1813 }
1814
1815 public void setVersionColumns(String catalog, String schema, String table, ResultSet versionColumns)
1816 {
1817 versionColumnsMap.put(new DatabaseIdentifierImpl(catalog, schema, table), versionColumns);
1818 }
1819
1820 public void clearVersionColumns()
1821 {
1822 versionColumnsMap.clear();
1823 }
1824
1825 public ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) throws SQLException
1826 {
1827 DatabaseIdentifier expected = new RowIdentifierDatabaseIdentifierImpl(catalog, schema, table, scope, nullable);
1828 return findMatchingDatabaseIdentifier(expected, bestRowIdentifierMap);
1829 }
1830
1831 public void setBestRowIdentifier(ResultSet bestRowIdentifier)
1832 {
1833 bestRowIdentifierMap.put(new RowIdentifierDatabaseIdentifierImpl(), bestRowIdentifier);
1834 }
1835
1836 public void setBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable, ResultSet bestRowIdentifier)
1837 {
1838 bestRowIdentifierMap.put(new RowIdentifierDatabaseIdentifierImpl(catalog, schema, table, scope, nullable), bestRowIdentifier);
1839 }
1840
1841 public void clearBestRowIdentifier()
1842 {
1843 bestRowIdentifierMap.clear();
1844 }
1845
1846 public ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) throws SQLException
1847 {
1848 DatabaseIdentifier expected = new IndexInfoDatabaseIdentifierImpl(catalog, schema, table, unique, approximate);
1849 return findMatchingDatabaseIdentifier(expected, indexInfoMap);
1850 }
1851
1852 public void setIndexInfo(ResultSet indexInfo)
1853 {
1854 indexInfoMap.put(new IndexInfoDatabaseIdentifierImpl(), indexInfo);
1855 }
1856
1857 public void setIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate, ResultSet indexInfo)
1858 {
1859 indexInfoMap.put(new IndexInfoDatabaseIdentifierImpl(catalog, schema, table, unique, approximate), indexInfo);
1860 }
1861
1862 public void clearIndexInfo()
1863 {
1864 indexInfoMap.clear();
1865 }
1866
1867 public ResultSet getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types) throws SQLException
1868 {
1869 DatabaseIdentifier expected = new UDTDatabaseIdentifierImpl(catalog, schemaPattern, typeNamePattern, types);
1870 return findMatchingDatabaseIdentifier(expected, udtsMap);
1871 }
1872
1873 public void setUDTs(ResultSet udts)
1874 {
1875 udtsMap.put(new UDTDatabaseIdentifierImpl(), udts);
1876 }
1877
1878 public void setUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types, ResultSet udts)
1879 {
1880 udtsMap.put(new UDTDatabaseIdentifierImpl(catalog, schemaPattern, typeNamePattern, types), udts);
1881 }
1882
1883 public void clearUDTs()
1884 {
1885 udtsMap.clear();
1886 }
1887
1888 public ResultSet getAttributes(String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern) throws SQLException
1889 {
1890 DatabaseIdentifier expected = new AttributesDatabaseIdentifierImpl(catalog, schemaPattern, typeNamePattern, attributeNamePattern);
1891 return findMatchingDatabaseIdentifier(expected, attributesMap);
1892 }
1893
1894 public void setAttributes(ResultSet attributes)
1895 {
1896 attributesMap.put(new AttributesDatabaseIdentifierImpl(), attributes);
1897 }
1898
1899 public void setAttributes(String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern, ResultSet attributes)
1900 {
1901 attributesMap.put(new AttributesDatabaseIdentifierImpl(catalog, schemaPattern, typeNamePattern, attributeNamePattern), attributes);
1902 }
1903
1904 public void clearAttributes()
1905 {
1906 attributesMap.clear();
1907 }
1908
1909 public ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) throws SQLException
1910 {
1911 DatabaseIdentifier expected = new ColumnDatabaseIdentifierImpl(catalog, schema, table, columnNamePattern);
1912 return findMatchingDatabaseIdentifier(expected, columnPrivilegesMap);
1913 }
1914
1915 public void setColumnPrivileges(ResultSet columnPrivileges)
1916 {
1917 columnPrivilegesMap.put(new ColumnDatabaseIdentifierImpl(), columnPrivileges);
1918 }
1919
1920 public void setColumnPrivileges(String catalog, String schema, String table, String columnNamePattern, ResultSet columnPrivileges)
1921 {
1922 columnPrivilegesMap.put(new ColumnDatabaseIdentifierImpl(catalog, schema, table, columnNamePattern), columnPrivileges);
1923 }
1924
1925 public void clearColumnPrivileges()
1926 {
1927 columnPrivilegesMap.clear();
1928 }
1929
1930 public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException
1931 {
1932 DatabaseIdentifier expected = new ColumnDatabaseIdentifierImpl(catalog, schemaPattern, tableNamePattern, columnNamePattern);
1933 return findMatchingDatabaseIdentifier(expected, columnsMap);
1934 }
1935
1936 public void setColumns(ResultSet columns)
1937 {
1938 columnsMap.put(new ColumnDatabaseIdentifierImpl(), columns);
1939 }
1940
1941 public void setColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern, ResultSet columns)
1942 {
1943 columnsMap.put(new ColumnDatabaseIdentifierImpl(catalog, schemaPattern, tableNamePattern, columnNamePattern), columns);
1944 }
1945
1946 public void clearColumns()
1947 {
1948 columnsMap.clear();
1949 }
1950
1951 public ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) throws SQLException
1952 {
1953 DatabaseIdentifier expected = new ColumnDatabaseIdentifierImpl(catalog, schemaPattern, procedureNamePattern, columnNamePattern);
1954 return findMatchingDatabaseIdentifier(expected, procedureColumnsMap);
1955 }
1956
1957 public void setProcedureColumns(ResultSet procedureColumns)
1958 {
1959 procedureColumnsMap.put(new ColumnDatabaseIdentifierImpl(), procedureColumns);
1960 }
1961
1962 public void setProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern, ResultSet procedureColumns)
1963 {
1964 procedureColumnsMap.put(new ColumnDatabaseIdentifierImpl(catalog, schemaPattern, procedureNamePattern, columnNamePattern), procedureColumns);
1965 }
1966
1967 public void clearProcedureColumns()
1968 {
1969 procedureColumnsMap.clear();
1970 }
1971
1972 public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) throws SQLException
1973 {
1974 DatabaseIdentifier expected = new TableDatabaseIdentifierImpl(catalog, schemaPattern, tableNamePattern, types);
1975 return findMatchingDatabaseIdentifier(expected, tablesMap);
1976 }
1977
1978 public void setTables(ResultSet tables)
1979 {
1980 tablesMap.put(new TableDatabaseIdentifierImpl(), tables);
1981 }
1982
1983 public void setTables(String catalog, String schemaPattern, String tableNamePattern, String[] types, ResultSet tables)
1984 {
1985 tablesMap.put(new TableDatabaseIdentifierImpl(catalog, schemaPattern, tableNamePattern, types), tables);
1986 }
1987
1988 public void clearTables()
1989 {
1990 tablesMap.clear();
1991 }
1992
1993 public ResultSet getCrossReference(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable) throws SQLException
1994 {
1995 DatabaseIdentifier identifier1 = new DatabaseIdentifierImpl(primaryCatalog, primarySchema, primaryTable);
1996 DatabaseIdentifier identifier2 = new DatabaseIdentifierImpl(foreignCatalog, foreignSchema, foreignTable);
1997 DatabaseIdentifier expected = new DatabaseIdentifierImplWrapper(identifier1, identifier2);
1998 return findMatchingDatabaseIdentifier(expected, crossReferenceMap);
1999 }
2000
2001 public void setCrossReference(ResultSet crossReference)
2002 {
2003 DatabaseIdentifier identifier1 = new DatabaseIdentifierImpl();
2004 DatabaseIdentifier identifier2 = new DatabaseIdentifierImpl();
2005 crossReferenceMap.put(new DatabaseIdentifierImplWrapper(identifier1, identifier2), crossReference);
2006 }
2007
2008 public void setCrossReference(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable, ResultSet crossReference)
2009 {
2010 DatabaseIdentifier identifier1 = new DatabaseIdentifierImpl(primaryCatalog, primarySchema, primaryTable);
2011 DatabaseIdentifier identifier2 = new DatabaseIdentifierImpl(foreignCatalog, foreignSchema, foreignTable);
2012 crossReferenceMap.put(new DatabaseIdentifierImplWrapper(identifier1, identifier2), crossReference);
2013 }
2014
2015 public void clearCrossReference()
2016 {
2017 crossReferenceMap.clear();
2018 }
2019
2020 private ResultSet findMatchingDatabaseIdentifier(DatabaseIdentifier expected, Map theMap)
2021 {
2022 Iterator keys = theMap.keySet().iterator();
2023 while(keys.hasNext())
2024 {
2025 DatabaseIdentifier next = (DatabaseIdentifier)keys.next();
2026 if(next.isGlobal() || expected.equals(next)) return (ResultSet)theMap.get(next);
2027 }
2028 return null;
2029 }
2030
2031 private interface DatabaseIdentifier
2032 {
2033 public boolean isGlobal();
2034 }
2035
2036 private class DatabaseIdentifierImpl implements DatabaseIdentifier
2037 {
2038 private boolean isGlobal;
2039 private String catalog;
2040 private String schema;
2041 private String table;
2042
2043 public DatabaseIdentifierImpl()
2044 {
2045 isGlobal = true;
2046 }
2047
2048 public DatabaseIdentifierImpl(String catalog, String schema, String table)
2049 {
2050 isGlobal = false;
2051 this.catalog = catalog;
2052 this.schema = schema;
2053 this.table = table;
2054 }
2055
2056 public String getCatalog()
2057 {
2058 return catalog;
2059 }
2060
2061 public boolean isGlobal()
2062 {
2063 return isGlobal;
2064 }
2065
2066 public String getSchema()
2067 {
2068 return schema;
2069 }
2070
2071 public String getTable()
2072 {
2073 return table;
2074 }
2075
2076 public boolean equals(Object object)
2077 {
2078 if(null == object) return false;
2079 if(!(object instanceof DatabaseIdentifierImpl)) return false;
2080 DatabaseIdentifierImpl other = (DatabaseIdentifierImpl)object;
2081 if(isGlobal != other.isGlobal()) return false;
2082 if(null != catalog && !catalog.equals(other.getCatalog())) return false;
2083 if(null != other.getCatalog() && !other.getCatalog().equals(catalog)) return false;
2084 if(null != schema && !schema.equals(other.getSchema())) return false;
2085 if(null != other.getSchema() && !other.getSchema().equals(schema)) return false;
2086 if(null != table && !table.equals(other.getTable())) return false;
2087 if(null != other.getTable() && !other.getTable().equals(table)) return false;
2088 return true;
2089 }
2090
2091 public int hashCode()
2092 {
2093 int hashCode = 0;
2094 if(null != catalog) hashCode += catalog.hashCode();
2095 if(null != schema) hashCode += schema.hashCode();
2096 if(null != table) hashCode += table.hashCode();
2097 return hashCode;
2098 }
2099 }
2100
2101 private class AttributesDatabaseIdentifierImpl extends DatabaseIdentifierImpl
2102 {
2103 private String attributeNamePattern;
2104
2105 public AttributesDatabaseIdentifierImpl()
2106 {
2107
2108 }
2109
2110 public AttributesDatabaseIdentifierImpl(String catalog, String schema, String table, String attributeNamePattern)
2111 {
2112 super(catalog, schema, table);
2113 this.attributeNamePattern = attributeNamePattern;
2114 }
2115
2116 public String getAttributeNamePattern()
2117 {
2118 return attributeNamePattern;
2119 }
2120
2121 public boolean equals(Object object)
2122 {
2123 if(!super.equals(object)) return false;
2124 if(!(object instanceof AttributesDatabaseIdentifierImpl)) return false;
2125 AttributesDatabaseIdentifierImpl other = (AttributesDatabaseIdentifierImpl)object;
2126 if(null != attributeNamePattern && !attributeNamePattern.equals(other.getAttributeNamePattern())) return false;
2127 if(null != other.getAttributeNamePattern() && !other.getAttributeNamePattern().equals(attributeNamePattern)) return false;
2128 return true;
2129 }
2130
2131 public int hashCode()
2132 {
2133 int hashCode = super.hashCode();
2134 if(null != attributeNamePattern) hashCode += attributeNamePattern.hashCode();
2135 return hashCode;
2136 }
2137 }
2138
2139 private class ColumnDatabaseIdentifierImpl extends DatabaseIdentifierImpl
2140 {
2141 private String columnNamePattern;
2142
2143 public ColumnDatabaseIdentifierImpl()
2144 {
2145
2146 }
2147
2148 public ColumnDatabaseIdentifierImpl(String catalog, String schema, String table, String columnNamePattern)
2149 {
2150 super(catalog, schema, table);
2151 this.columnNamePattern = columnNamePattern;
2152 }
2153
2154 public String getColumnNamePattern()
2155 {
2156 return columnNamePattern;
2157 }
2158
2159 public boolean equals(Object object)
2160 {
2161 if(!super.equals(object)) return false;
2162 if(!(object instanceof ColumnDatabaseIdentifierImpl)) return false;
2163 ColumnDatabaseIdentifierImpl other = (ColumnDatabaseIdentifierImpl)object;
2164 if(null != columnNamePattern && !columnNamePattern.equals(other.getColumnNamePattern())) return false;
2165 if(null != other.getColumnNamePattern() && !other.getColumnNamePattern().equals(columnNamePattern)) return false;
2166 return true;
2167 }
2168
2169 public int hashCode()
2170 {
2171 int hashCode = super.hashCode();
2172 if(null != columnNamePattern) hashCode += columnNamePattern.hashCode();
2173 return hashCode;
2174 }
2175 }
2176
2177 private class RowIdentifierDatabaseIdentifierImpl extends DatabaseIdentifierImpl
2178 {
2179 private int scope;
2180 private boolean nullable;
2181
2182 public RowIdentifierDatabaseIdentifierImpl()
2183 {
2184
2185 }
2186
2187 public RowIdentifierDatabaseIdentifierImpl(String catalog, String schema, String table, int scope, boolean nullable)
2188 {
2189 super(catalog, schema, table);
2190 this.scope = scope;
2191 this.nullable = nullable;
2192 }
2193
2194 public boolean isNullable()
2195 {
2196 return nullable;
2197 }
2198
2199 public int getScope()
2200 {
2201 return scope;
2202 }
2203
2204 public boolean equals(Object object)
2205 {
2206 if(!super.equals(object)) return false;
2207 if(!(object instanceof RowIdentifierDatabaseIdentifierImpl)) return false;
2208 RowIdentifierDatabaseIdentifierImpl other = (RowIdentifierDatabaseIdentifierImpl)object;
2209 if(scope != other.getScope()) return false;
2210 if(nullable != other.isNullable()) return false;
2211 return true;
2212 }
2213
2214 public int hashCode()
2215 {
2216 int hashCode = super.hashCode() + scope;
2217 hashCode += nullable ? 1 : 2;
2218 return hashCode;
2219 }
2220 }
2221
2222 private class IndexInfoDatabaseIdentifierImpl extends DatabaseIdentifierImpl
2223 {
2224 private boolean unique;
2225 private boolean approximate;
2226
2227 public IndexInfoDatabaseIdentifierImpl()
2228 {
2229
2230 }
2231
2232 public IndexInfoDatabaseIdentifierImpl(String catalog, String schema, String table, boolean unique, boolean approximate)
2233 {
2234 super(catalog, schema, table);
2235 this.unique = unique;
2236 this.approximate = approximate;
2237 }
2238
2239 public boolean isApproximate()
2240 {
2241 return approximate;
2242 }
2243
2244 public boolean isUnique()
2245 {
2246 return unique;
2247 }
2248
2249 public boolean equals(Object object)
2250 {
2251 if(!super.equals(object)) return false;
2252 if(!(object instanceof IndexInfoDatabaseIdentifierImpl)) return false;
2253 IndexInfoDatabaseIdentifierImpl other = (IndexInfoDatabaseIdentifierImpl)object;
2254 if(unique != other.isUnique()) return false;
2255 if(approximate != other.isApproximate()) return false;
2256 return true;
2257 }
2258
2259 public int hashCode()
2260 {
2261 int hashCode = super.hashCode();
2262 hashCode += unique ? 1 : 2;
2263 hashCode += approximate ? 3 : 4;
2264 return hashCode;
2265 }
2266 }
2267
2268 private class TableDatabaseIdentifierImpl extends DatabaseIdentifierImpl
2269 {
2270 private String[] types;
2271
2272 public TableDatabaseIdentifierImpl()
2273 {
2274
2275 }
2276
2277 public TableDatabaseIdentifierImpl(String catalog, String schema, String table, String[] types)
2278 {
2279 super(catalog, schema, table);
2280 this.types = types;
2281 }
2282
2283 public String[] getTypes()
2284 {
2285 return types;
2286 }
2287
2288 public boolean equals(Object object)
2289 {
2290 if(!super.equals(object)) return false;
2291 if(!(object instanceof TableDatabaseIdentifierImpl)) return false;
2292 TableDatabaseIdentifierImpl other = (TableDatabaseIdentifierImpl)object;
2293 if(null == types && null == other.getTypes()) return true;
2294 if(null == types) return false;
2295 if(null == other.getTypes()) return false;
2296 return Arrays.equals(types, other.getTypes());
2297 }
2298
2299 public int hashCode()
2300 {
2301 int hashCode = super.hashCode();
2302 if(null != types)
2303 {
2304 for(int ii = 0; ii < types.length; ii++)
2305 {
2306 if(null != types[ii])
2307 {
2308 hashCode += types[ii].hashCode();
2309 }
2310 }
2311 }
2312 return hashCode;
2313 }
2314 }
2315
2316 private class UDTDatabaseIdentifierImpl extends DatabaseIdentifierImpl
2317 {
2318 private int[] types;
2319
2320 public UDTDatabaseIdentifierImpl()
2321 {
2322
2323 }
2324
2325 public UDTDatabaseIdentifierImpl(String catalog, String schema, String table, int[] types)
2326 {
2327 super(catalog, schema, table);
2328 this.types = types;
2329 }
2330
2331 public int[] getTypes()
2332 {
2333 return types;
2334 }
2335
2336 public boolean equals(Object object)
2337 {
2338 if(!super.equals(object)) return false;
2339 if(!(object instanceof UDTDatabaseIdentifierImpl)) return false;
2340 UDTDatabaseIdentifierImpl other = (UDTDatabaseIdentifierImpl)object;
2341 if(null == types && null == other.getTypes()) return true;
2342 if(null == types) return false;
2343 if(null == other.getTypes()) return false;
2344 return Arrays.equals(types, other.getTypes());
2345 }
2346
2347 public int hashCode()
2348 {
2349 int hashCode = super.hashCode();
2350 if(null != types)
2351 {
2352 for(int ii = 0; ii < types.length; ii++)
2353 {
2354 hashCode += types[ii];
2355 }
2356 }
2357 return hashCode;
2358 }
2359 }
2360
2361 private class DatabaseIdentifierImplWrapper implements DatabaseIdentifier
2362 {
2363 private DatabaseIdentifier identifier1;
2364 private DatabaseIdentifier identifier2;
2365
2366 public DatabaseIdentifierImplWrapper(DatabaseIdentifier identifier1, DatabaseIdentifier identifier2)
2367 {
2368 this.identifier1 = identifier1;
2369 this.identifier2 = identifier2;
2370 }
2371
2372 public DatabaseIdentifier getIdentifier1()
2373 {
2374 return identifier1;
2375 }
2376
2377 public DatabaseIdentifier getIdentifier2()
2378 {
2379 return identifier2;
2380 }
2381
2382 public boolean isGlobal()
2383 {
2384 if(null == identifier1) return false;
2385 if(null == identifier2) return false;
2386 return (identifier1.isGlobal() && identifier1.isGlobal());
2387 }
2388
2389 public boolean equals(Object object)
2390 {
2391 if(null == object) return false;
2392 if(!(object instanceof DatabaseIdentifierImplWrapper)) return false;
2393 DatabaseIdentifierImplWrapper other = (DatabaseIdentifierImplWrapper)object;
2394 if(null != identifier1 && !identifier1.equals(other.getIdentifier1())) return false;
2395 if(null != other.getIdentifier1() && !other.getIdentifier1().equals(identifier1)) return false;
2396 if(null != identifier2 && !identifier2.equals(other.getIdentifier2())) return false;
2397 if(null != other.getIdentifier2() && !other.getIdentifier2().equals(identifier2)) return false;
2398 return true;
2399 }
2400
2401 public int hashCode()
2402 {
2403 int hashCode = 0;
2404 if(null != identifier1) hashCode += identifier1.hashCode();
2405 if(null != identifier2) hashCode += identifier2.hashCode();
2406 return hashCode;
2407 }
2408 }
2409 }