openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwsut...@apache.org
Subject svn commit: r1226933 - in /openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/ openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/ openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/
Date Tue, 03 Jan 2012 20:04:39 GMT
Author: kwsutter
Date: Tue Jan  3 20:04:38 2012
New Revision: 1226933

URL: http://svn.apache.org/viewvc?rev=1226933&view=rev
Log:
OPENJPA-2087.  Adding "missing" methods on the concrete JDBC classes to allow building with
Java 7.  Committing this change on behalf of Jacob Nowosatka.

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SimpleDriverDataSource.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingCallableStatement.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingConnection.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingDataSource.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingDatabaseMetaData.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingPreparedStatement.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingResultSet.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingStatement.java
    openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedConnection.java
    openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedPreparedStatement.java
    openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedResultSet.java
    openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedTemplate.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SimpleDriverDataSource.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SimpleDriverDataSource.java?rev=1226933&r1=1226932&r2=1226933&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SimpleDriverDataSource.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SimpleDriverDataSource.java
Tue Jan  3 20:04:38 2012
@@ -25,8 +25,10 @@ import java.sql.Connection;
 import java.sql.Driver;
 import java.sql.DriverManager;
 import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
 import java.util.List;
 import java.util.Properties;
+import java.util.logging.Logger;
 
 import org.apache.openjpa.jdbc.sql.DBDictionary;
 import org.apache.openjpa.lib.jdbc.DelegatingDataSource;
@@ -216,6 +218,11 @@ public class SimpleDriverDataSource
         else
             return null;
     }
-
+    
+    // Java 7 methods follow
+    
+    public Logger getParentLogger() throws SQLFeatureNotSupportedException{
+    	throw new SQLFeatureNotSupportedException();
+    }
 }
 

Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingCallableStatement.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingCallableStatement.java?rev=1226933&r1=1226932&r2=1226933&view=diff
==============================================================================
--- openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingCallableStatement.java
(original)
+++ openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingCallableStatement.java
Tue Jan  3 20:04:38 2012
@@ -1026,4 +1026,22 @@ public class DelegatingCallableStatement
     public void setPoolable(boolean poolable) throws SQLException {
         _stmnt.setPoolable(poolable);
     }
+    
+    // Java 7 methods follow
+    
+    public <T>T getObject(String columnLabel, Class<T> type) throws SQLException{
+    	throw new UnsupportedOperationException();
+    }
+    
+    public <T>T getObject(int columnIndex, Class<T> type) throws SQLException{
+    	throw new UnsupportedOperationException();
+    }
+    
+    public boolean isCloseOnCompletion() throws SQLException{
+    	throw new UnsupportedOperationException();
+    }
+    
+    public void closeOnCompletion() throws SQLException{
+    	throw new UnsupportedOperationException();
+    }
 }

Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingConnection.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingConnection.java?rev=1226933&r1=1226932&r2=1226933&view=diff
==============================================================================
--- openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingConnection.java
(original)
+++ openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingConnection.java
Tue Jan  3 20:04:38 2012
@@ -36,6 +36,7 @@ import java.sql.Statement;
 import java.sql.Struct;
 import java.util.Map;
 import java.util.Properties;
+import java.util.concurrent.Executor;
 
 import org.apache.openjpa.lib.util.Closeable;
 
@@ -510,4 +511,26 @@ public class DelegatingConnection implem
     public void setClientInfo(String name, String value) throws SQLClientInfoException {
         _conn.setClientInfo(name, value);
     }
+    
+    // Java 7 methods follow
+    
+    public void abort(Executor executor) throws SQLException {
+    	throw new UnsupportedOperationException();
+    }
+    
+    public int getNetworkTimeout() throws SQLException{
+    	throw new UnsupportedOperationException();
+    }
+    
+    public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException{
+    	throw new UnsupportedOperationException();
+    }
+    
+    public String getSchema() throws SQLException {
+    	throw new UnsupportedOperationException(); 
+    }
+    
+    public void setSchema(String schema)throws SQLException {
+    	throw new UnsupportedOperationException();
+    }
 }

Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingDataSource.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingDataSource.java?rev=1226933&r1=1226932&r2=1226933&view=diff
==============================================================================
--- openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingDataSource.java
(original)
+++ openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingDataSource.java
Tue Jan  3 20:04:38 2012
@@ -22,6 +22,8 @@ import java.io.PrintWriter;
 import java.lang.reflect.Method;
 import java.sql.Connection;
 import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
+import java.util.logging.Logger;
 
 import javax.sql.DataSource;
 
@@ -153,4 +155,10 @@ public class DelegatingDataSource implem
             return false;
         }
     }
+    
+    // Java 7 methods follow
+    
+    public Logger getParentLogger() throws SQLFeatureNotSupportedException{
+    	throw new SQLFeatureNotSupportedException();
+    }
 }

Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingDatabaseMetaData.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingDatabaseMetaData.java?rev=1226933&r1=1226932&r2=1226933&view=diff
==============================================================================
--- openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingDatabaseMetaData.java
(original)
+++ openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingDatabaseMetaData.java
Tue Jan  3 20:04:38 2012
@@ -822,4 +822,15 @@ public class DelegatingDatabaseMetaData 
     public boolean supportsStoredFunctionsUsingCallSyntax() throws SQLException {
         return _metaData.supportsStoredFunctionsUsingCallSyntax();
     }
