db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From banda...@apache.org
Subject svn commit: r345402 [1/2] - in /db/derby/code/trunk: ./ java/client/ java/client/org/apache/derby/client/ java/client/org/apache/derby/client/am/ java/client/org/apache/derby/client/net/ java/client/org/apache/derby/jdbc/ java/engine/ java/engine/org/a...
Date Fri, 18 Nov 2005 02:00:59 GMT
Author: bandaram
Date: Thu Nov 17 18:00:23 2005
New Revision: 345402

URL: http://svn.apache.org/viewcvs?rev=345402&view=rev
Log:
DERBY-587: Enhance Derby by adding JDBC 4.0 stub implementation for both client and embedded drivers. This would enable Derby to be used in up comming JDK1.6.

There is a design documented posted at JIRA with more details.

Thanks to Rick for review and testing.

Submitted by V.Narayanan (v.narayanan@sun.com)

Added:
    db/derby/code/trunk/java/client/org/apache/derby/client/ClientPooledConnection40.java   (with props)
    db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableStatement40.java   (with props)
    db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement40.java   (with props)
    db/derby/code/trunk/java/client/org/apache/derby/client/am/RowId.java   (with props)
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection40.java   (with props)
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetDatabaseMetaData40.java   (with props)
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetResultSet40.java   (with props)
    db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDataSource40.java   (with props)
    db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientJDBCObjectFactory.java   (with props)
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement40.java   (with props)
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection40.java   (with props)
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement40.java   (with props)
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement40.java   (with props)
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection40.java   (with props)
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData40.java   (with props)
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement40.java   (with props)
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet40.java   (with props)
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedRowId.java   (with props)
    db/derby/code/trunk/java/engine/org/apache/derby/jdbc/Driver40.java   (with props)
    db/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbeddedDataSource40.java   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/jdk16.java   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/StartTestConnection.out   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/TestCallableStatementMethods.out   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/TestConnectionMethods.out   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/TestPreparedStatementMethods.out   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/TestResultSetMethods.out   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/jdbc4.properties   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/jdbc4.runall   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/StartTestConnection.java   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/TestCallableStatementMethods.java   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/TestCallableStatementMethods_app.properties   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/TestConnection.java   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/TestConnectionMethods.java   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/TestConnectionMethods_app.properties   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/TestPreparedStatementMethods.java   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/TestPreparedStatement_app.properties   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/TestResultSetMethods.java   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/TestResultSetMethods_app.properties   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/TestRowId.java   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/TestRowId_app.properties   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/build.xml   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/copyfiles.ant   (with props)
Modified:
    db/derby/code/trunk/build.xml
    db/derby/code/trunk/java/client/build.xml
    db/derby/code/trunk/java/engine/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/JVMInfo.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/jdbc/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/modules.properties
    db/derby/code/trunk/java/testing/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/build.xml
    db/derby/code/trunk/tools/ant/properties/compilepath.properties

Modified: db/derby/code/trunk/build.xml
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/build.xml?rev=345402&r1=345401&r2=345402&view=diff
==============================================================================
--- db/derby/code/trunk/build.xml (original)
+++ db/derby/code/trunk/build.xml Thu Nov 17 18:00:23 2005
@@ -285,10 +285,24 @@
     <antcall target="build"/>
     <ant dir="${derby.engine.dir}/loc"/>
     <antcall target="class_size_catalog"/>
+    <antcall target="compile_jdbc4_target">
+                         <param name="coj.buildscript" value="${derby.engine.dir}/impl/jdbc/build.xml"/>
+                         <param name="coj.target" value="compile_jdbc4"/>
+                  </antcall>
+
+                  <antcall target="compile_jdbc4_target">
+                         <param name="coj.buildscript" value="${derby.engine.dir}/iapi/jdbc/build.xml"/>
+                         <param name="coj.target" value="compile_jdbc4"/>
+                  </antcall>
+
+                  <antcall target="compile_jdbc4_target">
+                         <param name="coj.buildscript" value="${derby.engine.dir}/jdbc/build.xml"/>
+                         <param name="coj.target" value="compile_jdbc4"/>
+                  </antcall>
   </target>
 	 <target name="engine_169_opt" depends="engine">
-	    <ant dir="${derby.engine.src.dir}" target="engine_169_opt"/>
-	  </target>
+	 	  <ant dir="${derby.engine.src.dir}" target="engine_169_opt"/>
+	 </target>
 	
   <target name="tools" depends="engine">
     <ant dir="${derby.tools.src.dir}"/>
@@ -300,6 +314,10 @@
 
   <target name="client" depends="engine,init">
     <ant dir="${derby.client.src.dir}"/>
+    <antcall target="compile_jdbc4_target">
+    	                 <param name="coj.buildscript" value="${derby.client.src.dir}/build.xml"/>
+                         <param name="coj.target" value="compile_jdbc4"/>
+    </antcall>
   </target>
 
   <target name="build">
@@ -312,6 +330,10 @@
 
   <target name="testing" depends="demo">
     <ant dir="${derby.testing.src.dir}"/>
+    <antcall target="compile_jdbc4_target">
+          <param name="coj.buildscript" value="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/jdbc4/build.xml"/>
+          <param name="coj.target" value="compile_jdbc4"/>
+    </antcall>
   </target>
 
 <!-- ==================================================================== -->
@@ -1314,5 +1336,27 @@
     <echo message=""/>
     <fail message="Exiting snapshot build..."/>
   </target>
+
+  <target name="compile_jdbc4_target" description="Build the JDBC4.0 elements of the derby engine" if="jdk16">
+	<!-- The optional compilation target of the jdbc4 classes begins here -->
+	<!-- Contains the ant-spawing logic -->
+	<property environment="env"/>
+
+	<condition property="antExecutable" value="ant.bat">
+		<os family="windows"/>
+	</condition>
+	<property name="antExecutable" value="ant"/>
+
+	<exec executable="${env.ANT_HOME}/bin/${antExecutable}" outputproperty="jdbc4.output">
+        	<env key="JAVA_HOME" value="${jdk16}"/>
+		<arg value="-quiet"/>
+		<arg value="-f"/>
+		<arg path="${coj.buildscript}"/>
+		<arg value="${coj.target}"/>
+	</exec>
+
+	<echo message="${jdbc4.output}"/>
+  </target>
+
 
 </project>

Modified: db/derby/code/trunk/java/client/build.xml
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/build.xml?rev=345402&r1=345401&r2=345402&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/build.xml (original)
+++ db/derby/code/trunk/java/client/build.xml Thu Nov 17 18:00:23 2005
@@ -31,10 +31,8 @@
   <property file="${properties.dir}/release.properties"/>
   
 
-<!-- Targets -->
-
 <!-- compile classes  -->
-  <target name="compile">
+<target name="compile">
     <javac
       bootclasspath="${empty}"
       nowarn="on"
@@ -45,7 +43,7 @@
       proceed="${proceed}"
       verbose="${verbose}"
       srcdir="${derby.client.src.dir}"
-      includes="org/apache/derby/**"
+      excludes="**/*40.java,**/RowId.java" 
       destdir="${out.dir}">
       <classpath>
           <pathelement path="${jce1_2_1}"/>
@@ -53,8 +51,29 @@
       </classpath>
     </javac>
 </target>
-  
 
+<target name="compile_jdbc4">
+    <javac
+      bootclasspath="${empty}"
+      nowarn="on"
+      debug="${debug}"
+      depend="${depend}"
+      deprecation="${deprecation}"
+      optimize="${optimize}"
+      proceed="${proceed}"
+      verbose="${verbose}"
+      srcdir="${derby.client.src.dir}"
+      includes="**/*40.java,**/RowId.java" 
+      destdir="${out.dir}">
+      <classpath>
+        <pathelement path="${jce1_2_1}"/>
+        <pathelement path="${java16compile.classpath}"/>
+      </classpath>
+      <compilerarg value="-Xlint"/>
+   </javac>
+</target> 
+
+  
 <!-- default target  -->
   <target name="client" depends="compile"/>
 </project>

