db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r171120 - in /incubator/derby/code/trunk: ./ java/engine/ java/engine/org/apache/derby/impl/jdbc/ java/engine/org/apache/derby/jdbc/
Date Fri, 20 May 2005 14:34:30 GMT
Author: djd
Date: Fri May 20 07:34:28 2005
New Revision: 171120

URL: http://svn.apache.org/viewcvs?rev=171120&view=rev
Log:
Add concrete JDBC classes for JSR169 and tie them
into the build system as optional targets.
They require a jsr169compile.classpath to be set up.
Once I have clean builds for this environment I will
add instructions to BUILDING.txt

Added:
    incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement169.java
  (with props)
    incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement169.java
  (with props)
    incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet169.java
  (with props)
Modified:
    incubator/derby/code/trunk/build.xml
    incubator/derby/code/trunk/java/engine/build.xml
    incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/build.xml
    incubator/derby/code/trunk/java/engine/org/apache/derby/jdbc/Driver169.java
    incubator/derby/code/trunk/java/engine/org/apache/derby/jdbc/build.xml

Modified: incubator/derby/code/trunk/build.xml
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/build.xml?rev=171120&r1=171119&r2=171120&view=diff
==============================================================================
--- incubator/derby/code/trunk/build.xml (original)
+++ incubator/derby/code/trunk/build.xml Fri May 20 07:34:28 2005
@@ -267,7 +267,10 @@
     <ant dir="${derby.engine.dir}/loc"/>
     <antcall target="class_size_catalog"/>
   </target>
-
+	 <target name="engine_169_opt" depends="engine">
+	    <ant dir="${derby.engine.src.dir}" target="engine_169_opt"/>
+	  </target>
+	
   <target name="tools" depends="engine">
     <ant dir="${derby.tools.src.dir}"/>
   </target>

Modified: incubator/derby/code/trunk/java/engine/build.xml
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/build.xml?rev=171120&r1=171119&r2=171120&view=diff
==============================================================================
--- incubator/derby/code/trunk/java/engine/build.xml (original)
+++ incubator/derby/code/trunk/java/engine/build.xml Fri May 20 07:34:28 2005
@@ -61,7 +61,17 @@
      <ant dir="${derby.engine.dir}/database"/>
      <ant dir="${derby.engine.dir}/impl" target="compile_impl_169"/>
  </target>
-
+	
+	<!-- optional JSR169 classes - optional because it requires a 
+	J2ME/CDC/Foundation/JSR169 build jar files.
+	jsr169compile.classpath
+	-->
+	  <target name="engine_169_opt"  depends="engine_169"
+	          description="Build optional JSR169 elements of Derby engine">
+	 <ant dir="${derby.engine.dir}/impl/jdbc" target="compile_jsr169_opt"/>
+     <ant dir="${derby.engine.dir}/jdbc" target="compile_jsr169_opt"/>
+	 </target>
+	
 <!--             ============= End Targets ==============                -->
 
 <!--             ============= End Project ==============                -->

Added: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement169.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement169.java?rev=171120&view=auto
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement169.java
(added)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement169.java
Fri May 20 07:34:28 2005
@@ -0,0 +1,47 @@
+/*
+
+Derby - Class org.apache.derby.impl.jdbc.EmbedCallableStatement169
+
+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.SQLException;
+
+/**
+ * CallableStatement implementation for JSR169.
+ * Adds no functionality to its (abstract) parent class.
+ * If Derby could be compiled against JSR169 that the parent
+ * class could be the concrete class for the environment.
+ * Just like for the JDBC 2.0 specific classes.
+ * Until that is possible (ie. easily downloadable J2ME/CDC/Foundation/JSR169
+ * jar files, this class is required and is only compiled by an optional target.
+ <P><B>Supports</B>
+ <UL>
+ <LI> JSR 169
+ </UL>
+
+ */
+
+public final class EmbedCallableStatement169 extends EmbedCallableStatement {
+	public EmbedCallableStatement169(EmbedConnection conn, String sql,
+			int resultSetType, int resultSetConcurrency,
+			int resultSetHoldability) throws SQLException {
+		super(conn, sql, resultSetType, resultSetConcurrency,
+				resultSetHoldability);
+	}
+}
\ No newline at end of file

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

