db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r724735 [4/11] - in /db/derby/code/trunk: ./ java/stubs/jdbc3/ java/stubs/jdbc3/java/ java/stubs/jdbc3/java/sql/ java/stubs/jdbc3/javax/ java/stubs/jdbc3/javax/sql/ java/stubs/jdbc4/ java/stubs/jdbc4/java/ java/stubs/jdbc4/java/sql/ java/st...
Date Tue, 09 Dec 2008 15:06:12 GMT
Propchange: db/derby/code/trunk/java/stubs/jdbc3/java/sql/DatabaseMetaData.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/stubs/jdbc3/java/sql/Date.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/stubs/jdbc3/java/sql/Date.java?rev=724735&view=auto
==============================================================================
--- db/derby/code/trunk/java/stubs/jdbc3/java/sql/Date.java (added)
+++ db/derby/code/trunk/java/stubs/jdbc3/java/sql/Date.java Tue Dec  9 07:06:09 2008
@@ -0,0 +1,211 @@
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 java.sql;
+
+import java.text.SimpleDateFormat;
+
+/**
+ * A Date class which can consume and produce dates in SQL Date format.
+ * <p>
+ * The SQL date format represents a date as yyyy-mm-dd. Note that this date
+ * format only deals with year, month and day values. There are no values for
+ * hours, minutes, seconds.
+ * <p>
+ * This contrasts with regular java.util.Date values, which include time values
+ * for hours, minutes, seconds, milliseconds.
+ * <p>
+ * Time points are handled as millisecond values - milliseconds since the epoch,
+ * January 1st 1970, 00:00:00.000 GMT. Time values passed to the java.sql.Date
+ * class are "normalized" to the time 00:00:00.000 GMT on the date implied by
+ * the time value.
+ */
+public class Date extends java.util.Date {
+
+    private static final long serialVersionUID = 1511598038487230103L;
+
+    /**
+     * @deprecated Please use the constructor Date( long ) Constructs a Date
+     *             object corresponding to the supplied Year, Month and Day.
+     * @param theYear
+     *            the year, specified as the year minus 1900. Must be in the
+     *            range 0 to 8099.
+     * @param theMonth
+     *            the month, specified as a number with 0 = January. Must be in
+     *            the range 0 to 11.
+     * @param theDay
+     *            the day in the month. Must be in the range 1 to 31.
+     */
+    public Date(int theYear, int theMonth, int theDay) {
+        super(theYear, theMonth, theDay);
+    }
+
+    /**
+     * Creates a Date which corresponds to the day implied by the supplied
+     * theDate milliseconds time value.
+     * 
+     * @param theDate -
+     *            a time value in milliseconds since the epoch - January 1 1970
+     *            00:00:00 GMT. The time value (hours, minutes, seconds,
+     *            milliseconds) stored in the Date object is adjusted to
+     *            correspond to 00:00:00 GMT on the day implied by the supplied
+     *            time value.
+     */
+    public Date(long theDate) {
+        super(normalizeTime(theDate));
+    }
+
+    /**
+     * @deprecated This method is deprecated and must not be used. SQL Date
+     *             values do not have an hours component.
+     * @return does not return
+     * @throws IllegalArgumentException
+     *             if this method is called
+     */
+    public int getHours() {
+        throw new IllegalArgumentException();
+    }
+
+    /**
+     * @deprecated This method is deprecated and must not be used. SQL Date
+     *             values do not have a minutes component.
+     * @return does not return
+     * @throws IllegalArgumentException
+     *             if this method is called
+     */
+    public int getMinutes() {
+        throw new IllegalArgumentException();
+    }
+
+    /**
+     * @deprecated This method is deprecated and must not be used. SQL Date
+     *             values do not have a seconds component.
+     * @return does not return
+     * @throws IllegalArgumentException
+     *             if this method is called
+     */
+    public int getSeconds() {
+        throw new IllegalArgumentException();
+    }
+
+    /**
+     * @deprecated This method is deprecated and must not be used. SQL Date
+     *             values do not have an hours component.
+     * @param theHours
+     *            the number of hours to set
+     * @throws IllegalArgumentException
+     *             if this method is called
+     */
+    public void setHours(int theHours) {
+        throw new IllegalArgumentException();
+    }
+
+    /**
+     * @deprecated This method is deprecated and must not be used. SQL Date
+     *             values do not have a minutes component.
+     * @param theMinutes
+     *            the number of minutes to set
+     * @throws IllegalArgumentException
+     *             if this method is called
+     */
+    public void setMinutes(int theMinutes) {
+        throw new IllegalArgumentException();
+    }
+
+    /**
+     * @deprecated This method is deprecated and must not be used. SQL Date
+     *             values do not have a seconds component.
+     * @param theSeconds
+     *            the number of seconds to set
+     * @throws IllegalArgumentException
+     *             if this method is called
+     */
+    public void setSeconds(int theSeconds) {
+        throw new IllegalArgumentException();
+    }
+
+    /**
+     * Sets this date to a date supplied as a milliseconds value. The date is
+     * set based on the supplied time value after removing any time elements
+     * finer than a day, based on zero GMT for that day.
+     * 
+     * @param theTime
+     *            the time in milliseconds since the Epoch
+     */
+    public void setTime(long theTime) {
+        /*
+         * Store the Date based on the supplied time after removing any time
+         * elements finer than the day based on zero GMT
+         */
+        super.setTime(normalizeTime(theTime));
+    }
+
+    /**
+     * Produces a string representation of the Date in SQL format
+     * 
+     * @return a string representation of the Date in SQL format - "yyyy-mm-dd".
+     */
+    public String toString() {
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); //$NON-NLS-1$
+        return dateFormat.format(this);
+    }
+
+    /**
+     * Creates a Date from a string representation of a date in SQL format.
+     * 
+     * @param dateString
+     *            the string representation of a date in SQL format -
+     *            "yyyy-mm-dd".
+     * @return the Date object
+     * @throws IllegalArgumentException
+     *             if the format of the supplied string does not match the SQL
+     *             format.
+     */
+    public static Date valueOf(String dateString) {
+        if (dateString == null) {
+            throw new IllegalArgumentException();
+        }
+        int firstIndex = dateString.indexOf('-');
+        int secondIndex = dateString.indexOf('-', firstIndex + 1);
+        // secondIndex == -1 means none or only one separator '-' has been
+        // found.
+        // The string is separated into three parts by two separator characters,
+        // if the first or the third part is null string, we should throw
+        // IllegalArgumentException to follow RI
+        if (secondIndex == -1 || firstIndex == 0
+                || secondIndex + 1 == dateString.length()) {
+            throw new IllegalArgumentException();
+        }
+        // parse each part of the string
+        int year = Integer.parseInt(dateString.substring(0, firstIndex));
+        int month = Integer.parseInt(dateString.substring(firstIndex + 1,
+                secondIndex));
+        int day = Integer.parseInt(dateString.substring(secondIndex + 1,
+                dateString.length()));
+        return new Date(year - 1900, month - 1, day);
+    }
+
+    /*
+     * Private method which normalizes a Time value, removing all low
+     * significance digits corresponding to milliseconds, seconds, minutes and
+     * hours, so that the returned Time value corresponds to 00:00:00 GMT on a
+     * particular day.
+     */
+    private static long normalizeTime(long theTime) {
+        return theTime;
+    }
+}