Added: db/derby/code/trunk/java/client/org/apache/derby/client/ClientPooledConnection40.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/client/ClientPooledConnection40.java?rev=345402&view=auto
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/ClientPooledConnection40.java (added)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/ClientPooledConnection40.java Thu Nov 17 18:00:23 2005
@@ -0,0 +1,61 @@
+/*
+ 
+   Derby - Class org.apache.derby.client.ClientPooledConnection40
+ 
+   Copyright (c) 2005 The Apache Software Foundation or its licensors, where applicable.
+ 
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+ 
+      http://www.apache.org/licenses/LICENSE-2.0
+ 
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+ 
+ */
+
+package org.apache.derby.client;
+import org.apache.derby.client.am.SqlException;
+import org.apache.derby.client.net.NetLogWriter;
+import org.apache.derby.jdbc.ClientDataSource;
+import javax.sql.StatementEventListener;
+
+public class ClientPooledConnection40 extends ClientPooledConnection {
+    
+    public ClientPooledConnection40(ClientDataSource ds,
+        org.apache.derby.client.am.LogWriter logWriter,
+        String user,
+        String password) throws SqlException {
+        super(ds,logWriter,user,password);
+        
+    }
+    
+    
+    public ClientPooledConnection40(ClientDataSource ds,
+        org.apache.derby.client.am.LogWriter logWriter,
+        String user,
+        String password,
+        int rmId) throws SqlException {
+        super(ds,logWriter,user,password,rmId);
+        
+    }
+    
+    public ClientPooledConnection40(ClientDataSource ds,
+        org.apache.derby.client.am.LogWriter logWriter) throws SqlException {
+        super(ds,logWriter);
+    }
+    
+    public void addStatementEventListener(StatementEventListener listener){
+        throw new java.lang.UnsupportedOperationException();
+    }
+    
+    public void removeStatementEventListener(StatementEventListener listener){
+        throw new java.lang.UnsupportedOperationException();
+    }
+    
+    
+}

