openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwsut...@apache.org
Subject svn commit: r482189 [2/2] - in /incubator/openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/ openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/
Date Mon, 04 Dec 2006 14:42:10 GMT
Modified: incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java?view=diff&rev=482189&r1=482188&r2=482189
==============================================================================
--- incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java (original)
+++ incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java Mon Dec  4 06:42:09 2006
@@ -1,144 +1,162 @@
-/*
- * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.openjpa.jdbc.sql;
-
-import java.sql.Connection;
-import java.sql.SQLException;
-import java.util.Arrays;
-
-import org.apache.openjpa.jdbc.schema.Sequence;
-
-/**
- * Dictionary for IBM DB2 database.
- */
-public class DB2Dictionary
-    extends AbstractDB2Dictionary {
-
-    public DB2Dictionary() {
-        platform = "DB2";
-        validationSQL = "SELECT DISTINCT(CURRENT TIMESTAMP) FROM "
-            + "SYSIBM.SYSTABLES";
-        supportsSelectEndIndex = true;
-
-        nextSequenceQuery = "VALUES NEXTVAL FOR {0}";
-
-        binaryTypeName = "BLOB(1M)";
-        longVarbinaryTypeName = "BLOB(1M)";
-        varbinaryTypeName = "BLOB(1M)";
-        clobTypeName = "CLOB(1M)";
-        longVarcharTypeName = "LONG VARCHAR";
-
-        fixedSizeTypeNameSet.addAll(Arrays.asList(new String[]{
-            "LONG VARCHAR FOR BIT DATA", "LONG VARCHAR", "LONG VARGRAPHIC",
-        }));
-
-        maxConstraintNameLength = 18;
-        maxIndexNameLength = 18;
-        maxColumnNameLength = 30;
-        supportsDeferredConstraints = false;
-        supportsDefaultDeleteAction = false;
-        supportsAlterTableWithDropColumn = false;
-
-        supportsNullTableForGetColumns = false;
-
-        reservedWordSet.addAll(Arrays.asList(new String[]{
-            "AFTER", "ALIAS", "ALLOW", "APPLICATION", "ASSOCIATE", "ASUTIME",
-            "AUDIT", "AUX", "AUXILIARY", "BEFORE", "BINARY", "BUFFERPOOL",
-            "CACHE", "CALL", "CALLED", "CAPTURE", "CARDINALITY", "CCSID",
-            "CLUSTER", "COLLECTION", "COLLID", "COMMENT", "CONCAT",
-            "CONDITION", "CONTAINS", "COUNT_BIG", "CURRENT_LC_CTYPE",
-            "CURRENT_PATH", "CURRENT_SERVER", "CURRENT_TIMEZONE", "CYCLE",
-            "DATA", "DATABASE", "DAYS", "DB2GENERAL", "DB2GENRL", "DB2SQL",
-            "DBINFO", "DEFAULTS", "DEFINITION", "DETERMINISTIC", "DISALLOW",
-            "DO", "DSNHATTR", "DSSIZE", "DYNAMIC", "EACH", "EDITPROC", "ELSEIF",
-            "ENCODING", "END-EXEC1", "ERASE", "EXCLUDING", "EXIT", "FENCED",
-            "FIELDPROC", "FILE", "FINAL", "FREE", "FUNCTION", "GENERAL",
-            "GENERATED", "GRAPHIC", "HANDLER", "HOLD", "HOURS", "IF",
-            "INCLUDING", "INCREMENT", "INDEX", "INHERIT", "INOUT", "INTEGRITY",
-            "ISOBID", "ITERATE", "JAR", "JAVA", "LABEL", "LC_CTYPE", "LEAVE",
-            "LINKTYPE", "LOCALE", "LOCATOR", "LOCATORS", "LOCK", "LOCKMAX",
-            "LOCKSIZE", "LONG", "LOOP", "MAXVALUE", "MICROSECOND",
-            "MICROSECONDS", "MINUTES", "MINVALUE", "MODE", "MODIFIES", "MONTHS",
-            "NEW", "NEW_TABLE", "NOCACHE", "NOCYCLE", "NODENAME", "NODENUMBER",
-            "NOMAXVALUE", "NOMINVALUE", "NOORDER", "NULLS", "NUMPARTS", "OBID",
-            "OLD", "OLD_TABLE", "OPTIMIZATION", "OPTIMIZE", "OUT", "OVERRIDING",
-            "PACKAGE", "PARAMETER", "PART", "PARTITION", "PATH", "PIECESIZE",
-            "PLAN", "PRIQTY", "PROGRAM", "PSID", "QUERYNO", "READS", "RECOVERY",
-            "REFERENCING", "RELEASE", "RENAME", "REPEAT", "RESET", "RESIGNAL",
-            "RESTART", "RESULT", "RESULT_SET_LOCATOR", "RETURN", "RETURNS",
-            "ROUTINE", "ROW", "RRN", "RUN", "SAVEPOINT", "SCRATCHPAD",
-            "SECONDS", "SECQTY", "SECURITY", "SENSITIVE", "SIGNAL", "SIMPLE",
-            "SOURCE", "SPECIFIC", "SQLID", "STANDARD", "START", "STATIC",
-            "STAY", "STOGROUP", "STORES", "STYLE", "SUBPAGES", "SYNONYM",
-            "SYSFUN", "SYSIBM", "SYSPROC", "SYSTEM", "TABLESPACE", "TRIGGER",
-            "TYPE", "UNDO", "UNTIL", "VALIDPROC", "VARIABLE", "VARIANT", "VCAT",
-            "VOLUMES", "WHILE", "WLM", "YEARS",
-        }));
-    }
-
-    public boolean supportsRandomAccessResultSet(Select sel,
-        boolean forUpdate) {
-        return !forUpdate
-            && super.supportsRandomAccessResultSet(sel, forUpdate);
-    }
-
-    protected void appendSelectRange(SQLBuffer buf, long start, long end) {
-        // appends the literal range string, since DB2 is unable to handle
-        // a bound parameter for it
-        buf.append(" FETCH FIRST ").append(Long.toString(end)).
-            append(" ROWS ONLY");
-    }
-
-    public String[] getCreateSequenceSQL(Sequence seq) {
-        String[] sql = super.getCreateSequenceSQL(seq);
-        if (seq.getAllocate() > 1)
-            sql[0] += " CACHE " + seq.getAllocate();
-        return sql;
-    }
-
-    protected String getSequencesSQL(String schemaName, String sequenceName) {
-        StringBuffer buf = new StringBuffer();
-        buf.append("SELECT SEQSCHEMA AS SEQUENCE_SCHEMA, ").
-            append("SEQNAME AS SEQUENCE_NAME FROM SYSCAT.SEQUENCES");
-        if (schemaName != null || sequenceName != null)
-            buf.append(" WHERE ");
-        if (schemaName != null) {
-            buf.append("SEQSCHEMA = ?");
-            if (sequenceName != null)
-                buf.append(" AND ");
-        }
-        if (sequenceName != null)
-            buf.append("SEQNAME = ?");
-        return buf.toString();
-    }
-
-    public Connection decorate(Connection conn)
-        throws SQLException {
-        // some versions of the DB2 driver seem to default to
-        // READ_UNCOMMITTED, which will prevent locking from working
-        // (multiple SELECT ... FOR UPDATE statements are allowed on
-        // the same instance); if we have not overridden the
-        // transaction isolation in the configuration, default to
-        // TRANSACTION_READ_COMMITTED
-        conn = super.decorate(conn);
-
-        if (conf.getTransactionIsolationConstant() == -1
-            && conn.getTransactionIsolation() < conn.TRANSACTION_READ_COMMITTED)
-            conn.setTransactionIsolation(conn.TRANSACTION_READ_COMMITTED);
-
-        return conn;
-    }
-}
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openjpa.jdbc.sql;
+
+import java.sql.Connection;
+import java.sql.DatabaseMetaData;
+import java.sql.SQLException;
+import java.util.Arrays;
+
+import org.apache.openjpa.jdbc.schema.Sequence;
+
+/**
+ * Dictionary for IBM DB2 database.
+ */
+public class DB2Dictionary
+    extends AbstractDB2Dictionary {
+
+    public DB2Dictionary() {
+        platform = "DB2";
+        validationSQL = "SELECT DISTINCT(CURRENT TIMESTAMP) FROM "
+            + "SYSIBM.SYSTABLES";
+        supportsSelectEndIndex = true;
+
+        nextSequenceQuery = "VALUES NEXTVAL FOR {0}";
+
+        binaryTypeName = "BLOB(1M)";
+        longVarbinaryTypeName = "BLOB(1M)";
+        varbinaryTypeName = "BLOB(1M)";
+        clobTypeName = "CLOB(1M)";
+        longVarcharTypeName = "LONG VARCHAR";
+
+        fixedSizeTypeNameSet.addAll(Arrays.asList(new String[]{
+            "LONG VARCHAR FOR BIT DATA", "LONG VARCHAR", "LONG VARGRAPHIC",
+        }));
+
+        maxConstraintNameLength = 18;
+        maxIndexNameLength = 18;
+        maxColumnNameLength = 30;
+        supportsDeferredConstraints = false;
+        supportsDefaultDeleteAction = false;
+        supportsAlterTableWithDropColumn = false;
+
+        supportsNullTableForGetColumns = false;
+
+        reservedWordSet.addAll(Arrays.asList(new String[]{
+            "AFTER", "ALIAS", "ALLOW", "APPLICATION", "ASSOCIATE", "ASUTIME",
+            "AUDIT", "AUX", "AUXILIARY", "BEFORE", "BINARY", "BUFFERPOOL",
+            "CACHE", "CALL", "CALLED", "CAPTURE", "CARDINALITY", "CCSID",
+            "CLUSTER", "COLLECTION", "COLLID", "COMMENT", "CONCAT",
+            "CONDITION", "CONTAINS", "COUNT_BIG", "CURRENT_LC_CTYPE",
+            "CURRENT_PATH", "CURRENT_SERVER", "CURRENT_TIMEZONE", "CYCLE",
+            "DATA", "DATABASE", "DAYS", "DB2GENERAL", "DB2GENRL", "DB2SQL",
+            "DBINFO", "DEFAULTS", "DEFINITION", "DETERMINISTIC", "DISALLOW",
+            "DO", "DSNHATTR", "DSSIZE", "DYNAMIC", "EACH", "EDITPROC", "ELSEIF",
+            "ENCODING", "END-EXEC1", "ERASE", "EXCLUDING", "EXIT", "FENCED",
+            "FIELDPROC", "FILE", "FINAL", "FREE", "FUNCTION", "GENERAL",
+            "GENERATED", "GRAPHIC", "HANDLER", "HOLD", "HOURS", "IF",
+            "INCLUDING", "INCREMENT", "INDEX", "INHERIT", "INOUT", "INTEGRITY",
+            "ISOBID", "ITERATE", "JAR", "JAVA", "LABEL", "LC_CTYPE", "LEAVE",
+            "LINKTYPE", "LOCALE", "LOCATOR", "LOCATORS", "LOCK", "LOCKMAX",
+            "LOCKSIZE", "LONG", "LOOP", "MAXVALUE", "MICROSECOND",
+            "MICROSECONDS", "MINUTES", "MINVALUE", "MODE", "MODIFIES", "MONTHS",
+            "NEW", "NEW_TABLE", "NOCACHE", "NOCYCLE", "NODENAME", "NODENUMBER",
+            "NOMAXVALUE", "NOMINVALUE", "NOORDER", "NULLS", "NUMPARTS", "OBID",
+            "OLD", "OLD_TABLE", "OPTIMIZATION", "OPTIMIZE", "OUT", "OVERRIDING",
+            "PACKAGE", "PARAMETER", "PART", "PARTITION", "PATH", "PIECESIZE",
+            "PLAN", "PRIQTY", "PROGRAM", "PSID", "QUERYNO", "READS", "RECOVERY",
+            "REFERENCING", "RELEASE", "RENAME", "REPEAT", "RESET", "RESIGNAL",
+            "RESTART", "RESULT", "RESULT_SET_LOCATOR", "RETURN", "RETURNS",
+            "ROUTINE", "ROW", "RRN", "RUN", "SAVEPOINT", "SCRATCHPAD",
+            "SECONDS", "SECQTY", "SECURITY", "SENSITIVE", "SIGNAL", "SIMPLE",
+            "SOURCE", "SPECIFIC", "SQLID", "STANDARD", "START", "STATIC",
+            "STAY", "STOGROUP", "STORES", "STYLE", "SUBPAGES", "SYNONYM",
+            "SYSFUN", "SYSIBM", "SYSPROC", "SYSTEM", "TABLESPACE", "TRIGGER",
+            "TYPE", "UNDO", "UNTIL", "VALIDPROC", "VARIABLE", "VARIANT", "VCAT",
+            "VOLUMES", "WHILE", "WLM", "YEARS",
+        }));
+    }
+
+    public boolean supportsRandomAccessResultSet(Select sel,
+        boolean forUpdate) {
+        return !forUpdate
+            && super.supportsRandomAccessResultSet(sel, forUpdate);
+    }
+
+    protected void appendSelectRange(SQLBuffer buf, long start, long end) {
+        // appends the literal range string, since DB2 is unable to handle
+        // a bound parameter for it
+        buf.append(" FETCH FIRST ").append(Long.toString(end)).
+            append(" ROWS ONLY");
+    }
+
+    public String[] getCreateSequenceSQL(Sequence seq) {
+        String[] sql = super.getCreateSequenceSQL(seq);
+        if (seq.getAllocate() > 1)
+            sql[0] += " CACHE " + seq.getAllocate();
+        return sql;
+    }
+
+    protected String getSequencesSQL(String schemaName, String sequenceName) {
+        StringBuffer buf = new StringBuffer();
+        buf.append("SELECT SEQSCHEMA AS SEQUENCE_SCHEMA, ").
+            append("SEQNAME AS SEQUENCE_NAME FROM SYSCAT.SEQUENCES");
+        if (schemaName != null || sequenceName != null)
+            buf.append(" WHERE ");
+        if (schemaName != null) {
+            buf.append("SEQSCHEMA = ?");
+            if (sequenceName != null)
+                buf.append(" AND ");
+        }
+        if (sequenceName != null)
+            buf.append("SEQNAME = ?");
+        return buf.toString();
+    }
+
+    public Connection decorate(Connection conn)
+        throws SQLException {
+        // some versions of the DB2 driver seem to default to
+        // READ_UNCOMMITTED, which will prevent locking from working
+        // (multiple SELECT ... FOR UPDATE statements are allowed on
+        // the same instance); if we have not overridden the
+        // transaction isolation in the configuration, default to
+        // TRANSACTION_READ_COMMITTED
+        conn = super.decorate(conn);
+
+        if (conf.getTransactionIsolationConstant() == -1
+            && conn.getTransactionIsolation() < conn.TRANSACTION_READ_COMMITTED)
+            conn.setTransactionIsolation(conn.TRANSACTION_READ_COMMITTED);
+
+        return conn;
+    }
+
+    public void connectedConfiguration(Connection conn) throws SQLException {
+    	super.connectedConfiguration(conn);
+
+    	DatabaseMetaData metaData = conn.getMetaData();
+    	if (metaData.getJDBCMajorVersion() >= 3) {
+			int maj = metaData.getDatabaseMajorVersion();
+	    	int min = metaData.getDatabaseMinorVersion();
+
+	    	if (maj >= 9 || (maj == 8 && min >= 2)) {
+	    		supportsLockingWithMultipleTables = true;
+	    		supportsLockingWithInnerJoin = true;
+	    		supportsLockingWithOuterJoin = true;
+	    		forUpdateClause = "WITH RR USE AND KEEP UPDATE LOCKS";
+	    	}
+    	}
+    }
+}