Propchange: db/derby/code/trunk/java/stubs/jdbc3/java/sql/Date.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/stubs/jdbc3/java/sql/Driver.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/stubs/jdbc3/java/sql/Driver.java?rev=724735&view=auto
==============================================================================
--- db/derby/code/trunk/java/stubs/jdbc3/java/sql/Driver.java (added)
+++ db/derby/code/trunk/java/stubs/jdbc3/java/sql/Driver.java Tue Dec  9 07:06:09 2008
@@ -0,0 +1,113 @@
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 java.sql;
+
+import java.util.Properties;
+
+/**
+ * An Interface to a JDBC Driver.
+ * <p>
+ * The JDBC Driver uses URLs to specify the location of specific data. URL
+ * format typically takes the form "xxxx:yyyy:SpecificData", where "xxxx:yyyy"
+ * is termed the subprotocol and is normally the same for all uses of a
+ * particular driver. "SpecificData" is a string which identifies the particular
+ * data source that the driver should use.
+ * 
+ */
+public interface Driver {
+
+    /**
+     * Returns whether the driver thinks that it can open a connection to the
+     * given URL.
+     * 
+     * @param url
+     *            the URL to connect to.
+     * @return true if the driver thinks that is can open a connection to the
+     *         supplied URL, false otherwise. Typically, the driver will respond
+     *         true if it thinks that it can handle the subprotocol specified by
+     *         the driver.
+     * @throws SQLException
+     */
+    public boolean acceptsURL(String url) throws SQLException;
+
+    /**
+     * Attempts to make a database connection to a datasource specified by a
+     * supplied URL.
+     * 
+     * @param url
+     *            the url to connect.
+     * @param info
+     *            some properties that should be used in establishing the
+     *            connection. The properties consist of name/value pairs of
+     *            Strings. Normally, a connection to a database requires at
+     *            least two properties - for "user" and "password" in order to
+     *            pass authentication to the database.
+     * @return a Connection object representing the connection to the database.
+     * @throws SQLException
+     *             if a database error occurs
+     */
+    public Connection connect(String url, Properties info) throws SQLException;
+
+    /**
+     * Gets the driver's major version number.
+     * 
+     * @return the major version number of the Driver - typically starts at 1.
+     */
+    public int getMajorVersion();
+
+    /**
+     * Gets the driver's minor version number.
+     * 
+     * @return the minor version number of the Driver - typically starts at 0.
+     */
+    public int getMinorVersion();
+
+    /**
+     * Gets information about possible properties for this driver.
+     * <p>
+     * This method is intended to provide a listing of possible properties that
+     * the user of the driver may need to supply in order to correct connect to
+     * a database. Note that the returned array of Properties may change
+     * depending on the supplied list of property values.
+     * 
+     * @param url
+     *            the url of the database. A using program may call this method
+     *            iteratively as the property list is built up - for example,
+     *            when displaying a dialog to an end-user as part of the
+     *            database login process.
+     * @param info
+     * @return an array of DriverPropertyInfo records which provide detail on
+     *         each property that the driver will accept.
+     * @throws SQLException
+     */
+    public DriverPropertyInfo[] getPropertyInfo(String url, Properties info)
+            throws SQLException;
+
+    /**
+     * Reports whether this driver is a genuine JDBC CompliantTM driver. The
+     * driver may only return true from this method if it passes all the JDBC
+     * Compliance tests.
+     * <p>
+     * A driver may not be fully compliant if the underlying database has
+     * limited functionality.
+     * 
+     * @return true if the driver is fully JDBC compliant, false otherwise.
+     */
+    public boolean jdbcCompliant();
+
+}