Propchange: db/derby/code/trunk/java/client/org/apache/derby/client/ClientPooledConnection40.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableStatement40.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableStatement40.java?rev=345402&view=auto
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableStatement40.java (added)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableStatement40.java Thu Nov 17 18:00:23 2005
@@ -0,0 +1,158 @@
+/*
+ 
+   Derby - Class org.apache.derby.client.am.CallableStatement40
+ 
+   Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ 
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+ 
+      http://www.apache.org/licenses/LICENSE-2.0
+ 
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+ 
+ */
+
+package org.apache.derby.client.am;
+
+import org.apache.derby.impl.jdbc.Util;
+import java.io.InputStream;
+import java.io.Reader;
+import java.sql.NClob;
+import java.sql.RowId;
+import java.sql.SQLException;
+import java.sql.SQLXML;
+
+
+public class CallableStatement40 extends org.apache.derby.client.am.CallableStatement {
+    
+    
+    private org.apache.derby.client.am.PreparedStatement40 ps;
+    
+    
+    public CallableStatement40(Agent agent,
+        Connection connection,
+        String sql,
+        int type, int concurrency, int holdability) throws SQLException {
+        super(agent, connection, sql, type, concurrency, holdability);
+        ps = new PreparedStatement40(agent, connection, sql, type, concurrency, holdability, java.sql.Statement.NO_GENERATED_KEYS, null);
+    }
+    
+    
+    public RowId getRowId(int parameterIndex) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public RowId getRowId(String parameterName) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public void setRowId(String parameterName, RowId x) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    
+    public void setNString(String parameterName, String value)
+    throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public void setNCharacterStream(String parameterName, Reader value, long length)
+    throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public void setNClob(String parameterName, NClob value) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public void setClob(String parameterName, Reader reader, long length)
+    throws SQLException{
+        throw Util.notImplemented();
+        
+    }
+    
+    public void setBlob(String parameterName, InputStream inputStream, long length)
+    throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    public void setNClob(String parameterName, Reader reader, long length)
+    throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public NClob getNClob(int i) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    
+    public NClob getNClob(String parameterName) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException {
+        throw Util.notImplemented();
+        
+    }
+    
+    public SQLXML getSQLXML(int parameterIndex) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public SQLXML getSQLXML(String parametername) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public void setRowId(int parameterIndex, RowId x) throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    /*********************************************************************************************************
+     * The methods from PreparedStatement for JDBC 4.0
+     *********************************************************************************************************/
+    public void setNString(int index, String value) throws SQLException {
+        ps.setNString(index,value);
+    }
+    
+    public void setNCharacterStream(int index, Reader value, long length) throws SQLException {
+        ps.setNCharacterStream(index,value,length);
+    }
+    
+    public void setNClob(int index, NClob value) throws SQLException {
+        ps.setNClob(index,value);
+    }
+    
+    public void setClob(int parameterIndex, Reader reader, long length)
+    throws SQLException {
+        ps.setClob(parameterIndex,reader,length);
+    }
+    
+    public void setBlob(int parameterIndex, InputStream inputStream, long length)
+    throws SQLException {
+        ps.setBlob(parameterIndex,inputStream,length);
+    }
+    public void setNClob(int parameterIndex, 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 setPoolable(boolean poolable)
+    throws SQLException {
+        ps.setPoolable(poolable);
+    }
+    
+    public boolean isPoolable()
+    throws SQLException {
+        return ps.isPoolable();
+    }
+}

Propchange: db/derby/code/trunk/java/client/org/apache/derby/client/am/CallableStatement40.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement40.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement40.java?rev=345402&view=auto
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement40.java (added)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement40.java Thu Nov 17 18:00:23 2005
@@ -0,0 +1,92 @@
+/*
+
+   Derby - Class org.apache.derby.client.am.PreparedStatement40
+
+   Copyright (c) 2005 The Apache Software Foundation or its licensors, where applicable.
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+*/
+
+package org.apache.derby.client.am;
+
+import org.apache.derby.impl.jdbc.Util;
+import java.sql.RowId;
+import java.sql.NClob;
+import java.sql.SQLException;
+import java.sql.SQLXML;
+import java.io.Reader;
+import java.io.InputStream;
+
+public class  PreparedStatement40 extends  org.apache.derby.client.am.PreparedStatement{
+    
+    public PreparedStatement40(Agent agent,
+        Connection connection,
+        String sql,
+        Section section) throws SQLException {
+        super(agent, connection,sql,section);
+    }
+    
+    public PreparedStatement40(Agent agent,
+        Connection connection,
+        String sql,
+        int type, int concurrency, int holdability, int autoGeneratedKeys, String[] columnNames) throws SqlException {
+        super(agent, connection, sql, type, concurrency, holdability, autoGeneratedKeys, columnNames);
+    }
+    
+    
+    
+    public void setRowId(int parameterIndex, RowId x) throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    public void setNString(int index, String value) throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    public void setNCharacterStream(int index, Reader value, long length) throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    public void setNClob(int index, NClob value) throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    public void setClob(int parameterIndex, Reader reader, long length)
+    throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    public void setBlob(int parameterIndex, InputStream inputStream, long length)
+    throws SQLException{
+        throw Util.notImplemented();
+    }
+    public void setNClob(int parameterIndex, Reader reader, long length)
+    throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    public void setPoolable(boolean poolable)
+    throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    public boolean isPoolable()
+    throws SQLException{
+        throw Util.notImplemented();
+    }
+}

Propchange: db/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatement40.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/client/org/apache/derby/client/am/RowId.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/client/am/RowId.java?rev=345402&view=auto
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/RowId.java (added)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/RowId.java Thu Nov 17 18:00:23 2005
@@ -0,0 +1,47 @@
+/*
+ 
+   Derby - Class org.apache.derby.client.am.RowId
+ 
+   Copyright (c) 2005 The Apache Software Foundation or its licensors, where applicable.
+ 
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+ 
+      http://www.apache.org/licenses/LICENSE-2.0
+ 
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+ 
+ */
+
+package org.apache.derby.client.am;
+
+import java.sql.SQLException;
+import org.apache.derby.impl.jdbc.Util;
+
+public class RowId implements java.sql.RowId {
+    
+    public RowId() {
+        throw new java.lang.UnsupportedOperationException();
+    }
+    
+    public boolean equals(Object obj) {
+        throw new java.lang.UnsupportedOperationException();
+    }
+    
+    public byte[] getBytes() {
+        throw new java.lang.UnsupportedOperationException();
+    }
+    
+    public String toString() {
+        throw new java.lang.UnsupportedOperationException();
+    }
+    
+    public int hashCode() {
+        throw new java.lang.UnsupportedOperationException();
+    }
+}

Propchange: db/derby/code/trunk/java/client/org/apache/derby/client/am/RowId.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection40.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection40.java?rev=345402&view=auto
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection40.java (added)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection40.java Thu Nov 17 18:00:23 2005
@@ -0,0 +1,131 @@
+/*
+ 
+   Derby - Class org.apache.derby.client.net.NetConnection40
+ 
+   Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ 
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+ 
+      http://www.apache.org/licenses/LICENSE-2.0
+ 
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+ 
+ */
+
+package org.apache.derby.client.net;
+
+import org.apache.derby.impl.jdbc.Util;
+import org.apache.derby.jdbc.InternalDriver;
+import java.sql.Blob;
+import java.sql.ClientInfoException;
+import java.sql.Clob;
+import java.sql.NClob;
+import java.sql.SQLException;
+import java.sql.SQLXML;
+import java.util.Properties;
+
+
+public class  NetConnection40 extends org.apache.derby.client.net.NetConnection {
+    
+    /*
+     *-------------------------------------------------------
+     * JDBC 4.0 
+     *-------------------------------------------------------
+    */
+
+    public NetConnection40(NetLogWriter netLogWriter,
+                         String databaseName,
+                         java.util.Properties properties) throws SQLException {
+	super(netLogWriter,databaseName,properties);
+    }
+    public NetConnection40(NetLogWriter netLogWriter,
+                         org.apache.derby.jdbc.ClientDataSource dataSource,
+                         String user,
+                         String password) throws SQLException {
+	super(netLogWriter,dataSource,user,password);
+    }
+     public NetConnection40(NetLogWriter netLogWriter,
+                         int driverManagerLoginTimeout,
+                         String serverName,
+                         int portNumber,
+                         String databaseName,
+                         java.util.Properties properties) throws SQLException{
+	super(netLogWriter,driverManagerLoginTimeout,serverName,portNumber,databaseName,properties);
+     }
+     public NetConnection40(NetLogWriter netLogWriter,
+                         String user,
+                         String password,
+                         org.apache.derby.jdbc.ClientDataSource dataSource,
+                         int rmId,
+                         boolean isXAConn) throws SQLException{
+	super(netLogWriter,user,password,dataSource,rmId,isXAConn);
+    }
+    public NetConnection40(NetLogWriter netLogWriter,
+                         String ipaddr,
+                         int portNumber,
+                         org.apache.derby.jdbc.ClientDataSource dataSource,
+                         boolean isXAConn) throws SQLException{
+        super(netLogWriter,ipaddr,portNumber,dataSource,isXAConn);
+    }
+    
+
+    
+    
+    public Clob createClob() throws SQLException {
+        throw Util.notImplemented();
+    }
+
+    public Blob createBlob() throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public NClob createNClob() throws SQLException {
+        throw Util.notImplemented();
+    }
+
+    public SQLXML createSQLXML() throws SQLException {
+        throw Util.notImplemented();
+    }
+
+    public boolean isValid(int timeout) throws SQLException {
+        throw Util.notImplemented();
+    }
+
+    public void setClientInfo(String name, String value)
+		throws SQLException{
+	throw Util.notImplemented();
+    }
+	
+    public void setClientInfo(Properties properties)
+		throws ClientInfoException {
+	SQLException temp= Util.notImplemented();
+	ClientInfoException clientInfoException = new ClientInfoException
+	(temp.getMessage(),temp.getSQLState(),(Properties) null);
+	throw clientInfoException; 
+    }
+	
+    public String getClientInfo(String name)
+		throws SQLException{
+	throw Util.notImplemented();
+    }
+	
+    public Properties getClientInfo()
+		throws SQLException{
+	throw Util.notImplemented();
+    }
+    
+    public <T> T createQueryObject(Class<T> ifc) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public java.util.Map<String,Class<?>> getTypeMap(){
+	throw new java.lang.UnsupportedOperationException();
+    }
+    
+}

Propchange: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection40.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetDatabaseMetaData40.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetDatabaseMetaData40.java?rev=345402&view=auto
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetDatabaseMetaData40.java (added)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetDatabaseMetaData40.java Thu Nov 17 18:00:23 2005
@@ -0,0 +1,61 @@
+/*
+ 
+   Derby - Class org.apache.derby.client.net.NetDatabaseMetaData40
+ 
+   Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ 
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+ 
+      http://www.apache.org/licenses/LICENSE-2.0
+ 
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+ 
+ */
+
+package org.apache.derby.client.net;
+
+import java.sql.ResultSet;
+import java.sql.RowIdLifetime;
+import java.sql.SQLException;
+import org.apache.derby.impl.jdbc.Util;
+
+public class NetDatabaseMetaData40 extends org.apache.derby.client.net.NetDatabaseMetaData {
+    
+    
+    public NetDatabaseMetaData40(NetAgent netAgent, NetConnection netConnection) {
+        super(netAgent,netConnection);
+    }
+    
+    public RowIdLifetime getRowIdLifetime() throws SQLException {
+        throw Util.notImplemented();
+        
+    }
+    
+    public ResultSet getSchemas(String catalog, String schemaPattern) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    
+    public boolean supportsStoredFunctionsUsingCallSyntax() throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public boolean autoCommitFailureClosesAllResultSets() throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public ResultSet getClientInfoProperties()
+    throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public boolean providesQueryObjectGenerator() throws SQLException {
+        throw Util.notImplemented();
+    }
+}

Propchange: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetDatabaseMetaData40.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetResultSet40.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetResultSet40.java?rev=345402&view=auto
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetResultSet40.java (added)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetResultSet40.java Thu Nov 17 18:00:23 2005
@@ -0,0 +1,116 @@
+/*
+
+   Derby - Class org.apache.derby.client.net.NetResultSet40
+
+   Copyright (c) 2005 The Apache Software Foundation or its licensors, where applicable.
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+*/
+
+package org.apache.derby.client.net;
+
+import java.io.InputStream;
+import java.io.Reader;
+import java.sql.NClob;
+import java.sql.RowId;
+import java.sql.SQLException;
+import java.sql.SQLXML;
+import org.apache.derby.impl.jdbc.Util;
+import org.apache.derby.iapi.sql.ResultSet;
+import org.apache.derby.client.am.Cursor;
+
+public class NetResultSet40 extends NetResultSet{
+    
+    public NetResultSet40(NetAgent netAgent,
+        NetStatement netStatement,
+        Cursor cursor,
+        //int qryprctyp,  //protocolType, CodePoint.FIXROWPRC | CodePoint.LMTBLKPRC
+        int sqlcsrhld, // holdOption, 0xF0 for false (default) | 0xF1 for true.
+        int qryattscr, // scrollOption, 0xF0 for false (default) | 0xF1 for true.
+        int qryattsns, // sensitivity, CodePoint.QRYUNK | CodePoint.QRYINS
+        int qryattset, // rowsetCursor, 0xF0 for false (default) | 0xF1 for true.
+        long qryinsid, // instanceIdentifier, 0 (if not returned, check default) or number
+        int actualResultSetType,
+        int actualResultSetConcurrency,
+        int actualResultSetHoldability) //throws DisconnectException
+    {
+        super(netAgent,netStatement,cursor,sqlcsrhld,qryattscr,qryattsns,qryattset,qryinsid,actualResultSetType,actualResultSetConcurrency,actualResultSetHoldability);
+    }
+    
+    public RowId getRowId(int columnIndex) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    
+    public RowId getRowId(String columnName) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public void updateRowId(int columnIndex, RowId x) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public void updateRowId(String columnName, RowId x) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public int getHoldability() throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public boolean isClosed() throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public void updateNString(int columnIndex, String nString) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public void updateNString(String columnName, String nString) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public void updateNClob(int columnIndex, NClob nClob) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public void updateNClob(String columnName, NClob nClob) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public NClob getNClob(int i) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public NClob getNClob(String colName) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public SQLXML getSQLXML(int columnIndex) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public SQLXML getSQLXML(String colName) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public void updateSQLXML(String columnName, SQLXML xmlObject) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+}

Propchange: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetResultSet40.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDataSource40.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDataSource40.java?rev=345402&view=auto
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDataSource40.java (added)
+++ db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDataSource40.java Thu Nov 17 18:00:23 2005
@@ -0,0 +1,35 @@
+/*
+ 
+   Derby - Class org.apache.derby.jdbc.ClientDataSource40
+ 
+   Copyright (c) 2005 The Apache Software Foundation or its licensors, where applicable.
+ 
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+ 
+      http://www.apache.org/licenses/LICENSE-2.0
+ 
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+ 
+ */
+
+package org.apache.derby.jdbc;
+
+import java.sql.SQLException;
+
+public class ClientDataSource40 extends ClientDataSource {
+    
+    public ClientDataSource40() {
+        super();
+    }
+    
+    public <T> T createQueryObject(Class<T> ifc) throws SQLException {
+        throw new java.lang.UnsupportedOperationException();
+    }
+    
+}

Propchange: db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDataSource40.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientJDBCObjectFactory.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientJDBCObjectFactory.java?rev=345402&view=auto
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientJDBCObjectFactory.java (added)
+++ db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientJDBCObjectFactory.java Thu Nov 17 18:00:23 2005
@@ -0,0 +1,386 @@
+/*
+
+   Derby - Class org.apache.derby.jdbc.ClientJDBCObjectFactory
+
+   Copyright (c) 2005 The Apache Software Foundation or its licensors, where applicable.
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+*/
+
+package org.apache.derby.jdbc;
+
+import org.apache.derby.client.ClientPooledConnection;
+import org.apache.derby.client.am.CallableStatement;
+import org.apache.derby.client.am.PreparedStatement;
+import org.apache.derby.client.am.Configuration;
+import org.apache.derby.client.am.LogWriter;
+import org.apache.derby.client.am.Agent;
+import org.apache.derby.client.am.Section;
+import org.apache.derby.client.am.Cursor;
+import org.apache.derby.client.net.NetAgent;
+import org.apache.derby.client.net.NetConnection;
+import org.apache.derby.client.net.NetStatement;
+import org.apache.derby.client.net.NetLogWriter;
+import org.apache.derby.client.net.NetResultSet;
+import org.apache.derby.client.net.NetDatabaseMetaData;
+import java.lang.reflect.*;
+import java.sql.Connection;
+import java.sql.SQLException;
+
+public class ClientJDBCObjectFactory
+{	
+	public static ClientPooledConnection newClientPooledConnection(ClientDataSource ds,LogWriter logWriter,String user,String password) throws SQLException
+	{
+		ClientPooledConnection cpc=null;
+		Class argsClass[] = new Class[]	{ClientDataSource.class,LogWriter.class,String.class,String.class};
+		Object objArgs[] = new Object[] {ds,logWriter,user,password};
+		try
+		{
+			if(Configuration.jreLevelMajor == 1 && Configuration.jreLevelMinor == 6)
+			{
+				Class cpcClass = Class.forName("org.apache.derby.jdbc.ClientPooledConnection40");
+				Constructor cpcConst = cpcClass.getConstructor(argsClass);
+				cpc = (ClientPooledConnection) cpcConst.newInstance(objArgs);
+			}
+			else
+			{
+				
+				Class cpcClass = Class.forName("org.apache.derby.jdbc.ClientPooledConnection");
+				Constructor cpcConst = cpcClass.getConstructor(argsClass);
+				cpc = (ClientPooledConnection) cpcConst.newInstance(objArgs);
+			}
+			
+		}
+		catch(Exception e)
+		{
+		        SQLException sqle = new SQLException(e.getMessage());
+    		    	throw sqle;
+
+		}
+
+	return cpc;	
+				
+	}	
+	public static ClientPooledConnection newClientPooledConnection(LogWriter logWriter,String user,String password,int rmId) throws SQLException
+	{
+		ClientPooledConnection cpc=null;
+		Integer rmIdClass = new Integer(rmId);
+		Class argsClass[] = new Class[]	{LogWriter.class,String.class,String.class,int.class};
+		Object objArgs[] = new Object[] {logWriter,user,password,rmIdClass};
+		try
+		{
+			if(Configuration.jreLevelMajor == 1 && Configuration.jreLevelMinor == 6)
+			{
+				Class cpcClass = Class.forName("org.apache.derby.jdbc.ClientPooledConnection40");
+				Constructor cpcConst = cpcClass.getConstructor(argsClass);
+				cpc = (ClientPooledConnection) cpcConst.newInstance(objArgs);
+			}
+			else
+			{
+				
+				Class cpcClass = Class.forName("org.apache.derby.jdbc.ClientPooledConnection");
+				Constructor cpcConst = cpcClass.getConstructor(argsClass);
+				cpc = (ClientPooledConnection) cpcConst.newInstance(objArgs);
+			}
+			
+		}
+		catch(Exception e)
+		{
+		        SQLException sqle = new SQLException(e.getMessage());
+    		    	throw sqle;
+		}
+
+	return cpc;	
+	}	
+
+	public static CallableStatement newCallableStatement(Agent agent,Connection connection, String sql,int type,int concurrency,int holdability) throws org.apache.derby.client.am.SqlException
+	{
+		CallableStatement cs = null;
+		Integer typeClass = new Integer(type);
+		Integer concurrencyClass = new Integer(concurrency);	
+		Integer holdabilityClass = new Integer(holdability);
+
+		
+		Class argsClass[] = new Class[]	{Agent.class,Connection.class,String.class,int.class,int.class,int.class};
+		Object objArgs[] = new Object[] {agent,connection,sql,typeClass,concurrencyClass,holdabilityClass};
+		try
+		{
+			if(Configuration.jreLevelMajor == 1 && Configuration.jreLevelMinor == 6)
+			{
+				Class csClass = Class.forName("org.apache.derby.client.am.CallableStatement40");
+				Constructor csConst = csClass.getConstructor(argsClass);
+				cs = (CallableStatement) csConst.newInstance(objArgs);
+			}
+			else
+			{
+				
+				Class csClass = Class.forName("org.apache.derby.client.am.CallableStatement");
+				Constructor csConst = csClass.getConstructor(argsClass);
+				cs = (CallableStatement) csConst.newInstance(objArgs);
+			}
+		}
+		catch(Exception e)
+		{
+		        org.apache.derby.client.am.SqlException sqle = new org.apache.derby.client.am.SqlException(agent.logWriter_,e.getMessage());
+    		    	throw sqle;
+		}
+
+	return cs;
+	}
+	public static PreparedStatement newPreparedStatement(Agent agent,org.apache.derby.client.am.Connection connection,String sql,Section section) throws org.apache.derby.client.am.SqlException
+	{
+		
+		PreparedStatement ps = null;
+		
+		Class argsClass[] = new Class[]	{Agent.class,org.apache.derby.client.am.Connection.class,String.class,Section.class};
+		Object objArgs[] = new Object[] {agent,connection,sql,section};
+		try
+		{
+			if(Configuration.jreLevelMajor == 1 && Configuration.jreLevelMinor == 6)
+			{
+				Class psClass = Class.forName("org.apache.derby.client.am.PreparedStatement40");
+				Constructor psConst = psClass.getConstructor(argsClass);
+				ps = (PreparedStatement) psConst.newInstance(objArgs);
+			}
+			else
+			{
+				
+				Class psClass = Class.forName("org.apache.derby.client.am.PreparedStatement");
+				Constructor psConst = psClass.getConstructor(argsClass);
+				ps = (PreparedStatement) psConst.newInstance(objArgs);
+			}
+		}
+		catch(Exception e)
+		{
+		        org.apache.derby.client.am.SqlException sqle = new org.apache.derby.client.am.SqlException(agent.logWriter_,e.getMessage());
+    		    	throw sqle;
+		}
+	return ps;
+	}
+
+	public static PreparedStatement newPreparedStatement(Agent agent,org.apache.derby.client.am.Connection connection,String sql,int type,int concurrency,int holdability,int autoGeneratedKeys,String [] columnNames) throws org.apache.derby.client.am.SqlException
+	{
+		
+		PreparedStatement ps = null;
+		Integer typeClass = new Integer(type);
+		Integer concurrencyClass = new Integer(concurrency);
+		Integer holdabilityClass = new Integer(holdability);
+		Integer autoGeneratedKeysClass = new Integer(autoGeneratedKeys);
+ 	        Class argsClass [] = new Class [] {Agent.class,org.apache.derby.client.am.Connection.class,String.class,int.class,int.class,int.class,int.class,new String[0].getClass()};
+		Object objArgs[] = new Object[] {agent,connection,sql,typeClass,concurrencyClass,holdabilityClass,autoGeneratedKeysClass,columnNames};
+		try
+		{
+			if(Configuration.jreLevelMajor == 1 && Configuration.jreLevelMinor == 6)
+			{
+				Class psClass = Class.forName("org.apache.derby.client.am.PreparedStatement40");
+				Constructor psConst = psClass.getConstructor(argsClass);
+				ps = (PreparedStatement) psConst.newInstance(objArgs);
+			}
+			else
+			{
+				
+				Class psClass = Class.forName("org.apache.derby.client.am.PreparedStatement");
+				Constructor psConst = psClass.getConstructor(argsClass);
+				ps = (PreparedStatement) psConst.newInstance(objArgs);
+			}
+		}
+		catch(Exception e)
+		{	
+			org.apache.derby.client.am.SqlException sqle = new org.apache.derby.client.am.SqlException(agent.logWriter_,e.getMessage());
+			throw sqle;
+		}
+	return ps;
+	}
+	public static NetConnection newNetConnection(NetLogWriter netLogWriter,String databaseName,java.util.Properties properties) throws SQLException
+	{
+		NetConnection nc=null;
+		Class argsClass[] = new Class[]	{NetLogWriter.class,String.class,java.util.Properties.class};
+		Object objArgs[] = new Object[] {netLogWriter,databaseName,properties};
+		try
+		{
+			nc = retNetConnectionObject(argsClass,objArgs);	
+		}
+		catch(SQLException e)
+		{
+			throw e;
+		}
+		return nc;
+	}
+	public static NetConnection newNetConnection(NetLogWriter netLogWriter,org.apache.derby.jdbc.ClientDataSource clientDataSource,String user,String password) throws SQLException
+	{
+		NetConnection nc=null;
+		Class argsClass[] = new Class[]	{NetLogWriter.class,org.apache.derby.jdbc.ClientDataSource.class,String.class,String.class};
+		Object objArgs[] = new Object[] {netLogWriter,clientDataSource,user,password};
+		try
+		{
+			nc = retNetConnectionObject(argsClass,objArgs);	
+		}
+		catch(SQLException e)
+		{
+			throw e;
+		}
+		return nc;
+	}
+	public static NetConnection newNetConnection(NetLogWriter netLogWriter,int driverManagerLoginTimeout,String serverName,int portNumber,String databaseName,java.util.Properties properties) throws SQLException
+	{
+		NetConnection nc=null;
+		Integer timeoutClass = new Integer(driverManagerLoginTimeout);
+		Integer portClass = new Integer(portNumber);
+		Class argsClass[] = new Class[]	{NetLogWriter.class,int.class,String.class,int.class,String.class,java.util.Properties.class};
+		Object objArgs[] = new Object[] {netLogWriter,timeoutClass,serverName,portClass,databaseName,properties};
+		try
+		{
+			nc = retNetConnectionObject(argsClass,objArgs);	
+		}
+		catch(SQLException e)
+		{
+			throw e;
+		}
+		return nc;
+		
+	}
+	public static NetConnection newNetConnection(NetLogWriter netLogWriter,String user,String password,org.apache.derby.jdbc.ClientDataSource dataSource,int rmId,boolean isXAConn) throws SQLException
+	{
+		NetConnection nc=null;
+		Integer rmIdClass = new Integer(rmId);
+		Boolean isxaconnClass = new Boolean(isXAConn);	
+		Class argsClass[] = new Class[]	{NetLogWriter.class,String.class,String.class,org.apache.derby.jdbc.ClientDataSource.class,int.class,boolean.class};
+		Object objArgs[] = new Object[] {netLogWriter,user,password,dataSource,rmIdClass,isxaconnClass};
+		try
+		{
+			nc = retNetConnectionObject(argsClass,objArgs);	
+		}
+		catch(SQLException e)
+		{
+			throw e;
+		}
+		return nc;
+	}
+	public static NetConnection newNetConnection(NetLogWriter netLogWriter,String ipaddr,int portNumber,org.apache.derby.jdbc.ClientDataSource dataSource,boolean isXAConn) throws SQLException
+	{
+		NetConnection nc=null;
+		Integer portNumberClass = new Integer(portNumber);
+		Boolean isxaconnClass = new Boolean(isXAConn);	
+		Class argsClass[] = new Class[]	{NetLogWriter.class,String.class,int.class,org.apache.derby.jdbc.ClientDataSource.class,boolean.class};
+		Object objArgs[] = new Object[] {netLogWriter,ipaddr,portNumberClass,dataSource,isxaconnClass};
+		try
+		{
+			nc = retNetConnectionObject(argsClass,objArgs);	
+		}
+		catch(SQLException e)
+		{
+			throw e;
+		}
+		return nc;
+			
+	}
+	private static NetConnection retNetConnectionObject(Class argsClass[],Object objArgs[]) throws SQLException
+	{
+		NetConnection nc=null;
+		try
+		{
+			if(Configuration.jreLevelMajor == 1 && Configuration.jreLevelMinor == 6)
+			{
+				Class psClass = Class.forName("org.apache.derby.client.net.NetConnection40");
+				Constructor psConst = psClass.getConstructor(argsClass);
+				nc = (NetConnection) psConst.newInstance(objArgs);
+			}
+			else
+			{
+				
+				Class ncClass = Class.forName("org.apache.derby.client.net.NetConnection");
+				Constructor ncConst = ncClass.getConstructor(argsClass);
+				nc = (NetConnection) ncConst.newInstance(objArgs);
+			}
+		}
+		catch(Exception e)
+		{
+		        SQLException sqle = new SQLException(e.getMessage());
+    		    	throw sqle;
+		}
+	return nc;
+	}
+	public static NetResultSet newNetResultSet(NetAgent netAgent,NetStatement netStatement,Cursor cursor,int sqlcsrhld,int qryattscr,int qryattsns,int qryattset,long qryinsid,int actualResultSetType,int actualResultSetConcurrency,int actualResultSetHoldability) throws SQLException
+	{
+		NetResultSet rs=null;
+
+		Integer arg1Class = new Integer(sqlcsrhld);
+		Integer arg2Class = new Integer(qryattscr);
+		Integer arg3Class = new Integer(qryattsns);
+		Integer arg4Class = new Integer(qryattset);
+		Long arg5Class = new Long(qryinsid);
+		Integer arg6Class = new Integer(actualResultSetType);
+		Integer arg7Class = new Integer(actualResultSetConcurrency);
+		Integer arg8Class = new Integer(actualResultSetHoldability);
+		
+		
+		Class argsClass[] = new Class[]	{NetAgent.class,NetStatement.class,Cursor.class,int.class,int.class,int.class,int.class,long.class,int.class,int.class,int.class};
+		Object objArgs[] = new Object[] {netAgent,netStatement,cursor,arg1Class,arg2Class,arg3Class,arg4Class,arg5Class,arg6Class,arg7Class,arg8Class};
+
+		
+		try
+		{
+			if(Configuration.jreLevelMajor == 1 && Configuration.jreLevelMinor == 6)
+			{
+				Class rsClass = Class.forName("org.apache.derby.client.net.NetResultSet40");
+				Constructor rsConst = rsClass.getConstructor(argsClass);
+				rs = (NetResultSet) rsConst.newInstance(objArgs);
+			}
+			else
+			{
+				
+				Class rsClass = Class.forName("org.apache.derby.client.net.NetResultSet");
+				Constructor rsConst = rsClass.getConstructor(argsClass);
+		 	 	rs = (NetResultSet) rsConst.newInstance(objArgs);
+			}
+		}
+		catch(Exception e)
+		{
+		        SQLException sqle = new SQLException(e.getMessage());
+    		    	throw sqle;
+		}
+	return rs;
+	} 
+	public static NetDatabaseMetaData newNetDatabaseMetaData(NetAgent netAgent,NetConnection netConnection) throws SQLException
+	{
+		NetDatabaseMetaData dmd=null;
+
+		Class argsClass[] = new Class[]	{NetAgent.class,NetConnection.class};
+		Object objArgs[] = new Object[] {netAgent,netConnection};
+		
+		try
+		{
+			if(Configuration.jreLevelMajor == 1 && Configuration.jreLevelMinor == 6)
+			{
+				Class dmdClass = Class.forName("org.apache.derby.client.net.NetDatabaseMetaData40");
+				Constructor dmdConst = dmdClass.getConstructor(argsClass);
+				dmd = (NetDatabaseMetaData) dmdConst.newInstance(objArgs);
+			}
+			else
+			{
+				
+				Class dmdClass = Class.forName("org.apache.derby.client.net.NetDatabaseMetaData");
+				Constructor dmdConst = dmdClass.getConstructor(argsClass);
+		 	 	dmd = (NetDatabaseMetaData) dmdConst.newInstance(objArgs);
+			}
+		}
+		catch(Exception e)
+		{
+		        SQLException sqle = new SQLException(e.getMessage());
+    		    	throw sqle;
+		}
+	return dmd;
+	} 
+}
+	

Propchange: db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientJDBCObjectFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/code/trunk/java/engine/build.xml
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/build.xml?rev=345402&r1=345401&r2=345402&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/build.xml (original)
+++ db/derby/code/trunk/java/engine/build.xml Thu Nov 17 18:00:23 2005
@@ -34,7 +34,7 @@
 
 <!--             ============ Begin Targets ==============                -->
  
-  <target name="engine" depends="engine_j2se,engine_169,engine_169_opt"
+  <target name="engine" depends="engine_j2se,engine_169,engine_169_opt,jdbc4_modules_edit"
           description="Build Derby engine">
 	</target>
     <target name="engine_j2se" depends="engine_169"
@@ -93,6 +93,15 @@
 	    <available file="${out.dir}/${derby.dir}/modulesJ2ME.done"/>
 	  </condition>
 	</target> 
+
+	<target name="jdbc4_modules_edit" 
+                 if="jdk16">
+                <replaceregexp file="${out.dir}/${derby.dir}/modules.properties"
+                              match="^#jdbc4_optional_(.*)"
+                              replace="\1"
+                              byline="true" />
+        </target>
+
 	
 <!--             ============= End Targets ==============                -->
 

Added: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement40.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement40.java?rev=345402&view=auto
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement40.java (added)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement40.java Thu Nov 17 18:00:23 2005
@@ -0,0 +1,153 @@
+/*
+ 
+   Derby - Class org.apache.derby.iapi.jdbc.BrokeredCallableStatement40
+ 
+   Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ 
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+ 
+      http://www.apache.org/licenses/LICENSE-2.0
+ 
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+ 
+ */
+
+package org.apache.derby.iapi.jdbc;
+
+import java.io.Reader;
+import java.io.InputStream;
+import java.sql.NClob;
+import java.sql.RowId;
+import java.sql.SQLException;
+import java.sql.SQLXML;
+
+public class BrokeredCallableStatement40 extends  BrokeredCallableStatement30{
+    
+    public BrokeredCallableStatement40(BrokeredStatementControl control, int jdbcLevel, String sql) throws SQLException{
+        super(control,jdbcLevel,sql);
+    }
+    
+    public RowId getRowId(int parameterIndex) throws SQLException{
+        return getCallableStatement().getRowId(parameterIndex);
+    }
+    
+    public RowId getRowId(String parameterName) throws SQLException{
+        return getCallableStatement().getRowId(parameterName);
+    }
+    
+    public void setRowId(String parameterName, RowId x) throws SQLException{
+        getCallableStatement().setRowId(parameterName,x);
+    }
+    
+    
+    public void setNString(String parameterName, String value)
+    throws SQLException{
+        getCallableStatement().setNString(parameterName,value);
+    }
+    
+    public void setNCharacterStream(String parameterName,Reader value,long length)
+    throws SQLException{
+        getCallableStatement().setNCharacterStream(parameterName,value,length);
+    }
+    
+    public void setNClob(String parameterName, NClob value) throws SQLException{
+        getCallableStatement().setNClob(parameterName,value);
+    }
+    
+    public void setClob(String parameterName, Reader reader, long length)
+    throws SQLException{
+        getCallableStatement().setClob(parameterName,reader,length);
+    }
+    
+    public void setBlob(String parameterName, InputStream inputStream, long length)
+    throws SQLException{
+        getCallableStatement().setBlob(parameterName,inputStream,length);
+    }
+    
+    public void setNClob(String parameterName, Reader reader, long length)
+    throws SQLException{
+        getCallableStatement().setNClob(parameterName,reader,length);
+    }
+    
+    public NClob getNClob(int i) throws SQLException{
+        return getCallableStatement().getNClob(i);
+    }
+    
+    public NClob getNClob(String parameterName) throws SQLException{
+        return getCallableStatement().getNClob(parameterName);
+    }
+    
+    public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException{
+        getCallableStatement().setSQLXML(parameterName,xmlObject);
+    }
+    
+    public SQLXML getSQLXML(int parameterIndex) throws SQLException{
+        return getCallableStatement().getSQLXML(parameterIndex);
+    }
+    
+    public SQLXML getSQLXML(String parametername) throws SQLException{
+        return getCallableStatement().getSQLXML(parametername);
+    }
+    
+    /************************************************************************
+     *PreparedStatement40 methods
+     *************************************************************************/
+    public void setRowId(int parameterIndex, RowId x) throws SQLException{
+        getPreparedStatement().setRowId(parameterIndex,x);
+    }
+    
+    public void setNString(int index, String value) throws SQLException{
+        getPreparedStatement().setNString(index,value);
+    }
+    
+    public void setNCharacterStream(int index, Reader value, long length) throws SQLException{
+        getPreparedStatement().setNCharacterStream(index,value,length);
+    }
+    
+    public void setNClob(int index, NClob value) throws SQLException{
+        getPreparedStatement().setNClob(index,value);
+    }
+    
+    public void setClob(int parameterIndex, Reader reader, long length)
+    throws SQLException{
+        getPreparedStatement().setClob(parameterIndex,reader,length);
+    }
+    
+    public void setBlob(int parameterIndex, InputStream inputStream, long length)
+    throws SQLException{
+        getPreparedStatement().setBlob(parameterIndex,inputStream,length);
+    }
+    public void setNClob(int parameterIndex, Reader reader, long length)
+    throws SQLException{
+        getPreparedStatement().setNClob(parameterIndex,reader,length);
+    }
+    
+    public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException{
+        getPreparedStatement().setSQLXML(parameterIndex,xmlObject);
+    }
+    
+    public void setPoolable(boolean poolable)
+    throws SQLException{
+        getPreparedStatement().setPoolable(poolable);
+    }
+    
+    public boolean isPoolable()
+    throws SQLException{
+        return getPreparedStatement().isPoolable();
+    }
+    
+    public java.lang.Object unwrap(java.lang.Class<?> interfaces) throws SQLException{
+        return getPreparedStatement().unwrap(interfaces);
+    }
+    
+    public boolean isWrapperFor(java.lang.Class<?> interfaces) throws java.sql.SQLException{
+        return getPreparedStatement().isWrapperFor(interfaces);
+    }
+    
+}

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement40.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java?rev=345402&r1=345401&r2=345402&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java Thu Nov 17 18:00:23 2005
@@ -334,7 +334,7 @@
 		}
 	}
 