+    
+    // Java 7 methods follow
+    
+    public boolean generatedKeyAlwaysReturned() throws SQLException {
+    	throw new UnsupportedOperationException();
+    }
+    
+    public ResultSet getPseudoColumns(String catalog, String schemaPattern, 
+    	String tableNamepattern, String columnNamePattern) throws SQLException {
+    	throw new UnsupportedOperationException();
+    }
 }

Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingPreparedStatement.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingPreparedStatement.java?rev=1226933&r1=1226932&r2=1226933&view=diff
==============================================================================
--- openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingPreparedStatement.java
(original)
+++ openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingPreparedStatement.java
Tue Jan  3 20:04:38 2012
@@ -555,4 +555,14 @@ public class DelegatingPreparedStatement
     public void setPoolable(boolean poolable) throws SQLException {
         _stmnt.setPoolable(poolable);
     }
+    
+    // Java 7 methods follow
+    
+    public boolean isCloseOnCompletion() throws SQLException{
+    	throw new UnsupportedOperationException();
+    }
+    
+    public void closeOnCompletion() throws SQLException{
+    	throw new UnsupportedOperationException();
+    }
 }

Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingResultSet.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingResultSet.java?rev=1226933&r1=1226932&r2=1226933&view=diff
==============================================================================
--- openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingResultSet.java
(original)
+++ openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingResultSet.java
Tue Jan  3 20:04:38 2012
@@ -881,5 +881,15 @@ public class DelegatingResultSet impleme
     public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException {
         _rs.updateSQLXML(columnLabel, xmlObject);
     }
+    
+    // Java 7 methods follow
+    
+    public <T>T getObject(String columnLabel, Class<T> type) throws SQLException{
+    	throw new UnsupportedOperationException();
+    }
+    
+    public <T>T getObject(int columnIndex, Class<T> type) throws SQLException{
+    	throw new UnsupportedOperationException();
+    }
 }
 

Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingStatement.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingStatement.java?rev=1226933&r1=1226932&r2=1226933&view=diff
==============================================================================
--- openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingStatement.java
(original)
+++ openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingStatement.java
Tue Jan  3 20:04:38 2012
@@ -293,4 +293,14 @@ public class DelegatingStatement impleme
     public boolean isPoolable() throws SQLException {
         return _stmnt.isPoolable();
     }
+    
+    // Java 7 methods follow
+    
+    public boolean isCloseOnCompletion() throws SQLException{
+    	throw new UnsupportedOperationException();
+    }
+    
+    public void closeOnCompletion() throws SQLException{
+    	throw new UnsupportedOperationException();
+    }
 }

Modified: openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedConnection.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedConnection.java?rev=1226933&r1=1226932&r2=1226933&view=diff
==============================================================================
--- openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedConnection.java
(original)
+++ openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedConnection.java
Tue Jan  3 20:04:38 2012
@@ -36,6 +36,7 @@ import java.sql.Struct;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
+import java.util.concurrent.Executor;
 
 /**
  * A virtual connection that contains multiple physical connections.
@@ -336,4 +337,26 @@ public class DistributedConnection imple
         throws SQLClientInfoException {
         throw new UnsupportedOperationException();
     }
+    
+    // Java 7 methods follow
+    
+    public void abort(Executor executor) throws SQLException {
+    	throw new UnsupportedOperationException();
+    }
+    
+    public int getNetworkTimeout() throws SQLException{
+    	throw new UnsupportedOperationException();
+    }
+    
+    public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException{
+    	throw new UnsupportedOperationException();
+    }
+    
+    public String getSchema() throws SQLException {
+    	throw new UnsupportedOperationException(); 
+    }
+    
+    public void setSchema(String schema)throws SQLException {
+    	throw new UnsupportedOperationException();
+    }
 }

Modified: openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedPreparedStatement.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedPreparedStatement.java?rev=1226933&r1=1226932&r2=1226933&view=diff
==============================================================================
--- openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedPreparedStatement.java
(original)
+++ openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedPreparedStatement.java
Tue Jan  3 20:04:38 2012
@@ -345,4 +345,14 @@ public class DistributedPreparedStatemen
     public void setSQLXML(int arg0, SQLXML arg1) throws SQLException {
         throw new UnsupportedOperationException();
     }
+    
+    // Java 7 methods follow
+    
+    public boolean isCloseOnCompletion() throws SQLException{
+    	throw new UnsupportedOperationException();
+    }
+    
+    public void closeOnCompletion() throws SQLException{
+    	throw new UnsupportedOperationException();
+    }
 }

Modified: openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedResultSet.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedResultSet.java?rev=1226933&r1=1226932&r2=1226933&view=diff
==============================================================================
--- openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedResultSet.java
(original)
+++ openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedResultSet.java
Tue Jan  3 20:04:38 2012
@@ -909,4 +909,14 @@ public class DistributedResultSet implem
     public void updateSQLXML(String arg0, SQLXML arg1) throws SQLException {
         throw new UnsupportedOperationException();
     }
+    
+    // Java 7 methods follow
+    
+    public <T>T getObject(String columnLabel, Class<T> type) throws SQLException{
+    	throw new UnsupportedOperationException();
+    }
+    
+    public <T>T getObject(int columnIndex, Class<T> type) throws SQLException{
+    	throw new UnsupportedOperationException();
+    }
 }

Modified: openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedTemplate.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedTemplate.java?rev=1226933&r1=1226932&r2=1226933&view=diff
==============================================================================
--- openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedTemplate.java
(original)
+++ openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedTemplate.java
Tue Jan  3 20:04:38 2012
@@ -298,4 +298,14 @@ public class DistributedTemplate<T exten
     public void setPoolable(boolean arg0) throws SQLException {
         throw new UnsupportedOperationException();
     }
+    
+    // Java 7 methods follow
+    
+    public boolean isCloseOnCompletion() throws SQLException{
+    	throw new UnsupportedOperationException();
+    }
+    
+    public void closeOnCompletion() throws SQLException{
+    	throw new UnsupportedOperationException();
+    }
 }



Mime
View raw message