Added: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement169.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement169.java?rev=171120&view=auto
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement169.java
(added)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement169.java
Fri May 20 07:34:28 2005
@@ -0,0 +1,51 @@
+/*
+
+Derby - Class org.apache.derby.impl.jdbc.EmbedPreparedStatement169
+
+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.SQLException;
+
+/**
+ * PreparedStatement implementation for JSR169.
+ * Adds no functionality to its (abstract) parent class.
+ * If Derby could be compiled against JSR169 that the parent
+ * class could be the concrete class for the environment.
+ * Just like for the JDBC 2.0 specific classes.
+ * Until that is possible (ie. easily downloadable J2ME/CDC/Foundation/JSR169
+ * jar files, this class is required and is only compiled by an optional target.
+ <P><B>Supports</B>
+ <UL>
+ <LI> JSR 169
+ </UL>
+
+ */
+
+public final class EmbedPreparedStatement169 extends EmbedPreparedStatement
+{
+	public EmbedPreparedStatement169(EmbedConnection conn, String sql,
+			boolean forMetaData, int resultSetType, int resultSetConcurrency,
+			int resultSetHoldability, int autoGeneratedKeys,
+			int[] columnIndexes, String[] columnNames) throws SQLException {
+
+		super(conn, sql, forMetaData, resultSetType, resultSetConcurrency,
+				resultSetHoldability, autoGeneratedKeys, columnIndexes,
+				columnNames);
+	}
+}
\ No newline at end of file

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