Propchange: db/derby/code/trunk/java/stubs/jdbc3/java/sql/Driver.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/stubs/jdbc3/java/sql/DriverManager.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/stubs/jdbc3/java/sql/DriverManager.java?rev=724735&view=auto
==============================================================================
--- db/derby/code/trunk/java/stubs/jdbc3/java/sql/DriverManager.java (added)
+++ db/derby/code/trunk/java/stubs/jdbc3/java/sql/DriverManager.java Tue Dec  9 07:06:09 2008
@@ -0,0 +1,299 @@
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 java.sql;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.util.Vector;
+import java.security.AccessController;
+
+/**
+ * Provides facilities for managing JDBC Drivers.
+ * <p>
+ * The DriverManager class will load JDBC drivers during its initialization,
+ * from the list of drivers referenced by the System Property "jdbc.drivers".
+ */
+public class DriverManager {
+
+    /*
+     * Facilities for logging. The Print Stream is deprecated but is maintained
+     * here for compatibility.
+     */
+    private static PrintStream thePrintStream;
+
+    private static PrintWriter thePrintWriter;
+
+    // Login timeout value - by default set to 0 -> "wait forever"
+    private static int loginTimeout = 0;
+
+    /*
+     * Set to hold Registered Drivers - initial capacity 10 drivers (will expand
+     * automatically if necessary.
+     */
+    private static final List theDrivers = new ArrayList(10);
+
+    // Permission for setting log
+    private static final SQLPermission logPermission = null;
+
+    /*
+     * Load drivers on initialization
+     */
+    static {
+        loadInitialDrivers();
+    }
+
+    /*
+     * Loads the set of JDBC drivers defined by the Property "jdbc.drivers" if
+     * it is defined.
+     */
+    private static void loadInitialDrivers() {
+    }
+
+    /*
+     * A private constructor to prevent allocation
+     */
+    private DriverManager() {
+        super();
+    }
+
+    /**
+     * Removes a driver from the DriverManager's registered driver list. This
+     * will only succeed where the caller's classloader loaded the driver that
+     * is to be removed. If the driver was loaded by a different classloader,
+     * the removal of the driver will fail silently.
+     * <p>
+     * If the removal succeeds, the DriverManager will not in future use this
+     * driver when asked to get a Connection.
+     * 
+     * @param driver
+     * @throws SQLException
+     *             if there is an exception accessing the database.
+     */
+    public static void deregisterDriver(Driver driver) throws SQLException { }
+
+    /**
+     * Attempts to establish a connection to the given database URL.
+     * 
+     * @param url
+     *            a URL string representing the database target to connect with
+     * @return a Connection to the database identified by the URL. null if no
+     *         connection can be made.
+     * @throws SQLException
+     *             if there is an error while attempting to connect to the
+     *             database identified by the URL
+     */
+    public static Connection getConnection(String url) throws SQLException {
+        return getConnection(url, new Properties());
+    }
+
+    /**
+     * Attempts to establish a connection to the given database URL.
+     * 
+     * @param url
+     *            a URL string representing the database target to connect with
+     * @param info
+     *            a set of Properties to use as arguments to set up the
+     *            connection. Properties are arbitrary string/value pairs.
+     *            Normally, at least the properties "user" and "password" should
+     *            be passed, with appropriate settings for the userid and its
+     *            corresponding password to get access to the database
+     *            concerned.
+     * @return a Connection to the database identified by the URL. null if no
+     *         connection can be made.
+     * @throws SQLException
+     *             if there is an error while attempting to connect to the
+     *             database identified by the URL
+     */
+    public static Connection getConnection(String url, Properties info)
+        throws SQLException { return null; }
+
+    /**
+     * Attempts to establish a connection to the given database URL.
+     * 
+     * @param url
+     *            a URL string representing the database target to connect with
+     * @param user
+     *            a userid used to login to the database
+     * @param password
+     *            a password for the userid to login to the database
+     * @return a Connection to the database identified by the URL. null if no
+     *         connection can be made.
+     * @throws SQLException
+     *             if there is an error while attempting to connect to the
+     *             database identified by the URL
+     */
+    public static Connection getConnection(String url, String user,
+                                           String password) throws SQLException { return null; }
+
+    /**
+     * Tries to find a driver that can interpret the supplied URL.
+     * 
+     * @param url
+     *            the URL of a database
+     * @return a Driver that can understand the given URL. null if no Driver
+     *         understands the URL
+     * @throws SQLException
+     *             if there is any kind of Database Access problem
+     */
+    public static Driver getDriver(String url) throws SQLException { return null; }
+
+    /**
+     * Returns an Enumeration that contains all of the loaded JDBC drivers that
+     * the current caller can access.
+     * 
+     * @return An Enumeration containing all the currently loaded JDBC Drivers
+     */
+    public static Enumeration getDrivers() { return null; }
+
+    /**
+     * Returns the login timeout when connecting to a database, in seconds.
+     * 
+     * @return the login timeout in seconds
+     */
+    public static int getLoginTimeout() {
+        return loginTimeout;
+    }
+
+    /**
+     * @deprecated Gets the log PrintStream used by the DriverManager and all
+     *             the JDBC Drivers.
+     * @return the PrintStream used for logging activity
+     */
+    public static PrintStream getLogStream() {
+        return thePrintStream;
+    }
+
+    /**
+     * Retrieves the log writer.
+     * 
+     * @return A PrintWriter object used as the log writer. null if no log
+     *         writer is set.
+     */
+    public static PrintWriter getLogWriter() {
+        return thePrintWriter;
+    }
+
+    /**
+     * Prints a message to the current JDBC log stream. This is either the
+     * PrintWriter or (deprecated) the PrintStream, if set.
+     * 
+     * @param message
+     *            the message to print to the JDBC log stream
+     */
+    public static void println(String message) {
+        if (thePrintWriter != null) {
+            thePrintWriter.println(message);
+            thePrintWriter.flush();
+        } else if (thePrintStream != null) {
+            thePrintStream.println(message);
+            thePrintStream.flush();
+        }
+        /*
+         * If neither the PrintWriter not the PrintStream are set, then silently
+         * do nothing the message is not recorded and no exception is generated.
+         */
+        return;
+    }
+
+    /**
+     * Registers a given JDBC driver with the DriverManager.
+     * <p>
+     * A newly loaded JDBC driver class should register itself with the
+     * DriverManager by calling this method.
+     * 
+     * @param driver
+     *            the Driver to register with the DriverManager
+     * @throws SQLException
+     *             if a database access error occurs.
+     */
+    public static void registerDriver(Driver driver) throws SQLException {
+        if (driver == null) {
+            throw new NullPointerException();
+        }
+        synchronized (theDrivers) {
+            theDrivers.add(driver);
+        }
+    }
+
+    /**
+     * Set the login timeout when connecting to a database, in seconds.
+     * 
+     * @param seconds
+     *            seconds until timeout. 0 indicates wait forever.
+     */
+    public static void setLoginTimeout(int seconds) {
+        loginTimeout = seconds;
+        return;
+    }
+
+    /**
+     * @deprecated Sets the Print Stream to use for logging data from the
+     *             DriverManager and the JDBC drivers.
+     *             <p>
+     *             Use setLogWriter instead.
+     * @param out
+     *            the PrintStream to use for logging.
+     */
+    public static void setLogStream(PrintStream out) {
+        checkLogSecurity();
+        thePrintStream = out;
+    }
+
+    /**
+     * Sets the PrintWriter that will be used by all loaded drivers, and also
+     * the DriverManager.
+     * 
+     * @param out
+     *            the PrintWriter to be used
+     */
+    public static void setLogWriter(PrintWriter out) {
+        checkLogSecurity();
+        thePrintWriter = out;
+    }
+
+    /*
+     * Method which checks to see if setting a logging stream is allowed by the
+     * Security manager
+     */
+    private static void checkLogSecurity() {
+        SecurityManager securityManager = System.getSecurityManager();
+        if (securityManager != null) {
+            // Throws a SecurityException if setting the log is not permitted
+            securityManager.checkPermission(logPermission);
+        }
+    }
+
+    /**
+     * Finds if a supplied Object belongs to the given ClassLoader.
+     * 
+     * @param theObject
+     *            the object to check
+     * @param theClassLoader
+     *            the ClassLoader
+     * @return true if the Object does belong to the ClassLoader, false
+     *         otherwise
+     */
+    private static boolean isClassFromClassLoader(Object theObject,
+                                                  ClassLoader theClassLoader)
+    { return false; }
+}