Modified: incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingDatabaseMetaData.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingDatabaseMetaData.java?view=diff&rev=482189&r1=482188&r2=482189
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingDatabaseMetaData.java (original)
+++ incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingDatabaseMetaData.java Mon Dec  4 06:42:09 2006
@@ -1,770 +1,770 @@
-/*
- * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.openjpa.lib.jdbc;
-
-import java.sql.Connection;
-import java.sql.DatabaseMetaData;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-
-/**
- * Wrapper around a DatabaseMetadata instance.
- *
- * @author Marc Prud'hommeaux
- */
-public class DelegatingDatabaseMetaData implements DatabaseMetaData {
-
-    private final DatabaseMetaData _metaData;
-    private final Connection _conn;
-
-    public DelegatingDatabaseMetaData(DatabaseMetaData metaData,
-        Connection conn) {
-        _conn = conn;
-        _metaData = metaData;
-    }
-
-    /**
-     * Return the base underlying database metadata.
-     */
-    public DatabaseMetaData getInnermostDelegate() {
-        return _metaData instanceof DelegatingDatabaseMetaData ?
-            ((DelegatingDatabaseMetaData) _metaData).getInnermostDelegate()
-            : _metaData;
-    }
-
-    public int hashCode() {
-        return getInnermostDelegate().hashCode();
-    }
-
-    public boolean equals(Object other) {
-        if (other == this)
-            return true;
-        if (other instanceof DelegatingDatabaseMetaData)
-            other = ((DelegatingDatabaseMetaData) other)
-                .getInnermostDelegate();
-        return getInnermostDelegate().equals(other);
-    }
-
-    public String toString() {
-        StringBuffer buf = new StringBuffer("metadata ").append(hashCode());
-        buf.append("[").append(_metaData.toString()).append("]");
-        return buf.toString();
-    }
-
-    public boolean allProceduresAreCallable() throws SQLException {
-        return _metaData.allProceduresAreCallable();
-    }
-
-    public boolean allTablesAreSelectable() throws SQLException {
-        return _metaData.allTablesAreSelectable();
-    }
-
-    public boolean dataDefinitionCausesTransactionCommit() throws SQLException {
-        return _metaData.dataDefinitionCausesTransactionCommit();
-    }
-
-    public boolean dataDefinitionIgnoredInTransactions() throws SQLException {
-        return _metaData.dataDefinitionIgnoredInTransactions();
-    }
-
-    public boolean deletesAreDetected(int type) throws SQLException {
-        return _metaData.deletesAreDetected(type);
-    }
-
-    public boolean doesMaxRowSizeIncludeBlobs() throws SQLException {
-        return _metaData.doesMaxRowSizeIncludeBlobs();
-    }
-
-    public ResultSet getBestRowIdentifier(String catalog,
-        String schema, String table, int scope, boolean nullable)
-        throws SQLException {
-        return _metaData.getBestRowIdentifier(catalog, schema,
-            table, scope, nullable);
-    }
-
-    public ResultSet getCatalogs() throws SQLException {
-        return _metaData.getCatalogs();
-    }
-
-    public String getCatalogSeparator() throws SQLException {
-        return _metaData.getCatalogSeparator();
-    }
-
-    public String getCatalogTerm() throws SQLException {
-        return _metaData.getCatalogTerm();
-    }
-
-    public ResultSet getColumnPrivileges(String catalog, String schema,
-        String table, String columnNamePattern) throws SQLException {
-        return _metaData.getColumnPrivileges(catalog, schema,
-            table, columnNamePattern);
-    }
-
-    public ResultSet getColumns(String catalog, String schemaPattern,
-        String tableNamePattern, String columnNamePattern) throws SQLException {
-        return _metaData.getColumns(catalog, schemaPattern,
-            tableNamePattern, columnNamePattern);
-    }
-
-    public Connection getConnection() throws SQLException {
-        return _conn;
-    }
-
-    public ResultSet getCrossReference(String primaryCatalog,
-        String primarySchema, String primaryTable, String foreignCatalog,
-        String foreignSchema, String foreignTable) throws SQLException {
-        return _metaData.getCrossReference(primaryCatalog, primarySchema,
-            primaryTable, foreignCatalog, foreignSchema, foreignTable);
-    }
-
-    public String getDatabaseProductName() throws SQLException {
-        return _metaData.getDatabaseProductName();
-    }
-
-    public String getDatabaseProductVersion() throws SQLException {
-        return _metaData.getDatabaseProductVersion();
-    }
-
-    public int getDefaultTransactionIsolation() throws SQLException {
-        return _metaData.getDefaultTransactionIsolation();
-    }
-
-    public int getDriverMajorVersion() {
-        return _metaData.getDriverMajorVersion();
-    }
-
-    public int getDriverMinorVersion() {
-        return _metaData.getDriverMinorVersion();
-    }
-
-    public String getDriverName() throws SQLException {
-        return _metaData.getDriverName();
-    }
-
-    public String getDriverVersion() throws SQLException {
-        return _metaData.getDriverVersion();
-    }
-
-    public ResultSet getExportedKeys(String catalog, String schema,
-        String table) throws SQLException {
-        return _metaData.getExportedKeys(catalog, schema, table);
-    }
-
-    public String getExtraNameCharacters() throws SQLException {
-        return _metaData.getExtraNameCharacters();
-    }
-
-    public String getIdentifierQuoteString() throws SQLException {
-        return _metaData.getIdentifierQuoteString();
-    }
-
-    public ResultSet getImportedKeys(String catalog, String schema,
-        String table) throws SQLException {
-        return _metaData.getImportedKeys(catalog, schema, table);
-    }
-
-    public ResultSet getIndexInfo(String catalog, String schema,
-        String table, boolean unique, boolean approximate) throws SQLException {
-        return _metaData.getIndexInfo(catalog, schema, table, unique,
-            approximate);
-    }
-
-    public int getMaxBinaryLiteralLength() throws SQLException {
-        return _metaData.getMaxBinaryLiteralLength();
-    }
-
-    public int getMaxCatalogNameLength() throws SQLException {
-        return _metaData.getMaxCatalogNameLength();
-    }
-
-    public int getMaxCharLiteralLength() throws SQLException {
-        return _metaData.getMaxCharLiteralLength();
-    }
-
-    public int getMaxColumnNameLength() throws SQLException {
-        return _metaData.getMaxColumnNameLength();
-    }
-
-    public int getMaxColumnsInGroupBy() throws SQLException {
-        return _metaData.getMaxColumnsInGroupBy();
-    }
-
-    public int getMaxColumnsInIndex() throws SQLException {
-        return _metaData.getMaxColumnsInIndex();
-    }
-
-    public int getMaxColumnsInOrderBy() throws SQLException {
-        return _metaData.getMaxColumnsInOrderBy();
-    }
-
-    public int getMaxColumnsInSelect() throws SQLException {
-        return _metaData.getMaxColumnsInSelect();
-    }
-
-    public int getMaxColumnsInTable() throws SQLException {
-        return _metaData.getMaxColumnsInTable();
-    }
-
-    public int getMaxConnections() throws SQLException {
-        return _metaData.getMaxConnections();
-    }
-
-    public int getMaxCursorNameLength() throws SQLException {
-        return _metaData.getMaxCursorNameLength();
-    }
-
-    public int getMaxIndexLength() throws SQLException {
-        return _metaData.getMaxIndexLength();
-    }
-
-    public int getMaxProcedureNameLength() throws SQLException {
-        return _metaData.getMaxProcedureNameLength();
-    }
-
-    public int getMaxRowSize() throws SQLException {
-        return _metaData.getMaxRowSize();
-    }
-
-    public int getMaxSchemaNameLength() throws SQLException {
-        return _metaData.getMaxSchemaNameLength();
-    }
-
-    public int getMaxStatementLength() throws SQLException {
-        return _metaData.getMaxStatementLength();
-    }
-
-    public int getMaxStatements() throws SQLException {
-        return _metaData.getMaxStatements();
-    }
-
-    public int getMaxTableNameLength() throws SQLException {
-        return _metaData.getMaxTableNameLength();
-    }
-
-    public int getMaxTablesInSelect() throws SQLException {
-        return _metaData.getMaxTablesInSelect();
-    }
-
-    public int getMaxUserNameLength() throws SQLException {
-        return _metaData.getMaxUserNameLength();
-    }
-
-    public String getNumericFunctions() throws SQLException {
-        return _metaData.getNumericFunctions();
-    }
-
-    public ResultSet getPrimaryKeys(String catalog, String schema, String table)
-        throws SQLException {
-        return _metaData.getPrimaryKeys(catalog, schema, table);
-    }
-
-    public ResultSet getProcedureColumns(String catalog, String schemaPattern,
-        String procedureNamePattern, String columnNamePattern)
-        throws SQLException {
-        return _metaData.getProcedureColumns(catalog, schemaPattern,
-            procedureNamePattern, columnNamePattern);
-    }
-
-    public ResultSet getProcedures(String catalog, String schemaPattern,
-        String procedureNamePattern) throws SQLException {
-        return _metaData.getProcedures(catalog, schemaPattern,
-            procedureNamePattern);
-    }
-
-    public String getProcedureTerm() throws SQLException {
-        return _metaData.getProcedureTerm();
-    }
-
-    public ResultSet getSchemas() throws SQLException {
-        return _metaData.getSchemas();
-    }
-
-    public String getSchemaTerm() throws SQLException {
-        return _metaData.getSchemaTerm();
-    }
-
-    public String getSearchStringEscape() throws SQLException {
-        return _metaData.getSearchStringEscape();
-    }
-
-    public String getSQLKeywords() throws SQLException {
-        return _metaData.getSQLKeywords();
-    }
-
-    public String getStringFunctions() throws SQLException {
-        return _metaData.getStringFunctions();
-    }
-
-    public String getSystemFunctions() throws SQLException {
-        return _metaData.getSystemFunctions();
-    }
-
-    public ResultSet getTablePrivileges(String catalog,
-        String schemaPattern, String tableNamePattern) throws SQLException {
-        return _metaData.getTablePrivileges(catalog, schemaPattern,
-            tableNamePattern);
-    }
-
-    public ResultSet getTables(String catalog, String schemaPattern,
-        String tableNamePattern, String[] types) throws SQLException {
-        return _metaData.getTables(catalog, schemaPattern,
-            tableNamePattern, types);
-    }
-
-    public ResultSet getTableTypes() throws SQLException {
-        return _metaData.getTableTypes();
-    }
-
-    public String getTimeDateFunctions() throws SQLException {
-        return _metaData.getTimeDateFunctions();
-    }
-
-    public ResultSet getTypeInfo() throws SQLException {
-        return _metaData.getTypeInfo();
-    }
-
-    public ResultSet getUDTs(String catalog, String schemaPattern,
-        String typeNamePattern, int[] types) throws SQLException {
-        return _metaData.getUDTs(catalog, schemaPattern,
-            typeNamePattern, types);
-    }
-
-    public String getURL() throws SQLException {
-        return _metaData.getURL();
-    }
-
-    public String getUserName() throws SQLException {
-        return _metaData.getUserName();
-    }
-
-    public ResultSet getVersionColumns(String catalog,
-        String schema, String table) throws SQLException {
-        return _metaData.getVersionColumns(catalog, schema, table);
-    }
-
-    public boolean insertsAreDetected(int type) throws SQLException {
-        return _metaData.insertsAreDetected(type);
-    }
-
-    public boolean isCatalogAtStart() throws SQLException {
-        return _metaData.isCatalogAtStart();
-    }
-
-    public boolean isReadOnly() throws SQLException {
-        return _metaData.isReadOnly();
-    }
-
-    public boolean nullPlusNonNullIsNull() throws SQLException {
-        return _metaData.nullPlusNonNullIsNull();
-    }
-
-    public boolean nullsAreSortedAtEnd() throws SQLException {
-        return _metaData.nullsAreSortedAtEnd();
-    }
-
-    public boolean nullsAreSortedAtStart() throws SQLException {
-        return _metaData.nullsAreSortedAtStart();
-    }
-
-    public boolean nullsAreSortedHigh() throws SQLException {
-        return _metaData.nullsAreSortedHigh();
-    }
-
-    public boolean nullsAreSortedLow() throws SQLException {
-        return _metaData.nullsAreSortedLow();
-    }
-
-    public boolean othersDeletesAreVisible(int type) throws SQLException {
-        return _metaData.othersDeletesAreVisible(type);
-    }
-
-    public boolean othersInsertsAreVisible(int type) throws SQLException {
-        return _metaData.othersInsertsAreVisible(type);
-    }
-
-    public boolean othersUpdatesAreVisible(int type) throws SQLException {
-        return _metaData.othersUpdatesAreVisible(type);
-    }
-
-    public boolean ownDeletesAreVisible(int type) throws SQLException {
-        return _metaData.ownDeletesAreVisible(type);
-    }
-
-    public boolean ownInsertsAreVisible(int type) throws SQLException {
-        return _metaData.ownInsertsAreVisible(type);
-    }
-
-    public boolean ownUpdatesAreVisible(int type) throws SQLException {
-        return _metaData.ownUpdatesAreVisible(type);
-    }
-
-    public boolean storesLowerCaseIdentifiers() throws SQLException {
-        return _metaData.storesLowerCaseIdentifiers();
-    }
-
-    public boolean storesLowerCaseQuotedIdentifiers() throws SQLException {
-        return _metaData.storesLowerCaseQuotedIdentifiers();
-    }
-
-    public boolean storesMixedCaseIdentifiers() throws SQLException {
-        return _metaData.storesMixedCaseIdentifiers();
-    }
-
-    public boolean storesMixedCaseQuotedIdentifiers() throws SQLException {
-        return _metaData.storesMixedCaseQuotedIdentifiers();
-    }
-
-    public boolean storesUpperCaseIdentifiers() throws SQLException {
-        return _metaData.storesUpperCaseIdentifiers();
-    }
-
-    public boolean storesUpperCaseQuotedIdentifiers() throws SQLException {
-        return _metaData.storesUpperCaseQuotedIdentifiers();
-    }
-
-    public boolean supportsAlterTableWithAddColumn() throws SQLException {
-        return _metaData.supportsAlterTableWithAddColumn();
-    }
-
-    public boolean supportsAlterTableWithDropColumn() throws SQLException {
-        return _metaData.supportsAlterTableWithDropColumn();
-    }
-
-    public boolean supportsANSI92EntryLevelSQL() throws SQLException {
-        return _metaData.supportsANSI92EntryLevelSQL();
-    }
-
-    public boolean supportsANSI92FullSQL() throws SQLException {
-        return _metaData.supportsANSI92FullSQL();
-    }
-
-    public boolean supportsANSI92IntermediateSQL() throws SQLException {
-        return _metaData.supportsANSI92IntermediateSQL();
-    }
-
-    public boolean supportsBatchUpdates() throws SQLException {
-        return _metaData.supportsBatchUpdates();
-    }
-
-    public boolean supportsCatalogsInDataManipulation() throws SQLException {
-        return _metaData.supportsCatalogsInDataManipulation();
-    }
-
-    public boolean supportsCatalogsInIndexDefinitions() throws SQLException {
-        return _metaData.supportsCatalogsInIndexDefinitions();
-    }
-
-    public boolean supportsCatalogsInPrivilegeDefinitions()
-        throws SQLException {
-        return _metaData.supportsCatalogsInPrivilegeDefinitions();
-    }
-
-    public boolean supportsCatalogsInProcedureCalls() throws SQLException {
-        return _metaData.supportsCatalogsInProcedureCalls();
-    }
-
-    public boolean supportsCatalogsInTableDefinitions() throws SQLException {
-        return _metaData.supportsCatalogsInTableDefinitions();
-    }
-
-    public boolean supportsColumnAliasing() throws SQLException {
-        return _metaData.supportsColumnAliasing();
-    }
-
-    public boolean supportsConvert() throws SQLException {
-        return _metaData.supportsConvert();
-    }
-
-    public boolean supportsConvert(int fromType, int toType)
-        throws SQLException {
-        return _metaData.supportsConvert(fromType, toType);
-    }
-
-    public boolean supportsCoreSQLGrammar() throws SQLException {
-        return _metaData.supportsCoreSQLGrammar();
-    }
-
-    public boolean supportsCorrelatedSubqueries() throws SQLException {
-        return _metaData.supportsCorrelatedSubqueries();
-    }
-
-    public boolean supportsDataDefinitionAndDataManipulationTransactions()
-        throws SQLException {
-        return _metaData
-            .supportsDataDefinitionAndDataManipulationTransactions();
-    }
-
-    public boolean supportsDataManipulationTransactionsOnly()
-        throws SQLException {
-        return _metaData.supportsDataManipulationTransactionsOnly();
-    }
-
-    public boolean supportsDifferentTableCorrelationNames()
-        throws SQLException {
-        return _metaData.supportsDifferentTableCorrelationNames();
-    }
-
-    public boolean supportsExpressionsInOrderBy() throws SQLException {
-        return _metaData.supportsExpressionsInOrderBy();
-    }
-
-    public boolean supportsExtendedSQLGrammar() throws SQLException {
-        return _metaData.supportsExtendedSQLGrammar();
-    }
-
-    public boolean supportsFullOuterJoins() throws SQLException {
-        return _metaData.supportsFullOuterJoins();
-    }
-
-    public boolean supportsGroupBy() throws SQLException {
-        return _metaData.supportsGroupBy();
-    }
-
-    public boolean supportsGroupByBeyondSelect() throws SQLException {
-        return _metaData.supportsGroupByBeyondSelect();
-    }
-
-    public boolean supportsGroupByUnrelated() throws SQLException {
-        return _metaData.supportsGroupByUnrelated();
-    }
-
-    public boolean supportsIntegrityEnhancementFacility() throws SQLException {
-        return _metaData.supportsIntegrityEnhancementFacility();
-    }
-
-    public boolean supportsLikeEscapeClause() throws SQLException {
-        return _metaData.supportsLikeEscapeClause();
-    }
-
-    public boolean supportsLimitedOuterJoins() throws SQLException {
-        return _metaData.supportsLimitedOuterJoins();
-    }
-
-    public boolean supportsMinimumSQLGrammar() throws SQLException {
-        return _metaData.supportsMinimumSQLGrammar();
-    }
-
-    public boolean supportsMixedCaseIdentifiers() throws SQLException {
-        return _metaData.supportsMixedCaseIdentifiers();
-    }
-
-    public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException {
-        return _metaData.supportsMixedCaseQuotedIdentifiers();
-    }
-
-    public boolean supportsMultipleResultSets() throws SQLException {
-        return _metaData.supportsMultipleResultSets();
-    }
-
-    public boolean supportsMultipleTransactions() throws SQLException {
-        return _metaData.supportsMultipleTransactions();
-    }
-
-    public boolean supportsNonNullableColumns() throws SQLException {
-        return _metaData.supportsNonNullableColumns();
-    }
-
-    public boolean supportsOpenCursorsAcrossCommit() throws SQLException {
-        return _metaData.supportsOpenCursorsAcrossCommit();
-    }
-
-    public boolean supportsOpenCursorsAcrossRollback() throws SQLException {
-        return _metaData.supportsOpenCursorsAcrossRollback();
-    }
-
-    public boolean supportsOpenStatementsAcrossCommit() throws SQLException {
-        return _metaData.supportsOpenStatementsAcrossCommit();
-    }
-
-    public boolean supportsOpenStatementsAcrossRollback() throws SQLException {
-        return _metaData.supportsOpenStatementsAcrossRollback();
-    }
-
-    public boolean supportsOrderByUnrelated() throws SQLException {
-        return _metaData.supportsOrderByUnrelated();
-    }
-
-    public boolean supportsOuterJoins() throws SQLException {
-        return _metaData.supportsOuterJoins();
-    }
-
-    public boolean supportsPositionedDelete() throws SQLException {
-        return _metaData.supportsPositionedDelete();
-    }
-
-    public boolean supportsPositionedUpdate() throws SQLException {
-        return _metaData.supportsPositionedUpdate();
-    }
-
-    public boolean supportsResultSetConcurrency(int type, int concurrency)
-        throws SQLException {
-        return _metaData.supportsResultSetConcurrency(type, concurrency);
-    }
-
-    public boolean supportsResultSetType(int type) throws SQLException {
-        return _metaData.supportsResultSetType(type);
-    }
-
-    public boolean supportsSchemasInDataManipulation() throws SQLException {
-        return _metaData.supportsSchemasInDataManipulation();
-    }
-
-    public boolean supportsSchemasInIndexDefinitions() throws SQLException {
-        return _metaData.supportsSchemasInIndexDefinitions();
-    }
-
-    public boolean supportsSchemasInPrivilegeDefinitions() throws SQLException {
-        return _metaData.supportsSchemasInPrivilegeDefinitions();
-    }
-
-    public boolean supportsSchemasInProcedureCalls() throws SQLException {
-        return _metaData.supportsSchemasInProcedureCalls();
-    }
-
-    public boolean supportsSchemasInTableDefinitions() throws SQLException {
-        return _metaData.supportsSchemasInTableDefinitions();
-    }
-
-    public boolean supportsSelectForUpdate() throws SQLException {
-        return _metaData.supportsSelectForUpdate();
-    }
-
-    public boolean supportsStoredProcedures() throws SQLException {
-        return _metaData.supportsStoredProcedures();
-    }
-
-    public boolean supportsSubqueriesInComparisons() throws SQLException {
-        return _metaData.supportsSubqueriesInComparisons();
-    }
-
-    public boolean supportsSubqueriesInExists() throws SQLException {
-        return _metaData.supportsSubqueriesInExists();
-    }
-
-    public boolean supportsSubqueriesInIns() throws SQLException {
-        return _metaData.supportsSubqueriesInIns();
-    }
-
-    public boolean supportsSubqueriesInQuantifieds() throws SQLException {
-        return _metaData.supportsSubqueriesInQuantifieds();
-    }
-
-    public boolean supportsTableCorrelationNames() throws SQLException {
-        return _metaData.supportsTableCorrelationNames();
-    }
-
-    public boolean supportsTransactionIsolationLevel(int level)
-        throws SQLException {
-        return _metaData.supportsTransactionIsolationLevel(level);
-    }
-
-    public boolean supportsTransactions() throws SQLException {
-        return _metaData.supportsTransactions();
-    }
-
-    public boolean supportsUnion() throws SQLException {
-        return _metaData.supportsUnion();
-    }
-
-    public boolean supportsUnionAll() throws SQLException {
-        return _metaData.supportsUnionAll();
-    }
-
-    public boolean updatesAreDetected(int type) throws SQLException {
-        return _metaData.updatesAreDetected(type);
-    }
-
-    public boolean usesLocalFilePerTable() throws SQLException {
-        return _metaData.usesLocalFilePerTable();
-    }
-
-    public boolean usesLocalFiles() throws SQLException {
-        return _metaData.usesLocalFiles();
-    }
-
-    // JDBC 3.0 methods(unsupported) follow; these are required to be able to
-    // compile against JDK 1.4
-
-    public boolean supportsSavepoints() throws SQLException {
-        throw new UnsupportedOperationException();
-    }
-
-    public boolean supportsNamedParameters() throws SQLException {
-        throw new UnsupportedOperationException();
-    }
-
-    public boolean supportsMultipleOpenResults() throws SQLException {
-        throw new UnsupportedOperationException();
-    }
-
-    public boolean supportsGetGeneratedKeys() throws SQLException {
-        throw new UnsupportedOperationException();
-    }
-
-    public ResultSet getSuperTypes(String catalog, String schemaPatter,
-        String typeNamePattern) throws SQLException {
-        throw new UnsupportedOperationException();
-    }
-
-    public ResultSet getSuperTables(String catalog, String schemaPatter,
-        String tableNamePattern) throws SQLException {
-        throw new UnsupportedOperationException();
-    }
-
-    public ResultSet getAttributes(String catalog, String schemaPatter,
-        String typeNamePattern, String attributeNamePattern)
-        throws SQLException {
-        throw new UnsupportedOperationException();
-    }
-
-    public boolean supportsResultSetHoldability(int holdability)
-        throws SQLException {
-        throw new UnsupportedOperationException();
-    }
-
-    public int getResultSetHoldability() throws SQLException {
-        throw new UnsupportedOperationException();
-    }
-
-    public int getDatabaseMajorVersion() throws SQLException {
-        throw new UnsupportedOperationException();
-    }
-
-    public int getDatabaseMinorVersion() throws SQLException {
-        throw new UnsupportedOperationException();
-    }
-
-    public int getJDBCMajorVersion() throws SQLException {
-        throw new UnsupportedOperationException();
-    }
-
-    public int getJDBCMinorVersion() throws SQLException {
-        throw new UnsupportedOperationException();
-    }
-
-    public int getSQLStateType() throws SQLException {
-        throw new UnsupportedOperationException();
-    }
-
-    public boolean locatorsUpdateCopy() throws SQLException {
-        throw new UnsupportedOperationException();
-    }
-
-    public boolean supportsStatementPooling() throws SQLException {
-        throw new UnsupportedOperationException();
-    }
-}
-
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openjpa.lib.jdbc;
+
+import java.sql.Connection;
+import java.sql.DatabaseMetaData;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+/**
+ * Wrapper around a DatabaseMetadata instance.
+ *
+ * @author Marc Prud'hommeaux
+ */
+public class DelegatingDatabaseMetaData implements DatabaseMetaData {
+
+    private final DatabaseMetaData _metaData;
+    private final Connection _conn;
+
+    public DelegatingDatabaseMetaData(DatabaseMetaData metaData,
+        Connection conn) {
+        _conn = conn;
+        _metaData = metaData;
+    }
+
+    /**
+     * Return the base underlying database metadata.
+     */
+    public DatabaseMetaData getInnermostDelegate() {
+        return _metaData instanceof DelegatingDatabaseMetaData ?
+            ((DelegatingDatabaseMetaData) _metaData).getInnermostDelegate()
+            : _metaData;
+    }
+
+    public int hashCode() {
+        return getInnermostDelegate().hashCode();
+    }
+
+    public boolean equals(Object other) {
+        if (other == this)
+            return true;
+        if (other instanceof DelegatingDatabaseMetaData)
+            other = ((DelegatingDatabaseMetaData) other)
+                .getInnermostDelegate();
+        return getInnermostDelegate().equals(other);
+    }
+
+    public String toString() {
+        StringBuffer buf = new StringBuffer("metadata ").append(hashCode());
+        buf.append("[").append(_metaData.toString()).append("]");
+        return buf.toString();
+    }
+
+    public boolean allProceduresAreCallable() throws SQLException {
+        return _metaData.allProceduresAreCallable();
+    }
+
+    public boolean allTablesAreSelectable() throws SQLException {
+        return _metaData.allTablesAreSelectable();
+    }
+
+    public boolean dataDefinitionCausesTransactionCommit() throws SQLException {
+        return _metaData.dataDefinitionCausesTransactionCommit();
+    }
+
+    public boolean dataDefinitionIgnoredInTransactions() throws SQLException {
+        return _metaData.dataDefinitionIgnoredInTransactions();
+    }
+
+    public boolean deletesAreDetected(int type) throws SQLException {
+        return _metaData.deletesAreDetected(type);
+    }
+
+    public boolean doesMaxRowSizeIncludeBlobs() throws SQLException {
+        return _metaData.doesMaxRowSizeIncludeBlobs();
+    }
+
+    public ResultSet getBestRowIdentifier(String catalog,
+        String schema, String table, int scope, boolean nullable)
+        throws SQLException {
+        return _metaData.getBestRowIdentifier(catalog, schema,
+            table, scope, nullable);
+    }
+
+    public ResultSet getCatalogs() throws SQLException {
+        return _metaData.getCatalogs();
+    }
+
+    public String getCatalogSeparator() throws SQLException {
+        return _metaData.getCatalogSeparator();
+    }
+
+    public String getCatalogTerm() throws SQLException {
+        return _metaData.getCatalogTerm();
+    }
+
+    public ResultSet getColumnPrivileges(String catalog, String schema,
+        String table, String columnNamePattern) throws SQLException {
+        return _metaData.getColumnPrivileges(catalog, schema,
+            table, columnNamePattern);
+    }
+
+    public ResultSet getColumns(String catalog, String schemaPattern,
+        String tableNamePattern, String columnNamePattern) throws SQLException {
+        return _metaData.getColumns(catalog, schemaPattern,
+            tableNamePattern, columnNamePattern);
+    }
+
+    public Connection getConnection() throws SQLException {
+        return _conn;
+    }
+
+    public ResultSet getCrossReference(String primaryCatalog,
+        String primarySchema, String primaryTable, String foreignCatalog,
+        String foreignSchema, String foreignTable) throws SQLException {
+        return _metaData.getCrossReference(primaryCatalog, primarySchema,
+            primaryTable, foreignCatalog, foreignSchema, foreignTable);
+    }
+
+    public String getDatabaseProductName() throws SQLException {
+        return _metaData.getDatabaseProductName();
+    }
+
+    public String getDatabaseProductVersion() throws SQLException {
+        return _metaData.getDatabaseProductVersion();
+    }
+
+    public int getDefaultTransactionIsolation() throws SQLException {
+        return _metaData.getDefaultTransactionIsolation();
+    }
+
+    public int getDriverMajorVersion() {
+        return _metaData.getDriverMajorVersion();
+    }
+
+    public int getDriverMinorVersion() {
+        return _metaData.getDriverMinorVersion();
+    }
+
+    public String getDriverName() throws SQLException {
+        return _metaData.getDriverName();
+    }
+
+    public String getDriverVersion() throws SQLException {
+        return _metaData.getDriverVersion();
+    }
+
+    public ResultSet getExportedKeys(String catalog, String schema,
+        String table) throws SQLException {
+        return _metaData.getExportedKeys(catalog, schema, table);
+    }
+
+    public String getExtraNameCharacters() throws SQLException {
+        return _metaData.getExtraNameCharacters();
+    }
+
+    public String getIdentifierQuoteString() throws SQLException {
+        return _metaData.getIdentifierQuoteString();
+    }
+
+    public ResultSet getImportedKeys(String catalog, String schema,
+        String table) throws SQLException {
+        return _metaData.getImportedKeys(catalog, schema, table);
+    }
+
+    public ResultSet getIndexInfo(String catalog, String schema,
+        String table, boolean unique, boolean approximate) throws SQLException {
+        return _metaData.getIndexInfo(catalog, schema, table, unique,
+            approximate);
+    }
+
+    public int getMaxBinaryLiteralLength() throws SQLException {
+        return _metaData.getMaxBinaryLiteralLength();
+    }
+
+    public int getMaxCatalogNameLength() throws SQLException {
+        return _metaData.getMaxCatalogNameLength();
+    }
+
+    public int getMaxCharLiteralLength() throws SQLException {
+        return _metaData.getMaxCharLiteralLength();
+    }
+
+    public int getMaxColumnNameLength() throws SQLException {
+        return _metaData.getMaxColumnNameLength();
+    }
+
+    public int getMaxColumnsInGroupBy() throws SQLException {
+        return _metaData.getMaxColumnsInGroupBy();
+    }
+
+    public int getMaxColumnsInIndex() throws SQLException {
+        return _metaData.getMaxColumnsInIndex();
+    }
+
+    public int getMaxColumnsInOrderBy() throws SQLException {
+        return _metaData.getMaxColumnsInOrderBy();
+    }
+
+    public int getMaxColumnsInSelect() throws SQLException {
+        return _metaData.getMaxColumnsInSelect();
+    }
+
+    public int getMaxColumnsInTable() throws SQLException {
+        return _metaData.getMaxColumnsInTable();
+    }
+
+    public int getMaxConnections() throws SQLException {
+        return _metaData.getMaxConnections();
+    }
+
+    public int getMaxCursorNameLength() throws SQLException {
+        return _metaData.getMaxCursorNameLength();
+    }
+
+    public int getMaxIndexLength() throws SQLException {
+        return _metaData.getMaxIndexLength();
+    }
+
+    public int getMaxProcedureNameLength() throws SQLException {
+        return _metaData.getMaxProcedureNameLength();
+    }
+
+    public int getMaxRowSize() throws SQLException {
+        return _metaData.getMaxRowSize();
+    }
+
+    public int getMaxSchemaNameLength() throws SQLException {
+        return _metaData.getMaxSchemaNameLength();
+    }
+
+    public int getMaxStatementLength() throws SQLException {
+        return _metaData.getMaxStatementLength();
+    }
+
+    public int getMaxStatements() throws SQLException {
+        return _metaData.getMaxStatements();
+    }
+
+    public int getMaxTableNameLength() throws SQLException {
+        return _metaData.getMaxTableNameLength();
+    }
+
+    public int getMaxTablesInSelect() throws SQLException {
+        return _metaData.getMaxTablesInSelect();
+    }
+
+    public int getMaxUserNameLength() throws SQLException {
+        return _metaData.getMaxUserNameLength();
+    }
+
+    public String getNumericFunctions() throws SQLException {
+        return _metaData.getNumericFunctions();
+    }
+
+    public ResultSet getPrimaryKeys(String catalog, String schema, String table)
+        throws SQLException {
+        return _metaData.getPrimaryKeys(catalog, schema, table);
+    }
+
+    public ResultSet getProcedureColumns(String catalog, String schemaPattern,
+        String procedureNamePattern, String columnNamePattern)
+        throws SQLException {
+        return _metaData.getProcedureColumns(catalog, schemaPattern,
+            procedureNamePattern, columnNamePattern);
+    }
+
+    public ResultSet getProcedures(String catalog, String schemaPattern,
+        String procedureNamePattern) throws SQLException {
+        return _metaData.getProcedures(catalog, schemaPattern,
+            procedureNamePattern);
+    }
+
+    public String getProcedureTerm() throws SQLException {
+        return _metaData.getProcedureTerm();
+    }
+
+    public ResultSet getSchemas() throws SQLException {
+        return _metaData.getSchemas();
+    }
+
+    public String getSchemaTerm() throws SQLException {
+        return _metaData.getSchemaTerm();
+    }
+
+    public String getSearchStringEscape() throws SQLException {
+        return _metaData.getSearchStringEscape();
+    }
+
+    public String getSQLKeywords() throws SQLException {
+        return _metaData.getSQLKeywords();
+    }
+
+    public String getStringFunctions() throws SQLException {
+        return _metaData.getStringFunctions();
+    }
+
+    public String getSystemFunctions() throws SQLException {
+        return _metaData.getSystemFunctions();
+    }
+
+    public ResultSet getTablePrivileges(String catalog,
+        String schemaPattern, String tableNamePattern) throws SQLException {
+        return _metaData.getTablePrivileges(catalog, schemaPattern,
+            tableNamePattern);
+    }
+
+    public ResultSet getTables(String catalog, String schemaPattern,
+        String tableNamePattern, String[] types) throws SQLException {
+        return _metaData.getTables(catalog, schemaPattern,
+            tableNamePattern, types);
+    }
+
+    public ResultSet getTableTypes() throws SQLException {
+        return _metaData.getTableTypes();
+    }
+
+    public String getTimeDateFunctions() throws SQLException {
+        return _metaData.getTimeDateFunctions();
+    }
+
+    public ResultSet getTypeInfo() throws SQLException {
+        return _metaData.getTypeInfo();
+    }
+
+    public ResultSet getUDTs(String catalog, String schemaPattern,
+        String typeNamePattern, int[] types) throws SQLException {
+        return _metaData.getUDTs(catalog, schemaPattern,
+            typeNamePattern, types);
+    }
+
+    public String getURL() throws SQLException {
+        return _metaData.getURL();
+    }
+
+    public String getUserName() throws SQLException {
+        return _metaData.getUserName();
+    }
+
+    public ResultSet getVersionColumns(String catalog,
+        String schema, String table) throws SQLException {
+        return _metaData.getVersionColumns(catalog, schema, table);
+    }
+
+    public boolean insertsAreDetected(int type) throws SQLException {
+        return _metaData.insertsAreDetected(type);
+    }
+
+    public boolean isCatalogAtStart() throws SQLException {
+        return _metaData.isCatalogAtStart();
+    }
+
+    public boolean isReadOnly() throws SQLException {
+        return _metaData.isReadOnly();
+    }
+
+    public boolean nullPlusNonNullIsNull() throws SQLException {
+        return _metaData.nullPlusNonNullIsNull();
+    }
+
+    public boolean nullsAreSortedAtEnd() throws SQLException {
+        return _metaData.nullsAreSortedAtEnd();
+    }
+
+    public boolean nullsAreSortedAtStart() throws SQLException {
+        return _metaData.nullsAreSortedAtStart();
+    }
+
+    public boolean nullsAreSortedHigh() throws SQLException {
+        return _metaData.nullsAreSortedHigh();
+    }
+
+    public boolean nullsAreSortedLow() throws SQLException {
+        return _metaData.nullsAreSortedLow();
+    }
+
+    public boolean othersDeletesAreVisible(int type) throws SQLException {
+        return _metaData.othersDeletesAreVisible(type);
+    }
+
+    public boolean othersInsertsAreVisible(int type) throws SQLException {
+        return _metaData.othersInsertsAreVisible(type);
+    }
+
+    public boolean othersUpdatesAreVisible(int type) throws SQLException {
+        return _metaData.othersUpdatesAreVisible(type);
+    }
+
+    public boolean ownDeletesAreVisible(int type) throws SQLException {
+        return _metaData.ownDeletesAreVisible(type);
+    }
+
+    public boolean ownInsertsAreVisible(int type) throws SQLException {
+        return _metaData.ownInsertsAreVisible(type);
+    }
+
+    public boolean ownUpdatesAreVisible(int type) throws SQLException {
+        return _metaData.ownUpdatesAreVisible(type);
+    }
+
+    public boolean storesLowerCaseIdentifiers() throws SQLException {
+        return _metaData.storesLowerCaseIdentifiers();
+    }
+
+    public boolean storesLowerCaseQuotedIdentifiers() throws SQLException {
+        return _metaData.storesLowerCaseQuotedIdentifiers();
+    }
+
+    public boolean storesMixedCaseIdentifiers() throws SQLException {
+        return _metaData.storesMixedCaseIdentifiers();
+    }
+
+    public boolean storesMixedCaseQuotedIdentifiers() throws SQLException {
+        return _metaData.storesMixedCaseQuotedIdentifiers();
+    }
+
+    public boolean storesUpperCaseIdentifiers() throws SQLException {
+        return _metaData.storesUpperCaseIdentifiers();
+    }
+
+    public boolean storesUpperCaseQuotedIdentifiers() throws SQLException {
+        return _metaData.storesUpperCaseQuotedIdentifiers();
+    }
+
+    public boolean supportsAlterTableWithAddColumn() throws SQLException {
+        return _metaData.supportsAlterTableWithAddColumn();
+    }
+
+    public boolean supportsAlterTableWithDropColumn() throws SQLException {
+        return _metaData.supportsAlterTableWithDropColumn();
+    }
+
+    public boolean supportsANSI92EntryLevelSQL() throws SQLException {
+        return _metaData.supportsANSI92EntryLevelSQL();
+    }
+
+    public boolean supportsANSI92FullSQL() throws SQLException {
+        return _metaData.supportsANSI92FullSQL();
+    }
+
+    public boolean supportsANSI92IntermediateSQL() throws SQLException {
+        return _metaData.supportsANSI92IntermediateSQL();
+    }
+
+    public boolean supportsBatchUpdates() throws SQLException {
+        return _metaData.supportsBatchUpdates();
+    }
+
+    public boolean supportsCatalogsInDataManipulation() throws SQLException {
+        return _metaData.supportsCatalogsInDataManipulation();
+    }
+
+    public boolean supportsCatalogsInIndexDefinitions() throws SQLException {
+        return _metaData.supportsCatalogsInIndexDefinitions();
+    }
+
+    public boolean supportsCatalogsInPrivilegeDefinitions()
+        throws SQLException {
+        return _metaData.supportsCatalogsInPrivilegeDefinitions();
+    }
+
+    public boolean supportsCatalogsInProcedureCalls() throws SQLException {
+        return _metaData.supportsCatalogsInProcedureCalls();
+    }
+
+    public boolean supportsCatalogsInTableDefinitions() throws SQLException {
+        return _metaData.supportsCatalogsInTableDefinitions();
+    }
+
+    public boolean supportsColumnAliasing() throws SQLException {
+        return _metaData.supportsColumnAliasing();
+    }
+
+    public boolean supportsConvert() throws SQLException {
+        return _metaData.supportsConvert();
+    }
+
+    public boolean supportsConvert(int fromType, int toType)
+        throws SQLException {
+        return _metaData.supportsConvert(fromType, toType);
+    }
+
+    public boolean supportsCoreSQLGrammar() throws SQLException {
+        return _metaData.supportsCoreSQLGrammar();
+    }
+
+    public boolean supportsCorrelatedSubqueries() throws SQLException {
+        return _metaData.supportsCorrelatedSubqueries();
+    }
+
+    public boolean supportsDataDefinitionAndDataManipulationTransactions()
+        throws SQLException {
+        return _metaData
+            .supportsDataDefinitionAndDataManipulationTransactions();
+    }
+
+    public boolean supportsDataManipulationTransactionsOnly()
+        throws SQLException {
+        return _metaData.supportsDataManipulationTransactionsOnly();
+    }
+
+    public boolean supportsDifferentTableCorrelationNames()
+        throws SQLException {
+        return _metaData.supportsDifferentTableCorrelationNames();
+    }
+
+    public boolean supportsExpressionsInOrderBy() throws SQLException {
+        return _metaData.supportsExpressionsInOrderBy();
+    }
+
+    public boolean supportsExtendedSQLGrammar() throws SQLException {
+        return _metaData.supportsExtendedSQLGrammar();
+    }
+
+    public boolean supportsFullOuterJoins() throws SQLException {
+        return _metaData.supportsFullOuterJoins();
+    }
+
+    public boolean supportsGroupBy() throws SQLException {
+        return _metaData.supportsGroupBy();
+    }
+
+    public boolean supportsGroupByBeyondSelect() throws SQLException {
+        return _metaData.supportsGroupByBeyondSelect();
+    }
+
+    public boolean supportsGroupByUnrelated() throws SQLException {
+        return _metaData.supportsGroupByUnrelated();
+    }
+
+    public boolean supportsIntegrityEnhancementFacility() throws SQLException {
+        return _metaData.supportsIntegrityEnhancementFacility();
+    }
+
+    public boolean supportsLikeEscapeClause() throws SQLException {
+        return _metaData.supportsLikeEscapeClause();
+    }
+
+    public boolean supportsLimitedOuterJoins() throws SQLException {
+        return _metaData.supportsLimitedOuterJoins();
+    }
+
+    public boolean supportsMinimumSQLGrammar() throws SQLException {
+        return _metaData.supportsMinimumSQLGrammar();
+    }
+
+    public boolean supportsMixedCaseIdentifiers() throws SQLException {
+        return _metaData.supportsMixedCaseIdentifiers();
+    }
+
+    public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException {
+        return _metaData.supportsMixedCaseQuotedIdentifiers();
+    }
+
+    public boolean supportsMultipleResultSets() throws SQLException {
+        return _metaData.supportsMultipleResultSets();
+    }
+
+    public boolean supportsMultipleTransactions() throws SQLException {
+        return _metaData.supportsMultipleTransactions();
+    }
+
+    public boolean supportsNonNullableColumns() throws SQLException {
+        return _metaData.supportsNonNullableColumns();
+    }
+
+    public boolean supportsOpenCursorsAcrossCommit() throws SQLException {
+        return _metaData.supportsOpenCursorsAcrossCommit();
+    }
+
+    public boolean supportsOpenCursorsAcrossRollback() throws SQLException {
+        return _metaData.supportsOpenCursorsAcrossRollback();
+    }
+
+    public boolean supportsOpenStatementsAcrossCommit() throws SQLException {
+        return _metaData.supportsOpenStatementsAcrossCommit();
+    }
+
+    public boolean supportsOpenStatementsAcrossRollback() throws SQLException {
+        return _metaData.supportsOpenStatementsAcrossRollback();
+    }
+
+    public boolean supportsOrderByUnrelated() throws SQLException {
+        return _metaData.supportsOrderByUnrelated();
+    }
+
+    public boolean supportsOuterJoins() throws SQLException {
+        return _metaData.supportsOuterJoins();
+    }
+
+    public boolean supportsPositionedDelete() throws SQLException {
+        return _metaData.supportsPositionedDelete();
+    }
+
+    public boolean supportsPositionedUpdate() throws SQLException {
+        return _metaData.supportsPositionedUpdate();
+    }
+
+    public boolean supportsResultSetConcurrency(int type, int concurrency)
+        throws SQLException {
+        return _metaData.supportsResultSetConcurrency(type, concurrency);
+    }
+
+    public boolean supportsResultSetType(int type) throws SQLException {
+        return _metaData.supportsResultSetType(type);
+    }
+
+    public boolean supportsSchemasInDataManipulation() throws SQLException {
+        return _metaData.supportsSchemasInDataManipulation();
+    }
+
+    public boolean supportsSchemasInIndexDefinitions() throws SQLException {
+        return _metaData.supportsSchemasInIndexDefinitions();
+    }
+
+    public boolean supportsSchemasInPrivilegeDefinitions() throws SQLException {
+        return _metaData.supportsSchemasInPrivilegeDefinitions();
+    }
+
+    public boolean supportsSchemasInProcedureCalls() throws SQLException {
+        return _metaData.supportsSchemasInProcedureCalls();
+    }
+
+    public boolean supportsSchemasInTableDefinitions() throws SQLException {
+        return _metaData.supportsSchemasInTableDefinitions();
+    }
+
+    public boolean supportsSelectForUpdate() throws SQLException {
+        return _metaData.supportsSelectForUpdate();
+    }
+
+    public boolean supportsStoredProcedures() throws SQLException {
+        return _metaData.supportsStoredProcedures();
+    }
+
+    public boolean supportsSubqueriesInComparisons() throws SQLException {
+        return _metaData.supportsSubqueriesInComparisons();
+    }
+
+    public boolean supportsSubqueriesInExists() throws SQLException {
+        return _metaData.supportsSubqueriesInExists();
+    }
+
+    public boolean supportsSubqueriesInIns() throws SQLException {
+        return _metaData.supportsSubqueriesInIns();
+    }
+
+    public boolean supportsSubqueriesInQuantifieds() throws SQLException {
+        return _metaData.supportsSubqueriesInQuantifieds();
+    }
+
+    public boolean supportsTableCorrelationNames() throws SQLException {
+        return _metaData.supportsTableCorrelationNames();
+    }
+
+    public boolean supportsTransactionIsolationLevel(int level)
+        throws SQLException {
+        return _metaData.supportsTransactionIsolationLevel(level);
+    }
+
+    public boolean supportsTransactions() throws SQLException {
+        return _metaData.supportsTransactions();
+    }
+
+    public boolean supportsUnion() throws SQLException {
+        return _metaData.supportsUnion();
+    }
+
+    public boolean supportsUnionAll() throws SQLException {
+        return _metaData.supportsUnionAll();
+    }
+
+    public boolean updatesAreDetected(int type) throws SQLException {
+        return _metaData.updatesAreDetected(type);
+    }
+
+    public boolean usesLocalFilePerTable() throws SQLException {
+        return _metaData.usesLocalFilePerTable();
+    }
+
+    public boolean usesLocalFiles() throws SQLException {
+        return _metaData.usesLocalFiles();
+    }
+
+    // JDBC 3.0 methods(unsupported) follow; these are required to be able to
+    // compile against JDK 1.4
+
+    public boolean supportsSavepoints() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean supportsNamedParameters() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean supportsMultipleOpenResults() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean supportsGetGeneratedKeys() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public ResultSet getSuperTypes(String catalog, String schemaPatter,
+        String typeNamePattern) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public ResultSet getSuperTables(String catalog, String schemaPatter,
+        String tableNamePattern) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public ResultSet getAttributes(String catalog, String schemaPatter,
+        String typeNamePattern, String attributeNamePattern)
+        throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean supportsResultSetHoldability(int holdability)
+        throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public int getResultSetHoldability() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public int getDatabaseMajorVersion() throws SQLException {
+        return _metaData.getDatabaseMajorVersion();
+    }
+
+    public int getDatabaseMinorVersion() throws SQLException {
+        return _metaData.getDatabaseMinorVersion();
+    }
+
+    public int getJDBCMajorVersion() throws SQLException {
+        return _metaData.getJDBCMajorVersion();
+    }
+
+    public int getJDBCMinorVersion() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public int getSQLStateType() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean locatorsUpdateCopy() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean supportsStatementPooling() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+}
+



Mime
View raw message