Author: aadamchik
Date: Wed Jul 4 18:22:08 2012
New Revision: 1357360
URL: http://svn.apache.org/viewvc?rev=1357360&view=rev
Log:
CAY-1717 [PATCH] Implement JDBC compatibility layer methods
patch by Joerg Schoenfisch
Modified:
cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt
cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataNode.java
Modified: cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt
URL:
http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt?rev=1357360&r1=1357359&r2=1357360&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt Wed Jul 4
18:22:08 2012
@@ -8,6 +8,15 @@ To browse individual bug reports check o
http://issues.apache.org/cayenne/
----------------------------------
+Release: 3.2M1
+Date:
+----------------------------------
+Changes/New Features Since 3.1
+
+CAY-1717 [PATCH] Implement JDBC compatibility layer methods
+
+
+----------------------------------
Release: 3.1B1
Date: 10 June 2012
----------------------------------
Modified:
cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataNode.java
URL:
http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataNode.java?rev=1357360&r1=1357359&r2=1357360&view=diff
==============================================================================
---
cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataNode.java
(original)
+++
cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataNode.java
Wed Jul 4 18:22:08 2012
@@ -406,7 +406,7 @@ public class DataNode implements QueryEn
*/
// JDBC 4 compatibility under Java 1.5
public boolean isWrapperFor(Class<?> iface) throws SQLException {
- throw new UnsupportedOperationException();
+ return iface.isAssignableFrom(dataSource.getClass());
}
/**
@@ -414,7 +414,11 @@ public class DataNode implements QueryEn
*/
// JDBC 4 compatibility under Java 1.5
public <T> T unwrap(Class<T> iface) throws SQLException {
- throw new UnsupportedOperationException();
+ try {
+ return iface.cast(dataSource);
+ } catch (ClassCastException e) {
+ throw new SQLException(e);
+ }
}
/**
@@ -423,7 +427,7 @@ public class DataNode implements QueryEn
* JDBC 4.1 compatibility under Java 1.5
*/
public Logger getParentLogger() throws SQLFeatureNotSupportedException
{
- throw new UnsupportedOperationException();
+ throw new SQLFeatureNotSupportedException();
}
}
}