Added: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet169.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet169.java?rev=171120&view=auto
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet169.java
(added)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet169.java
Fri May 20 07:34:28 2005
@@ -0,0 +1,52 @@
+/*
+
+Derby - Class org.apache.derby.impl.jdbc.EmbedResultSet169
+
+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 org.apache.derby.iapi.sql.ResultSet;
+import java.sql.SQLException;
+
+/**
+ * ResultSet implementation for JSR169.
+ * Adds no functionality to its (abstract) parent class.
+ * If Derby could be compiled against JSR169 that the parent
+ * class could be the concrete class for the environment.
+ * Just like for the JDBC 2.0 specific classes.
+ * Until that is possible (ie. easily downloadable J2ME/CDC/Foundation/JSR169
+ * jar files, this class is required and is only compiled by an optional target.
+ <P><B>Supports</B>
+ <UL>
+ <LI> JSR 169
+ </UL>
+
+ */
+
+public final class EmbedResultSet169 extends EmbedResultSet
+{
+    public EmbedResultSet169(EmbedConnection conn, 
+            ResultSet resultsToWrap,  
+            boolean forMetaData,
+            EmbedStatement stmt,
+            boolean isAtomic)  
+	throws SQLException
+	{
+    	super(conn, resultsToWrap, forMetaData, stmt, isAtomic);
+	}
+}
\ No newline at end of file

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

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/build.xml
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/build.xml?rev=171120&r1=171119&r2=171120&view=diff
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/build.xml (original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/build.xml Fri May 20
07:34:28 2005
@@ -36,6 +36,7 @@
         <pathelement path="${compile.classpath}"/>
       </classpath>
       <include name="${derby.dir}/impl/jdbc/*.java"/>
+	  <exclude name="${derby.dir}/impl/jdbc/*169.java"/>
 	  <exclude name="${derby.dir}/impl/jdbc/*20.java"/>
 	  <exclude name="${derby.dir}/impl/jdbc/*30.java"/>
    </javac>
@@ -59,7 +60,24 @@
       <exclude name="${derby.dir}/impl/jdbc/authentication/LDAP**"/>
     </javac>
     </target>
-
+  	<target name="compile_jsr169_opt">
+  	    <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="${jsr169compile.classpath}"/>
+        </classpath>
+        <include name="${derby.dir}/impl/jdbc/*169.java"/>
+    </javac>
+  	</target>
   <target name="compile_jdbc2" depends="compile_jsr169">
     <javac
       bootclasspath="${empty}"
@@ -70,7 +88,7 @@
       optimize="${optimize}"
       proceed="${proceed}"
       verbose="${verbose}"
-      srcdir="${derby.engine.src.dir};${derby.engine.src.dir}"
+      srcdir="${derby.engine.src.dir}"
       destdir="${out.dir}">
       <classpath>
         <pathelement path="${java13compile.classpath}"/>

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/jdbc/Driver169.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/jdbc/Driver169.java?rev=171120&r1=171119&r2=171120&view=diff
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/jdbc/Driver169.java (original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/jdbc/Driver169.java Fri May 20
07:34:28 2005
@@ -41,7 +41,7 @@
 	@author djd
 */
 
-public abstract class Driver169 extends InternalDriver {
+public class Driver169 extends InternalDriver {
 
 	public Driver169() {
 	}
@@ -50,12 +50,12 @@
 		Methods to be overloaded in sub-implementations such as
 		a tracing driver.
 	 */
-	protected abstract EmbedConnection getNewEmbedConnection(String url, Properties info) 
-		 throws SQLException ;
-//	{
+	protected EmbedConnection getNewEmbedConnection(String url, Properties info) 
+		 throws SQLException
+	{
 		// make a new local connection with a new transaction resource
-//		return new EmbedConnection(this, url, info);
-//	}
+		return new EmbedConnection30(this, url, info);
+	}
 
 
 	/**
@@ -66,7 +66,10 @@
 	 * @return A nested connection object.
 	 *
 	 */
-	public abstract Connection getNewNestedConnection(EmbedConnection conn);
+	public Connection getNewNestedConnection(EmbedConnection conn)
+	{
+		return new EmbedConnection30(conn);
+	}
 
 	/*
 	** methods to be overridden by subimplementations wishing to insert
@@ -86,7 +89,7 @@
 	/**
 	 	@exception SQLException if fails to create statement
 	 */
-	public abstract java.sql.PreparedStatement newEmbedPreparedStatement(
+	public java.sql.PreparedStatement newEmbedPreparedStatement(
 				EmbedConnection conn,
 				String stmt, 
 				boolean forMetaData, 
@@ -96,33 +99,35 @@
 				int autoGeneratedKeys,
 				int[] columnIndexes,
 				String[] columnNames)
-		throws SQLException;
-//	{
-//		return new EmbedPreparedStatement(conn,stmt,forMetaData, resultSetType,
-//		resultSetConcurrency, resultSetHoldability, autoGeneratedKeys, columnIndexes,
-//		columnNames);
-//	}
+		throws SQLException
+
+		{
+			return new EmbedPreparedStatement169(conn, stmt, forMetaData,
+				resultSetType, resultSetConcurrency, resultSetHoldability,
+				autoGeneratedKeys, columnIndexes, columnNames);
+		}
 	/**
 	 	@exception SQLException if fails to create statement
 	 */
-	public abstract java.sql.CallableStatement newEmbedCallableStatement(
+	public java.sql.CallableStatement newEmbedCallableStatement(
 				EmbedConnection conn,
 				String stmt, 
 				int resultSetType,
 				int resultSetConcurrency,
 				int resultSetHoldability)
-		throws SQLException;
-//	{
-//		return new EmbedCallableStatement(conn,stmt, resultSetType,
-//		resultSetConcurrency, resultSetHoldability);
-//	}
+		throws SQLException
+    {
+       return new EmbedCallableStatement169(conn,stmt, resultSetType,
+            resultSetConcurrency, resultSetHoldability);
+    }
 
 
-	public abstract EmbedResultSet
-		newEmbedResultSet(EmbedConnection conn, ResultSet results, boolean forMetaData, EmbedStatement
statement, boolean isAtomic) throws SQLException;
-//	{
-//		return new EmbedResultSet(conn, results, forMetaData, statement, isAtomic, false);
-//	}
+	public EmbedResultSet
+		newEmbedResultSet(EmbedConnection conn, ResultSet results, boolean forMetaData, EmbedStatement
statement, boolean isAtomic)
+	throws SQLException
+	{
+	    return new EmbedResultSet169(conn, results, forMetaData, statement, isAtomic);
+	}
 
 
 

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/jdbc/build.xml
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/jdbc/build.xml?rev=171120&r1=171119&r2=171120&view=diff
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/jdbc/build.xml (original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/jdbc/build.xml Fri May 20 07:34:28
2005
@@ -37,11 +37,29 @@
         <pathelement path="${compile.classpath}"/>
       </classpath>
       <include name="${derby.dir}/jdbc/InternalDriver.java"/>
-      <include name="${derby.dir}/jdbc/Driver169.java"/>
       <include name="${derby.dir}/jdbc/EmbeddedSimpleDataSource.java"/>
     </javac>
+ 
   </target>
-
+	  <target name="compile_jsr169_opt">
+	    <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="${jsr169compile.classpath}"/>
+	      </classpath>
+	      <include name="${derby.dir}/jdbc/Driver169.java"/>
+	    </javac>
+	  </target>
+	
   <target name="compile_jdbc2" depends="checkjikessource,compile_jdbc2_gump,compile_jdbc2_nosource"/>
 
   <target name="checkjikessource">



Mime
View raw message