Propchange: db/derby/code/trunk/java/stubs/jdbc3/java/sql/DriverManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/stubs/jdbc3/java/sql/DriverPropertyInfo.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/stubs/jdbc3/java/sql/DriverPropertyInfo.java?rev=724735&view=auto
==============================================================================
--- db/derby/code/trunk/java/stubs/jdbc3/java/sql/DriverPropertyInfo.java (added)
+++ db/derby/code/trunk/java/stubs/jdbc3/java/sql/DriverPropertyInfo.java Tue Dec  9 07:06:09 2008
@@ -0,0 +1,72 @@
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 java.sql;
+
+/**
+ * A class holding information about Driver Properties for making a Connection.
+ * This class is returned from the <code>Driver.getDriverProperties</code>
+ * method and is useful in using Connections in an advanced way.
+ */
+public class DriverPropertyInfo {
+
+    /**
+     * If the value member can be chosen from a set of possible values, they are
+     * contained here. Otherwise choices is null.
+     */
+    public String[] choices;
+
+    /**
+     * A description of the property. May be null.
+     */
+    public String description;
+
+    /**
+     * The name of the property.
+     */
+    public String name;
+
+    /**
+     * True when the value member must be provided during Driver.connect. False
+     * otherwise.
+     */
+    public boolean required;
+
+    /**
+     * The current value associated with this property. This is based on the
+     * data gathered by the getPropertyInfo method, the general Java environment
+     * and the default values for the driver.
+     */
+    public String value;
+
+    /**
+     * Creates a DriverPropertyInfo instance with the supplied name and value.
+     * Other members take their default values.
+     * 
+     * @param name
+     *            The property name
+     * @param value
+     *            The property value
+     */
+    public DriverPropertyInfo(String name, String value) {
+        this.name = name;
+        this.value = value;
+        this.choices = null;
+        this.description = null;
+        this.required = false;
+    }
+}

