Source Code Cross Referenced for MockDatabaseMetaData.java in  » Testing » mockrunner-0.4 » com » mockrunner » mock » jdbc » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Testing » mockrunner 0.4 » com.mockrunner.mock.jdbc 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        package com.mockrunner.mock.jdbc;
0002:
0003:        import java.sql.Connection;
0004:        import java.sql.DatabaseMetaData;
0005:        import java.sql.ResultSet; //import java.sql.RowIdLifetime;
0006:        import java.sql.SQLException;
0007:        import java.util.ArrayList;
0008:        import java.util.Arrays;
0009:        import java.util.HashMap;
0010:        import java.util.Iterator;
0011:        import java.util.List;
0012:        import java.util.Map;
0013:
0014:        import com.mockrunner.util.common.StringUtil;
0015:
0016:        /**
0017:         * Mock implementation of <code>DatabaseMetaData</code>.
0018:         */
0019:        public class MockDatabaseMetaData implements  DatabaseMetaData {
0020:            private boolean caseSensitive = false;
0021:            private int databaseMajorVersion = 1;
0022:            private int databaseMinorVersion = 0;
0023:            private int defaultTransactionLevel = Connection.TRANSACTION_READ_COMMITTED;
0024:            private int driverMajorVersion = 1;
0025:            private int driverMinorVersion = 0;
0026:            private int jdbcMajorVersion = 3;
0027:            private int jdbcMinorVersion = 0;
0028:            private int maxBinaryLiteralLength = 0;
0029:            private int maxCatalogNameLength = 0;
0030:            private int maxCharLiteralLength = 0;
0031:            private int maxColumnNameLength = 0;
0032:            private int maxColumnsInGroupBy = 0;
0033:            private int maxColumnsInIndex = 0;
0034:            private int maxColumnsInOrderBy = 0;
0035:            private int maxColumnsInSelect = 0;
0036:            private int maxColumnsInTable = 0;
0037:            private int maxConnections = 0;
0038:            private int maxCursorNameLength = 0;
0039:            private int maxIndexLength = 0;
0040:            private int maxProcedureNameLength = 0;
0041:            private int maxRowSize = 0;
0042:            private int maxSchemaNameLength = 0;
0043:            private int maxStatementLength = 0;
0044:            private int maxStatements = 0;
0045:            private int maxTableNameLength = 0;
0046:            private int maxTablesInSelect = 0;
0047:            private int maxUserNameLength = 0;
0048:            private int resultSetHoldability = 1; // 1 == ResultSet.HOLD_CURSORS_OVER_COMMIT
0049:            private int sqlStateType = sqlStateSQL99;
0050:            //private RowIdLifetime rowIdLifetime = RowIdLifetime.ROWID_VALID_TRANSACTION;
0051:            private boolean autoCommitFailureClosesAllResultSets = false;
0052:            private boolean allProceduresAreCallable = true;
0053:            private boolean allTablesAreSelectable = true;
0054:            private boolean dataDefinitionCausesTransactionCommit = false;
0055:            private boolean dataDefinitionIgnoredInTransactions = false;
0056:            private boolean doesMaxRowSizeIncludeBlobs = false;
0057:            private boolean isCatalogAtStart = false;
0058:            private boolean isReadOnly = false;
0059:            private boolean locatorsUpdateCopy = false;
0060:            private boolean nullPlusNonNullIsNull = false;
0061:            private boolean nullsAreSortedAtEnd = false;
0062:            private boolean nullsAreSortedAtStart = false;
0063:            private boolean nullsAreSortedHigh = false;
0064:            private boolean nullsAreSortedLow = false;
0065:            private boolean storesLowerCaseIdentifiers = true;
0066:            private boolean storesLowerCaseQuotedIdentifiers = true;
0067:            private boolean storesMixedCaseIdentifiers = true;
0068:            private boolean storesMixedCaseQuotedIdentifiers = true;
0069:            private boolean storesUpperCaseIdentifiers = true;
0070:            private boolean storesUpperCaseQuotedIdentifiers = true;
0071:            private boolean supportsANSI92EntryLevelSQL = true;
0072:            private boolean supportsANSI92FullSQL = true;
0073:            private boolean supportsANSI92IntermediateSQL = true;
0074:            private boolean supportsAlterTableWithAddColumn = true;
0075:            private boolean supportsAlterTableWithDropColumn = true;
0076:            private boolean supportsBatchUpdates = true;
0077:            private boolean supportsCatalogsInDataManipulation = true;
0078:            private boolean supportsCatalogsInIndexDefinitions = true;
0079:            private boolean supportsCatalogsInPrivilegeDefinitions = true;
0080:            private boolean supportsCatalogsInProcedureCalls = true;
0081:            private boolean supportsCatalogsInTableDefinitions = true;
0082:            private boolean supportsColumnAliasing = true;
0083:            private boolean supportsConvert = true;
0084:            private boolean supportsCoreSQLGrammar = true;
0085:            private boolean supportsCorrelatedSubqueries = true;
0086:            private boolean supportsDataDefinitionAndDataManipulationTransactions = true;
0087:            private boolean supportsDataManipulationTransactionsOnly = false;
0088:            private boolean supportsDifferentTableCorrelationNames;
0089:            private boolean supportsExpressionsInOrderBy = true;
0090:            private boolean supportsExtendedSQLGrammar = true;
0091:            private boolean supportsFullOuterJoins = true;
0092:            private boolean supportsGetGeneratedKeys = true;
0093:            private boolean supportsGroupBy = true;
0094:            private boolean supportsGroupByBeyondSelect = true;
0095:            private boolean supportsGroupByUnrelated = true;
0096:            private boolean supportsIntegrityEnhancementFacility = true;
0097:            private boolean supportsLikeEscapeClause = true;
0098:            private boolean supportsLimitedOuterJoins = true;
0099:            private boolean supportsMinimumSQLGrammar = true;;
0100:            private boolean supportsMixedCaseIdentifiers = true;
0101:            private boolean supportsMixedCaseQuotedIdentifiers = true;
0102:            private boolean supportsMultipleOpenResults = true;
0103:            private boolean supportsMultipleResultSets = true;
0104:            private boolean supportsMultipleTransactions = true;
0105:            private boolean supportsNamedParameters = true;
0106:            private boolean supportsNonNullableColumns = true;
0107:            private boolean supportsOpenCursorsAcrossCommit = true;
0108:            private boolean supportsOpenCursorsAcrossRollback = true;
0109:            private boolean supportsOpenStatementsAcrossCommit = true;
0110:            private boolean supportsOpenStatementsAcrossRollback = true;
0111:            private boolean supportsOrderByUnrelated = true;
0112:            private boolean supportsOuterJoins = true;
0113:            private boolean supportsPositionedDelete = true;
0114:            private boolean supportsPositionedUpdate = true;
0115:            private boolean supportsSavepoints = true;
0116:            private boolean supportsSchemasInDataManipulation = true;
0117:            private boolean supportsSchemasInIndexDefinitions = true;
0118:            private boolean supportsSchemasInPrivilegeDefinitions = true;
0119:            private boolean supportsSchemasInProcedureCalls = true;
0120:            private boolean supportsSchemasInTableDefinitions = true;
0121:            private boolean supportsSelectForUpdate = true;
0122:            private boolean supportsStatementPooling = true;
0123:            private boolean supportsStoredProcedures = true;
0124:            private boolean supportsSubqueriesInComparisons = true;
0125:            private boolean supportsSubqueriesInExists = true;
0126:            private boolean supportsSubqueriesInIns = true;
0127:            private boolean supportsSubqueriesInQuantifieds = true;
0128:            private boolean supportsTableCorrelationNames = true;
0129:            private boolean supportsTransactions = true;;
0130:            private boolean supportsUnion = true;
0131:            private boolean supportsUnionAll = true;
0132:            private boolean usesLocalFilePerTable = false;
0133:            private boolean usesLocalFiles = true;
0134:            private boolean deletesAreDetected = true;
0135:            private boolean insertsAreDetected = true;
0136:            private boolean othersDeletesAreVisible = true;
0137:            private boolean othersInsertsAreVisible = true;
0138:            private boolean othersUpdatesAreVisible = true;
0139:            private boolean ownDeletesAreVisible = true;
0140:            private boolean ownInsertsAreVisible = true;
0141:            private boolean ownUpdatesAreVisible = true;
0142:            private boolean supportsResultSetHoldability = true;
0143:            private boolean supportsResultSetType = true;
0144:            private boolean supportsTransactionIsolationLevel = true;
0145:            private boolean updatesAreDetected = true;
0146:            private boolean supportsResultSetConcurrency = true;
0147:            private boolean supportsStoredFunctionsUsingCallSyntax = true;
0148:            private String catalogSeparator = ".";
0149:            private String catalogTerm = "database";
0150:            private String databaseProductName = "MockDatabase";
0151:            private String databaseProductVersion = "1.0";
0152:            private String driverName = MockDriver.class.getName();
0153:            private String driverVersion = "1.0";
0154:            private String extraNameCharacters = "";
0155:            private String identifierQuoteString = " ";
0156:            private String numericFunctions = "";
0157:            private String procedureTerm = "";
0158:            private String sqlKeywords = "";
0159:            private String schemaTerm = "";
0160:            private String searchStringEscape = "\\";
0161:            private String stringFunctions = "";
0162:            private String systemFunctions = "";
0163:            private String timeDateFunctions = "";
0164:            private String url;
0165:            private String userName;
0166:            private Connection connection;
0167:            private ResultSet catalogs;
0168:            private ResultSet tableTypes;
0169:            private ResultSet typeInfo;
0170:            private ResultSet clientInfoProperties;
0171:            private Map schemasMap = new HashMap();
0172:            private Map exportedKeysMap = new HashMap();
0173:            private Map importedKeysMap = new HashMap();
0174:            private Map primaryKeysMap = new HashMap();
0175:            private Map proceduresMap = new HashMap();
0176:            private Map functionsMap = new HashMap();
0177:            private Map super TablesMap = new HashMap();
0178:            private Map super TypesMap = new HashMap();
0179:            private Map tablePrivilegesMap = new HashMap();
0180:            private Map versionColumnsMap = new HashMap();
0181:            private Map bestRowIdentifierMap = new HashMap();
0182:            private Map indexInfoMap = new HashMap();
0183:            private Map udtsMap = new HashMap();
0184:            private Map attributesMap = new HashMap();
0185:            private Map columnPrivilegesMap = new HashMap();
0186:            private Map columnsMap = new HashMap();
0187:            private Map procedureColumnsMap = new HashMap();
0188:            private Map functionColumnsMap = new HashMap();
0189:            private Map tablesMap = new HashMap();
0190:            private Map crossReferenceMap = new HashMap();
0191:
0192:            /**
0193:             * Set if matching of catalogs, schemas, tables and columns
0194:             * is case sensitive. Defaults to <code>false</code>.
0195:             * @param caseSensitive is matching case sensitive
0196:             */
0197:            public void setCaseSensitive(boolean caseSensitive) {
0198:                this .caseSensitive = caseSensitive;
0199:            }
0200:
0201:            public int getDatabaseMajorVersion() throws SQLException {
0202:                return databaseMajorVersion;
0203:            }
0204:
0205:            public void setDatabaseMajorVersion(int version) {
0206:                databaseMajorVersion = version;
0207:            }
0208:
0209:            public int getDatabaseMinorVersion() throws SQLException {
0210:                return databaseMinorVersion;
0211:            }
0212:
0213:            public void setDatabaseMinorVersion(int version) {
0214:                databaseMinorVersion = version;
0215:            }
0216:
0217:            public int getDefaultTransactionIsolation() throws SQLException {
0218:                return defaultTransactionLevel;
0219:            }
0220:
0221:            public void setDefaultTransactionIsolation(
0222:                    int defaultTransactionLevel) {
0223:                this .defaultTransactionLevel = defaultTransactionLevel;
0224:            }
0225:
0226:            public int getDriverMajorVersion() {
0227:                return driverMajorVersion;
0228:            }
0229:
0230:            public void setDriverMajorVersion(int driverMajorVersion) {
0231:                this .driverMajorVersion = driverMajorVersion;
0232:            }
0233:
0234:            public int getDriverMinorVersion() {
0235:                return driverMinorVersion;
0236:            }
0237:
0238:            public void setDriverMinorVersion(int driverMinorVersion) {
0239:                this .driverMinorVersion = driverMinorVersion;
0240:            }
0241:
0242:            public int getJDBCMajorVersion() throws SQLException {
0243:                return jdbcMajorVersion;
0244:            }
0245:
0246:            public void setJDBCMajorVersion(int jdbcMajorVersion) {
0247:                this .jdbcMajorVersion = jdbcMajorVersion;
0248:            }
0249:
0250:            public int getJDBCMinorVersion() throws SQLException {
0251:                return jdbcMinorVersion;
0252:            }
0253:
0254:            public void setJDBCMinorVersion(int jdbcMinorVersion) {
0255:                this .jdbcMinorVersion = jdbcMinorVersion;
0256:            }
0257:
0258:            public int getMaxBinaryLiteralLength() throws SQLException {
0259:                return maxBinaryLiteralLength;
0260:            }
0261:
0262:            public void setMaxBinaryLiteralLength(int maxBinaryLiteralLength) {
0263:                this .maxBinaryLiteralLength = maxBinaryLiteralLength;
0264:            }
0265:
0266:            public int getMaxCatalogNameLength() throws SQLException {
0267:                return maxCatalogNameLength;
0268:            }
0269:
0270:            public void setetMaxCatalogNameLength(int maxCatalogNameLength) {
0271:                this .maxCatalogNameLength = maxCatalogNameLength;
0272:            }
0273:
0274:            public int getMaxCharLiteralLength() throws SQLException {
0275:                return maxCharLiteralLength;
0276:            }
0277:
0278:            public void setMaxCharLiteralLength(int maxCharLiteralLength) {
0279:                this .maxCharLiteralLength = maxCharLiteralLength;
0280:            }
0281:
0282:            public int getMaxColumnNameLength() throws SQLException {
0283:                return maxColumnNameLength;
0284:            }
0285:
0286:            public void setMaxColumnNameLength(int maxColumnNameLength) {
0287:                this .maxColumnNameLength = maxColumnNameLength;
0288:            }
0289:
0290:            public int getMaxColumnsInGroupBy() throws SQLException {
0291:                return maxColumnsInGroupBy;
0292:            }
0293:
0294:            public void setMaxColumnsInGroupBy(int maxColumnsInGroupBy) {
0295:                this .maxColumnsInGroupBy = maxColumnsInGroupBy;
0296:            }
0297:
0298:            public int getMaxColumnsInIndex() throws SQLException {
0299:                return maxColumnsInIndex;
0300:            }
0301:
0302:            public void setMaxColumnsInIndex(int maxColumnsInIndex) {
0303:                this .maxColumnsInIndex = maxColumnsInIndex;
0304:            }
0305:
0306:            public int getMaxColumnsInOrderBy() throws SQLException {
0307:                return maxColumnsInOrderBy;
0308:            }
0309:
0310:            public void setMaxColumnsInOrderBy(int maxColumnsInOrderBy) {
0311:                this .maxColumnsInOrderBy = maxColumnsInOrderBy;
0312:            }
0313:
0314:            public int getMaxColumnsInSelect() throws SQLException {
0315:                return maxColumnsInSelect;
0316:            }
0317:
0318:            public void setMaxColumnsInSelect(int maxColumnsInSelect) {
0319:                this .maxColumnsInSelect = maxColumnsInSelect;
0320:            }
0321:
0322:            public int getMaxColumnsInTable() throws SQLException {
0323:                return maxColumnsInTable;
0324:            }
0325:
0326:            public void setMaxColumnsInTable(int maxColumnsInTable) {
0327:                this .maxColumnsInTable = maxColumnsInTable;
0328:            }
0329:
0330:            public int getMaxConnections() throws SQLException {
0331:                return maxConnections;
0332:            }
0333:
0334:            public void setMaxConnections(int maxConnections) {
0335:                this .maxConnections = maxConnections;
0336:            }
0337:
0338:            public int getMaxCursorNameLength() throws SQLException {
0339:                return maxCursorNameLength;
0340:            }
0341:
0342:            public void setMaxCursorNameLength(int maxCursorNameLength) {
0343:                this .maxCursorNameLength = maxCursorNameLength;
0344:            }
0345:
0346:            public int getMaxIndexLength() throws SQLException {
0347:                return maxIndexLength;
0348:            }
0349:
0350:            public void setMaxIndexLength(int maxIndexLength) {
0351:                this .maxIndexLength = maxIndexLength;
0352:            }
0353:
0354:            public int getMaxProcedureNameLength() throws SQLException {
0355:                return maxProcedureNameLength;
0356:            }
0357:
0358:            public void setMaxProcedureNameLength(int maxProcedureNameLength) {
0359:                this .maxProcedureNameLength = maxProcedureNameLength;
0360:            }
0361:
0362:            public int getMaxRowSize() throws SQLException {
0363:                return maxRowSize;
0364:            }
0365:
0366:            public void setMaxRowSize(int maxRowSize) {
0367:                this .maxRowSize = maxRowSize;
0368:            }
0369:
0370:            public int getMaxSchemaNameLength() throws SQLException {
0371:                return maxSchemaNameLength;
0372:            }
0373:
0374:            public void setMaxSchemaNameLength(int maxSchemaNameLength) {
0375:                this .maxSchemaNameLength = maxSchemaNameLength;
0376:            }
0377:
0378:            public int getMaxStatementLength() throws SQLException {
0379:                return maxStatementLength;
0380:            }
0381:
0382:            public void setMaxStatementLength(int maxStatementLength) {
0383:                this .maxStatementLength = maxStatementLength;
0384:            }
0385:
0386:            public int getMaxStatements() throws SQLException {
0387:                return maxStatements;
0388:            }
0389:
0390:            public void setMaxStatements(int maxStatements) {
0391:                this .maxStatements = maxStatements;
0392:            }
0393:
0394:            public int getMaxTableNameLength() throws SQLException {
0395:                return maxTableNameLength;
0396:            }
0397:
0398:            public void setMaxTableNameLength(int maxTableNameLength) {
0399:                this .maxTableNameLength = maxTableNameLength;
0400:            }
0401:
0402:            public int getMaxTablesInSelect() throws SQLException {
0403:                return maxTablesInSelect;
0404:            }
0405:
0406:            public void setMaxTablesInSelect(int maxTablesInSelect) {
0407:                this .maxTablesInSelect = maxTablesInSelect;
0408:            }
0409:
0410:            public int getMaxUserNameLength() throws SQLException {
0411:                return maxUserNameLength;
0412:            }
0413:
0414:            public void setMaxUserNameLength(int maxUserNameLength) {
0415:                this .maxUserNameLength = maxUserNameLength;
0416:            }
0417:
0418:            public int getResultSetHoldability() throws SQLException {
0419:                return resultSetHoldability;
0420:            }
0421:
0422:            public void setResultSetHoldability(int resultSetHoldability) {
0423:                this .resultSetHoldability = resultSetHoldability;
0424:            }
0425:
0426:            public int getSQLStateType() throws SQLException {
0427:                return sqlStateType;
0428:            }
0429:
0430:            public void setSQLStateType(int sqlStateType) {
0431:                this .sqlStateType = sqlStateType;
0432:            }
0433:
0434:            /*public RowIdLifetime getRowIdLifetime() throws SQLException
0435:            {
0436:                return rowIdLifetime;
0437:            }*/
0438:
0439:            /*public void setRowIdLifetime(RowIdLifetime rowIdLifetime)
0440:            {
0441:                this.rowIdLifetime = rowIdLifetime;
0442:            }*/
0443:
0444:            public boolean autoCommitFailureClosesAllResultSets()
0445:                    throws SQLException {
0446:                return autoCommitFailureClosesAllResultSets;
0447:            }
0448:
0449:            public void setAutoCommitFailureClosesAllResultSets(
0450:                    boolean closesAllResultSets) {
0451:                autoCommitFailureClosesAllResultSets = closesAllResultSets;
0452:            }
0453:
0454:            public boolean allProceduresAreCallable() throws SQLException {
0455:                return allProceduresAreCallable;
0456:            }
0457:
0458:            public void setAllProceduresAreCallable(boolean callable) {
0459:                allProceduresAreCallable = callable;
0460:            }
0461:
0462:            public boolean allTablesAreSelectable() throws SQLException {
0463:                return allTablesAreSelectable;
0464:            }
0465:
0466:            public void setAllTablesAreSelectable(boolean selectable) {
0467:                allTablesAreSelectable = selectable;
0468:            }
0469:
0470:            public boolean dataDefinitionCausesTransactionCommit()
0471:                    throws SQLException {
0472:                return dataDefinitionCausesTransactionCommit;
0473:            }
0474:
0475:            public void setDataDefinitionCausesTransactionCommit(
0476:                    boolean causesCommit) {
0477:                dataDefinitionCausesTransactionCommit = causesCommit;
0478:            }
0479:
0480:            public boolean dataDefinitionIgnoredInTransactions()
0481:                    throws SQLException {
0482:                return dataDefinitionIgnoredInTransactions;
0483:            }
0484:
0485:            public void setDataDefinitionIgnoredInTransactions(boolean ignored) {
0486:                dataDefinitionIgnoredInTransactions = ignored;
0487:            }
0488:
0489:            public boolean doesMaxRowSizeIncludeBlobs() throws SQLException {
0490:                return doesMaxRowSizeIncludeBlobs;
0491:            }
0492:
0493:            public void setDoesMaxRowSizeIncludeBlobs(boolean includeBlobs) {
0494:                doesMaxRowSizeIncludeBlobs = includeBlobs;
0495:            }
0496:
0497:            public boolean isCatalogAtStart() throws SQLException {
0498:                return isCatalogAtStart;
0499:            }
0500:
0501:            public void setIsCatalogAtStart(boolean isCatalogAtStart) {
0502:                this .isCatalogAtStart = isCatalogAtStart;
0503:            }
0504:
0505:            public boolean isReadOnly() throws SQLException {
0506:                return isReadOnly;
0507:            }
0508:
0509:            public void setIsReadOnly(boolean isReadOnly) {
0510:                this .isReadOnly = isReadOnly;
0511:            }
0512:
0513:            public boolean locatorsUpdateCopy() throws SQLException {
0514:                return locatorsUpdateCopy;
0515:            }
0516:
0517:            public void setLocatorsUpdateCopy(boolean locatorsUpdateCopy) {
0518:                this .locatorsUpdateCopy = locatorsUpdateCopy;
0519:            }
0520:
0521:            public boolean nullPlusNonNullIsNull() throws SQLException {
0522:                return nullPlusNonNullIsNull;
0523:            }
0524:
0525:            public void setNullPlusNonNullIsNull(boolean nullPlusNonNullIsNull) {
0526:                this .nullPlusNonNullIsNull = nullPlusNonNullIsNull;
0527:            }
0528:
0529:            public boolean nullsAreSortedAtEnd() throws SQLException {
0530:                return nullsAreSortedAtEnd;
0531:            }
0532:
0533:            public void setNullsAreSortedAtEnd(boolean nullsAreSortedAtEnd) {
0534:                this .nullsAreSortedAtEnd = nullsAreSortedAtEnd;
0535:            }
0536:
0537:            public boolean nullsAreSortedAtStart() throws SQLException {
0538:                return nullsAreSortedAtStart;
0539:            }
0540:
0541:            public void setNullsAreSortedAtStart(boolean nullsAreSortedAtStart) {
0542:                this .nullsAreSortedAtStart = nullsAreSortedAtStart;
0543:            }
0544:
0545:            public boolean nullsAreSortedHigh() throws SQLException {
0546:                return nullsAreSortedHigh;
0547:            }
0548:
0549:            public void setNullsAreSortedHigh(boolean nullsAreSortedHigh) {
0550:                this .nullsAreSortedHigh = nullsAreSortedHigh;
0551:            }
0552:
0553:            public boolean nullsAreSortedLow() throws SQLException {
0554:                return nullsAreSortedLow;
0555:            }
0556:
0557:            public void setNullsAreSortedLow(boolean nullsAreSortedLow) {
0558:                this .nullsAreSortedLow = nullsAreSortedLow;
0559:            }
0560:
0561:            public boolean storesLowerCaseIdentifiers() throws SQLException {
0562:                return storesLowerCaseIdentifiers;
0563:            }
0564:
0565:            public void setStoresLowerCaseIdentifiers(
0566:                    boolean storesLowerCaseIdentifiers) {
0567:                this .storesLowerCaseIdentifiers = storesLowerCaseIdentifiers;
0568:            }
0569:
0570:            public boolean storesLowerCaseQuotedIdentifiers()
0571:                    throws SQLException {
0572:                return storesLowerCaseQuotedIdentifiers;
0573:            }
0574:
0575:            public void setStoresLowerCaseQuotedIdentifiers(
0576:                    boolean storesLowerCaseQuotedIdentifiers) {
0577:                this .storesLowerCaseQuotedIdentifiers = storesLowerCaseQuotedIdentifiers;
0578:            }
0579:
0580:            public boolean storesMixedCaseIdentifiers() throws SQLException {
0581:                return storesMixedCaseIdentifiers;
0582:            }
0583:
0584:            public void setStoresMixedCaseIdentifiers(
0585:                    boolean storesMixedCaseIdentifiers) {
0586:                this .storesMixedCaseIdentifiers = storesMixedCaseIdentifiers;
0587:            }
0588:
0589:            public boolean storesMixedCaseQuotedIdentifiers()
0590:                    throws SQLException {
0591:                return storesMixedCaseQuotedIdentifiers;
0592:            }
0593:
0594:            public void setStoresMixedCaseQuotedIdentifiers(
0595:                    boolean storesMixedCaseQuotedIdentifiers) {
0596:                this .storesMixedCaseQuotedIdentifiers = storesMixedCaseQuotedIdentifiers;
0597:            }
0598:
0599:            public boolean storesUpperCaseIdentifiers() throws SQLException {
0600:                return storesUpperCaseIdentifiers;
0601:            }
0602:
0603:            public void setStoresUpperCaseIdentifiers(
0604:                    boolean storesUpperCaseIdentifiers) {
0605:                this .storesUpperCaseIdentifiers = storesUpperCaseIdentifiers;
0606:            }
0607:
0608:            public boolean storesUpperCaseQuotedIdentifiers()
0609:                    throws SQLException {
0610:                return storesUpperCaseQuotedIdentifiers;
0611:            }
0612:
0613:            public void setStoresUpperCaseQuotedIdentifiers(
0614:                    boolean storesUpperCaseQuotedIdentifiers) {
0615:                this .storesUpperCaseQuotedIdentifiers = storesUpperCaseQuotedIdentifiers;
0616:            }
0617:
0618:            public boolean supportsANSI92EntryLevelSQL() throws SQLException {
0619:                return supportsANSI92EntryLevelSQL;
0620:            }
0621:
0622:            public void setSupportsANSI92EntryLevelSQL(
0623:                    boolean supportsANSI92EntryLevelSQL) {
0624:                this .supportsANSI92EntryLevelSQL = supportsANSI92EntryLevelSQL;
0625:            }
0626:
0627:            public boolean supportsANSI92FullSQL() throws SQLException {
0628:                return supportsANSI92FullSQL;
0629:            }
0630:
0631:            public void setSupportsANSI92FullSQL(boolean supportsANSI92FullSQL) {
0632:                this .supportsANSI92FullSQL = supportsANSI92FullSQL;
0633:            }
0634:
0635:            public boolean supportsANSI92IntermediateSQL() throws SQLException {
0636:                return supportsANSI92IntermediateSQL;
0637:            }
0638:
0639:            public void setSupportsANSI92IntermediateSQL(
0640:                    boolean supportsANSI92IntermediateSQL) {
0641:                this .supportsANSI92IntermediateSQL = supportsANSI92IntermediateSQL;
0642:            }
0643:
0644:            public boolean supportsAlterTableWithAddColumn()
0645:                    throws SQLException {
0646:                return supportsAlterTableWithAddColumn;
0647:            }
0648:
0649:            public void setSupportsAlterTableWithAddColumn(
0650:                    boolean supportsAlterTableWithAddColumn) {
0651:                this .supportsAlterTableWithAddColumn = supportsAlterTableWithAddColumn;
0652:            }
0653:
0654:            public boolean supportsAlterTableWithDropColumn()
0655:                    throws SQLException {
0656:                return supportsAlterTableWithDropColumn;
0657:            }
0658:
0659:            public void setSupportsAlterTableWithDropColumn(
0660:                    boolean supportsAlterTableWithDropColumn) {
0661:                this .supportsAlterTableWithDropColumn = supportsAlterTableWithDropColumn;
0662:            }
0663:
0664:            public boolean supportsBatchUpdates() throws SQLException {
0665:                return supportsBatchUpdates;
0666:            }
0667:
0668:            public void setSupportsBatchUpdates(boolean supportsBatchUpdates) {
0669:                this .supportsBatchUpdates = supportsBatchUpdates;
0670:            }
0671:
0672:            public boolean supportsCatalogsInDataManipulation()
0673:                    throws SQLException {
0674:                return supportsCatalogsInDataManipulation;
0675:            }
0676:
0677:            public void setSupportsCatalogsInDataManipulation(
0678:                    boolean supportsCatalogsInDataManipulation) {
0679:                this .supportsCatalogsInDataManipulation = supportsCatalogsInDataManipulation;
0680:            }
0681:
0682:            public boolean supportsCatalogsInIndexDefinitions()
0683:                    throws SQLException {
0684:                return supportsCatalogsInIndexDefinitions;
0685:            }
0686:
0687:            public void setSupportsCatalogsInIndexDefinitions(
0688:                    boolean supportsCatalogsInIndexDefinitions) {
0689:                this .supportsCatalogsInIndexDefinitions = supportsCatalogsInIndexDefinitions;
0690:            }
0691:
0692:            public boolean supportsCatalogsInPrivilegeDefinitions()
0693:                    throws SQLException {
0694:                return supportsCatalogsInPrivilegeDefinitions;
0695:            }
0696:
0697:            public void setSupportsCatalogsInPrivilegeDefinitions(
0698:                    boolean supportsCatalogsInPrivilegeDefinitions) {
0699:                this .supportsCatalogsInPrivilegeDefinitions = supportsCatalogsInPrivilegeDefinitions;
0700:            }
0701:
0702:            public boolean supportsCatalogsInProcedureCalls()
0703:                    throws SQLException {
0704:                return supportsCatalogsInProcedureCalls;
0705:            }
0706:
0707:            public void setSupportsCatalogsInProcedureCalls(
0708:                    boolean supportsCatalogsInProcedureCalls) {
0709:                this .supportsCatalogsInProcedureCalls = supportsCatalogsInProcedureCalls;
0710:            }
0711:
0712:            public boolean supportsCatalogsInTableDefinitions()
0713:                    throws SQLException {
0714:                return supportsCatalogsInTableDefinitions;
0715:            }
0716:
0717:            public void setSupportsCatalogsInTableDefinitions(
0718:                    boolean supportsCatalogsInTableDefinitions) {
0719:                this .supportsCatalogsInTableDefinitions = supportsCatalogsInTableDefinitions;
0720:            }
0721:
0722:            public boolean supportsColumnAliasing() throws SQLException {
0723:                return supportsColumnAliasing;
0724:            }
0725:
0726:            public void setSupportsColumnAliasing(boolean supportsColumnAliasing) {
0727:                this .supportsColumnAliasing = supportsColumnAliasing;
0728:            }
0729:
0730:            public boolean supportsConvert() throws SQLException {
0731:                return supportsConvert;
0732:            }
0733:
0734:            public void setSupportsConvert(boolean supportsConvert) {
0735:                this .supportsConvert = supportsConvert;
0736:            }
0737:
0738:            public boolean supportsCoreSQLGrammar() throws SQLException {
0739:                return supportsCoreSQLGrammar;
0740:            }
0741:
0742:            public void setSupportsCoreSQLGrammar(boolean supportsCoreSQLGrammar) {
0743:                this .supportsCoreSQLGrammar = supportsCoreSQLGrammar;
0744:            }
0745:
0746:            public boolean supportsCorrelatedSubqueries() throws SQLException {
0747:                return supportsCorrelatedSubqueries;
0748:            }
0749:
0750:            public void setSupportsCorrelatedSubqueries(
0751:                    boolean supportsCorrelatedSubqueries) {
0752:                this .supportsCorrelatedSubqueries = supportsCorrelatedSubqueries;
0753:            }
0754:
0755:            public boolean supportsDataDefinitionAndDataManipulationTransactions()
0756:                    throws SQLException {
0757:                return supportsDataDefinitionAndDataManipulationTransactions;
0758:            }
0759:
0760:            public void setSupportsDataDefinitionAndDataManipulationTransactions(
0761:                    boolean supportsDataDefinitionAndDataManipulationTransactions) {
0762:                this .supportsDataDefinitionAndDataManipulationTransactions = supportsDataDefinitionAndDataManipulationTransactions;
0763:            }
0764:
0765:            public boolean supportsDataManipulationTransactionsOnly()
0766:                    throws SQLException {
0767:                return supportsDataManipulationTransactionsOnly;
0768:            }
0769:
0770:            public void setSupportsDataManipulationTransactionsOnly(
0771:                    boolean supportsDataManipulationTransactionsOnly) {
0772:                this .supportsDataManipulationTransactionsOnly = supportsDataManipulationTransactionsOnly;
0773:            }
0774:
0775:            public boolean supportsDifferentTableCorrelationNames()
0776:                    throws SQLException {
0777:                return supportsDifferentTableCorrelationNames;
0778:            }
0779:
0780:            public void setSupportsDifferentTableCorrelationNames(
0781:                    boolean supportsDifferentTableCorrelationNames) {
0782:                this .supportsDifferentTableCorrelationNames = supportsDifferentTableCorrelationNames;
0783:            }
0784:
0785:            public boolean supportsExpressionsInOrderBy() throws SQLException {
0786:                return supportsExpressionsInOrderBy;
0787:            }
0788:
0789:            public void setSupportsExpressionsInOrderBy(
0790:                    boolean supportsExpressionsInOrderBy) {
0791:                this .supportsExpressionsInOrderBy = supportsExpressionsInOrderBy;
0792:            }
0793:
0794:            public boolean supportsExtendedSQLGrammar() throws SQLException {
0795:                return supportsExtendedSQLGrammar;
0796:            }
0797:
0798:            public void setSupportsExtendedSQLGrammar(
0799:                    boolean supportsExtendedSQLGrammar) {
0800:                this .supportsExtendedSQLGrammar = supportsExtendedSQLGrammar;
0801:            }
0802:
0803:            public boolean supportsFullOuterJoins() throws SQLException {
0804:                return supportsFullOuterJoins;
0805:            }
0806:
0807:            public void setSupportsFullOuterJoins(boolean supportsFullOuterJoins) {
0808:                this .supportsFullOuterJoins = supportsFullOuterJoins;
0809:            }
0810:
0811:            public boolean supportsGetGeneratedKeys() throws SQLException {
0812:                return supportsGetGeneratedKeys;
0813:            }
0814:
0815:            public void setSupportsGetGeneratedKeys(
0816:                    boolean supportsGetGeneratedKeys) {
0817:                this .supportsGetGeneratedKeys = supportsGetGeneratedKeys;
0818:            }
0819:
0820:            public boolean supportsGroupBy() throws SQLException {
0821:                return supportsGroupBy;
0822:            }
0823:
0824:            public void setSupportsGroupBy(boolean supportsGroupBy) {
0825:                this .supportsGroupBy = supportsGroupBy;
0826:            }
0827:
0828:            public boolean supportsGroupByBeyondSelect() throws SQLException {
0829:                return supportsGroupByBeyondSelect;
0830:            }
0831:
0832:            public void setSupportsGroupByBeyondSelect(
0833:                    boolean supportsGroupByBeyondSelect) {
0834:                this .supportsGroupByBeyondSelect = supportsGroupByBeyondSelect;
0835:            }
0836:
0837:            public boolean supportsGroupByUnrelated() throws SQLException {
0838:                return supportsGroupByUnrelated;
0839:            }
0840:
0841:            public void setSupportsGroupByUnrelated(
0842:                    boolean supportsGroupByUnrelated) {
0843:                this .supportsGroupByUnrelated = supportsGroupByUnrelated;
0844:            }
0845:
0846:            public boolean supportsIntegrityEnhancementFacility()
0847:                    throws SQLException {
0848:                return supportsIntegrityEnhancementFacility;
0849:            }
0850:
0851:            public void setSupportsIntegrityEnhancementFacility(
0852:                    boolean supportsIntegrityEnhancementFacility) {
0853:                this .supportsIntegrityEnhancementFacility = supportsIntegrityEnhancementFacility;
0854:            }
0855:
0856:            public boolean supportsLikeEscapeClause() throws SQLException {
0857:                return supportsLikeEscapeClause;
0858:            }
0859:
0860:            public void setSupportsLikeEscapeClause(
0861:                    boolean supportsLikeEscapeClause) {
0862:                this .supportsLikeEscapeClause = supportsLikeEscapeClause;
0863:            }
0864:
0865:            public boolean supportsLimitedOuterJoins() throws SQLException {
0866:                return supportsLimitedOuterJoins;
0867:            }
0868:
0869:            public void setSupportsLimitedOuterJoins(
0870:                    boolean supportsLimitedOuterJoins) {
0871:                this .supportsLimitedOuterJoins = supportsLimitedOuterJoins;
0872:            }
0873:
0874:            public boolean supportsMinimumSQLGrammar() throws SQLException {
0875:                return supportsMinimumSQLGrammar;
0876:            }
0877:
0878:            public void setSupportsMinimumSQLGrammar(
0879:                    boolean supportsMinimumSQLGrammar) {
0880:                this .supportsMinimumSQLGrammar = supportsMinimumSQLGrammar;
0881:            }
0882:
0883:            public boolean supportsMixedCaseIdentifiers() throws SQLException {
0884:                return supportsMixedCaseIdentifiers;
0885:            }
0886:
0887:            public void setSupportsMixedCaseIdentifiers(
0888:                    boolean supportsMixedCaseIdentifiers) {
0889:                this .supportsMixedCaseIdentifiers = supportsMixedCaseIdentifiers;
0890:            }
0891:
0892:            public boolean supportsMixedCaseQuotedIdentifiers()
0893:                    throws SQLException {
0894:                return supportsMixedCaseQuotedIdentifiers;
0895:            }
0896:
0897:            public void setSupportsMixedCaseQuotedIdentifiers(
0898:                    boolean supportsMixedCaseQuotedIdentifiers) {
0899:                this .supportsMixedCaseQuotedIdentifiers = supportsMixedCaseQuotedIdentifiers;
0900:            }
0901:
0902:            public boolean supportsMultipleOpenResults() throws SQLException {
0903:                return supportsMultipleOpenResults;
0904:            }
0905:
0906:            public void setSupportsMultipleOpenResults(
0907:                    boolean supportsMultipleOpenResults) {
0908:                this .supportsMultipleOpenResults = supportsMultipleOpenResults;
0909:            }
0910:
0911:            public boolean supportsMultipleResultSets() throws SQLException {
0912:                return supportsMultipleResultSets;
0913:            }
0914:
0915:            public void setSupportsMultipleResultSets(
0916:                    boolean supportsMultipleResultSets) {
0917:                this .supportsMultipleResultSets = supportsMultipleResultSets;
0918:            }
0919:
0920:            public boolean supportsMultipleTransactions() throws SQLException {
0921:                return supportsMultipleTransactions;
0922:            }
0923:
0924:            public void setSupportsMultipleTransactions(
0925:                    boolean supportsMultipleTransactions) {
0926:                this .supportsMultipleTransactions = supportsMultipleTransactions;
0927:            }
0928:
0929:            public boolean supportsNamedParameters() throws SQLException {
0930:                return supportsNamedParameters;
0931:            }
0932:
0933:            public void setSupportsNamedParameters(
0934:                    boolean supportsNamedParameters) {
0935:                this .supportsNamedParameters = supportsNamedParameters;
0936:            }
0937:
0938:            public boolean supportsNonNullableColumns() throws SQLException {
0939:                return supportsNonNullableColumns;
0940:            }
0941:
0942:            public void setSupportsNonNullableColumns(
0943:                    boolean supportsNonNullableColumns) {
0944:                this .supportsNonNullableColumns = supportsNonNullableColumns;
0945:            }
0946:
0947:            public boolean supportsOpenCursorsAcrossCommit()
0948:                    throws SQLException {
0949:                return supportsOpenCursorsAcrossCommit;
0950:            }
0951:
0952:            public void setSupportsOpenCursorsAcrossCommit(
0953:                    boolean supportsOpenCursorsAcrossCommit) {
0954:                this .supportsOpenCursorsAcrossCommit = supportsOpenCursorsAcrossCommit;
0955:            }
0956:
0957:            public boolean supportsOpenCursorsAcrossRollback()
0958:                    throws SQLException {
0959:                return supportsOpenCursorsAcrossRollback;
0960:            }
0961:
0962:            public void setSupportsOpenCursorsAcrossRollback(
0963:                    boolean supportsOpenCursorsAcrossRollback) {
0964:                this .supportsOpenCursorsAcrossRollback = supportsOpenCursorsAcrossRollback;
0965:            }
0966:
0967:            public boolean supportsOpenStatementsAcrossCommit()
0968:                    throws SQLException {
0969:                return supportsOpenStatementsAcrossCommit;
0970:            }
0971:
0972:            public void setSupportsOpenStatementsAcrossCommit(
0973:                    boolean supportsOpenStatementsAcrossCommit) {
0974:                this .supportsOpenStatementsAcrossCommit = supportsOpenStatementsAcrossCommit;
0975:            }
0976:
0977:            public boolean supportsOpenStatementsAcrossRollback()
0978:                    throws SQLException {
0979:                return supportsOpenStatementsAcrossRollback;
0980:            }
0981:
0982:            public void setSupportsOpenStatementsAcrossRollback(
0983:                    boolean supportsOpenStatementsAcrossRollback) {
0984:                this .supportsOpenStatementsAcrossRollback = supportsOpenStatementsAcrossRollback;
0985:            }
0986:
0987:            public boolean supportsOrderByUnrelated() throws SQLException {
0988:                return supportsOrderByUnrelated;
0989:            }
0990:
0991:            public void setSupportsOrderByUnrelated(
0992:                    boolean supportsOrderByUnrelated) {
0993:                this .supportsOrderByUnrelated = supportsOrderByUnrelated;
0994:            }
0995:
0996:            public boolean supportsOuterJoins() throws SQLException {
0997:                return supportsOuterJoins;
0998:            }
0999:
1000:            public void setSupportsOuterJoins(boolean supportsOuterJoins) {
1001:                this .supportsOuterJoins = supportsOuterJoins;
1002:            }
1003:
1004:            public boolean supportsPositionedDelete() throws SQLException {
1005:                return supportsPositionedDelete;
1006:            }
1007:
1008:            public void setSupportsPositionedDelete(
1009:                    boolean supportsPositionedDelete) {
1010:                this .supportsPositionedDelete = supportsPositionedDelete;
1011:            }
1012:
1013:            public boolean supportsPositionedUpdate() throws SQLException {
1014:                return supportsPositionedUpdate;
1015:            }
1016:
1017:            public void setSupportsPositionedUpdate(
1018:                    boolean supportsPositionedUpdate) {
1019:                this .supportsPositionedUpdate = supportsPositionedUpdate;
1020:            }
1021:
1022:            public boolean supportsSavepoints() throws SQLException {
1023:                return supportsSavepoints;
1024:            }
1025:
1026:            public void setSupportsSavepoints(boolean supportsSavepoints) {
1027:                this .supportsSavepoints = supportsSavepoints;
1028:            }
1029:
1030:            public boolean supportsSchemasInDataManipulation()
1031:                    throws SQLException {
1032:                return supportsSchemasInDataManipulation;
1033:            }
1034:
1035:            public void setSupportsSchemasInDataManipulation(
1036:                    boolean supportsSchemasInDataManipulation) {
1037:                this .supportsSchemasInDataManipulation = supportsSchemasInDataManipulation;
1038:            }
1039:
1040:            public boolean supportsSchemasInIndexDefinitions()
1041:                    throws SQLException {
1042:                return supportsSchemasInIndexDefinitions;
1043:            }
1044:
1045:            public void setSupportsSchemasInIndexDefinitions(
1046:                    boolean supportsSchemasInIndexDefinitions) {
1047:                this .supportsSchemasInIndexDefinitions = supportsSchemasInIndexDefinitions;
1048:            }
1049:
1050:            public boolean supportsSchemasInPrivilegeDefinitions()
1051:                    throws SQLException {
1052:                return supportsSchemasInPrivilegeDefinitions;
1053:            }
1054:
1055:            public void setSupportsSchemasInPrivilegeDefinitions(
1056:                    boolean supportsSchemasInPrivilegeDefinitions) {
1057:                this .supportsSchemasInPrivilegeDefinitions = supportsSchemasInPrivilegeDefinitions;
1058:            }
1059:
1060:            public boolean supportsSchemasInProcedureCalls()
1061:                    throws SQLException {
1062:                return supportsSchemasInProcedureCalls;
1063:            }
1064:
1065:            public void setSupportsSchemasInProcedureCalls(
1066:                    boolean supportsSchemasInProcedureCalls) {
1067:                this .supportsSchemasInProcedureCalls = supportsSchemasInProcedureCalls;
1068:            }
1069:
1070:            public boolean supportsSchemasInTableDefinitions()
1071:                    throws SQLException {
1072:                return supportsSchemasInTableDefinitions;
1073:            }
1074:
1075:            public void setSupportsSchemasInTableDefinitions(
1076:                    boolean supportsSchemasInTableDefinitions) {
1077:                this .supportsSchemasInTableDefinitions = supportsSchemasInTableDefinitions;
1078:            }
1079:
1080:            public boolean supportsSelectForUpdate() throws SQLException {
1081:                return supportsSelectForUpdate;
1082:            }
1083:
1084:            public void setSupportsSelectForUpdate(
1085:                    boolean supportsSelectForUpdate) {
1086:                this .supportsSelectForUpdate = supportsSelectForUpdate;
1087:            }
1088:
1089:            public boolean supportsStatementPooling() throws SQLException {
1090:                return supportsStatementPooling;
1091:            }
1092:
1093:            public void setSupportsStatementPooling(
1094:                    boolean supportsStatementPooling) {
1095:                this .supportsStatementPooling = supportsStatementPooling;
1096:            }
1097:
1098:            public boolean supportsStoredProcedures() throws SQLException {
1099:                return supportsStoredProcedures;
1100:            }
1101:
1102:            public void setSupportsStoredProcedures(
1103:                    boolean supportsStoredProcedures) {
1104:                this .supportsStoredProcedures = supportsStoredProcedures;
1105:            }
1106:
1107:            public boolean supportsSubqueriesInComparisons()
1108:                    throws SQLException {
1109:                return supportsSubqueriesInComparisons;
1110:            }
1111:
1112:            public void setSupportsSubqueriesInComparisons(
1113:                    boolean supportsSubqueriesInComparisons) {
1114:                this .supportsSubqueriesInComparisons = supportsSubqueriesInComparisons;
1115:            }
1116:
1117:            public boolean supportsSubqueriesInExists() throws SQLException {
1118:                return supportsSubqueriesInExists;
1119:            }
1120:
1121:            public void setSupportsSubqueriesInExists(
1122:                    boolean supportsSubqueriesInExists) {
1123:                this .supportsSubqueriesInExists = supportsSubqueriesInExists;
1124:            }
1125:
1126:            public boolean supportsSubqueriesInIns() throws SQLException {
1127:                return supportsSubqueriesInIns;
1128:            }
1129:
1130:            public void setSupportsSubqueriesInIns(
1131:                    boolean supportsSubqueriesInIns) {
1132:                this .supportsSubqueriesInIns = supportsSubqueriesInIns;
1133:            }
1134:
1135:            public boolean supportsSubqueriesInQuantifieds()
1136:                    throws SQLException {
1137:                return supportsSubqueriesInQuantifieds;
1138:            }
1139:
1140:            public void setSupportsSubqueriesInQuantifieds(
1141:                    boolean supportsSubqueriesInQuantifieds) {
1142:                this .supportsSubqueriesInQuantifieds = supportsSubqueriesInQuantifieds;
1143:            }
1144:
1145:            public boolean supportsTableCorrelationNames() throws SQLException {
1146:                return supportsTableCorrelationNames;
1147:            }
1148:
1149:            public void setSupportsTableCorrelationNames(
1150:                    boolean supportsTableCorrelationNames) {
1151:                this .supportsTableCorrelationNames = supportsTableCorrelationNames;
1152:            }
1153:
1154:            public boolean supportsTransactions() throws SQLException {
1155:                return supportsTransactions;
1156:            }
1157:
1158:            public void setSupportsTransactions(boolean supportsTransactions) {
1159:                this .supportsTransactions = supportsTransactions;
1160:            }
1161:
1162:            public boolean supportsUnion() throws SQLException {
1163:                return supportsUnion;
1164:            }
1165:
1166:            public void setSupportsUnion(boolean supportsUnion) {
1167:                this .supportsUnion = supportsUnion;
1168:            }
1169:
1170:            public boolean supportsUnionAll() throws SQLException {
1171:                return supportsUnionAll;
1172:            }
1173:
1174:            public void setSupportsUnionAll(boolean supportsUnionAll) {
1175:                this .supportsUnionAll = supportsUnionAll;
1176:            }
1177:
1178:            public boolean usesLocalFilePerTable() throws SQLException {
1179:                return usesLocalFilePerTable;
1180:            }
1181:
1182:            public void setUsesLocalFilePerTable(boolean usesLocalFilePerTable) {
1183:                this .usesLocalFilePerTable = usesLocalFilePerTable;
1184:            }
1185:
1186:            public boolean usesLocalFiles() throws SQLException {
1187:                return usesLocalFiles;
1188:            }
1189:
1190:            public void setUsesLocalFiles(boolean usesLocalFiles) {
1191:                this .usesLocalFiles = usesLocalFiles;
1192:            }
1193:
1194:            public boolean deletesAreDetected(int type) throws SQLException {
1195:                return deletesAreDetected;
1196:            }
1197:
1198:            public void setDeletesAreDetected(boolean deletesAreDetected) {
1199:                this .deletesAreDetected = deletesAreDetected;
1200:            }
1201:
1202:            public boolean insertsAreDetected(int type) throws SQLException {
1203:                return insertsAreDetected;
1204:            }
1205:
1206:            public void setInsertsAreDetected(boolean insertsAreDetected) {
1207:                this .insertsAreDetected = insertsAreDetected;
1208:            }
1209:
1210:            public boolean othersDeletesAreVisible(int type)
1211:                    throws SQLException {
1212:                return othersDeletesAreVisible;
1213:            }
1214:
1215:            public void setOthersDeletesAreVisible(
1216:                    boolean othersDeletesAreVisible) {
1217:                this .othersDeletesAreVisible = othersDeletesAreVisible;
1218:            }
1219:
1220:            public boolean othersInsertsAreVisible(int type)
1221:                    throws SQLException {
1222:                return othersInsertsAreVisible;
1223:            }
1224:
1225:            public void setOthersInsertsAreVisible(
1226:                    boolean othersInsertsAreVisible) {
1227:                this .othersInsertsAreVisible = othersInsertsAreVisible;
1228:            }
1229:
1230:            public boolean othersUpdatesAreVisible(int type)
1231:                    throws SQLException {
1232:                return othersUpdatesAreVisible;
1233:            }
1234:
1235:            public void setOthersUpdatesAreVisible(
1236:                    boolean othersUpdatesAreVisible) {
1237:                this .othersUpdatesAreVisible = othersUpdatesAreVisible;
1238:            }
1239:
1240:            public boolean ownDeletesAreVisible(int type) throws SQLException {
1241:                return ownDeletesAreVisible;
1242:            }
1243:
1244:            public void setOwnDeletesAreVisible(boolean ownDeletesAreVisible) {
1245:                this .ownDeletesAreVisible = ownDeletesAreVisible;
1246:            }
1247:
1248:            public boolean ownInsertsAreVisible(int type) throws SQLException {
1249:                return ownInsertsAreVisible;
1250:            }
1251:
1252:            public void setOwnInsertsAreVisible(boolean ownInsertsAreVisible) {
1253:                this .ownInsertsAreVisible = ownInsertsAreVisible;
1254:            }
1255:
1256:            public boolean ownUpdatesAreVisible(int type) throws SQLException {
1257:                return ownUpdatesAreVisible;
1258:            }
1259:
1260:            public void setOwnUpdatesAreVisible(boolean ownUpdatesAreVisible) {
1261:                this .ownUpdatesAreVisible = ownUpdatesAreVisible;
1262:            }
1263:
1264:            public boolean supportsResultSetHoldability(int holdability)
1265:                    throws SQLException {
1266:                return supportsResultSetHoldability;
1267:            }
1268:
1269:            public void setSupportsResultSetHoldability(
1270:                    boolean supportsResultSetHoldability) {
1271:                this .supportsResultSetHoldability = supportsResultSetHoldability;
1272:            }
1273:
1274:            public boolean supportsResultSetType(int type) throws SQLException {
1275:                return supportsResultSetType;
1276:            }
1277:
1278:            public void setSupportsResultSetType(boolean supportsResultSetType) {
1279:                this .supportsResultSetType = supportsResultSetType;
1280:            }
1281:
1282:            public boolean supportsTransactionIsolationLevel(int level)
1283:                    throws SQLException {
1284:                return supportsTransactionIsolationLevel;
1285:            }
1286:
1287:            public void setSupportsTransactionIsolationLevel(
1288:                    boolean supportsTransactionIsolationLevel) {
1289:                this .supportsTransactionIsolationLevel = supportsTransactionIsolationLevel;
1290:            }
1291:
1292:            public boolean updatesAreDetected(int type) throws SQLException {
1293:                return updatesAreDetected;
1294:            }
1295:
1296:            public void setUpdatesAreDetected(boolean updatesAreDetected) {
1297:                this .updatesAreDetected = updatesAreDetected;
1298:            }
1299:
1300:            public boolean supportsConvert(int fromType, int toType)
1301:                    throws SQLException {
1302:                return supportsConvert;
1303:            }
1304:
1305:            public boolean supportsResultSetConcurrency(int type,
1306:                    int concurrency) throws SQLException {
1307:                return supportsResultSetConcurrency;
1308:            }
1309:
1310:            public void setSupportsResultSetConcurrency(
1311:                    boolean supportsResultSetConcurrency) {
1312:                this .supportsResultSetConcurrency = supportsResultSetConcurrency;
1313:            }
1314:
1315:            public boolean supportsStoredFunctionsUsingCallSyntax()
1316:                    throws SQLException {
1317:                return supportsStoredFunctionsUsingCallSyntax;
1318:            }
1319:
1320:            public void setSupportsStoredFunctionsUsingCallSyntax(
1321:                    boolean supportsStoredFunctions) {
1322:                supportsStoredFunctionsUsingCallSyntax = supportsStoredFunctions;
1323:            }
1324:
1325:            public String getCatalogSeparator() throws SQLException {
1326:                return catalogSeparator;
1327:            }
1328:
1329:            public void setCatalogSeparator(String catalogSeparator) {
1330:                this .catalogSeparator = catalogSeparator;
1331:            }
1332:
1333:            public String getCatalogTerm() throws SQLException {
1334:                return catalogTerm;
1335:            }
1336:
1337:            public void setCatalogTerm(String catalogTerm) {
1338:                this .catalogTerm = catalogTerm;
1339:            }
1340:
1341:            public String getDatabaseProductName() throws SQLException {
1342:                return databaseProductName;
1343:            }
1344:
1345:            public void setDatabaseProductName(String databaseProductName) {
1346:                this .databaseProductName = databaseProductName;
1347:            }
1348:
1349:            public String getDatabaseProductVersion() throws SQLException {
1350:                return databaseProductVersion;
1351:            }
1352:
1353:            public void setDatabaseProductVersion(String databaseProductVersion) {
1354:                this .databaseProductVersion = databaseProductVersion;
1355:            }
1356:
1357:            public String getDriverName() throws SQLException {
1358:                return driverName;
1359:            }
1360:
1361:            public void setDriverName(String driverName) {
1362:                this .driverName = driverName;
1363:            }
1364:
1365:            public String getDriverVersion() throws SQLException {
1366:                return driverVersion;
1367:            }
1368:
1369:            public void setDriverVersion(String driverVersion) {
1370:                this .driverVersion = driverVersion;
1371:            }
1372:
1373:            public String getExtraNameCharacters() throws SQLException {
1374:                return extraNameCharacters;
1375:            }
1376:
1377:            public void setExtraNameCharacters(String extraNameCharacters) {
1378:                this .extraNameCharacters = extraNameCharacters;
1379:            }
1380:
1381:            public String getIdentifierQuoteString() throws SQLException {
1382:                return identifierQuoteString;
1383:            }
1384:
1385:            public void setIdentifierQuoteString(String identifierQuoteString) {
1386:                this .identifierQuoteString = identifierQuoteString;
1387:            }
1388:
1389:            public String getNumericFunctions() throws SQLException {
1390:                return numericFunctions;
1391:            }
1392:
1393:            public void setNumericFunctions(String numericFunctions) {
1394:                this .numericFunctions = numericFunctions;
1395:            }
1396:
1397:            public String getProcedureTerm() throws SQLException {
1398:                return procedureTerm;
1399:            }
1400:
1401:            public void setProcedureTerm(String procedureTerm) {
1402:                this .procedureTerm = procedureTerm;
1403:            }
1404:
1405:            public String getSQLKeywords() throws SQLException {
1406:                return sqlKeywords;
1407:            }
1408:
1409:            public void setSQLKeywords(String sqlKeywords) {
1410:                this .sqlKeywords = sqlKeywords;
1411:            }
1412:
1413:            public String getSchemaTerm() throws SQLException {
1414:                return schemaTerm;
1415:            }
1416:
1417:            public void setSchemaTerm(String schemaTerm) {
1418:                this .schemaTerm = schemaTerm;
1419:            }
1420:
1421:            public String getSearchStringEscape() throws SQLException {
1422:                return searchStringEscape;
1423:            }
1424:
1425:            public void setSearchStringEscape(String searchStringEscape) {
1426:                this .searchStringEscape = searchStringEscape;
1427:            }
1428:
1429:            public String getStringFunctions() throws SQLException {
1430:                return stringFunctions;
1431:            }
1432:
1433:            public void setStringFunctions(String stringFunctions) {
1434:                this .stringFunctions = stringFunctions;
1435:            }
1436:
1437:            public String getSystemFunctions() throws SQLException {
1438:                return systemFunctions;
1439:            }
1440:
1441:            public void setSystemFunctions(String systemFunctions) {
1442:                this .systemFunctions = systemFunctions;
1443:            }
1444:
1445:            public String getTimeDateFunctions() throws SQLException {
1446:                return timeDateFunctions;
1447:            }
1448:
1449:            public void setTimeDateFunctions(String timeDateFunctions) {
1450:                this .timeDateFunctions = timeDateFunctions;
1451:            }
1452:
1453:            public String getURL() throws SQLException {
1454:                return url;
1455:            }
1456:
1457:            public void setURL(String url) {
1458:                this .url = url;
1459:            }
1460:
1461:            public String getUserName() throws SQLException {
1462:                return userName;
1463:            }
1464:
1465:            public void setUserName(String userName) {
1466:                this .userName = userName;
1467:            }
1468:
1469:            public Connection getConnection() throws SQLException {
1470:                return connection;
1471:            }
1472:
1473:            public void setConnection(Connection connection) {
1474:                this .connection = connection;
1475:            }
1476:
1477:            public ResultSet getCatalogs() throws SQLException {
1478:                return catalogs;
1479:            }
1480:
1481:            public void setCatalogs(ResultSet catalogs) {
1482:                this .catalogs = catalogs;
1483:            }
1484:
1485:            public ResultSet getSchemas() throws SQLException {
1486:                return getAll(schemasMap);
1487:            }
1488:
1489:            public ResultSet getSchemas(String catalog, String schemaPattern)
1490:                    throws SQLException {
1491:                DatabaseIdentifier expected = new DatabaseIdentifierImpl(
1492:                        catalog, schemaPattern, "", true, false);
1493:                return findMatchingDatabaseIdentifier(expected, schemasMap);
1494:            }
1495:
1496:            public void setSchemas(ResultSet schemas) {
1497:                schemasMap.put(new DatabaseIdentifierImpl(), schemas);
1498:            }
1499:
1500:            public void setSchemas(String catalog, String schemaPattern,
1501:                    ResultSet schemas) {
1502:                schemasMap.put(new DatabaseIdentifierImpl(catalog,
1503:                        schemaPattern, ""), schemas);
1504:            }
1505:
1506:            public void clearSchemas() {
1507:                schemasMap.clear();
1508:            }
1509:
1510:            public ResultSet getTableTypes() throws SQLException {
1511:                return tableTypes;
1512:            }
1513:
1514:            public void setTableTypes(ResultSet tableTypes) {
1515:                this .tableTypes = tableTypes;
1516:            }
1517:
1518:            public ResultSet getTypeInfo() throws SQLException {
1519:                return typeInfo;
1520:            }
1521:
1522:            public void setTypeInfo(ResultSet typeInfo) {
1523:                this .typeInfo = typeInfo;
1524:            }
1525:
1526:            public ResultSet getClientInfoProperties() throws SQLException {
1527:                return clientInfoProperties;
1528:            }
1529:
1530:            public void setClientInfoProperties(ResultSet clientInfoProperties) {
1531:                this .clientInfoProperties = clientInfoProperties;
1532:            }
1533:
1534:            public ResultSet getExportedKeys(String catalog, String schema,
1535:                    String table) throws SQLException {
1536:                DatabaseIdentifier expected = new DatabaseIdentifierImpl(
1537:                        catalog, schema, table);
1538:                return findMatchingDatabaseIdentifier(expected, exportedKeysMap);
1539:            }
1540:
1541:            public void setExportedKeys(ResultSet exportedKeys) {
1542:                exportedKeysMap.put(new DatabaseIdentifierImpl(), exportedKeys);
1543:            }
1544:
1545:            public void setExportedKeys(String catalog, String schema,
1546:                    String table, ResultSet exportedKeys) {
1547:                exportedKeysMap.put(new DatabaseIdentifierImpl(catalog, schema,
1548:                        table), exportedKeys);
1549:            }
1550:
1551:            public void clearExportedKeys() {
1552:                exportedKeysMap.clear();
1553:            }
1554:
1555:            public ResultSet getImportedKeys(String catalog, String schema,
1556:                    String table) throws SQLException {
1557:                DatabaseIdentifier expected = new DatabaseIdentifierImpl(
1558:                        catalog, schema, table);
1559:                return findMatchingDatabaseIdentifier(expected, importedKeysMap);
1560:            }
1561:
1562:            public void setImportedKeys(ResultSet importedKeys) {
1563:                importedKeysMap.put(new DatabaseIdentifierImpl(), importedKeys);
1564:            }
1565:
1566:            public void setImportedKeys(String catalog, String schema,
1567:                    String table, ResultSet importedKeys) {
1568:                importedKeysMap.put(new DatabaseIdentifierImpl(catalog, schema,
1569:                        table), importedKeys);
1570:            }
1571:
1572:            public void clearImportedKeys() {
1573:                importedKeysMap.clear();
1574:            }
1575:
1576:            public ResultSet getPrimaryKeys(String catalog, String schema,
1577:                    String table) throws SQLException {
1578:                DatabaseIdentifier expected = new DatabaseIdentifierImpl(
1579:                        catalog, schema, table);
1580:                return findMatchingDatabaseIdentifier(expected, primaryKeysMap);
1581:            }
1582:
1583:            public void setPrimaryKeys(ResultSet primaryKeys) {
1584:                primaryKeysMap.put(new DatabaseIdentifierImpl(), primaryKeys);
1585:            }
1586:
1587:            public void setPrimaryKeys(String catalog, String schema,
1588:                    String table, ResultSet primaryKeys) {
1589:                primaryKeysMap.put(new DatabaseIdentifierImpl(catalog, schema,
1590:                        table), primaryKeys);
1591:            }
1592:
1593:            public void clearPrimaryKeys() {
1594:                primaryKeysMap.clear();
1595:            }
1596:
1597:            public ResultSet getProcedures(String catalog,
1598:                    String schemaPattern, String procedureNamePattern)
1599:                    throws SQLException {
1600:                DatabaseIdentifier expected = new DatabaseIdentifierImpl(
1601:                        catalog, schemaPattern, procedureNamePattern, true,
1602:                        true);
1603:                return findMatchingDatabaseIdentifier(expected, proceduresMap);
1604:            }
1605:
1606:            public void setProcedures(ResultSet procedures) {
1607:                proceduresMap.put(new DatabaseIdentifierImpl(), procedures);
1608:            }
1609:
1610:            public void setProcedures(String catalog, String schemaPattern,
1611:                    String procedureNamePattern, ResultSet procedures) {
1612:                proceduresMap.put(new DatabaseIdentifierImpl(catalog,
1613:                        schemaPattern, procedureNamePattern), procedures);
1614:            }
1615:
1616:            public void clearProcedures() {
1617:                proceduresMap.clear();
1618:            }
1619:
1620:            public ResultSet getFunctions(String catalog, String schemaPattern,
1621:                    String functionNamePattern) throws SQLException {
1622:                DatabaseIdentifier expected = new DatabaseIdentifierImpl(
1623:                        catalog, schemaPattern, functionNamePattern, true, true);
1624:                return findMatchingDatabaseIdentifier(expected, functionsMap);
1625:            }
1626:
1627:            public void setFunctions(ResultSet functions) {
1628:                functionsMap.put(new DatabaseIdentifierImpl(), functions);
1629:            }
1630:
1631:            public void setFunctions(String catalog, String schemaPattern,
1632:                    String functionNamePattern, ResultSet functions) {
1633:                functionsMap.put(new DatabaseIdentifierImpl(catalog,
1634:                        schemaPattern, functionNamePattern), functions);
1635:            }
1636:
1637:            public void clearFunctions() {
1638:                functionsMap.clear();
1639:            }
1640:
1641:            public ResultSet getSuperTables(String catalog,
1642:                    String schemaPattern, String tableNamePattern)
1643:                    throws SQLException {
1644:                DatabaseIdentifier expected = new DatabaseIdentifierImpl(
1645:                        catalog, schemaPattern, tableNamePattern, true, true);
1646:                return findMatchingDatabaseIdentifier(expected, super TablesMap);
1647:            }
1648:
1649:            public void setSuperTables(ResultSet super Tables) {
1650:                super TablesMap.put(new DatabaseIdentifierImpl(), super Tables);
1651:            }
1652:
1653:            public void setSuperTables(String catalog, String schemaPattern,
1654:                    String tableName, ResultSet super Tables) {
1655:                super TablesMap.put(new DatabaseIdentifierImpl(catalog,
1656:                        schemaPattern, tableName), super Tables);
1657:            }
1658:
1659:            public void clearSuperTables() {
1660:                super TablesMap.clear();
1661:            }
1662:
1663:            public ResultSet getSuperTypes(String catalog,
1664:                    String schemaPattern, String typeNamePattern)
1665:                    throws SQLException {
1666:                DatabaseIdentifier expected = new DatabaseIdentifierImpl(
1667:                        catalog, schemaPattern, typeNamePattern, true, true);
1668:                return findMatchingDatabaseIdentifier(expected, super TypesMap);
1669:            }
1670:
1671:            public void setSuperTypes(ResultSet super Types) {
1672:                super TypesMap.put(new DatabaseIdentifierImpl(), super Types);
1673:            }
1674:
1675:            public void setSuperTypes(String catalog, String schemaPattern,
1676:                    String typeNamePattern, ResultSet super Types) {
1677:                super TypesMap.put(new DatabaseIdentifierImpl(catalog,
1678:                        schemaPattern, typeNamePattern), super Types);
1679:            }
1680:
1681:            public void clearSuperTypes() {
1682:                super TypesMap.clear();
1683:            }
1684:
1685:            public ResultSet getTablePrivileges(String catalog,
1686:                    String schemaPattern, String tableNamePattern)
1687:                    throws SQLException {
1688:                DatabaseIdentifier expected = new DatabaseIdentifierImpl(
1689:                        catalog, schemaPattern, tableNamePattern, true, true);
1690:                return findMatchingDatabaseIdentifier(expected,
1691:                        tablePrivilegesMap);
1692:            }
1693:
1694:            public void setTablePrivileges(ResultSet tablePrivileges) {
1695:                tablePrivilegesMap.put(new DatabaseIdentifierImpl(),
1696:                        tablePrivileges);
1697:            }
1698:
1699:            public void setTablePrivileges(String catalog,
1700:                    String schemaPattern, String tableNamePattern,
1701:                    ResultSet tablePrivileges) {
1702:                tablePrivilegesMap.put(new DatabaseIdentifierImpl(catalog,
1703:                        schemaPattern, tableNamePattern), tablePrivileges);
1704:            }
1705:
1706:            public void clearTablePrivileges() {
1707:                tablePrivilegesMap.clear();
1708:            }
1709:
1710:            public ResultSet getVersionColumns(String catalog, String schema,
1711:                    String table) throws SQLException {
1712:                DatabaseIdentifier expected = new DatabaseIdentifierImpl(
1713:                        catalog, schema, table);
1714:                return findMatchingDatabaseIdentifier(expected,
1715:                        versionColumnsMap);
1716:            }
1717:
1718:            public void setVersionColumns(ResultSet versionColumns) {
1719:                versionColumnsMap.put(new DatabaseIdentifierImpl(),
1720:                        versionColumns);
1721:            }
1722:
1723:            public void setVersionColumns(String catalog, String schema,
1724:                    String table, ResultSet versionColumns) {
1725:                versionColumnsMap.put(new DatabaseIdentifierImpl(catalog,
1726:                        schema, table), versionColumns);
1727:            }
1728:
1729:            public void clearVersionColumns() {
1730:                versionColumnsMap.clear();
1731:            }
1732:
1733:            public ResultSet getBestRowIdentifier(String catalog,
1734:                    String schema, String table, int scope, boolean nullable)
1735:                    throws SQLException {
1736:                DatabaseIdentifier expected = new RowIdentifierDatabaseIdentifierImpl(
1737:                        catalog, schema, table, scope, nullable);
1738:                return findMatchingDatabaseIdentifier(expected,
1739:                        bestRowIdentifierMap);
1740:            }
1741:
1742:            public void setBestRowIdentifier(ResultSet bestRowIdentifier) {
1743:                bestRowIdentifierMap.put(
1744:                        new RowIdentifierDatabaseIdentifierImpl(),
1745:                        bestRowIdentifier);
1746:            }
1747:
1748:            public void setBestRowIdentifier(String catalog, String schema,
1749:                    String table, int scope, boolean nullable,
1750:                    ResultSet bestRowIdentifier) {
1751:                bestRowIdentifierMap.put(
1752:                        new RowIdentifierDatabaseIdentifierImpl(catalog,
1753:                                schema, table, scope, nullable),
1754:                        bestRowIdentifier);
1755:            }
1756:
1757:            public void clearBestRowIdentifier() {
1758:                bestRowIdentifierMap.clear();
1759:            }
1760:
1761:            public ResultSet getIndexInfo(String catalog, String schema,
1762:                    String table, boolean unique, boolean approximate)
1763:                    throws SQLException {
1764:                DatabaseIdentifier expected = new IndexInfoDatabaseIdentifierImpl(
1765:                        catalog, schema, table, unique, approximate);
1766:                return findMatchingDatabaseIdentifier(expected, indexInfoMap);
1767:            }
1768:
1769:            public void setIndexInfo(ResultSet indexInfo) {
1770:                indexInfoMap.put(new IndexInfoDatabaseIdentifierImpl(),
1771:                        indexInfo);
1772:            }
1773:
1774:            public void setIndexInfo(String catalog, String schema,
1775:                    String table, boolean unique, boolean approximate,
1776:                    ResultSet indexInfo) {
1777:                indexInfoMap.put(new IndexInfoDatabaseIdentifierImpl(catalog,
1778:                        schema, table, unique, approximate), indexInfo);
1779:            }
1780:
1781:            public void clearIndexInfo() {
1782:                indexInfoMap.clear();
1783:            }
1784:
1785:            public ResultSet getUDTs(String catalog, String schemaPattern,
1786:                    String typeNamePattern, int[] types) throws SQLException {
1787:                DatabaseIdentifier expected = new UDTDatabaseIdentifierImpl(
1788:                        catalog, schemaPattern, typeNamePattern, true, true,
1789:                        types);
1790:                return findMatchingDatabaseIdentifier(expected, udtsMap);
1791:            }
1792:
1793:            public void setUDTs(ResultSet udts) {
1794:                udtsMap.put(new UDTDatabaseIdentifierImpl(), udts);
1795:            }
1796:
1797:            public void setUDTs(String catalog, String schemaPattern,
1798:                    String typeNamePattern, int[] types, ResultSet udts) {
1799:                udtsMap.put(new UDTDatabaseIdentifierImpl(catalog,
1800:                        schemaPattern, typeNamePattern, types), udts);
1801:            }
1802:
1803:            public void clearUDTs() {
1804:                udtsMap.clear();
1805:            }
1806:
1807:            public ResultSet getAttributes(String catalog,
1808:                    String schemaPattern, String typeNamePattern,
1809:                    String attributeNamePattern) throws SQLException {
1810:                DatabaseIdentifier expected = new AttributesDatabaseIdentifierImpl(
1811:                        catalog, schemaPattern, typeNamePattern, true, true,
1812:                        attributeNamePattern);
1813:                return findMatchingDatabaseIdentifier(expected, attributesMap);
1814:            }
1815:
1816:            public void setAttributes(ResultSet attributes) {
1817:                attributesMap.put(new AttributesDatabaseIdentifierImpl(),
1818:                        attributes);
1819:            }
1820:
1821:            public void setAttributes(String catalog, String schemaPattern,
1822:                    String typeNamePattern, String attributeNamePattern,
1823:                    ResultSet attributes) {
1824:                attributesMap.put(new AttributesDatabaseIdentifierImpl(catalog,
1825:                        schemaPattern, typeNamePattern, attributeNamePattern),
1826:                        attributes);
1827:            }
1828:
1829:            public void clearAttributes() {
1830:                attributesMap.clear();
1831:            }
1832:
1833:            public ResultSet getColumnPrivileges(String catalog, String schema,
1834:                    String table, String columnNamePattern) throws SQLException {
1835:                DatabaseIdentifier expected = new ColumnDatabaseIdentifierImpl(
1836:                        catalog, schema, table, columnNamePattern);
1837:                return findMatchingDatabaseIdentifier(expected,
1838:                        columnPrivilegesMap);
1839:            }
1840:
1841:            public void setColumnPrivileges(ResultSet columnPrivileges) {
1842:                columnPrivilegesMap.put(new ColumnDatabaseIdentifierImpl(),
1843:                        columnPrivileges);
1844:            }
1845:
1846:            public void setColumnPrivileges(String catalog, String schema,
1847:                    String table, String columnNamePattern,
1848:                    ResultSet columnPrivileges) {
1849:                columnPrivilegesMap.put(new ColumnDatabaseIdentifierImpl(
1850:                        catalog, schema, table, columnNamePattern),
1851:                        columnPrivileges);
1852:            }
1853:
1854:            public void clearColumnPrivileges() {
1855:                columnPrivilegesMap.clear();
1856:            }
1857:
1858:            public ResultSet getColumns(String catalog, String schemaPattern,
1859:                    String tableNamePattern, String columnNamePattern)
1860:                    throws SQLException {
1861:                DatabaseIdentifier expected = new ColumnDatabaseIdentifierImpl(
1862:                        catalog, schemaPattern, tableNamePattern, true, true,
1863:                        columnNamePattern);
1864:                return findMatchingDatabaseIdentifier(expected, columnsMap);
1865:            }
1866:
1867:            public void setColumns(ResultSet columns) {
1868:                columnsMap.put(new ColumnDatabaseIdentifierImpl(), columns);
1869:            }
1870:
1871:            public void setColumns(String catalog, String schemaPattern,
1872:                    String tableNamePattern, String columnNamePattern,
1873:                    ResultSet columns) {
1874:                columnsMap.put(new ColumnDatabaseIdentifierImpl(catalog,
1875:                        schemaPattern, tableNamePattern, columnNamePattern),
1876:                        columns);
1877:            }
1878:
1879:            public void clearColumns() {
1880:                columnsMap.clear();
1881:            }
1882:
1883:            public ResultSet getProcedureColumns(String catalog,
1884:                    String schemaPattern, String procedureNamePattern,
1885:                    String columnNamePattern) throws SQLException {
1886:                DatabaseIdentifier expected = new ColumnDatabaseIdentifierImpl(
1887:                        catalog, schemaPattern, procedureNamePattern, true,
1888:                        true, columnNamePattern);
1889:                return findMatchingDatabaseIdentifier(expected,
1890:                        procedureColumnsMap);
1891:            }
1892:
1893:            public void setProcedureColumns(ResultSet procedureColumns) {
1894:                procedureColumnsMap.put(new ColumnDatabaseIdentifierImpl(),
1895:                        procedureColumns);
1896:            }
1897:
1898:            public void setProcedureColumns(String catalog,
1899:                    String schemaPattern, String procedureNamePattern,
1900:                    String columnNamePattern, ResultSet procedureColumns) {
1901:                procedureColumnsMap.put(new ColumnDatabaseIdentifierImpl(
1902:                        catalog, schemaPattern, procedureNamePattern,
1903:                        columnNamePattern), procedureColumns);
1904:            }
1905:
1906:            public void clearProcedureColumns() {
1907:                procedureColumnsMap.clear();
1908:            }
1909:
1910:            public ResultSet getFunctionColumns(String catalog,
1911:                    String schemaPattern, String functionNamePattern,
1912:                    String columnNamePattern) throws SQLException {
1913:                DatabaseIdentifier expected = new ColumnDatabaseIdentifierImpl(
1914:                        catalog, schemaPattern, functionNamePattern, true,
1915:                        true, columnNamePattern);
1916:                return findMatchingDatabaseIdentifier(expected,
1917:                        functionColumnsMap);
1918:            }
1919:
1920:            public void setFunctionColumns(ResultSet functionColumns) {
1921:                functionColumnsMap.put(new ColumnDatabaseIdentifierImpl(),
1922:                        functionColumns);
1923:            }
1924:
1925:            public void setFunctionColumns(String catalog,
1926:                    String schemaPattern, String functionNamePattern,
1927:                    String columnNamePattern, ResultSet functionColumns) {
1928:                functionColumnsMap.put(new ColumnDatabaseIdentifierImpl(
1929:                        catalog, schemaPattern, functionNamePattern,
1930:                        columnNamePattern), functionColumns);
1931:            }
1932:
1933:            public void clearFunctionColumns() {
1934:                functionColumnsMap.clear();
1935:            }
1936:
1937:            public ResultSet getTables(String catalog, String schemaPattern,
1938:                    String tableNamePattern, String[] types)
1939:                    throws SQLException {
1940:                DatabaseIdentifier expected = new TableDatabaseIdentifierImpl(
1941:                        catalog, schemaPattern, true, true, tableNamePattern,
1942:                        types);
1943:                return findMatchingDatabaseIdentifier(expected, tablesMap);
1944:            }
1945:
1946:            public void setTables(ResultSet tables) {
1947:                tablesMap.put(new TableDatabaseIdentifierImpl(), tables);
1948:            }
1949:
1950:            public void setTables(String catalog, String schemaPattern,
1951:                    String tableNamePattern, String[] types, ResultSet tables) {
1952:                tablesMap.put(new TableDatabaseIdentifierImpl(catalog,
1953:                        schemaPattern, tableNamePattern, types), tables);
1954:            }
1955:
1956:            public void clearTables() {
1957:                tablesMap.clear();
1958:            }
1959:
1960:            public ResultSet getCrossReference(String primaryCatalog,
1961:                    String primarySchema, String primaryTable,
1962:                    String foreignCatalog, String foreignSchema,
1963:                    String foreignTable) throws SQLException {
1964:                DatabaseIdentifier identifier1 = new DatabaseIdentifierImpl(
1965:                        primaryCatalog, primarySchema, primaryTable);
1966:                DatabaseIdentifier identifier2 = new DatabaseIdentifierImpl(
1967:                        foreignCatalog, foreignSchema, foreignTable);
1968:                DatabaseIdentifier expected = new DatabaseIdentifierImplWrapper(
1969:                        identifier1, identifier2);
1970:                return findMatchingDatabaseIdentifier(expected,
1971:                        crossReferenceMap);
1972:            }
1973:
1974:            public void setCrossReference(ResultSet crossReference) {
1975:                DatabaseIdentifier identifier1 = new DatabaseIdentifierImpl();
1976:                DatabaseIdentifier identifier2 = new DatabaseIdentifierImpl();
1977:                crossReferenceMap.put(new DatabaseIdentifierImplWrapper(
1978:                        identifier1, identifier2), crossReference);
1979:            }
1980:
1981:            public void setCrossReference(String primaryCatalog,
1982:                    String primarySchema, String primaryTable,
1983:                    String foreignCatalog, String foreignSchema,
1984:                    String foreignTable, ResultSet crossReference) {
1985:                DatabaseIdentifier identifier1 = new DatabaseIdentifierImpl(
1986:                        primaryCatalog, primarySchema, primaryTable);
1987:                DatabaseIdentifier identifier2 = new DatabaseIdentifierImpl(
1988:                        foreignCatalog, foreignSchema, foreignTable);
1989:                crossReferenceMap.put(new DatabaseIdentifierImplWrapper(
1990:                        identifier1, identifier2), crossReference);
1991:            }
1992:
1993:            public void clearCrossReference() {
1994:                crossReferenceMap.clear();
1995:            }
1996:
1997:            public boolean isWrapperFor(Class iface) throws SQLException {
1998:                return false;
1999:            }
2000:
2001:            public Object unwrap(Class iface) throws SQLException {
2002:                throw new SQLException("No object found for " + iface);
2003:            }
2004:
2005:            /*
2006:             * If there is only one matching DatabaseIdentifier, then return its
2007:             * ResultSet otherwise return a PolyResultSet with the ResultSet of each
2008:             * matching DatabaseIdentifier.
2009:             */
2010:            private ResultSet findMatchingDatabaseIdentifier(
2011:                    DatabaseIdentifier expected, Map theMap) {
2012:                List list = new ArrayList();
2013:                for (Iterator it = theMap.entrySet().iterator(); it.hasNext();) {
2014:                    Map.Entry entry = (Map.Entry) it.next();
2015:                    DatabaseIdentifier next = (DatabaseIdentifier) entry
2016:                            .getKey();
2017:                    if (next.isGlobal() || expected.matches(next)) {
2018:                        list.add(entry.getValue());
2019:                    }
2020:                }
2021:                if (list.isEmpty())
2022:                    return null;
2023:                if (list.size() == 1)
2024:                    return (ResultSet) list.get(0);
2025:                return new PolyResultSet(list);
2026:            }
2027:
2028:            private ResultSet getAll(Map theMap) {
2029:                List list = new ArrayList();
2030:                list.addAll(theMap.values());
2031:                if (list.isEmpty())
2032:                    return null;
2033:                if (list.size() == 1)
2034:                    return (ResultSet) list.get(0);
2035:                return new PolyResultSet(list);
2036:            }
2037:
2038:            private interface DatabaseIdentifier {
2039:                public boolean isGlobal();
2040:
2041:                public boolean matches(DatabaseIdentifier other);
2042:            }
2043:
2044:            private class DatabaseIdentifierImpl implements  DatabaseIdentifier {
2045:                private boolean isGlobal;
2046:                private String catalog;
2047:                private String schema;
2048:                private String table;
2049:                private boolean useSchemaPattern;
2050:                private boolean useTablePattern;
2051:
2052:                public DatabaseIdentifierImpl() {
2053:                    isGlobal = true;
2054:                }
2055:
2056:                public DatabaseIdentifierImpl(String catalog, String schema,
2057:                        String table) {
2058:                    this (catalog, schema, table, false, false);
2059:                }
2060:
2061:                public DatabaseIdentifierImpl(String catalog, String schema,
2062:                        String table, boolean useSchemaPattern,
2063:                        boolean useTablePattern) {
2064:                    isGlobal = false;
2065:                    this .catalog = catalog;
2066:                    this .schema = schema;
2067:                    this .table = table;
2068:                    this .useSchemaPattern = useSchemaPattern;
2069:                    this .useTablePattern = useTablePattern;
2070:                }
2071:
2072:                public String getCatalog() {
2073:                    return catalog;
2074:                }
2075:
2076:                public boolean isGlobal() {
2077:                    return isGlobal;
2078:                }
2079:
2080:                public String getSchema() {
2081:                    return schema;
2082:                }
2083:
2084:                public String getTable() {
2085:                    return table;
2086:                }
2087:
2088:                protected String convert(String name) {
2089:                    if (name.indexOf('%') != -1) {
2090:                        name = StringUtil.replaceAll(name, "%", ".*");
2091:                    }
2092:                    if (name.indexOf('_') != -1) {
2093:                        name = StringUtil.replaceAll(name, "_", ".");
2094:                    }
2095:                    return name;
2096:                }
2097:
2098:                public boolean matches(DatabaseIdentifier object) {
2099:                    if (null == object)
2100:                        return false;
2101:                    if (!object.getClass().equals(this .getClass()))
2102:                        return false;
2103:                    DatabaseIdentifierImpl other = (DatabaseIdentifierImpl) object;
2104:                    if (isGlobal != other.isGlobal())
2105:                        return false;
2106:                    if (!matchesCatalog(other))
2107:                        return false;
2108:                    if (!matchesSchema(other))
2109:                        return false;
2110:                    return matchesTable(other);
2111:                }
2112:
2113:                private boolean matchesCatalog(DatabaseIdentifierImpl other) {
2114:                    if (null == getCatalog())
2115:                        return true;
2116:                    if (catalog.length() == 0) {
2117:                        return (other.getCatalog() == null)
2118:                                || (other.getCatalog().length() == 0);
2119:                    } else {
2120:                        if (other.getCatalog() == null)
2121:                            return false;
2122:                        return StringUtil.matchesExact(other.getCatalog(),
2123:                                catalog, caseSensitive);
2124:                    }
2125:                }
2126:
2127:                private boolean matchesSchema(DatabaseIdentifierImpl other) {
2128:                    if (null == getSchema())
2129:                        return true;
2130:                    if (schema.length() == 0) {
2131:                        return (other.getSchema() == null)
2132:                                || (other.getSchema().length() == 0);
2133:                    } else {
2134:                        if (other.getSchema() == null)
2135:                            return false;
2136:                        if (!useSchemaPattern) {
2137:                            return StringUtil.matchesExact(other.getSchema(),
2138:                                    schema, caseSensitive);
2139:                        } else {
2140:                            return StringUtil.matchesPerl5(other.getSchema(),
2141:                                    convert(schema), caseSensitive);
2142:                        }
2143:                    }
2144:                }
2145:
2146:                private boolean matchesTable(DatabaseIdentifierImpl other) {
2147:                    if (null == table)
2148:                        return false;
2149:                    if (null == other.getTable())
2150:                        return false;
2151:                    if (!useTablePattern) {
2152:                        return StringUtil.matchesExact(other.getTable(), table,
2153:                                caseSensitive);
2154:                    } else {
2155:                        return StringUtil.matchesPerl5(other.getTable(),
2156:                                convert(table), caseSensitive);
2157:                    }
2158:                }
2159:
2160:                public boolean equals(Object object) {
2161:                    if (null == object)
2162:                        return false;
2163:                    if (!object.getClass().equals(this .getClass()))
2164:                        return false;
2165:                    DatabaseIdentifierImpl other = (DatabaseIdentifierImpl) object;
2166:                    if (isGlobal != other.isGlobal())
2167:                        return false;
2168:                    if (null != catalog && !catalog.equals(other.getCatalog()))
2169:                        return false;
2170:                    if (null != other.getCatalog()
2171:                            && !other.getCatalog().equals(catalog))
2172:                        return false;
2173:                    if (null != schema && !schema.equals(other.getSchema()))
2174:                        return false;
2175:                    if (null != other.getSchema()
2176:                            && !other.getSchema().equals(schema))
2177:                        return false;
2178:                    if (null != table && !table.equals(other.getTable()))
2179:                        return false;
2180:                    if (null != other.getTable()
2181:                            && !other.getTable().equals(table))
2182:                        return false;
2183:                    return true;
2184:                }
2185:
2186:                public int hashCode() {
2187:                    int hashCode = 17;
2188:                    if (null != catalog)
2189:                        hashCode = (31 * hashCode) + catalog.hashCode();
2190:                    if (null != schema)
2191:                        hashCode = (31 * hashCode) + schema.hashCode();
2192:                    if (null != table)
2193:                        hashCode = (31 * hashCode) + table.hashCode();
2194:                    return hashCode;
2195:                }
2196:            }
2197:
2198:            private class AttributesDatabaseIdentifierImpl extends
2199:                    DatabaseIdentifierImpl {
2200:                private String attributeNamePattern;
2201:
2202:                public AttributesDatabaseIdentifierImpl() {
2203:
2204:                }
2205:
2206:                public AttributesDatabaseIdentifierImpl(String catalog,
2207:                        String schema, String table, String attributeNamePattern) {
2208:                    super (catalog, schema, table);
2209:                    this .attributeNamePattern = attributeNamePattern;
2210:                }
2211:
2212:                public AttributesDatabaseIdentifierImpl(String catalog,
2213:                        String schema, String table, boolean useSchemaPattern,
2214:                        boolean useTablePattern, String attributeNamePattern) {
2215:                    super (catalog, schema, table, useSchemaPattern,
2216:                            useTablePattern);
2217:                    this .attributeNamePattern = attributeNamePattern;
2218:                }
2219:
2220:                public String getAttributeNamePattern() {
2221:                    return attributeNamePattern;
2222:                }
2223:
2224:                public boolean matches(DatabaseIdentifier object) {
2225:                    if (!super .matches(object))
2226:                        return false;
2227:                    AttributesDatabaseIdentifierImpl other = (AttributesDatabaseIdentifierImpl) object;
2228:                    if (null == attributeNamePattern)
2229:                        return false;
2230:                    if (null == other.getAttributeNamePattern())
2231:                        return false;
2232:                    return StringUtil.matchesPerl5(other
2233:                            .getAttributeNamePattern(),
2234:                            convert(attributeNamePattern), caseSensitive);
2235:                }
2236:
2237:                public boolean equals(Object object) {
2238:                    if (!super .equals(object))
2239:                        return false;
2240:                    AttributesDatabaseIdentifierImpl other = (AttributesDatabaseIdentifierImpl) object;
2241:                    if (null != attributeNamePattern
2242:                            && !attributeNamePattern.equals(other
2243:                                    .getAttributeNamePattern()))
2244:                        return false;
2245:                    if (null != other.getAttributeNamePattern()
2246:                            && !other.getAttributeNamePattern().equals(
2247:                                    attributeNamePattern))
2248:                        return false;
2249:                    return true;
2250:                }
2251:
2252:                public int hashCode() {
2253:                    int hashCode = super .hashCode();
2254:                    if (null != attributeNamePattern)
2255:                        hashCode = (31 * hashCode)
2256:                                + attributeNamePattern.hashCode();
2257:                    return hashCode;
2258:                }
2259:            }
2260:
2261:            private class ColumnDatabaseIdentifierImpl extends
2262:                    DatabaseIdentifierImpl {
2263:                private String columnNamePattern;
2264:
2265:                public ColumnDatabaseIdentifierImpl() {
2266:
2267:                }
2268:
2269:                public ColumnDatabaseIdentifierImpl(String catalog,
2270:                        String schema, String table, String columnNamePattern) {
2271:                    super (catalog, schema, table);
2272:                    this .columnNamePattern = columnNamePattern;
2273:                }
2274:
2275:                public ColumnDatabaseIdentifierImpl(String catalog,
2276:                        String schema, String table, boolean useSchemaPattern,
2277:                        boolean useTablePattern, String columnNamePattern) {
2278:                    super (catalog, schema, table, useSchemaPattern,
2279:                            useTablePattern);
2280:                    this .columnNamePattern = columnNamePattern;
2281:                }
2282:
2283:                public String getColumnNamePattern() {
2284:                    return columnNamePattern;
2285:                }
2286:
2287:                public boolean matches(DatabaseIdentifier object) {
2288:                    if (!super .matches(object))
2289:                        return false;
2290:                    ColumnDatabaseIdentifierImpl other = (ColumnDatabaseIdentifierImpl) object;
2291:                    if (null == columnNamePattern)
2292:                        return false;
2293:                    if (null == other.getColumnNamePattern())
2294:                        return false;
2295:                    return StringUtil.matchesPerl5(
2296:                            other.getColumnNamePattern(),
2297:                            convert(columnNamePattern), caseSensitive);
2298:                }
2299:
2300:                public boolean equals(Object object) {
2301:                    if (!super .equals(object))
2302:                        return false;
2303:                    ColumnDatabaseIdentifierImpl other = (ColumnDatabaseIdentifierImpl) object;
2304:                    if (null != columnNamePattern
2305:                            && !columnNamePattern.equals(other
2306:                                    .getColumnNamePattern()))
2307:                        return false;
2308:                    if (null != other.getColumnNamePattern()
2309:                            && !other.getColumnNamePattern().equals(
2310:                                    columnNamePattern))
2311:                        return false;
2312:                    return true;
2313:                }
2314:
2315:                public int hashCode() {
2316:                    int hashCode = super .hashCode();
2317:                    if (null != columnNamePattern)
2318:                        hashCode = (31 * hashCode)
2319:                                + columnNamePattern.hashCode();
2320:                    return hashCode;
2321:                }
2322:            }
2323:
2324:            private class RowIdentifierDatabaseIdentifierImpl extends
2325:                    DatabaseIdentifierImpl {
2326:                private int scope;
2327:                private boolean nullable;
2328:
2329:                public RowIdentifierDatabaseIdentifierImpl() {
2330:
2331:                }
2332:
2333:                public RowIdentifierDatabaseIdentifierImpl(String catalog,
2334:                        String schema, String table, int scope, boolean nullable) {
2335:                    super (catalog, schema, table);
2336:                    this .scope = scope;
2337:                    this .nullable = nullable;
2338:                }
2339:
2340:                public boolean isNullable() {
2341:                    return nullable;
2342:                }
2343:
2344:                public int getScope() {
2345:                    return scope;
2346:                }
2347:
2348:                public boolean matches(DatabaseIdentifier object) {
2349:                    if (!super .matches(object))
2350:                        return false;
2351:                    return isEqual(object);
2352:                }
2353:
2354:                public boolean equals(Object object) {
2355:                    if (!super .equals(object))
2356:                        return false;
2357:                    return isEqual(object);
2358:                }
2359:
2360:                private boolean isEqual(Object object) {
2361:                    RowIdentifierDatabaseIdentifierImpl other = (RowIdentifierDatabaseIdentifierImpl) object;
2362:                    if (scope != other.getScope())
2363:                        return false;
2364:                    if (nullable != other.isNullable())
2365:                        return false;
2366:                    return true;
2367:                }
2368:
2369:                public int hashCode() {
2370:                    int hashCode = (super .hashCode() * 31) + scope;
2371:                    hashCode = (31 * hashCode) + (nullable ? 31 : 62);
2372:                    return hashCode;
2373:                }
2374:            }
2375:
2376:            private class IndexInfoDatabaseIdentifierImpl extends
2377:                    DatabaseIdentifierImpl {
2378:                private boolean unique;
2379:                private boolean approximate;
2380:
2381:                public IndexInfoDatabaseIdentifierImpl() {
2382:
2383:                }
2384:
2385:                public IndexInfoDatabaseIdentifierImpl(String catalog,
2386:                        String schema, String table, boolean unique,
2387:                        boolean approximate) {
2388:                    super (catalog, schema, table);
2389:                    this .unique = unique;
2390:                    this .approximate = approximate;
2391:                }
2392:
2393:                public boolean isApproximate() {
2394:                    return approximate;
2395:                }
2396:
2397:                public boolean isUnique() {
2398:                    return unique;
2399:                }
2400:
2401:                public boolean matches(DatabaseIdentifier object) {
2402:                    if (!super .matches(object))
2403:                        return false;
2404:                    return isEqual(object);
2405:                }
2406:
2407:                public boolean equals(Object object) {
2408:                    if (!super .equals(object))
2409:                        return false;
2410:                    return isEqual(object);
2411:                }
2412:
2413:                private boolean isEqual(Object object) {
2414:                    IndexInfoDatabaseIdentifierImpl other = (IndexInfoDatabaseIdentifierImpl) object;
2415:                    if (unique != other.isUnique())
2416:                        return false;
2417:                    if (approximate != other.isApproximate())
2418:                        return false;
2419:                    return true;
2420:                }
2421:
2422:                public int hashCode() {
2423:                    int hashCode = super .hashCode();
2424:                    hashCode = (31 * hashCode) + (unique ? 31 : 62);
2425:                    hashCode = (31 * hashCode)
2426:                            + (approximate ? (3 * 31) : (4 * 31));
2427:                    return hashCode;
2428:                }
2429:            }
2430:
2431:            private class TableDatabaseIdentifierImpl extends
2432:                    DatabaseIdentifierImpl {
2433:                private String[] types;
2434:
2435:                public TableDatabaseIdentifierImpl() {
2436:
2437:                }
2438:
2439:                public TableDatabaseIdentifierImpl(String catalog,
2440:                        String schema, String table, String[] types) {
2441:                    super (catalog, schema, table);
2442:                    this .types = types;
2443:                }
2444:
2445:                public TableDatabaseIdentifierImpl(String catalog,
2446:                        String schema, boolean useSchemaPattern,
2447:                        boolean useTablePattern, String table, String[] types) {
2448:                    super (catalog, schema, table, useSchemaPattern,
2449:                            useTablePattern);
2450:                    this .types = types;
2451:                }
2452:
2453:                public String[] getTypes() {
2454:                    return types;
2455:                }
2456:
2457:                public boolean matches(DatabaseIdentifier object) {
2458:                    if (!super .matches(object))
2459:                        return false;
2460:                    TableDatabaseIdentifierImpl other = (TableDatabaseIdentifierImpl) object;
2461:                    if (null == types)
2462:                        return true;
2463:                    if (null == other.getTypes())
2464:                        return false;
2465:                    return matchesTypes(other);
2466:                }
2467:
2468:                private boolean matchesTypes(TableDatabaseIdentifierImpl other) {
2469:                    String[] otherTypes = other.getTypes();
2470:                    for (int ii = 0; ii < types.length; ii++) {
2471:                        String type = types[ii];
2472:                        for (int jj = 0; jj < otherTypes.length; jj++) {
2473:                            if (type.equals(otherTypes[jj]))
2474:                                return true;
2475:                        }
2476:                    }
2477:                    return false;
2478:                }
2479:
2480:                public boolean equals(Object object) {
2481:                    if (!super .equals(object))
2482:                        return false;
2483:                    TableDatabaseIdentifierImpl other = (TableDatabaseIdentifierImpl) object;
2484:                    if (null == types && null == other.getTypes())
2485:                        return true;
2486:                    if (null == types)
2487:                        return false;
2488:                    if (null == other.getTypes())
2489:                        return false;
2490:                    return Arrays.equals(types, other.getTypes());
2491:                }
2492:
2493:                public int hashCode() {
2494:                    int hashCode = super .hashCode();
2495:                    if (null != types) {
2496:                        for (int ii = 0; ii < types.length; ii++) {
2497:                            if (null != types[ii]) {
2498:                                hashCode = (31 * hashCode)
2499:                                        + types[ii].hashCode();
2500:                            }
2501:                        }
2502:                    }
2503:                    return hashCode;
2504:                }
2505:            }
2506:
2507:            private class UDTDatabaseIdentifierImpl extends
2508:                    DatabaseIdentifierImpl {
2509:                private int[] types;
2510:
2511:                public UDTDatabaseIdentifierImpl() {
2512:
2513:                }
2514:
2515:                public UDTDatabaseIdentifierImpl(String catalog, String schema,
2516:                        String table, int[] types) {
2517:                    super (catalog, schema, table);
2518:                    this .types = types;
2519:                }
2520:
2521:                public UDTDatabaseIdentifierImpl(String catalog, String schema,
2522:                        String table, boolean useSchemaPattern,
2523:                        boolean useTablePattern, int[] types) {
2524:                    super (catalog, schema, table, useSchemaPattern,
2525:                            useTablePattern);
2526:                    this .types = types;
2527:                }
2528:
2529:                public int[] getTypes() {
2530:                    return types;
2531:                }
2532:
2533:                public boolean matches(DatabaseIdentifier object) {
2534:                    if (!super .matches(object))
2535:                        return false;
2536:                    UDTDatabaseIdentifierImpl other = (UDTDatabaseIdentifierImpl) object;
2537:                    if (null == types)
2538:                        return true;
2539:                    if (null == other.getTypes())
2540:                        return false;
2541:                    return matchesTypes(other);
2542:                }
2543:
2544:                private boolean matchesTypes(UDTDatabaseIdentifierImpl other) {
2545:                    int[] otherTypes = other.getTypes();
2546:                    for (int ii = 0; ii < types.length; ii++) {
2547:                        int type = types[ii];
2548:                        for (int jj = 0; jj < otherTypes.length; jj++) {
2549:                            if (type == otherTypes[jj])
2550:                                return true;
2551:                        }
2552:                    }
2553:                    return false;
2554:                }
2555:
2556:                public boolean equals(Object object) {
2557:                    if (!super .equals(object))
2558:                        return false;
2559:                    UDTDatabaseIdentifierImpl other = (UDTDatabaseIdentifierImpl) object;
2560:                    if (null == types && null == other.getTypes())
2561:                        return true;
2562:                    if (null == types)
2563:                        return false;
2564:                    if (null == other.getTypes())
2565:                        return false;
2566:                    return Arrays.equals(types, other.getTypes());
2567:                }
2568:
2569:                public int hashCode() {
2570:                    int hashCode = super .hashCode();
2571:                    if (null != types) {
2572:                        for (int ii = 0; ii < types.length; ii++) {
2573:                            hashCode = (31 * hashCode) + types[ii];
2574:                        }
2575:                    }
2576:                    return hashCode;
2577:                }
2578:            }
2579:
2580:            private class DatabaseIdentifierImplWrapper implements 
2581:                    DatabaseIdentifier {
2582:                private DatabaseIdentifier identifier1;
2583:                private DatabaseIdentifier identifier2;
2584:
2585:                public DatabaseIdentifierImplWrapper(
2586:                        DatabaseIdentifier identifier1,
2587:                        DatabaseIdentifier identifier2) {
2588:                    this .identifier1 = identifier1;
2589:                    this .identifier2 = identifier2;
2590:                }
2591:
2592:                public DatabaseIdentifier getIdentifier1() {
2593:                    return identifier1;
2594:                }
2595:
2596:                public DatabaseIdentifier getIdentifier2() {
2597:                    return identifier2;
2598:                }
2599:
2600:                public boolean isGlobal() {
2601:                    if (null == identifier1)
2602:                        return false;
2603:                    if (null == identifier2)
2604:                        return false;
2605:                    return (identifier1.isGlobal() && identifier1.isGlobal());
2606:                }
2607:
2608:                public boolean matches(DatabaseIdentifier object) {
2609:                    if (null == object)
2610:                        return false;
2611:                    if (!object.getClass().equals(this .getClass()))
2612:                        return false;
2613:                    DatabaseIdentifierImplWrapper other = (DatabaseIdentifierImplWrapper) object;
2614:                    if (null != identifier1
2615:                            && !identifier1.matches(other.getIdentifier1()))
2616:                        return false;
2617:                    if (null != identifier2
2618:                            && !identifier2.matches(other.getIdentifier2()))
2619:                        return false;
2620:                    return true;
2621:                }
2622:
2623:                public boolean equals(Object object) {
2624:                    if (null == object)
2625:                        return false;
2626:                    if (!object.getClass().equals(this .getClass()))
2627:                        return false;
2628:                    DatabaseIdentifierImplWrapper other = (DatabaseIdentifierImplWrapper) object;
2629:                    if (null != identifier1
2630:                            && !identifier1.equals(other.getIdentifier1()))
2631:                        return false;
2632:                    if (null != other.getIdentifier1()
2633:                            && !other.getIdentifier1().equals(identifier1))
2634:                        return false;
2635:                    if (null != identifier2
2636:                            && !identifier2.equals(other.getIdentifier2()))
2637:                        return false;
2638:                    if (null != other.getIdentifier2()
2639:                            && !other.getIdentifier2().equals(identifier2))
2640:                        return false;
2641:                    return true;
2642:                }
2643:
2644:                public int hashCode() {
2645:                    int hashCode = 0;
2646:                    if (null != identifier1)
2647:                        hashCode = (31 * hashCode) + identifier1.hashCode();
2648:                    if (null != identifier2)
2649:                        hashCode = (31 * hashCode) + identifier2.hashCode();
2650:                    return hashCode;
2651:                }
2652:            }
2653:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.