You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by dj...@apache.org on 2005/02/14 19:30:32 UTC

svn commit: r153825 - incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc

Author: djd
Date: Mon Feb 14 10:30:30 2005
New Revision: 153825

URL: http://svn.apache.org/viewcvs?view=rev&rev=153825
Log:
Move JDBC 3.0 methods that also exist in JSR 169 into
the base classes EmbedResultSet and EmbedCallableStatement.

Modified:
    incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement.java
    incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement20.java
    incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java
    incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet20.java

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement.java?view=diff&r1=153824&r2=153825
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement.java (original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement.java Mon Feb 14 10:30:30 2005
@@ -30,11 +30,15 @@
 import org.apache.derby.iapi.reference.JDBC30Translation;
 import org.apache.derby.iapi.reference.SQLState;
 
+import java.net.URL;
+import java.sql.Blob;
 import java.sql.CallableStatement;
+import java.sql.Clob;
 import java.sql.SQLException;
 import java.sql.Date;
 import java.sql.Time;
 import java.sql.Timestamp;
+import java.util.Calendar;
 
 /**
  * Local implementation.
@@ -434,6 +438,48 @@
 			throw EmbedResultSet.noStateChangeException(e);
 		}
 	}
+    /**
+     * Get the value of a SQL DATE parameter as a java.sql.Date object
+     *
+     * @param parameterIndex the first parameter is 1, the second is 2, ...
+     * @return the parameter value; if the value is SQL NULL, the result is 
+     * null
+     * @exception SQLException if a database-access error occurs.
+     */
+    public java.sql.Date getDate(int parameterIndex, Calendar cal) 
+      throws SQLException 
+	{
+		return getDate(parameterIndex);
+	}
+
+    /**
+     * Get the value of a SQL TIME parameter as a java.sql.Time object.
+     *
+     * @param parameterIndex the first parameter is 1, the second is 2, ...
+     * @return the parameter value; if the value is SQL NULL, the result is 
+	 * null
+     * @exception SQLException if a database-access error occurs.
+     */
+    public java.sql.Time getTime(int parameterIndex, Calendar cal) 
+      throws SQLException 
+	{
+		return getTime(parameterIndex);
+	}
+
+    /**
+     * Get the value of a SQL TIMESTAMP parameter as a java.sql.Timestamp 
+     * object.
+     *
+     * @param parameterIndex the first parameter is 1, the second is 2, ...
+     * @return the parameter value; if the value is SQL NULL, the result is 
+     * null
+     * @exception SQLException if a database-access error occurs.
+     */
+    public java.sql.Timestamp getTimestamp(int parameterIndex, Calendar cal) 
+      throws SQLException 
+	{
+		return getTimestamp(parameterIndex);
+	}
 
     /**
 	 * @see CallableStatement#getObject
@@ -452,7 +498,78 @@
 			throw EmbedResultSet.noStateChangeException(e);
 		}
 	}
-
+	/**
+	    * JDBC 3.0
+	    *
+	    * Retrieve the value of the designated JDBC DATALINK parameter as a java.net.URL object
+	    *
+	    * @param parameterIndex - the first parameter is 1, the second is 2
+	    * @return a java.net.URL object that represents the JDBC DATALINK value used as
+	    * the designated parameter
+	    * @exception SQLException Feature not implemented for now.
+		*/
+		public URL getURL(int parameterIndex)
+	    throws SQLException
+		{
+			throw Util.notImplemented();
+		}
+
+		/**
+	    * JDBC 3.0
+	    *
+	    * Sets the designated parameter to the given java.net.URL object. The driver
+	    * converts this to an SQL DATALINK value when it sends it to the database.
+	    *
+	    * @param parameterName - the name of the parameter
+	    * @param val - the parameter value
+	    * @exception SQLException Feature not implemented for now.
+		*/
+		public void setURL(String parameterName, URL val)
+	    throws SQLException
+		{
+			throw Util.notImplemented();
+		}
+
+		/**
+	    * JDBC 3.0
+	    *
+	    * Retrieves the value of a JDBC DATALINK parameter as a java.net.URL object
+	    *
+	    * @param parameterName - the name of the parameter
+	    * @return the parameter value. If the value is SQL NULL, the result is null.
+	    * @exception SQLException Feature not implemented for now.
+		*/
+		public URL getURL(String parameterName)
+	    throws SQLException
+		{
+			throw Util.notImplemented();
+		}
+
+		/**
+	     * JDBC 2.0
+	     *
+	     * Get a BLOB OUT parameter.
+	     *
+	     * @param i the first parameter is 1, the second is 2, ...
+	     * @return an object representing a BLOB
+	     * @exception SQLException if a database-access error occurs.
+	     */
+	    public Blob getBlob (int i) throws SQLException {
+			throw Util.notImplemented();
+		}
+
+	    /**
+	     * JDBC 2.0
+	     *
+	     * Get a CLOB OUT parameter.
+	     *
+	     * @param i the first parameter is 1, the second is 2, ...
+	     * @return an object representing a CLOB
+	     * @exception SQLException if a database-access error occurs.
+	     */
+	    public Clob getClob (int i) throws SQLException {
+			throw Util.notImplemented();
+		}
 	public void addBatch() throws SQLException {
 
 		checkStatus();

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement20.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement20.java?view=diff&r1=153824&r2=153825
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement20.java (original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement20.java Mon Feb 14 10:30:30 2005
@@ -150,32 +150,6 @@
     /**
      * JDBC 2.0
      *
-     * Get a BLOB OUT parameter.
-     *
-     * @param i the first parameter is 1, the second is 2, ...
-     * @return an object representing a BLOB
-     * @exception SQLException if a database-access error occurs.
-     */
-    public Blob getBlob (int i) throws SQLException {
-		throw Util.notImplemented();
-	}
-
-    /**
-     * JDBC 2.0
-     *
-     * Get a CLOB OUT parameter.
-     *
-     * @param i the first parameter is 1, the second is 2, ...
-     * @return an object representing a CLOB
-     * @exception SQLException if a database-access error occurs.
-     */
-    public Clob getClob (int i) throws SQLException {
-		throw Util.notImplemented();
-	}
-
-    /**
-     * JDBC 2.0
-     *
      * Get an Array OUT parameter.
      *
      * @param i the first parameter is 1, the second is 2, ...
@@ -186,48 +160,6 @@
 		throw Util.notImplemented();
 	}
 
-    /**
-     * Get the value of a SQL DATE parameter as a java.sql.Date object
-     *
-     * @param parameterIndex the first parameter is 1, the second is 2, ...
-     * @return the parameter value; if the value is SQL NULL, the result is 
-     * null
-     * @exception SQLException if a database-access error occurs.
-     */
-    public java.sql.Date getDate(int parameterIndex, Calendar cal) 
-      throws SQLException 
-	{
-		return getDate(parameterIndex);
-	}
-
-    /**
-     * Get the value of a SQL TIME parameter as a java.sql.Time object.
-     *
-     * @param parameterIndex the first parameter is 1, the second is 2, ...
-     * @return the parameter value; if the value is SQL NULL, the result is 
-	 * null
-     * @exception SQLException if a database-access error occurs.
-     */
-    public java.sql.Time getTime(int parameterIndex, Calendar cal) 
-      throws SQLException 
-	{
-		return getTime(parameterIndex);
-	}
-
-    /**
-     * Get the value of a SQL TIMESTAMP parameter as a java.sql.Timestamp 
-     * object.
-     *
-     * @param parameterIndex the first parameter is 1, the second is 2, ...
-     * @return the parameter value; if the value is SQL NULL, the result is 
-     * null
-     * @exception SQLException if a database-access error occurs.
-     */
-    public java.sql.Timestamp getTimestamp(int parameterIndex, Calendar cal) 
-      throws SQLException 
-	{
-		return getTimestamp(parameterIndex);
-	}
 
  
 	/*
@@ -322,53 +254,6 @@
 	*/
 	public void registerOutParameter(String parameterName,
 					int sqlType, int scale)
-    throws SQLException
-	{
-		throw Util.notImplemented();
-	}
-
-	/**
-    * JDBC 3.0
-    *
-    * Retrieve the value of the designated JDBC DATALINK parameter as a java.net.URL object
-    *
-    * @param parameterIndex - the first parameter is 1, the second is 2
-    * @return a java.net.URL object that represents the JDBC DATALINK value used as
-    * the designated parameter
-    * @exception SQLException Feature not implemented for now.
-	*/
-	public URL getURL(int parameterIndex)
-    throws SQLException
-	{
-		throw Util.notImplemented();
-	}
-
-	/**
-    * JDBC 3.0
-    *
-    * Sets the designated parameter to the given java.net.URL object. The driver
-    * converts this to an SQL DATALINK value when it sends it to the database.
-    *
-    * @param parameterName - the name of the parameter
-    * @param val - the parameter value
-    * @exception SQLException Feature not implemented for now.
-	*/
-	public void setURL(String parameterName, URL val)
-    throws SQLException
-	{
-		throw Util.notImplemented();
-	}
-
-	/**
-    * JDBC 3.0
-    *
-    * Retrieves the value of a JDBC DATALINK parameter as a java.net.URL object
-    *
-    * @param parameterName - the name of the parameter
-    * @return the parameter value. If the value is SQL NULL, the result is null.
-    * @exception SQLException Feature not implemented for now.
-	*/
-	public URL getURL(String parameterName)
     throws SQLException
 	{
 		throw Util.notImplemented();

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java?view=diff&r1=153824&r2=153825
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java (original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java Mon Feb 14 10:30:30 2005
@@ -63,6 +63,7 @@
 
 import java.io.InputStream;
 import java.io.IOException;
+import java.net.URL;
 
 import java.util.Calendar;
 
@@ -1342,8 +1343,43 @@
     	return (getBinaryStream(findColumnName(columnName)));
 	}
 
+    /**
+	 * JDBC 3.0
+	 * 
+	 * Retrieves the value of the designated column in the current row of this
+	 * ResultSet object as a java.net.URL object in the Java programming
+	 * language.
+	 * 
+	 * @param columnIndex -
+	 *            the first column is 1, the second is 2
+	 * @return the column value as a java.net.URL object, if the value is SQL
+	 *         NULL, the value returned is null in the Java programming language
+	 * @exception SQLException
+	 *                Feature not implemented for now.
+	 */
+	public URL getURL(int columnIndex) throws SQLException {
+		throw Util.notImplemented();
+	}
 
-    //=====================================================================
+	/**
+	 * JDBC 3.0
+	 * 
+	 * Retrieves the value of the designated column in the current row of this
+	 * ResultSet object as a java.net.URL object in the Java programming
+	 * language.
+	 * 
+	 * @param columnName -
+	 *            the SQL name of the column
+	 * @return the column value as a java.net.URL object, if the value is SQL
+	 *         NULL, the value returned is null in the Java programming language
+	 * @exception SQLException
+	 *                Feature not implemented for now.
+	 */
+	public URL getURL(String columnName) throws SQLException {
+		throw Util.notImplemented();
+	}
+ 
+	//=====================================================================
     // Advanced features:
     //=====================================================================
 

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet20.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet20.java?view=diff&r1=153824&r2=153825
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet20.java (original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet20.java Mon Feb 14 10:30:30 2005
@@ -318,39 +318,7 @@
         //
         /////////////////////////////////////////////////////////////////////////
 
-        /**
-    * JDBC 3.0
-    *
-    * Retrieves the value of the designated column in the current row of this
-    * ResultSet object as a java.net.URL object in the Java programming language.
-    *
-    * @param columnIndex - the first column is 1, the second is 2
-    * @return the column value as a java.net.URL object, if the value is SQL NULL,
-    * the value returned is null in the Java programming language 
-    * @exception SQLException Feature not implemented for now.
-        */
-        public URL getURL(int columnIndex)
-    throws SQLException
-        {
-                throw Util.notImplemented();
-        }
 
-        /**
-    * JDBC 3.0
-    *
-    * Retrieves the value of the designated column in the current row of this
-    * ResultSet object as a java.net.URL object in the Java programming language.
-    *
-    * @param columnName - the SQL name of the column
-    * @return the column value as a java.net.URL object, if the value is SQL NULL,
-    * the value returned is null in the Java programming language 
-    * @exception SQLException Feature not implemented for now.
-        */
-        public URL getURL(String columnName)
-    throws SQLException
-        {
-                throw Util.notImplemented();
-        }
 
         /**
     * JDBC 3.0