-    public final java.util.Map getTypeMap() throws SQLException
+    public java.util.Map getTypeMap() throws SQLException
 	{
 		try
 		{

Added: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection40.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection40.java?rev=345402&view=auto
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection40.java (added)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection40.java Thu Nov 17 18:00:23 2005
@@ -0,0 +1,99 @@
+/*
+ 
+   Derby - Class org.apache.derby.iapi.jdbc.BrokeredConnection40
+ 
+   Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ 
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+ 
+      http://www.apache.org/licenses/LICENSE-2.0
+ 
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+ 
+ */
+
+package org.apache.derby.iapi.jdbc;
+
+import java.sql.Clob;
+import java.sql.ClientInfoException;
+import java.sql.NClob;
+import java.sql.SQLException;
+import java.sql.SQLXML;
+import java.util.Properties;
+import org.apache.derby.impl.jdbc.Util;
+
+
+public class BrokeredConnection40 extends BrokeredConnection30 {
+    
+    /** Creates a new instance of BrokeredConnection40 */
+    public BrokeredConnection40(BrokeredConnectionControl control) {
+        super(control);
+    }
+    
+    public Clob createClob() throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    
+    public NClob createNClob() throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    public SQLXML createSQLXML() throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    
+    public boolean isValid(int timeout) throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    
+    public void setClientInfo(String name, String value)
+    throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    public void setClientInfo(Properties properties)
+    throws ClientInfoException{
+        SQLException temp= Util.notImplemented();
+        ClientInfoException clientInfoException = new ClientInfoException
+            (temp.getMessage(),temp.getSQLState(),(Properties) null);
+        throw clientInfoException;
+    }
+    
+    public String getClientInfo(String name)
+    throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    public Properties getClientInfo()
+    throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    public <T> T createQueryObject(Class<T> ifc) throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    public BrokeredPreparedStatement newBrokeredStatement(BrokeredStatementControl statementControl, String sql, Object generatedKeys) throws SQLException {
+        return new BrokeredPreparedStatement40(statementControl, getJDBCLevel(), sql, generatedKeys);
+    }
+    public BrokeredCallableStatement newBrokeredStatement(BrokeredStatementControl statementControl, String sql) throws SQLException {
+        return new BrokeredCallableStatement40(statementControl, getJDBCLevel(), sql);
+    }
+    
+    public java.util.Map<String,Class<?>> getTypeMap() throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    protected int getJDBCLevel() { return 4;}
+    
+    
+}

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection40.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement40.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement40.java?rev=345402&view=auto
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement40.java (added)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement40.java Thu Nov 17 18:00:23 2005
@@ -0,0 +1,92 @@
+/*
+ 
+   Derby - Class org.apache.derby.iapi.jdbc.BrokeredPreparedStatement40
+ 
+   Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ 
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+ 
+      http://www.apache.org/licenses/LICENSE-2.0
+ 
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+ 
+ */
+
+package org.apache.derby.iapi.jdbc;
+
+import java.io.InputStream;
+import java.io.Reader;
+import java.sql.NClob;
+import java.sql.RowId;
+import java.sql.SQLException;
+import java.sql.SQLXML;
+import org.apache.derby.impl.jdbc.Util;
+
+
+public class BrokeredPreparedStatement40 extends BrokeredPreparedStatement30{
+    
+    private final Object generatedKeys;
+    public BrokeredPreparedStatement40(BrokeredStatementControl control, int jdbcLevel, String sql, Object generatedKeys) throws SQLException {
+        super(control, jdbcLevel, sql,generatedKeys);
+        this.generatedKeys = generatedKeys;
+    }
+    
+    public void setRowId(int parameterIndex, RowId x) throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    public void setNString(int index, String value) throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    public void setNCharacterStream(int index, Reader value, long length) throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    public void setNClob(int index, NClob value) throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    public void setClob(int parameterIndex, Reader reader, long length)
+    throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    public void setBlob(int parameterIndex, InputStream inputStream, long length)
+    throws SQLException{
+        throw Util.notImplemented();
+    }
+    public void setNClob(int parameterIndex, Reader reader, long length)
+    throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    public void setPoolable(boolean poolable)
+    throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    public boolean isPoolable()
+    throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    public java.lang.Object unwrap(java.lang.Class<?> interfaces) throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    public boolean isWrapperFor(java.lang.Class<?> interfaces) throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+}

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement40.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/build.xml
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/build.xml?rev=345402&r1=345401&r2=345402&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/build.xml (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/build.xml Thu Nov 17 18:00:23 2005
@@ -41,10 +41,13 @@
       <include name="${derby.dir}/${cur.dir}/*.java"/>
 	  <exclude name="${derby.dir}/${cur.dir}/BrokeredConnection.java"/>
 	  <exclude name="${derby.dir}/${cur.dir}/BrokeredConnection30.java"/>
+	  <exclude name="${derby.dir}/${cur.dir}/BrokeredConnection40.java"/>
 	  <exclude name="${derby.dir}/${cur.dir}/BrokeredPreparedStatement.java"/>
 	  <exclude name="${derby.dir}/${cur.dir}/BrokeredPreparedStatement30.java"/>
+	  <exclude name="${derby.dir}/${cur.dir}/BrokeredPreparedStatement40.java"/>
 	  <exclude name="${derby.dir}/${cur.dir}/BrokeredCallableStatement.java"/>
 	  <exclude name="${derby.dir}/${cur.dir}/BrokeredCallableStatement30.java"/>
+	  <exclude name="${derby.dir}/${cur.dir}/BrokeredCallableStatement40.java"/>
 	  <exclude name="${derby.dir}/${cur.dir}/BrokeredStatement.java"/>
 	  <exclude name="${derby.dir}/${cur.dir}/JDBCBoot.java"/>
 	  <exclude name="${derby.dir}/${cur.dir}/ResourceAdapter.java"/>
@@ -112,6 +115,27 @@
 	  <include name="${derby.dir}/${cur.dir}/ResourceAdapter.java"/>
     </javac>
   </target>
+
+  <target name="compile_jdbc4">
+      <javac
+          bootclasspath="${empty}"
+          nowarn="on"
+          debug="${debug}"
+          depend="${depend}"
+          deprecation="${deprecation}"
+          optimize="${optimize}"
+          proceed="${proceed}"
+          verbose="${verbose}"
+          srcdir="${derby.engine.src.dir}"
+          destdir="${out.dir}">
+          <classpath>
+              <pathelement path="${java16compile.classpath}"/>
+          </classpath>
+          <include name="${derby.dir}/${cur.dir}/BrokeredConnection40.java"/>
+          <include name="${derby.dir}/${cur.dir}/BrokeredPreparedStatement40.java"/>
+          <include name="${derby.dir}/${cur.dir}/BrokeredCallableStatement40.java"/>
+      </javac>
+  </target> 
 
 </project>
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/JVMInfo.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/JVMInfo.java?rev=345402&r1=345401&r2=345402&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/JVMInfo.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/JVMInfo.java Thu Nov 17 18:00:23 2005
@@ -43,6 +43,7 @@
 	public static final int J2SE_14 = 4;
 	public static final int J2SE_142 = 5;
 	public static final int J2SE_15 = 6; // aka J2SE 5.0
+	public static final int J2SE_16 = 7; 
 
 	public static final boolean J2ME;
 
@@ -119,6 +120,10 @@
 			else if (javaVersion.equals("1.5"))
 			{
 				id = J2SE_15;
+			}
+			else if (javaVersion.equals("1.6"))
+			{
+				id = J2SE_16;
 			}
 			else
 			{

Added: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement40.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement40.java?rev=345402&view=auto
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement40.java (added)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement40.java Thu Nov 17 18:00:23 2005
@@ -0,0 +1,168 @@
+/*
+
+   Derby - Class org.apache.derby.impl.jdbc.EmbedCallableStatement40
+
+   Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+ */
+
+package org.apache.derby.impl.jdbc;
+
+import java.io.InputStream;
+import java.io.Reader;
+import java.sql.NClob;
+import java.sql.RowId;
+import java.sql.SQLException;
+import java.sql.SQLXML;
+
+public class EmbedCallableStatement40 extends EmbedCallableStatement30 {
+    
+    
+    
+    EmbedPreparedStatement40 ps;
+    /** Creates a new instance of EmbedCallableStatement40 */
+    public EmbedCallableStatement40(EmbedConnection conn, String sql,
+        int resultSetType,
+        int resultSetConcurrency,
+        int resultSetHoldability) throws SQLException{
+        super(conn, sql, resultSetType, resultSetConcurrency, resultSetHoldability);
+        ps = new EmbedPreparedStatement40(conn, sql, false,
+            resultSetType,
+            resultSetConcurrency,
+            resultSetHoldability,
+            java.sql.Statement.NO_GENERATED_KEYS,
+            null,
+            null);
+    }
+    
+    
+    public RowId getRowId(int parameterIndex) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public RowId getRowId(String parameterName) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public void setRowId(String parameterName, RowId x) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    
+    public void setNString(String parameterName, String value)
+    throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public void setNCharacterStream(String parameterName, Reader value, long length)
+    throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public void setNClob(String parameterName, NClob value) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public void setClob(String parameterName, Reader reader, long length)
+    throws SQLException{
+        throw Util.notImplemented();
+        
+    }
+    
+    public void setBlob(String parameterName, InputStream inputStream, long length)
+    throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    public void setNClob(String parameterName, Reader reader, long length)
+    throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public NClob getNClob(int i) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    
+    public NClob getNClob(String parameterName) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException {
+        throw Util.notImplemented();
+        
+    }
+    
+    public SQLXML getSQLXML(int parameterIndex) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public SQLXML getSQLXML(String parametername) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    
+    
+    
+    
+    /************************************************************************
+     * The prepared statement methods
+     *************************************************************************/
+    
+    
+    public void setRowId(int parameterIndex, RowId x) throws SQLException{
+        ps.setRowId(parameterIndex,x);
+    }
+    
+    public void setNString(int index, String value) throws SQLException{
+        ps.setNString(index,value);
+    }
+    
+    public void setNCharacterStream(int index, Reader value, long length) throws SQLException{
+        ps.setNCharacterStream(index,value,length);
+    }
+    
+    public void setNClob(int index, NClob value) throws SQLException{
+        ps.setNClob(index,value);
+    }
+    
+    public void setClob(int parameterIndex, Reader reader, long length)
+    throws SQLException{
+        ps.setClob(parameterIndex,reader,length);
+    }
+    
+    public void setBlob(int parameterIndex, InputStream inputStream, long length)
+    throws SQLException{
+        ps.setBlob(parameterIndex,inputStream,length);
+    }
+    public void setNClob(int parameterIndex, 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 setPoolable(boolean poolable)
+    throws SQLException{
+        ps.setPoolable(poolable);
+    }
+    
+    public boolean isPoolable()
+    throws SQLException{
+        return ps.isPoolable();
+    }
+}

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement40.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java?rev=345402&r1=345401&r2=345402&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java Thu Nov 17 18:00:23 2005
@@ -1220,7 +1220,7 @@
 	 * JDBC 2.0 - java.util.Map requires JDK 1
      *
      */
-    public final java.util.Map getTypeMap() {
+    public java.util.Map getTypeMap() {
 		// just return an immuntable empty map
 		return java.util.Collections.EMPTY_MAP;
     }

Added: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection40.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection40.java?rev=345402&view=auto
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection40.java (added)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection40.java Thu Nov 17 18:00:23 2005
@@ -0,0 +1,105 @@
+/*
+ 
+   Derby - Class org.apache.derby.impl.jdbc.EmbedConnection40
+ 
+   Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ 
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+ 
+      http://www.apache.org/licenses/LICENSE-2.0
+ 
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+ 
+ */
+
+package org.apache.derby.impl.jdbc;
+
+import java.sql.Blob;
+import java.sql.ClientInfoException;
+import java.sql.Clob;
+import java.sql.NClob;
+import java.sql.SQLException;
+import java.sql.SQLXML;
+import java.util.Properties;
+
+import org.apache.derby.jdbc.InternalDriver;
+
+public class EmbedConnection40 extends EmbedConnection30 {
+    
+    /** Creates a new instance of EmbedConnection40 */
+    public EmbedConnection40(EmbedConnection inputConnection) {
+        super(inputConnection);
+    }
+    
+    public EmbedConnection40(
+        InternalDriver driver,
+        String url,
+        Properties info)
+        throws SQLException {
+        super(driver, url, info);
+    }
+    
+    /*
+     *-------------------------------------------------------
+     * JDBC 4.0
+     *-------------------------------------------------------
+     */
+    
+    
+    public Clob createClob() throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public Blob createBlob() throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public NClob createNClob() throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public SQLXML createSQLXML() throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public boolean isValid(int timeout) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public void setClientInfo(String name, String value)
+    throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    public void setClientInfo(Properties properties)
+    throws ClientInfoException {
+        SQLException temp= Util.notImplemented();
+        ClientInfoException clientInfoException = new ClientInfoException
+            (temp.getMessage(),temp.getSQLState(),(Properties) null);
+        throw clientInfoException;
+    }
+    
+    public String getClientInfo(String name)
+    throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    public Properties getClientInfo()
+    throws SQLException{
+        throw Util.notImplemented();
+    }
+    
+    public <T> T createQueryObject(Class<T> ifc) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    public java.util.Map<String,Class<?>> getTypeMap() {
+        throw new java.lang.UnsupportedOperationException();
+    }
+}

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection40.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java?rev=345402&r1=345401&r2=345402&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java Thu Nov 17 18:00:23 2005
@@ -83,7 +83,7 @@
  *
  * @author ames
  */
-public final class EmbedDatabaseMetaData extends ConnectionChild 
+public class EmbedDatabaseMetaData extends ConnectionChild 
 	implements DatabaseMetaData, java.security.PrivilegedAction {
 
 	/*

Added: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData40.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData40.java?rev=345402&view=auto
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData40.java (added)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData40.java Thu Nov 17 18:00:23 2005
@@ -0,0 +1,65 @@
+/*
+
+   Derby - Class org.apache.derby.impl.jdbc.EmbedDatabaseMetaData40
+
+   Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+ */
+
+package org.apache.derby.impl.jdbc;
+
+import java.sql.ResultSet;
+import java.sql.RowIdLifetime;
+import java.sql.SQLException;
+import org.apache.derby.impl.jdbc.Util;
+
+
+public class EmbedDatabaseMetaData40 extends EmbedDatabaseMetaData {
+    
+    private final String url;
+    
+    public EmbedDatabaseMetaData40(EmbedConnection connection, String url) throws SQLException {
+        super(connection,url);
+        this.url = url;
+    }
+   
+    public RowIdLifetime getRowIdLifetime() throws SQLException {
+        throw Util.notImplemented();
+        
+    }
+
+    
+    public ResultSet getSchemas(String catalog, String schemaPattern) throws SQLException {
+        throw Util.notImplemented();
+    }
+    
+    
+    public boolean supportsStoredFunctionsUsingCallSyntax() throws SQLException {
+        throw Util.notImplemented();
+    }
+     
+    public boolean autoCommitFailureClosesAllResultSets() throws SQLException {
+        throw Util.notImplemented();
+    }
+   
+    public ResultSet getClientInfoProperties()
+		throws SQLException {
+        throw Util.notImplemented();
+    }
+   
+    public boolean providesQueryObjectGenerator() throws SQLException {
+        throw Util.notImplemented();
+    }
+}

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData40.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message