From 9024b39d2c44818a5616ad4d3d74ead28a7d486b Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Mon, 11 Sep 2006 02:40:48 +0000 Subject: Added commented out JDK 1.6 features. --- .../repo/jdbc/LoggingCallableStatement.java | 158 +++++++++++++++++++++ .../carbonado/repo/jdbc/LoggingConnection.java | 64 +++++++++ .../carbonado/repo/jdbc/LoggingDataSource.java | 26 ++++ .../repo/jdbc/LoggingPreparedStatement.java | 92 ++++++++++++ .../carbonado/repo/jdbc/LoggingStatement.java | 22 +++ .../carbonado/repo/jdbc/SimpleDataSource.java | 26 ++++ 6 files changed, 388 insertions(+) (limited to 'src/main/java') diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingCallableStatement.java b/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingCallableStatement.java index 86ac2e0..3e5156b 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingCallableStatement.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingCallableStatement.java @@ -386,6 +386,164 @@ class LoggingCallableStatement extends LoggingPreparedStatement implements Calla return cs().getURL(parameterName); } + /* JDK 1.6 features + public RowId getRowId(int parameterIndex) throws SQLException { + return cs().getRowId(parameterIndex); + } + + public RowId getRowId(String parameterName) throws SQLException { + return cs().getRowId(parameterName); + } + + public void setRowId(String parameterName, RowId x) throws SQLException { + cs().setRowId(parameterName, x); + } + + public void setNString(String parameterName, String value) throws SQLException { + cs().setNString(parameterName, value); + } + + public void setNCharacterStream(String parameterName, java.io.Reader value, long length) + throws SQLException + { + cs().setNCharacterStream(parameterName, value, length); + } + + public void setNClob(String parameterName, NClob value) throws SQLException { + cs().setNClob(parameterName, value); + } + + public void setClob(String parameterName, java.io.Reader reader, long length) + throws SQLException + { + cs().setClob(parameterName, reader, length); + } + + public void setBlob(String parameterName, java.io.InputStream inputStream, long length) + throws SQLException + { + cs().setBlob(parameterName, inputStream, length); + } + + public void setNClob(String parameterName, java.io.Reader reader, long length) + throws SQLException + { + cs().setNClob(parameterName, reader, length); + } + + public NClob getNClob (int parameterIndex) throws SQLException { + return cs().getNClob(parameterIndex); + } + + public NClob getNClob (String parameterName) throws SQLException { + return cs().getNClob(parameterName); + } + + public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException { + cs().setSQLXML(parameterName, xmlObject); + } + + public SQLXML getSQLXML(int parameterIndex) throws SQLException { + return cs().getSQLXML(parameterIndex); + } + + public SQLXML getSQLXML(String parameterName) throws SQLException { + return cs().getSQLXML(parameterName); + } + + public String getNString(int parameterIndex) throws SQLException { + return cs().getNString(parameterIndex); + } + + public String getNString(String parameterName) throws SQLException { + return cs().getNString(parameterName); + } + + public java.io.Reader getNCharacterStream(int parameterIndex) throws SQLException { + return cs().getNCharacterStream(parameterIndex); + } + + public java.io.Reader getNCharacterStream(String parameterName) throws SQLException { + return cs().getNCharacterStream(parameterName); + } + + public java.io.Reader getCharacterStream(int parameterIndex) throws SQLException { + return cs().getCharacterStream(parameterIndex); + } + + public java.io.Reader getCharacterStream(String parameterName) throws SQLException { + return cs().getCharacterStream(parameterName); + } + + public void setBlob(String parameterName, Blob x) throws SQLException { + cs().setBlob(parameterName, x); + } + + public void setClob(String parameterName, Clob x) throws SQLException { + cs().setClob(parameterName, x); + } + + public void setAsciiStream(String parameterName, java.io.InputStream x, long length) + throws SQLException + { + cs().setAsciiStream(parameterName, x, length); + } + + public void setBinaryStream(String parameterName, java.io.InputStream x, long length) + throws SQLException + { + cs().setBinaryStream(parameterName, x, length); + } + + public void setCharacterStream(String parameterName, + java.io.Reader reader, + long length) + throws SQLException + { + cs().setCharacterStream(parameterName, reader, length); + } + + public void setAsciiStream(String parameterName, java.io.InputStream x) + throws SQLException + { + cs().setAsciiStream(parameterName, x); + } + + public void setBinaryStream(String parameterName, java.io.InputStream x) + throws SQLException + { + cs().setBinaryStream(parameterName, x); + } + + public void setCharacterStream(String parameterName, java.io.Reader reader) + throws SQLException + { + cs().setCharacterStream(parameterName, reader); + } + + public void setNCharacterStream(String parameterName, java.io.Reader value) + throws SQLException + { + cs().setNCharacterStream(parameterName, value); + } + + public void setClob(String parameterName, java.io.Reader reader) throws SQLException { + cs().setClob(parameterName, reader); + } + + public void setBlob(String parameterName, java.io.InputStream inputStream) + throws SQLException + { + cs().setBlob(parameterName, inputStream); + } + + public void setNClob(String parameterName, java.io.Reader reader) + throws SQLException + { + cs().setNClob(parameterName, reader); + } + */ + private CallableStatement cs() { return (CallableStatement) mStatement; } diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingConnection.java b/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingConnection.java index 5d3327e..c019666 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingConnection.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingConnection.java @@ -224,4 +224,68 @@ class LoggingConnection implements Connection { mLog.debug("Connection.releaseSavepoint(savepoint)"); mCon.releaseSavepoint(savepoint); } + + /* JDK 1.6 features + public Clob createClob() throws SQLException { + return mCon.createClob(); + } + + public Blob createBlob() throws SQLException { + return mCon.createBlob(); + } + + public NClob createNClob() throws SQLException { + return mCon.createNClob(); + } + + public SQLXML createSQLXML() throws SQLException { + return mCon.createSQLXML(); + } + + public boolean isValid(int timeout) throws SQLException { + return mCon.isValid(timeout); + } + + public void setClientInfo(String name, String value) throws SQLClientInfoException { + mCon.setClientInfo(name, value); + } + + public void setClientInfo(java.util.Properties properties) throws SQLClientInfoException { + mCon.setClientInfo(properties); + } + + public String getClientInfo(String name) throws SQLException { + return mCon.getClientInfo(name); + } + + public java.util.Properties getClientInfo() throws SQLException { + return mCon.getClientInfo(); + } + + public T createQueryObject(Class ifc) throws SQLException { + return mCon.createQueryObject(ifc); + } + + public T createQueryObject(Class ifc, Connection con) + throws SQLException + { + return mCon.createQueryObject(ifc, con); + } + + public Array createArrayOf(String typeName, Object[] elements) throws SQLException { + return mCon.createArrayOf(typeName, elements); + } + + public Struct createStruct(String typeName, Object[] attributes) throws SQLException { + return mCon.createStruct(typeName, attributes); + } + + public T unwrap(Class iface) throws SQLException { + throw new UnsupportedOperationException(); + } + + public boolean isWrapperFor(Class iface) throws SQLException { + throw new UnsupportedOperationException(); + } + */ } diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingDataSource.java b/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingDataSource.java index f612956..214389a 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingDataSource.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingDataSource.java @@ -90,4 +90,30 @@ public class LoggingDataSource implements DataSource { public int getLoginTimeout() throws SQLException { return mDataSource.getLoginTimeout(); } + + /* JDK 1.6 features + public T createQueryObject(Class ifc) + throws SQLException + { + throw new UnsupportedOperationException(); + } + + public T createQueryObject(Class ifc, DataSource ds) + throws SQLException + { + throw new UnsupportedOperationException(); + } + + public java.sql.QueryObjectGenerator getQueryObjectGenerator() throws SQLException { + throw new UnsupportedOperationException(); + } + + public T unwrap(Class iface) throws SQLException { + throw new UnsupportedOperationException(); + } + + public boolean isWrapperFor(Class iface) throws SQLException { + throw new UnsupportedOperationException(); + } + */ } diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingPreparedStatement.java b/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingPreparedStatement.java index be2c48c..f5b355f 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingPreparedStatement.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingPreparedStatement.java @@ -249,6 +249,98 @@ class LoggingPreparedStatement extends LoggingStatement implements PreparedState return ps().getParameterMetaData(); } + /* JDK 1.6 features + public void setRowId(int parameterIndex, RowId x) throws SQLException { + ps().setRowId(parameterIndex, x); + } + + public void setNString(int parameterIndex, String value) throws SQLException { + ps().setNString(parameterIndex, value); + } + + public void setNCharacterStream(int parameterIndex, java.io.Reader value, long length) + throws SQLException + { + ps().setNCharacterStream(parameterIndex, value, length); + } + + public void setNClob(int parameterIndex, NClob value) throws SQLException { + ps().setNClob(parameterIndex, value); + } + + public void setClob(int parameterIndex, java.io.Reader reader, long length) + throws SQLException + { + ps().setClob(parameterIndex, reader, length); + } + + public void setBlob(int parameterIndex, java.io.InputStream inputStream, long length) + throws SQLException + { + ps().setBlob(parameterIndex, inputStream, length); + } + + public void setNClob(int parameterIndex, java.io.Reader reader, long length) + throws SQLException + { + ps().setNClob(parameterIndex, reader, length); + } + + public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException { + ps().setSQLXML(parameterIndex, xmlObject); + } + + public void setAsciiStream(int parameterIndex, java.io.InputStream x, long length) + throws SQLException + { + ps().setAsciiStream(parameterIndex, x, length); + } + + public void setBinaryStream(int parameterIndex, java.io.InputStream x, long length) + throws SQLException + { + ps().setBinaryStream(parameterIndex, x, length); + } + + public void setCharacterStream(int parameterIndex, + java.io.Reader reader, + long length) + throws SQLException + { + ps().setCharacterStream(parameterIndex, reader, length); + } + + public void setAsciiStream(int parameterIndex, java.io.InputStream x) throws SQLException { + ps().setAsciiStream(parameterIndex, x); + } + + public void setBinaryStream(int parameterIndex, java.io.InputStream x) throws SQLException { + ps().setBinaryStream(parameterIndex, x); + } + + public void setCharacterStream(int parameterIndex, java.io.Reader reader) throws SQLException { + ps().setCharacterStream(parameterIndex, reader); + } + + public void setNCharacterStream(int parameterIndex, java.io.Reader value) throws SQLException { + ps().setNCharacterStream(parameterIndex, value); + } + + public void setClob(int parameterIndex, java.io.Reader reader) throws SQLException { + ps().setClob(parameterIndex, reader); + } + + public void setBlob(int parameterIndex, java.io.InputStream inputStream) + throws SQLException + { + ps().setBlob(parameterIndex, inputStream); + } + + public void setNClob(int parameterIndex, java.io.Reader reader) throws SQLException { + ps().setNClob(parameterIndex, reader); + } + */ + private PreparedStatement ps() { return (PreparedStatement) mStatement; } diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingStatement.java b/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingStatement.java index 790778f..c6b1f82 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingStatement.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/LoggingStatement.java @@ -197,4 +197,26 @@ class LoggingStatement implements Statement { public int getResultSetHoldability() throws SQLException { return mStatement.getResultSetHoldability(); } + + /* JDK 1.6 features + public boolean isClosed() throws SQLException { + return mStatement.isClosed(); + } + + public void setPoolable(boolean poolable) throws SQLException { + mStatement.setPoolable(poolable); + } + + public boolean isPoolable() throws SQLException { + return mStatement.isPoolable(); + } + + public T unwrap(Class iface) throws SQLException { + throw new UnsupportedOperationException(); + } + + public boolean isWrapperFor(Class iface) throws SQLException { + throw new UnsupportedOperationException(); + } + */ } diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/SimpleDataSource.java b/src/main/java/com/amazon/carbonado/repo/jdbc/SimpleDataSource.java index 9c93fec..5056a72 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/SimpleDataSource.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/SimpleDataSource.java @@ -86,4 +86,30 @@ public class SimpleDataSource implements DataSource { public int getLoginTimeout() throws SQLException { return 0; } + + /* JDK 1.6 features + public T createQueryObject(Class ifc) + throws SQLException + { + throw new UnsupportedOperationException(); + } + + public T createQueryObject(Class ifc, DataSource ds) + throws SQLException + { + throw new UnsupportedOperationException(); + } + + public java.sql.QueryObjectGenerator getQueryObjectGenerator() throws SQLException { + throw new UnsupportedOperationException(); + } + + public T unwrap(Class iface) throws SQLException { + throw new UnsupportedOperationException(); + } + + public boolean isWrapperFor(Class iface) throws SQLException { + throw new UnsupportedOperationException(); + } + */ } -- cgit v1.2.3