Propchange: db/derby/code/trunk/java/stubs/jdbc3/java/sql/DriverPropertyInfo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/stubs/jdbc3/java/sql/ParameterMetaData.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/stubs/jdbc3/java/sql/ParameterMetaData.java?rev=724735&view=auto
==============================================================================
--- db/derby/code/trunk/java/stubs/jdbc3/java/sql/ParameterMetaData.java (added)
+++ db/derby/code/trunk/java/stubs/jdbc3/java/sql/ParameterMetaData.java Tue Dec  9 07:06:09 2008
@@ -0,0 +1,183 @@
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 java.sql;
+
+/**
+ * An interface used to get information about the types and properties of
+ * parameters in a PreparedStatement object.
+ */
+public interface ParameterMetaData {
+
+    /**
+     * Indicates that the parameter mode is IN.
+     */
+    public static final int parameterModeIn = 1;
+
+    /**
+     * Indicates that the parameter mode is INOUT.
+     */
+    public static final int parameterModeInOut = 2;
+
+    /**
+     * Indicates that the parameter mode is OUT.
+     */
+    public static final int parameterModeOut = 4;
+
+    /**
+     * Indicates that the parameter mode is not known.
+     */
+    public static final int parameterModeUnknown = 0;
+
+    /**
+     * Indicates that a parameter is not permitted to be NULL.
+     */
+    public static final int parameterNoNulls = 0;
+
+    /**
+     * Indicates that a parameter is permitted to be NULL.
+     */
+    public static final int parameterNullable = 1;
+
+    /**
+     * Indicates that whether a parameter is allowed to be null or not is not
+     * known.
+     */
+    public static final int parameterNullableUnknown = 2;
+
+    /**
+     * Gets the fully-qualified name of the Java class which should be passed as
+     * a parameter to the method <code>PreparedStatement.setObject</code>.
+     * 
+     * @param paramIndex
+     *            the index number of the parameter, where the first parameter
+     *            has an index of 1
+     * @return a String with the fully qualified Java class name of the
+     *         parameter with the specified index. This class name is used for
+     *         custom mapping.
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public String getParameterClassName(int paramIndex) throws SQLException;
+
+    /**
+     * Gets the number of parameters in the PreparedStatement for which this
+     * ParameterMetaData contains information.
+     * 
+     * @return the number of parameters as an int
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public int getParameterCount() throws SQLException;
+
+    /**
+     * Gets the mode of the specified parameter.
+     * 
+     * @param paramIndex
+     *            the index number of the parameter, where the first parameter
+     *            has an index of 1
+     * @return the parameters mode. Can be: ParameterMetaData.parameterModeIn,
+     *         ParameterMetaData.parameterModeOut,
+     *         ParameterMetaData.parameterModeInOut or
+     *         ParameterMetaData.parameterModeUnknown.
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public int getParameterMode(int paramIndex) throws SQLException;
+
+    /**
+     * Gets the SQL type of a specified parameter.
+     * 
+     * @param paramIndex
+     *            the index number of the parameter, where the first parameter
+     *            has an index of 1
+     * @return the type of the parameter - an SQL type as defined in
+     *         java.sql.Types.
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public int getParameterType(int paramIndex) throws SQLException;
+
+    /**
+     * Gets the database-specific type name of a specified parameter.
+     * 
+     * @param paramIndex
+     *            the index number of the parameter, where the first parameter
+     *            has an index of 1
+     * @return the type name for the parameter as used by the database. A
+     *         fully-qualified name is returned if the parameter is a User
+     *         Defined Type.
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public String getParameterTypeName(int paramIndex) throws SQLException;
+
+    /**
+     * Gets the number of decimal digits for a specified parameter.
+     * 
+     * @param paramIndex
+     *            the index number of the parameter, where the first parameter
+     *            has an index of 1
+     * @return the number of decimal digits ("the precision") for the parameter.
+     *         0 if the parameter is not a numeric type.
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public int getPrecision(int paramIndex) throws SQLException;
+
+    /**
+     * Gets the number of digits after the decimal point for a specified
+     * parameter.
+     * 
+     * @param paramIndex
+     *            the index number of the parameter, where the first parameter
+     *            has an index of 1
+     * @return the number of digits after the decimal point ("the scale") for
+     *         the parameter. 0 if the parameter is not a numeric type.
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public int getScale(int paramIndex) throws SQLException;
+
+    /**
+     * Gets whether null values are allowed for the specified parameter.
+     * 
+     * @param paramIndex
+     *            the index number of the parameter, where the first parameter
+     *            has an index of 1
+     * @return indicator of nullability, can be:
+     *         ParameterMetaData.parameterNoNulls,
+     *         ParameterMetaData.parameterNullable, or
+     *         ParameterMetaData.parameterNullableUnknown
+     * @throws SQLException
+     *             if a database error is encountered
+     */
+    public int isNullable(int paramIndex) throws SQLException;
+
+    /**
+     * Gets whether values for the specified parameter can be signed numbers.
+     * 
+     * @param paramIndex
+     *            the index number of the parameter, where the first parameter
+     *            has an index of 1
+     * @return true if values can be signed numbers for this parameter, false
+     *         otherwise.
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public boolean isSigned(int paramIndex) throws SQLException;
+}

Propchange: db/derby/code/trunk/java/stubs/jdbc3/java/sql/ParameterMetaData.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/stubs/jdbc3/java/sql/PreparedStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/stubs/jdbc3/java/sql/PreparedStatement.java?rev=724735&view=auto
==============================================================================
--- db/derby/code/trunk/java/stubs/jdbc3/java/sql/PreparedStatement.java (added)
+++ db/derby/code/trunk/java/stubs/jdbc3/java/sql/PreparedStatement.java Tue Dec  9 07:06:09 2008
@@ -0,0 +1,625 @@
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 java.sql;
+
+import java.util.Calendar;
+import java.net.URL;
+import java.io.InputStream;
+import java.io.Reader;
+import java.math.BigDecimal;
+
+/**
+ * An interface for a Precompiled SQL Statement.
+ * <p>
+ * An SQL Statement is put into a PreparedStatement and is precompiled so that
+ * it can be executed multiple times efficiently.
+ * <p>
+ * Setter methods are supplied in the PreparedStatement interface for the
+ * setting of IN parameters for the Statement. The setter method used for each
+ * IN parameter must match the type of the IN parameter being set.
+ */
+public interface PreparedStatement extends Statement {
+
+    /**
+     * Add a set of parameters to the PreparedStatement's command batch.
+     * 
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void addBatch() throws SQLException;
+
+    /**
+     * Clear the current parameter values.
+     * <p>
+     * Typically, parameter values are retained for multiple executions of the
+     * Statement. Setting a parameter value replaces the previous value. This
+     * method clears the values for all parameters, releasing all resources used
+     * by those parameters.
+     * 
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void clearParameters() throws SQLException;
+
+    /**
+     * Executes the SQL statement in this PreparedStatement.
+     * <p>
+     * A PreparedStatement may return multiple results. The execute method
+     * returns a flag indicating the kind of result produced by
+     * PreparedStatement. The methods <code>
+     * getResultSet</code> or
+     * <code>getUpdateCount</code> are used to retrieve the first result,
+     * while <code>getMoreResults</code> must be used to retrieve the second
+     * and subsequent results.
+     * 
+     * @return true if the result of the execution is a ResultSet, false if
+     *         there is no result or if the result is an update count.
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public boolean execute() throws SQLException;
+
+    /**
+     * Execute the SQL query in the PreparedStatement and return the ResultSet
+     * generated by the query.
+     * 
+     * @return the ResultSet generated by the query - never null.
+     * @throws SQLException
+     *             if a database error happens or if the SQL statement does not
+     *             produce a ResultSet.
+     */
+    public ResultSet executeQuery() throws SQLException;
+
+    /**
+     * Invoke the SQL command contained within the Prepared Statement. This must
+     * be INSERT, UPDATE, DELETE, or a command that returns nothing.
+     * 
+     * @return the count of rows for INSERT, UPDATE or DELETE statements, 0 for
+     *         statements that return nothing
+     * @throws SQLException
+     *             if a database error happens or if the SQL statement returns a
+     *             ResultSet.
+     */
+    public int executeUpdate() throws SQLException;
+
+    /**
+     * Returns a ResultSetMetaData containing data from the ResultSet that is
+     * produced when the PreparedStatement is invoked.
+     * <p>
+     * It is possible to know the Metadata for the ResultSet without executing
+     * the PreparedStatement, because the PreparedStatement is precompiled. As a
+     * result the Metadata can be queried ahead of time without actually
+     * executing the statement.
+     * 
+     * @return a ResultSetMetaData object with the information about the columns
+     *         of the ResultSet, if the driver can return a ResultSetMetaData.
+     *         null otherwise.
+     * @throws SQLException
+     *             if there is a database error
+     */
+    public ResultSetMetaData getMetaData() throws SQLException;
+
+    /**
+     * Gets information about the parameters of the PreparedStatement.
+     * 
+     * @return a ParameterMetaData object which holds information about the
+     *         number, type and properties of the parameters of this
+     *         PreparedStatement.
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public ParameterMetaData getParameterMetaData() throws SQLException;
+
+    /**
+     * Sets the value of a specified parameter to the supplied Array object.
+     * 
+     * @param parameterIndex
+     *            the parameter number index, where the first parameter has
+     *            index 1
+     * @param theArray
+     *            a java.sql.Array holing the data to set.
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void setArray(int parameterIndex, Array theArray)
+            throws SQLException;
+
+    /**
+     * Sets the value of a specified parameter to the content of a supplied
+     * InputStream, which has a specified number of bytes.
+     * <p>
+     * This is a good method for setting an SQL LONVARCHAR parameter where the
+     * length of the data is large. Data is read from the InputStream until
+     * end-of-file is reached or the specified number of bytes is copied.
+     * 
+     * @param parameterIndex
+     *            the parameter number index, where the first parameter has
+     *            index 1
+     * @param theInputStream
+     *            the ASCII InputStream carrying the data to update the
+     *            parameter
+     * @param length
+     *            the number of bytes in the InputStream to copy to the
+     *            parameter
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void setAsciiStream(int parameterIndex, InputStream theInputStream,
+            int length) throws SQLException;
+
+    /**
+     * Sets the value of a specified parameter to a supplied
+     * java.math.BigDecimal value.
+     * 
+     * @param parameterIndex
+     *            the parameter number index, where the first parameter has
+     *            index 1
+     * @param theBigDecimal
+     *            the java.math.BigInteger value to set
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void setBigDecimal(int parameterIndex, BigDecimal theBigDecimal)
+            throws SQLException;
+
+    /**
+     * Sets the value of a specified parameter to the content of a supplied
+     * binary InputStream, which has a specified number of bytes.
+     * <p>
+     * Use this method when a large amount of data needs to be set into a
+     * LONGVARBINARY parameter.
+     * 
+     * @param parameterIndex
+     *            the parameter number index, where the first parameter has
+     *            index 1
+     * @param theInputStream
+     *            the binary InputStream carrying the data to update the
+     *            parameter
+     * @param length
+     *            the number of bytes in the InputStream to copy to the
+     *            parameter
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void setBinaryStream(int parameterIndex, InputStream theInputStream,
+            int length) throws SQLException;
+
+    /**
+     * Sets the value of a specified parameter to the given Blob object.
+     * 
+     * @param parameterIndex
+     *            the parameter number index, where the first parameter has
+     *            index 1
+     * @param theBlob
+     *            a java.sql.Blob holding the data to update the parameter
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void setBlob(int parameterIndex, Blob theBlob) throws SQLException;
+
+    /**
+     * Sets the value of a specified parameter to a supplied boolean value.
+     * 
+     * @param parameterIndex
+     *            the parameter number index, where the first parameter has
+     *            index 1
+     * @param theBoolean
+     *            the boolean value to update the parameter
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void setBoolean(int parameterIndex, boolean theBoolean)
+            throws SQLException;
+
+    /**
+     * Sets the value of a specified parameter to a supplied byte value.
+     * 
+     * @param parameterIndex
+     *            the parameter number index, where the first parameter has
+     *            index 1
+     * @param theByte
+     *            the byte value to update the parameter
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void setByte(int parameterIndex, byte theByte) throws SQLException;
+
+    /**
+     * Sets the value of a specified parameter to a supplied array of bytes. The
+     * array is mapped to a VARBINARY or LONGVARBINARY in the database.
+     * 
+     * @param parameterIndex
+     *            the parameter number index, where the first parameter has
+     *            index 1
+     * @param theBytes
+     *            the array of bytes to update the parameter
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void setBytes(int parameterIndex, byte[] theBytes)
+            throws SQLException;
+
+    /**
+     * Sets the value of a specified parameter to the character content of a
+     * Reader object, with the specified length of character data.
+     * 
+     * @param parameterIndex
+     *            the parameter number index, where the first parameter has
+     *            index 1
+     * @param reader
+     *            the java.io.Reader encompassing the character data
+     * @param length
+     *            the amount of characters to be read
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void setCharacterStream(int parameterIndex, Reader reader, int length)
+            throws SQLException;
+
+    /**
+     * Sets the value of a specified parameter to the given Clob object.
+     * 
+     * @param parameterIndex
+     *            the parameter number index, where the first parameter has
+     *            index 1
+     * @param theClob
+     *            a java.sql.Clob holding the data to update the parameter
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void setClob(int parameterIndex, Clob theClob) throws SQLException;
+
+    /**
+     * Sets the value of a specified parameter to a supplied java.sql.Date
+     * value.
+     * 
+     * @param parameterIndex
+     *            the parameter number index, where the first parameter has
+     *            index 1
+     * @param theDate
+     *            a java.sql.Date to update the parameter
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void setDate(int parameterIndex, Date theDate) throws SQLException;
+
+    /**
+     * Sets the value of a specified parameter to a supplied java.sql.Date
+     * value, using a supplied Calendar to map the Date. The Calendar allows the
+     * application to control the timezone used to compute the SQL DATE in the
+     * database - without the supplied Calendar, the driver uses the default
+     * timezone of the Java virtual machine.
+     * 
+     * @param parameterIndex
+     *            the parameter number index, where the first parameter has
+     *            index 1
+     * @param theDate
+     *            a java.sql.Date to update the parameter
+     * @param cal
+     *            a Calendar to use to construct the SQL DATE value
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void setDate(int parameterIndex, Date theDate, Calendar cal)
+            throws SQLException;
+
+    /**
+     * Sets the value of a specified parameter to a supplied double value.
+     * 
+     * @param parameterIndex
+     *            the parameter number index, where the first parameter has
+     *            index 1
+     * @param theDouble
+     *            the double value to update the parameter
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void setDouble(int parameterIndex, double theDouble)
+            throws SQLException;
+
+    /**
+     * Sets the value of a specified parameter to to a supplied float value.
+     * 
+     * @param parameterIndex
+     *            the parameter number index, where the first parameter has
+     *            index 1
+     * @param theFloat
+     *            the float value to update the parameter
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void setFloat(int parameterIndex, float theFloat)
+            throws SQLException;
+
+    /**
+     * Sets the value of a specified parameter to a supplied int value.
+     * 
+     * @param parameterIndex
+     *            the parameter number index, where the first parameter has
+     *            index 1
+     * @param theInt
+     *            the int value to update the parameter
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void setInt(int parameterIndex, int theInt) throws SQLException;
+
+    /**
+     * Sets the value of a specified parameter to a supplied long value.
+     * 
+     * @param parameterIndex
+     *            the parameter number index, where the first parameter has
+     *            index 1
+     * @param theLong
+     *            the long value to update the parameter
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void setLong(int parameterIndex, long theLong) throws SQLException;
+
+    /**
+     * Sets the value of a specified parameter to SQL NULL. Don't use this
+     * version of setNull for User Defined Types or for REF type parameters.
+     * 
+     * @param parameterIndex
+     *            the parameter number index, where the first parameter has
+     *            index 1
+     * @param sqlType
+     *            the SQL Type of the parameter, as defined in java.sql.Types
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void setNull(int parameterIndex, int sqlType) throws SQLException;
+
+    /**
+     * Sets the value of a specified parameter to SQL NULL. This version of
+     * setNull should be used for User Defined Types (UDTs) and also REF types.
+     * UDTs can be STRUCT, DISTINCT, JAVA_OBJECT and named array types.
+     * <p>
+     * Applications must provide the SQL Type code and also a fully qualified
+     * SQL Type name when supplying a NULL UDT or REF. For a UDT, the type name
+     * is the type name of the parameter itself, but for a REF parameter the
+     * type name is the type name of the referenced type.
+     * 
+     * @param paramIndex
+     *            the parameter number index, where the first parameter has
+     *            index 1
+     * @param sqlType
+     *            the SQL Type of the parameter, as defined in java.sql.Types
+     * @param typeName
+     *            the fully qualified name of a UDT or REF type - ignored if the
+     *            parameter is not a UDT.
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void setNull(int paramIndex, int sqlType, String typeName)
+            throws SQLException;
+
+    /**
+     * Sets the value of a specified parameter using a supplied object.
+     * <p>
+     * There is a standard mapping from Java types to SQL types, defined in the
+     * JDBC specification. The passed object is then transformed into the
+     * appropriate SQL type, and then transferred to the database. setObject can
+     * be used to pass abstract data types unique to the database, by using a
+     * JDBC driver specific Java type. If the object's class implements the
+     * interface SQLData, the JDBC driver calls <code>SQLData.writeSQL</code>
+     * to write it to the SQL data stream. If the object's class implements Ref,
+     * Blob, Clob, Struct, or Array, the driver passes it to the database as a
+     * value of the corresponding SQL type.
+     * 
+     * @param parameterIndex
+     *            the parameter number index, where the first parameter has
+     *            index 1
+     * @param theObject
+     *            the Object containing the value to update the parameter
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void setObject(int parameterIndex, Object theObject)
+            throws SQLException;
+
+    /**
+     * Sets the value of a specified parameter.
+     * <p>
+     * The Object is converted to the target SQL type before it is added to the
+     * database. If the Object is an instance of SQLData then SQLData.writeSQL
+     * is called to write out its data.
+     * </p>
+     * 
+     * @param parameterIndex
+     *            the parameter index, where the first parameter has index 1
+     * @param theObject
+     *            the Object containing the value to update the parameter
+     * @param targetSqlType
+     *            the SQL Type to send to the database, as defined in
+     *            java.sql.Types
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void setObject(int parameterIndex, Object theObject,
+            int targetSqlType) throws SQLException;
+
+    /**
+     * Sets the value of a specified parameter.
+     * <p>
+     * The Object is converted to the target SQL type before it is added to the
+     * database. If the Object is an instance of SQLData then SQLData.writeSQL
+     * is called to write out its data.
+     * </p>
+     * 
+     * @param parameterIndex
+     *            the parameter index, where the first parameter has index 1
+     * @param theObject
+     *            the Object containing the value to update the parameter
+     * @param targetSqlType
+     *            the SQL Type to send to the database, as defined in
+     *            java.sql.Types
+     * @param scale
+     *            the number of decimal places if the types is
+     *            java.sql.Types.DECIMAL or java.sql.Types.NUMERIC
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void setObject(int parameterIndex, Object theObject,
+            int targetSqlType, int scale) throws SQLException;
+
+    /**
+     * Sets the value of a specified parameter to a supplied REF(<structured-type>)
+     * value. This is stored as an SQL REF.
+     * 
+     * @param parameterIndex
+     *            the parameter number index, where the first parameter has
+     *            index 1
+     * @param theRef
+     *            a java.sql.Ref value to update the parameter
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void setRef(int parameterIndex, Ref theRef) throws SQLException;
+
+    /**
+     * Sets the value of a specified parameter to a supplied short value.
+     * 
+     * @param parameterIndex
+     *            the parameter number index, where the first parameter has
+     *            index 1
+     * @param theShort
+     *            a short value to update the parameter
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void setShort(int parameterIndex, short theShort)
+            throws SQLException;
+
+    /**
+     * Sets the value of a specified parameter to a supplied String.
+     * 
+     * @param parameterIndex
+     *            the parameter number index, where the first parameter has
+     *            index 1
+     * @param theString
+     *            a String value to update the parameter
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void setString(int parameterIndex, String theString)
+            throws SQLException;
+
+    /**
+     * Sets the value of a specified parameter to a supplied java.sql.Time
+     * value.
+     * 
+     * @param parameterIndex
+     *            the parameter number index, where the first parameter has
+     *            index 1
+     * @param theTime
+     *            a java.sql.Time value to update the parameter
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void setTime(int parameterIndex, Time theTime) throws SQLException;
+
+    /**
+     * Sets the value of a specified parameter to a supplied java.sql.Time
+     * value, using a supplied Calendar.
+     * <p>
+     * The driver uses the supplied Calendar to create the SQL TIME value, which
+     * allows it to use a custom timezone - otherwise the driver uses the
+     * default timezone of the Java virtual machine.
+     * 
+     * @param parameterIndex
+     *            the parameter number index, where the first parameter has
+     *            index 1
+     * @param theTime
+     *            a java.sql.Time value to update the parameter
+     * @param cal
+     *            a Calendar to use to construct the SQL TIME value
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void setTime(int parameterIndex, Time theTime, Calendar cal)
+            throws SQLException;
+
+    /**
+     * Sets the value of a specified parameter to a supplied java.sql.Timestamp
+     * value.
+     * 
+     * @param parameterIndex
+     *            the parameter number index, where the first parameter has
+     *            index 1
+     * @param theTimestamp
+     *            the java.sql.Timestamp value to update the parameter
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void setTimestamp(int parameterIndex, Timestamp theTimestamp)
+            throws SQLException;
+
+    /**
+     * Sets the value of a specified parameter to a supplied java.sql.Timestamp
+     * value, using the supplied Calendar.
+     * <p>
+     * The driver uses the supplied Calendar to create the SQL TIMESTAMP value,
+     * which allows it to use a custom timezone - otherwise the driver uses the
+     * default timezone of the Java virtual machine.
+     * 
+     * @param parameterIndex
+     *            the parameter number index, where the first parameter has
+     *            index 1
+     * @param theTimestamp
+     *            the java.sql.Timestamp value to update the parameter
+     * @param cal
+     *            a Calendar to use to construct the SQL TIMESTAMP value
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void setTimestamp(int parameterIndex, Timestamp theTimestamp,
+            Calendar cal) throws SQLException;
+
+    /**
+     * @deprecated Sets the value of a specified parameter to the characters
+     *             from a supplied InputStream, with a specified number of
+     *             bytes.
+     * @param parameterIndex
+     *            the parameter number index, where the first parameter has
+     *            index 1
+     * @param theInputStream
+     *            the InputStream with the character data to update the
+     *            parameter
+     * @param length
+     *            the number of bytes to read from the InputStream
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void setUnicodeStream(int parameterIndex,
+            InputStream theInputStream, int length) throws SQLException;
+
+    /**
+     * Sets the value of a specified parameter to a supplied java.net.URL.
+     * 
+     * @param parameterIndex
+     *            the parameter number index, where the first parameter has
+     *            index 1
+     * @param theURL
+     *            the URL to update the parameter
+     * @throws SQLException
+     *             if a database error happens
+     */
+    public void setURL(int parameterIndex, URL theURL) throws SQLException;
+}

Propchange: db/derby/code/trunk/java/stubs/jdbc3/java/sql/PreparedStatement.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/stubs/jdbc3/java/sql/Ref.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/stubs/jdbc3/java/sql/Ref.java?rev=724735&view=auto
==============================================================================
--- db/derby/code/trunk/java/stubs/jdbc3/java/sql/Ref.java (added)
+++ db/derby/code/trunk/java/stubs/jdbc3/java/sql/Ref.java Tue Dec  9 07:06:09 2008
@@ -0,0 +1,79 @@
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 java.sql;
+
+import java.util.Map;
+
+/**
+ * A manifestation of the SQL REF type - a reference to an SQL type contained in
+ * the database.
+ * <p>
+ * The SQL REF's are held in a table along with SQL structured types. Every REF
+ * has an individual identifier for each single instance. The SQL REF is used
+ * instead of the structured type it references.
+ * <p>
+ * A Ref object is stored into the database using the PreparedStatement.setRef
+ * method.
+ */
+public interface Ref {
+
+    /**
+     * Gets the fully-qualified SQL name of the SQL structured type that this
+     * Ref references.
+     * 
+     * @return the fully qualified name of the SQL structured type
+     * @throws SQLException
+     *             if there is a database error
+     */
+    public String getBaseTypeName() throws SQLException;
+
+    /**
+     * Gets the SQL structured type instance referenced by this Ref.
+     * 
+     * @return a Java object whose type is defined by the mapping for the SQL
+     *         structured type.
+     * @throws SQLException
+     *             if there is a database error
+     */
+    public Object getObject() throws SQLException;
+
+    /**
+     * Returns the associated object and uses the relevant mapping to convert it
+     * to a Java type.
+     * 
+     * @param map
+     *            a java.util.Map which contains the mapping to use
+     * @return a Java object whose type is defined by the mapping for the SQL
+     *         structured type.
+     * @throws SQLException
+     *             if there is a database error
+     */
+    public Object getObject(Map map) throws SQLException;
+
+    /**
+     * Sets the value of the structured typethat this Ref references to a
+     * supplied Object.
+     * 
+     * @param value
+     *            the Object representing the new SQL structured type that this
+     *            Ref will reference.
+     * @throws SQLException
+     *             if there is a database error
+     */
+    public void setObject(Object value) throws SQLException;
+}

Propchange: db/derby/code/trunk/java/stubs/jdbc3/java/sql/Ref.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message