CAY-2026 Java 7 * JDBC 4.1 implementation in various JDBC wrappers
Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/e9dd773b Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/e9dd773b Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/e9dd773b Branch: refs/heads/master Commit: e9dd773b592ae3616c27cf0d8c8774d04ff6c4d8 Parents: e1157f3a Author: aadamchik <[email protected]> Authored: Sat Sep 12 08:35:09 2015 +0300 Committer: aadamchik <[email protected]> Committed: Sat Sep 12 13:01:53 2015 +0300 ---------------------------------------------------------------------- .../access/TransactionConnectionDecorator.java | 675 +++++----- .../cayenne/datasource/DriverDataSource.java | 3 +- .../datasource/ManagedPoolingDataSource.java | 8 +- .../cayenne/datasource/PoolAwareConnection.java | 26 +- .../cayenne/datasource/PoolingDataSource.java | 4 +- .../cayenne/datasource/StoppedDataSource.java | 4 +- .../datasource/UnmanagedPoolingDataSource.java | 31 +- .../dba/oracle/OracleResultSetMetadata.java | 166 +++ .../dba/oracle/OracleResultSetWrapper.java | 969 ++++++++++++++ .../dba/oracle/OracleSQLTemplateAction.java | 1192 +----------------- 10 files changed, 1536 insertions(+), 1542 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cayenne/blob/e9dd773b/cayenne-server/src/main/java/org/apache/cayenne/access/TransactionConnectionDecorator.java ---------------------------------------------------------------------- diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/TransactionConnectionDecorator.java b/cayenne-server/src/main/java/org/apache/cayenne/access/TransactionConnectionDecorator.java index 664dd7a..518a95e 100644 --- a/cayenne-server/src/main/java/org/apache/cayenne/access/TransactionConnectionDecorator.java +++ b/cayenne-server/src/main/java/org/apache/cayenne/access/TransactionConnectionDecorator.java @@ -39,344 +39,349 @@ import java.util.Properties; import java.util.concurrent.Executor; /** - * A wrapper of a JDBC connection that is attached to a transaction. The behavior of this - * object to delegate all method calls to the underlying connection, except for the - * 'close' method that is implemented as noop in hope that a transaction originator will - * close the underlying Connection object. + * A wrapper of a JDBC connection that is attached to a transaction. The + * behavior of this object to delegate all method calls to the underlying + * connection, except for the 'close' method that is implemented as noop in hope + * that a transaction originator will close the underlying Connection object. * * @since 1.2 */ class TransactionConnectionDecorator implements Connection { - Connection connection; - - TransactionConnectionDecorator(Connection connection) { - this.connection = connection; - } - - // the only method that is NOT delegated... - public void close() throws SQLException { - // noop - } - - public void clearWarnings() throws SQLException { - connection.clearWarnings(); - } - - public void commit() throws SQLException { - connection.commit(); - } - - public Statement createStatement() throws SQLException { - return connection.createStatement(); - } - - public Statement createStatement( - int resultSetType, - int resultSetConcurrency, - int resultSetHoldability) throws SQLException { - return connection.createStatement( - resultSetType, - resultSetConcurrency, - resultSetHoldability); - } - - public Statement createStatement(int resultSetType, int resultSetConcurrency) - throws SQLException { - return connection.createStatement(resultSetType, resultSetConcurrency); - } - - public boolean getAutoCommit() throws SQLException { - return connection.getAutoCommit(); - } - - public String getCatalog() throws SQLException { - return connection.getCatalog(); - } - - public int getHoldability() throws SQLException { - return connection.getHoldability(); - } - - public DatabaseMetaData getMetaData() throws SQLException { - return connection.getMetaData(); - } - - public int getTransactionIsolation() throws SQLException { - return connection.getTransactionIsolation(); - } - - public Map<String,Class<?>> getTypeMap() throws SQLException { - return connection.getTypeMap(); - } - - public SQLWarning getWarnings() throws SQLException { - return connection.getWarnings(); - } - - public boolean isClosed() throws SQLException { - return connection.isClosed(); - } - - public boolean isReadOnly() throws SQLException { - return connection.isReadOnly(); - } - - public String nativeSQL(String sql) throws SQLException { - return connection.nativeSQL(sql); - } - - public CallableStatement prepareCall( - String sql, - int resultSetType, - int resultSetConcurrency, - int resultSetHoldability) throws SQLException { - return connection.prepareCall( - sql, - resultSetType, - resultSetConcurrency, - resultSetHoldability); - } - - public CallableStatement prepareCall( - String sql, - int resultSetType, - int resultSetConcurrency) throws SQLException { - return connection.prepareCall(sql, resultSetType, resultSetConcurrency); - } - - public CallableStatement prepareCall(String sql) throws SQLException { - return connection.prepareCall(sql); - } - - public PreparedStatement prepareStatement( - String sql, - int resultSetType, - int resultSetConcurrency, - int resultSetHoldability) throws SQLException { - return connection.prepareStatement( - sql, - resultSetType, - resultSetConcurrency, - resultSetHoldability); - } - - public PreparedStatement prepareStatement( - String sql, - int resultSetType, - int resultSetConcurrency) throws SQLException { - return connection.prepareStatement(sql, resultSetType, resultSetConcurrency); - } - - public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) - throws SQLException { - return connection.prepareStatement(sql, autoGeneratedKeys); - } - - public PreparedStatement prepareStatement(String sql, int[] columnIndexes) - throws SQLException { - return connection.prepareStatement(sql, columnIndexes); - } - - public PreparedStatement prepareStatement(String sql, String[] columnNames) - throws SQLException { - return connection.prepareStatement(sql, columnNames); - } - - public PreparedStatement prepareStatement(String sql) throws SQLException { - return connection.prepareStatement(sql); - } - - public void releaseSavepoint(Savepoint savepoint) throws SQLException { - connection.releaseSavepoint(savepoint); - } - - public void rollback() throws SQLException { - connection.rollback(); - } - - public void rollback(Savepoint savepoint) throws SQLException { - connection.rollback(savepoint); - } - - public void setAutoCommit(boolean autoCommit) throws SQLException { - connection.setAutoCommit(autoCommit); - } - - public void setCatalog(String catalog) throws SQLException { - connection.setCatalog(catalog); - } - - public void setHoldability(int holdability) throws SQLException { - connection.setHoldability(holdability); - } - - public void setReadOnly(boolean readOnly) throws SQLException { - connection.setReadOnly(readOnly); - } - - public Savepoint setSavepoint() throws SQLException { - return connection.setSavepoint(); - } - - public Savepoint setSavepoint(String name) throws SQLException { - return connection.setSavepoint(name); - } - - public void setTransactionIsolation(int level) throws SQLException { - connection.setTransactionIsolation(level); - } - - public void setTypeMap(Map<String, Class<?>> map) throws SQLException { - connection.setTypeMap(map); - } - - /** - * @since 3.0 - */ - // JDBC 4 compatibility under Java 1.5 - public Array createArrayOf(String typeName, Object[] elements) throws SQLException { - throw new UnsupportedOperationException(); - } - - /** - * @since 3.0 - */ - // JDBC 4 compatibility under Java 1.5 - public Blob createBlob() throws SQLException { - throw new UnsupportedOperationException(); - } - - /** - * @since 3.0 - */ - // JDBC 4 compatibility under Java 1.5 - public Clob createClob() throws SQLException { - throw new UnsupportedOperationException(); - } - - /** - * @since 3.0 - */ - // JDBC 4 compatibility under Java 1.5 - public Struct createStruct(String typeName, Object[] attributes) throws SQLException { - throw new UnsupportedOperationException(); - } - - /** - * @since 3.0 - */ - // JDBC 4 compatibility under Java 1.5 - public Properties getClientInfo() throws SQLException { - throw new UnsupportedOperationException(); - } - - /** - * @since 3.0 - */ - // JDBC 4 compatibility under Java 1.5 - public String getClientInfo(String name) throws SQLException { - throw new UnsupportedOperationException(); - } - - /** - * @since 3.0 - */ - // JDBC 4 compatibility under Java 1.5 - public void setClientInfo(Properties properties) throws SQLClientInfoException { - throw new UnsupportedOperationException(); - } - - /** - * @since 3.0 - */ - // JDBC 4 compatibility under Java 1.5 - public void setClientInfo(String name, String value) throws SQLClientInfoException { - throw new UnsupportedOperationException(); - } - - /** - * @since 3.0 - */ - // JDBC 4 compatibility under Java 1.5 - public boolean isValid(int timeout) throws SQLException { - throw new UnsupportedOperationException(); - } - - /** - * @since 3.0 - */ - // JDBC 4 compatibility under Java 1.5 - public boolean isWrapperFor(Class<?> iface) throws SQLException { - throw new UnsupportedOperationException(); - } - - /** - * @since 3.0 - */ - // JDBC 4 compatibility under Java 1.5 - public <T> T unwrap(Class<T> iface) throws SQLException { - throw new UnsupportedOperationException(); - } - - /** - * @since 3.0 - */ - // JDBC 4 compatibility under Java 1.5 - public NClob createNClob() throws SQLException { - throw new UnsupportedOperationException(); - } - - /** - * @since 3.0 - */ - // JDBC 4 compatibility under Java 1.5 - public SQLXML createSQLXML() throws SQLException { - throw new UnsupportedOperationException(); - } - - /** - * @since 3.1 - * - * JDBC 4.1 compatibility under Java 1.5 - */ - public void setSchema(String schema) throws SQLException { - throw new UnsupportedOperationException(); - } - - /** - * @since 3.1 - * - * JDBC 4.1 compatibility under Java 1.5 - */ - public String getSchema() throws SQLException { - throw new UnsupportedOperationException(); - } - - /** - * @since 3.1 - * - * JDBC 4.1 compatibility under Java 1.5 - */ - public void abort(Executor executor) throws SQLException { - throw new UnsupportedOperationException(); - } - - /** - * @since 3.1 - * - * JDBC 4.1 compatibility under Java 1.5 - */ - public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException { - throw new UnsupportedOperationException(); - } - - /** - * @since 3.1 - * - * JDBC 4.1 compatibility under Java 1.5 - */ - public int getNetworkTimeout() throws SQLException { - throw new UnsupportedOperationException(); - } + Connection connection; + + TransactionConnectionDecorator(Connection connection) { + this.connection = connection; + } + + // the only method that is NOT delegated... + @Override + public void close() throws SQLException { + // noop + } + + /** + * @since 3.1 + */ + @Override + public void abort(Executor executor) throws SQLException { + + // do nothing; same as 'close' + } + + @Override + public void clearWarnings() throws SQLException { + connection.clearWarnings(); + } + + @Override + public void commit() throws SQLException { + connection.commit(); + } + + @Override + public Statement createStatement() throws SQLException { + return connection.createStatement(); + } + + @Override + public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) + throws SQLException { + return connection.createStatement(resultSetType, resultSetConcurrency, resultSetHoldability); + } + + @Override + public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException { + return connection.createStatement(resultSetType, resultSetConcurrency); + } + + @Override + public boolean getAutoCommit() throws SQLException { + return connection.getAutoCommit(); + } + + @Override + public String getCatalog() throws SQLException { + return connection.getCatalog(); + } + + @Override + public int getHoldability() throws SQLException { + return connection.getHoldability(); + } + + @Override + public DatabaseMetaData getMetaData() throws SQLException { + return connection.getMetaData(); + } + + @Override + public int getTransactionIsolation() throws SQLException { + return connection.getTransactionIsolation(); + } + + @Override + public Map<String, Class<?>> getTypeMap() throws SQLException { + return connection.getTypeMap(); + } + + @Override + public SQLWarning getWarnings() throws SQLException { + return connection.getWarnings(); + } + + @Override + public boolean isClosed() throws SQLException { + return connection.isClosed(); + } + + @Override + public boolean isReadOnly() throws SQLException { + return connection.isReadOnly(); + } + + @Override + public String nativeSQL(String sql) throws SQLException { + return connection.nativeSQL(sql); + } + + @Override + public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, + int resultSetHoldability) throws SQLException { + return connection.prepareCall(sql, resultSetType, resultSetConcurrency, resultSetHoldability); + } + + @Override + public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException { + return connection.prepareCall(sql, resultSetType, resultSetConcurrency); + } + + @Override + public CallableStatement prepareCall(String sql) throws SQLException { + return connection.prepareCall(sql); + } + + @Override + public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, + int resultSetHoldability) throws SQLException { + return connection.prepareStatement(sql, resultSetType, resultSetConcurrency, resultSetHoldability); + } + + @Override + public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) + throws SQLException { + return connection.prepareStatement(sql, resultSetType, resultSetConcurrency); + } + + @Override + public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException { + return connection.prepareStatement(sql, autoGeneratedKeys); + } + + @Override + public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException { + return connection.prepareStatement(sql, columnIndexes); + } + + @Override + public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException { + return connection.prepareStatement(sql, columnNames); + } + + @Override + public PreparedStatement prepareStatement(String sql) throws SQLException { + return connection.prepareStatement(sql); + } + + @Override + public void releaseSavepoint(Savepoint savepoint) throws SQLException { + connection.releaseSavepoint(savepoint); + } + + @Override + public void rollback() throws SQLException { + connection.rollback(); + } + + @Override + public void rollback(Savepoint savepoint) throws SQLException { + connection.rollback(savepoint); + } + + @Override + public void setAutoCommit(boolean autoCommit) throws SQLException { + connection.setAutoCommit(autoCommit); + } + + @Override + public void setCatalog(String catalog) throws SQLException { + connection.setCatalog(catalog); + } + + @Override + public void setHoldability(int holdability) throws SQLException { + connection.setHoldability(holdability); + } + + @Override + public void setReadOnly(boolean readOnly) throws SQLException { + connection.setReadOnly(readOnly); + } + + @Override + public Savepoint setSavepoint() throws SQLException { + return connection.setSavepoint(); + } + + @Override + public Savepoint setSavepoint(String name) throws SQLException { + return connection.setSavepoint(name); + } + + @Override + public void setTransactionIsolation(int level) throws SQLException { + connection.setTransactionIsolation(level); + } + + @Override + public void setTypeMap(Map<String, Class<?>> map) throws SQLException { + connection.setTypeMap(map); + } + + /** + * @since 3.0 + */ + @Override + public Array createArrayOf(String typeName, Object[] elements) throws SQLException { + return connection.createArrayOf(typeName, elements); + } + + /** + * @since 3.0 + */ + @Override + public Blob createBlob() throws SQLException { + return connection.createBlob(); + } + + /** + * @since 3.0 + */ + @Override + public Clob createClob() throws SQLException { + return connection.createClob(); + } + + /** + * @since 3.0 + */ + @Override + public Struct createStruct(String typeName, Object[] attributes) throws SQLException { + return connection.createStruct(typeName, attributes); + } + + /** + * @since 3.0 + */ + @Override + public Properties getClientInfo() throws SQLException { + return connection.getClientInfo(); + } + + /** + * @since 3.0 + */ + @Override + public String getClientInfo(String name) throws SQLException { + return connection.getClientInfo(name); + } + + /** + * @since 3.0 + */ + @Override + public void setClientInfo(Properties properties) throws SQLClientInfoException { + connection.setClientInfo(properties); + } + + /** + * @since 3.0 + */ + @Override + public void setClientInfo(String name, String value) throws SQLClientInfoException { + connection.setClientInfo(name, value); + } + + /** + * @since 3.0 + */ + @Override + public boolean isValid(int timeout) throws SQLException { + return connection.isValid(timeout); + } + + /** + * @since 3.0 + */ + @Override + public boolean isWrapperFor(Class<?> iface) throws SQLException { + // TODO... + throw new UnsupportedOperationException(); + } + + /** + * @since 3.0 + */ + @Override + public <T> T unwrap(Class<T> iface) throws SQLException { + // TODO + throw new UnsupportedOperationException(); + } + + /** + * @since 3.0 + */ + @Override + public NClob createNClob() throws SQLException { + return connection.createNClob(); + } + + /** + * @since 3.0 + */ + @Override + public SQLXML createSQLXML() throws SQLException { + return connection.createSQLXML(); + } + + /** + * @since 3.1 + */ + @Override + public void setSchema(String schema) throws SQLException { + connection.setSchema(schema); + } + + /** + * @since 3.1 + */ + @Override + public String getSchema() throws SQLException { + return connection.getSchema(); + } + + /** + * @since 3.1 + */ + @Override + public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException { + connection.setNetworkTimeout(executor, milliseconds); + } + + /** + * @since 3.1 + */ + public int getNetworkTimeout() throws SQLException { + return connection.getNetworkTimeout(); + } } http://git-wip-us.apache.org/repos/asf/cayenne/blob/e9dd773b/cayenne-server/src/main/java/org/apache/cayenne/datasource/DriverDataSource.java ---------------------------------------------------------------------- diff --git a/cayenne-server/src/main/java/org/apache/cayenne/datasource/DriverDataSource.java b/cayenne-server/src/main/java/org/apache/cayenne/datasource/DriverDataSource.java index d8f960b..316a4f8 100644 --- a/cayenne-server/src/main/java/org/apache/cayenne/datasource/DriverDataSource.java +++ b/cayenne-server/src/main/java/org/apache/cayenne/datasource/DriverDataSource.java @@ -278,9 +278,8 @@ public class DriverDataSource implements DataSource { /** * @since 3.1 - * - * JDBC 4.1 compatibility under Java 1.5 */ + @Override public Logger getParentLogger() throws SQLFeatureNotSupportedException { throw new UnsupportedOperationException(); } http://git-wip-us.apache.org/repos/asf/cayenne/blob/e9dd773b/cayenne-server/src/main/java/org/apache/cayenne/datasource/ManagedPoolingDataSource.java ---------------------------------------------------------------------- diff --git a/cayenne-server/src/main/java/org/apache/cayenne/datasource/ManagedPoolingDataSource.java b/cayenne-server/src/main/java/org/apache/cayenne/datasource/ManagedPoolingDataSource.java index 0f65732..3a794de 100644 --- a/cayenne-server/src/main/java/org/apache/cayenne/datasource/ManagedPoolingDataSource.java +++ b/cayenne-server/src/main/java/org/apache/cayenne/datasource/ManagedPoolingDataSource.java @@ -29,8 +29,8 @@ import javax.sql.DataSource; import org.apache.cayenne.di.ScopeEventListener; /** - * A wrapper for {@link UnmanagedPoolingDataSource} that automatically manages the underlying - * connection pool size. + * A wrapper for {@link UnmanagedPoolingDataSource} that automatically manages + * the underlying connection pool size. * * @since 4.0 */ @@ -116,9 +116,9 @@ public class ManagedPoolingDataSource implements PoolingDataSource, ScopeEventLi return ManagedPoolingDataSource.class.equals(iface) ? (T) this : dataSource.unwrap(iface); } - // JDBC 4.1 compatibility under Java 1.6 and newer + @Override public Logger getParentLogger() throws SQLFeatureNotSupportedException { - throw new SQLFeatureNotSupportedException(); + return dataSource.getParentLogger(); } } http://git-wip-us.apache.org/repos/asf/cayenne/blob/e9dd773b/cayenne-server/src/main/java/org/apache/cayenne/datasource/PoolAwareConnection.java ---------------------------------------------------------------------- diff --git a/cayenne-server/src/main/java/org/apache/cayenne/datasource/PoolAwareConnection.java b/cayenne-server/src/main/java/org/apache/cayenne/datasource/PoolAwareConnection.java index d293b40..cf24a76 100644 --- a/cayenne-server/src/main/java/org/apache/cayenne/datasource/PoolAwareConnection.java +++ b/cayenne-server/src/main/java/org/apache/cayenne/datasource/PoolAwareConnection.java @@ -548,39 +548,37 @@ public class PoolAwareConnection implements Connection { @Override public void setClientInfo(Properties properties) throws SQLClientInfoException { - // TODO: we can implement that now. - throw new UnsupportedOperationException(); + connection.setClientInfo(properties); } @Override public void setClientInfo(String name, String value) throws SQLClientInfoException { - // TODO: we can implement that now. - throw new UnsupportedOperationException(); + connection.setClientInfo(name, value); } - // JDBC 4.1 compatibility pre Java 7 + @Override public void setSchema(String schema) throws SQLException { - throw new UnsupportedOperationException(); + connection.setSchema(schema); } - // JDBC 4.1 compatibility pre Java 7 + @Override public String getSchema() throws SQLException { - throw new UnsupportedOperationException(); + return connection.getSchema(); } - // JDBC 4.1 compatibility pre Java 7 + @Override public void abort(Executor executor) throws SQLException { - throw new UnsupportedOperationException(); + connection.abort(executor); } - // JDBC 4.1 compatibility pre Java 7 + @Override public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException { - throw new UnsupportedOperationException(); + connection.setNetworkTimeout(executor, milliseconds); } - // JDBC 4.1 compatibility pre Java 7 + @Override public int getNetworkTimeout() throws SQLException { - throw new UnsupportedOperationException(); + return connection.getNetworkTimeout(); } } http://git-wip-us.apache.org/repos/asf/cayenne/blob/e9dd773b/cayenne-server/src/main/java/org/apache/cayenne/datasource/PoolingDataSource.java ---------------------------------------------------------------------- diff --git a/cayenne-server/src/main/java/org/apache/cayenne/datasource/PoolingDataSource.java b/cayenne-server/src/main/java/org/apache/cayenne/datasource/PoolingDataSource.java index 2ab39b7..9f0816a 100644 --- a/cayenne-server/src/main/java/org/apache/cayenne/datasource/PoolingDataSource.java +++ b/cayenne-server/src/main/java/org/apache/cayenne/datasource/PoolingDataSource.java @@ -18,8 +18,6 @@ ****************************************************************/ package org.apache.cayenne.datasource; -import java.io.Closeable; - import javax.sql.DataSource; /** @@ -28,6 +26,6 @@ import javax.sql.DataSource; * * @since 4.0 */ -public interface PoolingDataSource extends DataSource, Closeable { +public interface PoolingDataSource extends DataSource, AutoCloseable { } http://git-wip-us.apache.org/repos/asf/cayenne/blob/e9dd773b/cayenne-server/src/main/java/org/apache/cayenne/datasource/StoppedDataSource.java ---------------------------------------------------------------------- diff --git a/cayenne-server/src/main/java/org/apache/cayenne/datasource/StoppedDataSource.java b/cayenne-server/src/main/java/org/apache/cayenne/datasource/StoppedDataSource.java index 383c7b7..fa84db6 100644 --- a/cayenne-server/src/main/java/org/apache/cayenne/datasource/StoppedDataSource.java +++ b/cayenne-server/src/main/java/org/apache/cayenne/datasource/StoppedDataSource.java @@ -81,8 +81,8 @@ class StoppedDataSource implements DataSource { return StoppedDataSource.class.equals(iface) ? (T) this : dataSource.unwrap(iface); } - // JDBC 4.1 compatibility under Java pre 1.7 + @Override public Logger getParentLogger() throws SQLFeatureNotSupportedException { - throw new SQLFeatureNotSupportedException(); + return dataSource.getParentLogger(); } } http://git-wip-us.apache.org/repos/asf/cayenne/blob/e9dd773b/cayenne-server/src/main/java/org/apache/cayenne/datasource/UnmanagedPoolingDataSource.java ---------------------------------------------------------------------- diff --git a/cayenne-server/src/main/java/org/apache/cayenne/datasource/UnmanagedPoolingDataSource.java b/cayenne-server/src/main/java/org/apache/cayenne/datasource/UnmanagedPoolingDataSource.java index a054807..0ffd34c 100644 --- a/cayenne-server/src/main/java/org/apache/cayenne/datasource/UnmanagedPoolingDataSource.java +++ b/cayenne-server/src/main/java/org/apache/cayenne/datasource/UnmanagedPoolingDataSource.java @@ -70,18 +70,18 @@ public class UnmanagedPoolingDataSource implements PoolingDataSource { } } - /** - * An exception indicating that a connection request waiting in the queue - * timed out and was unable to obtain a connection. - */ - public static class ConnectionUnavailableException extends SQLException { - private static final long serialVersionUID = 1063973806941023165L; - - public ConnectionUnavailableException(String message) { - super(message); - } - } - + /** + * An exception indicating that a connection request waiting in the queue + * timed out and was unable to obtain a connection. + */ + public static class ConnectionUnavailableException extends SQLException { + private static final long serialVersionUID = 1063973806941023165L; + + public ConnectionUnavailableException(String message) { + super(message); + } + } + /** * Defines a maximum time in milliseconds that a connection request could * wait in the connection queue. After this period expires, an exception @@ -335,7 +335,8 @@ public class UnmanagedPoolingDataSource implements PoolingDataSource { return resetState(c); } - throw new ConnectionUnavailableException("Can't obtain connection. Request to pool timed out. Total pool size: " + pool.size()); + throw new ConnectionUnavailableException( + "Can't obtain connection. Request to pool timed out. Total pool size: " + pool.size()); } @Override @@ -375,9 +376,9 @@ public class UnmanagedPoolingDataSource implements PoolingDataSource { return UnmanagedPoolingDataSource.class.equals(iface) ? (T) this : nonPoolingDataSource.unwrap(iface); } - // JDBC 4.1 compatibility under Java pre 1.7 + @Override public Logger getParentLogger() throws SQLFeatureNotSupportedException { - throw new SQLFeatureNotSupportedException(); + return nonPoolingDataSource.getParentLogger(); } String getValidationQuery() { http://git-wip-us.apache.org/repos/asf/cayenne/blob/e9dd773b/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleResultSetMetadata.java ---------------------------------------------------------------------- diff --git a/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleResultSetMetadata.java b/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleResultSetMetadata.java new file mode 100644 index 0000000..86bd8d5 --- /dev/null +++ b/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleResultSetMetadata.java @@ -0,0 +1,166 @@ +/***************************************************************** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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.cayenne.dba.oracle; + +import java.math.BigDecimal; +import java.sql.ResultSetMetaData; +import java.sql.SQLException; +import java.sql.Types; + +class OracleResultSetMetadata implements ResultSetMetaData { + + private ResultSetMetaData delegate; + + OracleResultSetMetadata(ResultSetMetaData delegate) { + this.delegate = delegate; + } + + @Override + public String getCatalogName(int column) throws SQLException { + return delegate.getCatalogName(column); + } + + @Override + public String getColumnClassName(int column) throws SQLException { + String className = delegate.getColumnClassName(column); + + if (BigDecimal.class.getName().equals(className) && getColumnType(column) == Types.INTEGER) { + className = Integer.class.getName(); + } + + return className; + } + + @Override + public int getColumnCount() throws SQLException { + return delegate.getColumnCount(); + } + + @Override + public int getColumnDisplaySize(int column) throws SQLException { + return delegate.getColumnDisplaySize(column); + } + + @Override + public String getColumnLabel(int column) throws SQLException { + return delegate.getColumnLabel(column); + } + + @Override + public String getColumnName(int column) throws SQLException { + return delegate.getColumnName(column); + } + + @Override + public int getColumnType(int column) throws SQLException { + int type = delegate.getColumnType(column); + + // this only detects INTEGER but not BIGINT... + if (type == Types.NUMERIC) { + int precision = delegate.getPrecision(column); + if ((precision == 10 || precision == 38) && delegate.getScale(column) == 0) { + type = Types.INTEGER; + } + } + + return type; + } + + @Override + public String getColumnTypeName(int column) throws SQLException { + return delegate.getColumnTypeName(column); + } + + @Override + public int getPrecision(int column) throws SQLException { + return delegate.getPrecision(column); + } + + @Override + public int getScale(int column) throws SQLException { + return delegate.getScale(column); + } + + @Override + public String getSchemaName(int column) throws SQLException { + return delegate.getSchemaName(column); + } + + @Override + public String getTableName(int column) throws SQLException { + return delegate.getTableName(column); + } + + @Override + public boolean isAutoIncrement(int column) throws SQLException { + return delegate.isAutoIncrement(column); + } + + @Override + public boolean isCaseSensitive(int column) throws SQLException { + return delegate.isCaseSensitive(column); + } + + @Override + public boolean isCurrency(int column) throws SQLException { + return delegate.isCurrency(column); + } + + @Override + public boolean isDefinitelyWritable(int column) throws SQLException { + return delegate.isDefinitelyWritable(column); + } + + @Override + public int isNullable(int column) throws SQLException { + return delegate.isNullable(column); + } + + @Override + public boolean isReadOnly(int column) throws SQLException { + return delegate.isReadOnly(column); + } + + @Override + public boolean isSearchable(int column) throws SQLException { + return delegate.isSearchable(column); + } + + @Override + public boolean isSigned(int column) throws SQLException { + return delegate.isSigned(column); + } + + @Override + public boolean isWritable(int column) throws SQLException { + return delegate.isWritable(column); + } + + @Override + public boolean isWrapperFor(Class<?> iface) throws SQLException { + // TODO + throw new UnsupportedOperationException(); + } + + @Override + public <T> T unwrap(Class<T> iface) throws SQLException { + // TODO + throw new UnsupportedOperationException(); + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cayenne/blob/e9dd773b/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleResultSetWrapper.java ---------------------------------------------------------------------- diff --git a/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleResultSetWrapper.java b/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleResultSetWrapper.java new file mode 100644 index 0000000..8d8705c --- /dev/null +++ b/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleResultSetWrapper.java @@ -0,0 +1,969 @@ +/***************************************************************** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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.cayenne.dba.oracle; + +import java.io.InputStream; +import java.io.Reader; +import java.math.BigDecimal; +import java.net.URL; +import java.sql.Array; +import java.sql.Blob; +import java.sql.Clob; +import java.sql.Date; +import java.sql.NClob; +import java.sql.Ref; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.RowId; +import java.sql.SQLException; +import java.sql.SQLWarning; +import java.sql.SQLXML; +import java.sql.Statement; +import java.sql.Time; +import java.sql.Timestamp; +import java.util.Calendar; +import java.util.Map; + +final class OracleResultSetWrapper implements ResultSet { + + private ResultSet delegate; + + OracleResultSetWrapper(ResultSet delegate) { + this.delegate = delegate; + } + + @Override + public ResultSetMetaData getMetaData() throws SQLException { + return new OracleResultSetMetadata(delegate.getMetaData()); + } + + @Override + public boolean absolute(int row) throws SQLException { + return delegate.absolute(row); + } + + @Override + public void afterLast() throws SQLException { + delegate.afterLast(); + } + + @Override + public void beforeFirst() throws SQLException { + delegate.beforeFirst(); + } + + @Override + public void cancelRowUpdates() throws SQLException { + delegate.cancelRowUpdates(); + } + + @Override + public void clearWarnings() throws SQLException { + delegate.clearWarnings(); + } + + @Override + public void close() throws SQLException { + delegate.close(); + } + + @Override + public void deleteRow() throws SQLException { + delegate.deleteRow(); + } + + @Override + public int findColumn(String columnName) throws SQLException { + return delegate.findColumn(columnName); + } + + @Override + public boolean first() throws SQLException { + return delegate.first(); + } + + @Override + public Array getArray(int i) throws SQLException { + return delegate.getArray(i); + } + + @Override + public Array getArray(String colName) throws SQLException { + return delegate.getArray(colName); + } + + @Override + public InputStream getAsciiStream(int columnIndex) throws SQLException { + return delegate.getAsciiStream(columnIndex); + } + + @Override + public InputStream getAsciiStream(String columnName) throws SQLException { + return delegate.getAsciiStream(columnName); + } + + /** + * @deprecated to mirror deprecation in the ResultSet interface + */ + @Deprecated + @Override + public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException { + return delegate.getBigDecimal(columnIndex, scale); + } + + @Override + public BigDecimal getBigDecimal(int columnIndex) throws SQLException { + return delegate.getBigDecimal(columnIndex); + } + + /** + * @deprecated to mirror deprecation in the ResultSet interface + */ + @Deprecated + @Override + public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException { + return delegate.getBigDecimal(columnName, scale); + } + + @Override + public BigDecimal getBigDecimal(String columnName) throws SQLException { + return delegate.getBigDecimal(columnName); + } + + @Override + public InputStream getBinaryStream(int columnIndex) throws SQLException { + return delegate.getBinaryStream(columnIndex); + } + + @Override + public InputStream getBinaryStream(String columnName) throws SQLException { + return delegate.getBinaryStream(columnName); + } + + @Override + public Blob getBlob(int i) throws SQLException { + return delegate.getBlob(i); + } + + @Override + public Blob getBlob(String colName) throws SQLException { + return delegate.getBlob(colName); + } + + @Override + public boolean getBoolean(int columnIndex) throws SQLException { + return delegate.getBoolean(columnIndex); + } + + @Override + public boolean getBoolean(String columnName) throws SQLException { + return delegate.getBoolean(columnName); + } + + @Override + public byte getByte(int columnIndex) throws SQLException { + return delegate.getByte(columnIndex); + } + + @Override + public byte getByte(String columnName) throws SQLException { + return delegate.getByte(columnName); + } + + @Override + public byte[] getBytes(int columnIndex) throws SQLException { + return delegate.getBytes(columnIndex); + } + + @Override + public byte[] getBytes(String columnName) throws SQLException { + return delegate.getBytes(columnName); + } + + @Override + public Reader getCharacterStream(int columnIndex) throws SQLException { + return delegate.getCharacterStream(columnIndex); + } + + @Override + public Reader getCharacterStream(String columnName) throws SQLException { + return delegate.getCharacterStream(columnName); + } + + @Override + public Clob getClob(int i) throws SQLException { + return delegate.getClob(i); + } + + @Override + public Clob getClob(String colName) throws SQLException { + return delegate.getClob(colName); + } + + @Override + public int getConcurrency() throws SQLException { + return delegate.getConcurrency(); + } + + @Override + public String getCursorName() throws SQLException { + return delegate.getCursorName(); + } + + @Override + public Date getDate(int columnIndex, Calendar cal) throws SQLException { + return delegate.getDate(columnIndex, cal); + } + + @Override + public Date getDate(int columnIndex) throws SQLException { + return delegate.getDate(columnIndex); + } + + @Override + public Date getDate(String columnName, Calendar cal) throws SQLException { + return delegate.getDate(columnName, cal); + } + + @Override + public Date getDate(String columnName) throws SQLException { + return delegate.getDate(columnName); + } + + @Override + public double getDouble(int columnIndex) throws SQLException { + return delegate.getDouble(columnIndex); + } + + @Override + public double getDouble(String columnName) throws SQLException { + return delegate.getDouble(columnName); + } + + @Override + public int getFetchDirection() throws SQLException { + return delegate.getFetchDirection(); + } + + @Override + public int getFetchSize() throws SQLException { + return delegate.getFetchSize(); + } + + @Override + public float getFloat(int columnIndex) throws SQLException { + return delegate.getFloat(columnIndex); + } + + @Override + public float getFloat(String columnName) throws SQLException { + return delegate.getFloat(columnName); + } + + @Override + public int getInt(int columnIndex) throws SQLException { + return delegate.getInt(columnIndex); + } + + @Override + public int getInt(String columnName) throws SQLException { + return delegate.getInt(columnName); + } + + @Override + public long getLong(int columnIndex) throws SQLException { + return delegate.getLong(columnIndex); + } + + @Override + public long getLong(String columnName) throws SQLException { + return delegate.getLong(columnName); + } + + @Override + public Object getObject(int columnIndex, Map<String, Class<?>> map) throws SQLException { + return delegate.getObject(columnIndex, map); + } + + @Override + public Object getObject(int columnIndex) throws SQLException { + return delegate.getObject(columnIndex); + } + + @Override + public Object getObject(String columnLabel, Map<String, Class<?>> map) throws SQLException { + return delegate.getObject(columnLabel, map); + } + + @Override + public Object getObject(String columnName) throws SQLException { + return delegate.getObject(columnName); + } + + @Override + public Ref getRef(int i) throws SQLException { + return delegate.getRef(i); + } + + @Override + public Ref getRef(String colName) throws SQLException { + return delegate.getRef(colName); + } + + @Override + public int getRow() throws SQLException { + return delegate.getRow(); + } + + @Override + public short getShort(int columnIndex) throws SQLException { + return delegate.getShort(columnIndex); + } + + @Override + public short getShort(String columnName) throws SQLException { + return delegate.getShort(columnName); + } + + @Override + public Statement getStatement() throws SQLException { + return delegate.getStatement(); + } + + @Override + public String getString(int columnIndex) throws SQLException { + return delegate.getString(columnIndex); + } + + @Override + public String getString(String columnName) throws SQLException { + return delegate.getString(columnName); + } + + @Override + public Time getTime(int columnIndex, Calendar cal) throws SQLException { + return delegate.getTime(columnIndex, cal); + } + + @Override + public Time getTime(int columnIndex) throws SQLException { + return delegate.getTime(columnIndex); + } + + @Override + public Time getTime(String columnName, Calendar cal) throws SQLException { + return delegate.getTime(columnName, cal); + } + + @Override + public Time getTime(String columnName) throws SQLException { + return delegate.getTime(columnName); + } + + @Override + public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException { + return delegate.getTimestamp(columnIndex, cal); + } + + @Override + public Timestamp getTimestamp(int columnIndex) throws SQLException { + return delegate.getTimestamp(columnIndex); + } + + @Override + public Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException { + return delegate.getTimestamp(columnName, cal); + } + + @Override + public Timestamp getTimestamp(String columnName) throws SQLException { + return delegate.getTimestamp(columnName); + } + + @Override + public int getType() throws SQLException { + return delegate.getType(); + } + + @Deprecated + @Override + public InputStream getUnicodeStream(int columnIndex) throws SQLException { + return delegate.getUnicodeStream(columnIndex); + } + + @Deprecated + @Override + public InputStream getUnicodeStream(String columnName) throws SQLException { + return delegate.getUnicodeStream(columnName); + } + + @Override + public URL getURL(int columnIndex) throws SQLException { + return delegate.getURL(columnIndex); + } + + @Override + public URL getURL(String columnName) throws SQLException { + return delegate.getURL(columnName); + } + + @Override + public SQLWarning getWarnings() throws SQLException { + return delegate.getWarnings(); + } + + @Override + public void insertRow() throws SQLException { + delegate.insertRow(); + } + + @Override + public boolean isAfterLast() throws SQLException { + return delegate.isAfterLast(); + } + + @Override + public boolean isBeforeFirst() throws SQLException { + return delegate.isBeforeFirst(); + } + + @Override + public boolean isFirst() throws SQLException { + return delegate.isFirst(); + } + + @Override + public boolean isLast() throws SQLException { + return delegate.isLast(); + } + + @Override + public boolean last() throws SQLException { + return delegate.last(); + } + + @Override + public void moveToCurrentRow() throws SQLException { + delegate.moveToCurrentRow(); + } + + @Override + public void moveToInsertRow() throws SQLException { + delegate.moveToInsertRow(); + } + + @Override + public boolean next() throws SQLException { + return delegate.next(); + } + + @Override + public boolean previous() throws SQLException { + return delegate.previous(); + } + + @Override + public void refreshRow() throws SQLException { + delegate.refreshRow(); + } + + @Override + public boolean relative(int rows) throws SQLException { + return delegate.relative(rows); + } + + @Override + public boolean rowDeleted() throws SQLException { + return delegate.rowDeleted(); + } + + @Override + public boolean rowInserted() throws SQLException { + return delegate.rowInserted(); + } + + @Override + public boolean rowUpdated() throws SQLException { + return delegate.rowUpdated(); + } + + @Override + public void setFetchDirection(int direction) throws SQLException { + delegate.setFetchDirection(direction); + } + + public void setFetchSize(int rows) throws SQLException { + delegate.setFetchSize(rows); + } + + public void updateArray(int columnIndex, Array x) throws SQLException { + delegate.updateArray(columnIndex, x); + } + + public void updateArray(String columnName, Array x) throws SQLException { + delegate.updateArray(columnName, x); + } + + public void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException { + delegate.updateAsciiStream(columnIndex, x, length); + } + + public void updateAsciiStream(String columnName, InputStream x, int length) throws SQLException { + delegate.updateAsciiStream(columnName, x, length); + } + + public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException { + delegate.updateBigDecimal(columnIndex, x); + } + + public void updateBigDecimal(String columnName, BigDecimal x) throws SQLException { + delegate.updateBigDecimal(columnName, x); + } + + public void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException { + delegate.updateBinaryStream(columnIndex, x, length); + } + + public void updateBinaryStream(String columnName, InputStream x, int length) throws SQLException { + delegate.updateBinaryStream(columnName, x, length); + } + + public void updateBlob(int columnIndex, Blob x) throws SQLException { + delegate.updateBlob(columnIndex, x); + } + + public void updateBlob(String columnName, Blob x) throws SQLException { + delegate.updateBlob(columnName, x); + } + + public void updateBoolean(int columnIndex, boolean x) throws SQLException { + delegate.updateBoolean(columnIndex, x); + } + + public void updateBoolean(String columnName, boolean x) throws SQLException { + delegate.updateBoolean(columnName, x); + } + + public void updateByte(int columnIndex, byte x) throws SQLException { + delegate.updateByte(columnIndex, x); + } + + public void updateByte(String columnName, byte x) throws SQLException { + delegate.updateByte(columnName, x); + } + + public void updateBytes(int columnIndex, byte[] x) throws SQLException { + delegate.updateBytes(columnIndex, x); + } + + public void updateBytes(String columnName, byte[] x) throws SQLException { + delegate.updateBytes(columnName, x); + } + + public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException { + delegate.updateCharacterStream(columnIndex, x, length); + } + + public void updateCharacterStream(String columnName, Reader reader, int length) throws SQLException { + delegate.updateCharacterStream(columnName, reader, length); + } + + public void updateClob(int columnIndex, Clob x) throws SQLException { + delegate.updateClob(columnIndex, x); + } + + public void updateClob(String columnName, Clob x) throws SQLException { + delegate.updateClob(columnName, x); + } + + public void updateDate(int columnIndex, Date x) throws SQLException { + delegate.updateDate(columnIndex, x); + } + + public void updateDate(String columnName, Date x) throws SQLException { + delegate.updateDate(columnName, x); + } + + public void updateDouble(int columnIndex, double x) throws SQLException { + delegate.updateDouble(columnIndex, x); + } + + public void updateDouble(String columnName, double x) throws SQLException { + delegate.updateDouble(columnName, x); + } + + public void updateFloat(int columnIndex, float x) throws SQLException { + delegate.updateFloat(columnIndex, x); + } + + public void updateFloat(String columnName, float x) throws SQLException { + delegate.updateFloat(columnName, x); + } + + public void updateInt(int columnIndex, int x) throws SQLException { + delegate.updateInt(columnIndex, x); + } + + public void updateInt(String columnName, int x) throws SQLException { + delegate.updateInt(columnName, x); + } + + public void updateLong(int columnIndex, long x) throws SQLException { + delegate.updateLong(columnIndex, x); + } + + public void updateLong(String columnName, long x) throws SQLException { + delegate.updateLong(columnName, x); + } + + public void updateNull(int columnIndex) throws SQLException { + delegate.updateNull(columnIndex); + } + + public void updateNull(String columnName) throws SQLException { + delegate.updateNull(columnName); + } + + public void updateObject(int columnIndex, Object x, int scale) throws SQLException { + delegate.updateObject(columnIndex, x, scale); + } + + public void updateObject(int columnIndex, Object x) throws SQLException { + delegate.updateObject(columnIndex, x); + } + + public void updateObject(String columnName, Object x, int scale) throws SQLException { + delegate.updateObject(columnName, x, scale); + } + + public void updateObject(String columnName, Object x) throws SQLException { + delegate.updateObject(columnName, x); + } + + public void updateRef(int columnIndex, Ref x) throws SQLException { + delegate.updateRef(columnIndex, x); + } + + public void updateRef(String columnName, Ref x) throws SQLException { + delegate.updateRef(columnName, x); + } + + public void updateRow() throws SQLException { + delegate.updateRow(); + } + + public void updateShort(int columnIndex, short x) throws SQLException { + delegate.updateShort(columnIndex, x); + } + + public void updateShort(String columnName, short x) throws SQLException { + delegate.updateShort(columnName, x); + } + + public void updateString(int columnIndex, String x) throws SQLException { + delegate.updateString(columnIndex, x); + } + + public void updateString(String columnName, String x) throws SQLException { + delegate.updateString(columnName, x); + } + + public void updateTime(int columnIndex, Time x) throws SQLException { + delegate.updateTime(columnIndex, x); + } + + public void updateTime(String columnName, Time x) throws SQLException { + delegate.updateTime(columnName, x); + } + + public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException { + delegate.updateTimestamp(columnIndex, x); + } + + public void updateTimestamp(String columnName, Timestamp x) throws SQLException { + delegate.updateTimestamp(columnName, x); + } + + public boolean wasNull() throws SQLException { + return delegate.wasNull(); + } + + @Override + public int getHoldability() throws SQLException { + return delegate.getHoldability(); + } + + @Override + public Reader getNCharacterStream(int arg0) throws SQLException { + return delegate.getNCharacterStream(arg0); + } + + @Override + public Reader getNCharacterStream(String arg0) throws SQLException { + return delegate.getNCharacterStream(arg0); + } + + @Override + public String getNString(int columnIndex) throws SQLException { + return delegate.getNString(columnIndex); + } + + @Override + public String getNString(String arg0) throws SQLException { + return delegate.getNString(arg0); + } + + @Override + public boolean isClosed() throws SQLException { + return delegate.isClosed(); + } + + @Override + public void updateAsciiStream(int arg0, InputStream arg1) throws SQLException { + delegate.updateAsciiStream(arg0, arg1); + } + + @Override + public void updateAsciiStream(String arg0, InputStream arg1) throws SQLException { + delegate.updateAsciiStream(arg0, arg1); + } + + @Override + public void updateAsciiStream(int arg0, InputStream arg1, long arg2) throws SQLException { + delegate.updateAsciiStream(arg0, arg1, arg2); + } + + @Override + public void updateAsciiStream(String arg0, InputStream arg1, long arg2) throws SQLException { + delegate.updateAsciiStream(arg0, arg1, arg2); + } + + @Override + public void updateBinaryStream(int arg0, InputStream arg1) throws SQLException { + delegate.updateBinaryStream(arg0, arg1); + } + + @Override + public void updateBinaryStream(String arg0, InputStream arg1) throws SQLException { + delegate.updateBinaryStream(arg0, arg1); + } + + @Override + public void updateBinaryStream(int arg0, InputStream arg1, long arg2) throws SQLException { + delegate.updateBinaryStream(arg0, arg1, arg2); + } + + @Override + public void updateBinaryStream(String arg0, InputStream arg1, long arg2) throws SQLException { + delegate.updateBinaryStream(arg0, arg1, arg2); + } + + @Override + public void updateBlob(int arg0, InputStream arg1) throws SQLException { + delegate.updateBlob(arg0, arg1); + } + + @Override + public void updateBlob(String arg0, InputStream arg1) throws SQLException { + delegate.updateBlob(arg0, arg1); + } + + @Override + public void updateBlob(int arg0, InputStream arg1, long arg2) throws SQLException { + delegate.updateBlob(arg0, arg1, arg2); + } + + @Override + public void updateBlob(String arg0, InputStream arg1, long arg2) throws SQLException { + delegate.updateBlob(arg0, arg1, arg2); + } + + @Override + public void updateCharacterStream(int arg0, Reader arg1) throws SQLException { + delegate.updateCharacterStream(arg0, arg1); + } + + @Override + public void updateCharacterStream(String arg0, Reader arg1) throws SQLException { + delegate.updateCharacterStream(arg0, arg1); + } + + @Override + public void updateCharacterStream(int arg0, Reader arg1, long arg2) throws SQLException { + delegate.updateCharacterStream(arg0, arg1, arg2); + } + + @Override + public void updateCharacterStream(String arg0, Reader arg1, long arg2) throws SQLException { + delegate.updateCharacterStream(arg0, arg1, arg2); + } + + @Override + public void updateClob(int arg0, Reader arg1) throws SQLException { + delegate.updateClob(arg0, arg1); + } + + @Override + public void updateClob(String arg0, Reader arg1) throws SQLException { + delegate.updateClob(arg0, arg1); + } + + @Override + public void updateClob(int arg0, Reader arg1, long arg2) throws SQLException { + delegate.updateClob(arg0, arg1, arg2); + } + + @Override + public void updateClob(String arg0, Reader arg1, long arg2) throws SQLException { + delegate.updateClob(arg0, arg1, arg2); + } + + @Override + public void updateNCharacterStream(int arg0, Reader arg1) throws SQLException { + delegate.updateNCharacterStream(arg0, arg1); + } + + @Override + public void updateNCharacterStream(String arg0, Reader arg1) throws SQLException { + delegate.updateNCharacterStream(arg0, arg1); + } + + @Override + public void updateNCharacterStream(int arg0, Reader arg1, long arg2) throws SQLException { + delegate.updateNCharacterStream(arg0, arg1, arg2); + } + + @Override + public void updateNCharacterStream(String arg0, Reader arg1, long arg2) throws SQLException { + delegate.updateNCharacterStream(arg0, arg1, arg2); + } + + @Override + public void updateNClob(int arg0, Reader arg1) throws SQLException { + delegate.updateNClob(arg0, arg1); + } + + @Override + public void updateNClob(String arg0, Reader arg1) throws SQLException { + delegate.updateNClob(arg0, arg1); + } + + @Override + public void updateNClob(int arg0, Reader arg1, long arg2) throws SQLException { + delegate.updateNClob(arg0, arg1, arg2); + } + + @Override + public void updateNClob(String arg0, Reader arg1, long arg2) throws SQLException { + delegate.updateNClob(arg0, arg1, arg2); + } + + @Override + public void updateNString(int arg0, String arg1) throws SQLException { + delegate.updateNString(arg0, arg1); + } + + @Override + public void updateNString(String arg0, String arg1) throws SQLException { + delegate.updateNString(arg0, arg1); + } + + @Override + public boolean isWrapperFor(Class<?> iface) throws SQLException { + // TODO + throw new UnsupportedOperationException(); + } + + @Override + public <T> T unwrap(Class<T> iface) throws SQLException { + // TODO + throw new UnsupportedOperationException(); + } + + @Override + public NClob getNClob(int arg0) throws SQLException { + return delegate.getNClob(arg0); + } + + @Override + public NClob getNClob(String columnLabel) throws SQLException { + return delegate.getNClob(columnLabel); + } + + @Override + public RowId getRowId(int columnIndex) throws SQLException { + return delegate.getRowId(columnIndex); + } + + @Override + public RowId getRowId(String columnLabel) throws SQLException { + return delegate.getRowId(columnLabel); + } + + @Override + public SQLXML getSQLXML(int columnIndex) throws SQLException { + return delegate.getSQLXML(columnIndex); + } + + @Override + public SQLXML getSQLXML(String columnLabel) throws SQLException { + return delegate.getSQLXML(columnLabel); + } + + @Override + public void updateNClob(int columnIndex, NClob clob) throws SQLException { + delegate.updateNClob(columnIndex, clob); + } + + @Override + public void updateNClob(String columnLabel, NClob clob) throws SQLException { + delegate.updateNClob(columnLabel, clob); + } + + @Override + public void updateRowId(int columnIndex, RowId x) throws SQLException { + delegate.updateRowId(columnIndex, x); + } + + @Override + public void updateRowId(String columnLabel, RowId x) throws SQLException { + delegate.updateRowId(columnLabel, x); + } + + @Override + public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException { + delegate.updateSQLXML(columnIndex, xmlObject); + } + + @Override + public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException { + delegate.updateSQLXML(columnLabel, xmlObject); + } + + @Override + public <T> T getObject(int columnIndex, Class<T> type) throws SQLException { + return delegate.getObject(columnIndex, type); + } + + @Override + public <T> T getObject(String columnLabel, Class<T> type) throws SQLException { + return delegate.getObject(columnLabel, type); + + } +} \ No newline at end of file
