db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r671940 [5/5] - in /db/derby/code/trunk: ./ java/stubs/ java/stubs/jsr169/ java/stubs/jsr169/java/ java/stubs/jsr169/java/sql/ java/stubs/jsr169/javax/ java/stubs/jsr169/javax/sql/ tools/ant/properties/
Date Thu, 26 Jun 2008 16:41:11 GMT
Added: db/derby/code/trunk/java/stubs/jsr169/javax/sql/RowSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/stubs/jsr169/javax/sql/RowSet.java?rev=671940&view=auto
==============================================================================
--- db/derby/code/trunk/java/stubs/jsr169/javax/sql/RowSet.java (added)
+++ db/derby/code/trunk/java/stubs/jsr169/javax/sql/RowSet.java Thu Jun 26 09:41:10 2008
@@ -0,0 +1,791 @@
+/* 
+ * 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 javax.sql;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Array;
+import java.sql.Blob;
+import java.sql.Clob;
+import java.sql.Date;
+import java.sql.Ref;
+import java.sql.Time;
+import java.sql.Timestamp;
+import java.util.Map;
+import java.io.InputStream;
+import java.io.Reader;
+import java.util.Calendar;
+import java.math.BigDecimal;
+
+/**
+ * A RowSet is an interface which provides access to data being sent from/to a
+ * database and which extends the functionality of ResultSet into a form that
+ * can be used as a JavaBeans component, perhaps being used in a visual
+ * programming environment.
+ * <p>
+ * Facilities are provided for get/set of properties relating to the Database
+ * and the SQL Command and for getting/setting data within the Rows represented
+ * by the RowSet. The RowSet supports JavaBeans events so that other components
+ * in an application can be informed when various changes happen to the RowSet,
+ * such as changes in data values.
+ * <p>
+ * RowSet is implemented as a layer on top of the remainder of the JDBC API. A
+ * RowSet may be <i>connected</i> where it maintains a connection to the
+ * database throughout its lifecycle. A RowSet may be <i>disconnected</i> where
+ * it establishes a connection to the database, gets data and then closes the
+ * connection. Updates to a disconnected RowSet can be made and later send back
+ * the changes to the database, but this requires the RowSet to first reconnect
+ * to the database before the changes are sent back.
+ * <p>
+ * Disconnected RowSets may make use of RowSetReaders to populate the RowSet
+ * with data, possibly from a non-relational database source. Disconnected
+ * RowSets may also use RowSetWriters to send data back to the underlying data
+ * store. There is considerable freedom in the way that RowSetReaders and
+ * RowSetWriters are implemented to get and store data.
+ */
+public interface RowSet extends ResultSet {
+
+    /**
+     * Registers a supplied RowSetListener with this RowSet. Once registered,
+     * the RowSetListener is notified of events generated by the RowSet.
+     * 
+     * @param theListener
+     *            an object which implements the <code>rowSetListener</code>
+     *            interface.
+     */
+    public void addRowSetListener(RowSetListener theListener);
+
+    /**
+     * Clears the parameters previously set for this RowSet.
+     * <p>
+     * Parameter values apply to repeated use of a RowSet object. Setting a new
+     * value for a parameter clears its previous value.
+     * <code>clearParameters</code> clears the values for all parameters with
+     * one method call.
+     * 
+     * @throws SQLException
+     *             if a problem occurs accessing the database
+     */
+    public void clearParameters() throws SQLException;
+
+    /**
+     * Fetches data for this RowSet. If successful, any existing data for the
+     * RowSet is discarded and the metadata for the rowset is set.
+     * <p>
+     * Data is retrieved connects to the database and executes a Command. This
+     * requires some or all of the following properties to be set: url, data
+     * source name, user name, password, transaction isolation, type map ; plus
+     * some or all of the properties: command, read only, maximum field size,
+     * maximum rows, escape processing, and query timeout.
+     * <p>
+     * The RowSet may use a RowSetReader to access the database - in this case a
+     * reader must be registered with the RowSet and the RowSet will then invoke
+     * the <code>readData</code> method on the reader to fetch the data.
+     * 
+     * @throws SQLException
+     *             if a problem occurs accessing the database or if the
+     *             properties needed to access the database have not been set
+     */
+    public void execute() throws SQLException;
+
+    /**
+     * Gets the RowSet's Command property.
+     * 
+     * @return a string containing the RowSet's Command property - this is an
+     *         SQL Query which can be executed to fetch data into the RowSet.
+     */
+    public String getCommand();
+
+    /**
+     * Gets the name of the datasource for this RowSet.
+     * 
+     * @return a String containing the name of the datasource.
+     */
+    public String getDataSourceName();
+
+    /**
+     * Reports if escape processing is enabled for this RowSet.
+     * <p>
+     * If <code>true</code> (the default) the driver will automatically
+     * perform escape code processing on SQL statements prior to them being sent
+     * to the database.
+     * 
+     * @return true if escape processing is enabled, false otherwise.
+     * @throws SQLException
+     *             if a problem occurs accessing the database
+     */
+    public boolean getEscapeProcessing() throws SQLException;
+
+    /**
+     * Gets the maximum number of bytes that can be returned for column values
+     * which are of types BINARY, VARBINARY, LONGVARBINARYBINARY, CHAR, VARCHAR,
+     * or LONGVARCHAR. Excess data is silently discarded if the number is
+     * exceeded.
+     * 
+     * @return the current maximum size in bytes. 0 means no limit
+     * @throws SQLException
+     *             if a problem occurs accessing the database
+     */
+    public int getMaxFieldSize() throws SQLException;
+
+    /**
+     * Gets the maximum number of rows for this RowSet. Excess rows are
+     * discarded silently if the limit is exceeded.
+     * 
+     * @return the previous maximum number of rows. 0 implies no limit.
+     * @throws SQLException
+     *             if a problem occurs accessing the database
+     */
+    public int getMaxRows() throws SQLException;
+
+    /**
+     * Gets the value of the password property for this RowSet. This property is
+     * used when making a connection to the database and should be set before
+     * invoking the <code>execute</code> method.
+     * 
+     * @return a String containing the value of the password property.
+     */
+    public String getPassword();
+
+    /**
+     * Gets the Timeout for the driver when executing a Query operation.
+     * <p>
+     * If a Query takes longer than the Timeout, an exception is thrown.
+     * 
+     * @return the Timeout value in seconds.
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public int getQueryTimeout() throws SQLException;
+
+    /**
+     * Gets the transaction isolation property setting for this RowSet.
+     * 
+     * @return an integer holding the current transaction isolation setting. One
+     *         of: one of Connection.TRANSACTION_READ_UNCOMMITTED,
+     *         Connection.TRANSACTION_READ_COMMITTED,
+     *         Connection.TRANSACTION_REPEATABLE_READ,
+     *         Connection.TRANSACTION_SERIALIZABLE
+     */
+    public int getTransactionIsolation();
+
+    /**
+     * Gets the custom mapping of SQL types for this RowSet, if any.
+     * 
+     * @return a Map holding the custom mappings of SQL types to Java classes
+     *         for this RowSet. By default, the Map is empty.
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public Map getTypeMap() throws SQLException;
+
+    /**
+     * Gets the value of the Username property for this RowSet. The Username is
+     * used when establishing a connection to the database and should be set
+     * before the <code>execute</code> method is invoked.
+     * 
+     * @return a String holing the value of the Username property.
+     */
+    public String getUsername();
+
+    /**
+     * Reports if this RowSet is read only.
+     * 
+     * @return true if this RowSet is read only, false if it is updateable.
+     */
+    public boolean isReadOnly();
+
+    /**
+     * Removes a specified RowSetListener object from the set of listeners which
+     * will be notified of events by this RowSet.
+     * 
+     * @param theListener
+     *            the RowSetListener to remove from the set of listeners for
+     *            this RowSet.
+     */
+    public void removeRowSetListener(RowSetListener theListener);
+
+
+    /**
+     * Sets the value of the specified parameter in the RowSet command with the
+     * ASCII data in the supplied java.io.InputStream value. Data is read from
+     * the InputStream until end-of-file is reached.
+     * 
+     * @param parameterIndex
+     *            index of the parameter to set, where the first parameter has
+     *            index = 1.
+     * @param theInputStream
+     *            an InputStream containing the ASCII data to set into the
+     *            parameter value
+     * @param length
+     *            the length of the data in bytes
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setAsciiStream(int parameterIndex, InputStream theInputStream,
+            int length) throws SQLException;
+
+    /**
+     * Sets the value of the specified parameter in the RowSet command with the
+     * binary data in the supplied java.io.InputStream value. Data is read from
+     * the InputStream until end-of-file is reached.
+     * 
+     * @param parameterIndex
+     *            index of the parameter to set, where the first parameter has
+     *            index = 1.
+     * @param theInputStream
+     *            an InputStream containing the binary data to set into the
+     *            parameter value
+     * @param length
+     *            the length of the data in bytes
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setBinaryStream(int parameterIndex, InputStream theInputStream,
+            int length) throws SQLException;
+
+    /**
+     * Sets the value of the specified parameter in the RowSet command with the
+     * value of a supplied java.sql.Blob.
+     * 
+     * @param parameterIndex
+     *            index of the parameter to set, where the first parameter has
+     *            index = 1.
+     * @param theBlob
+     *            the Blob value to set
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setBlob(int parameterIndex, Blob theBlob) throws SQLException;
+
+    /**
+     * Sets the value of the specified parameter in the RowSet command to the
+     * supplied boolean.
+     * 
+     * @param parameterIndex
+     *            index of the parameter to set, where the first parameter has
+     *            index = 1.
+     * @param theBoolean
+     *            the boolean value to set
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setBoolean(int parameterIndex, boolean theBoolean)
+            throws SQLException;
+
+    /**
+     * Sets the value of the specified parameter in the RowSet command to the
+     * supplied byte value.
+     * 
+     * @param parameterIndex
+     *            index of the parameter to set, where the first parameter has
+     *            index = 1.
+     * @param theByte
+     *            the byte value to set
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setByte(int parameterIndex, byte theByte) throws SQLException;
+
+    /**
+     * Sets the value of the specified parameter in the RowSet command to the
+     * supplied byte array value.
+     * 
+     * @param parameterIndex
+     *            index of the parameter to set, where the first parameter has
+     *            index = 1.
+     * @param theByteArray
+     *            the array of bytes to set into the parameter.
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setBytes(int parameterIndex, byte[] theByteArray)
+            throws SQLException;
+
+    /**
+     * Sets the value of the specified parameter in the RowSet command to the
+     * sequence of Unicode characters carried by the supplied java.io.Reader.
+     * 
+     * @param parameterIndex
+     *            index of the parameter to set, where the first parameter has
+     *            index = 1.
+     * @param theReader
+     *            the Reader which contains the Unicode data to set into the
+     *            parameter
+     * @param length
+     *            the length of the data in the Reader in characters
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setCharacterStream(int parameterIndex, Reader theReader,
+            int length) throws SQLException;
+
+    /**
+     * Sets the value of the specified parameter in the RowSet command with the
+     * value of a supplied java.sql.Clob.
+     * 
+     * @param parameterIndex
+     *            index of the parameter to set, where the first parameter has
+     *            index = 1.
+     * @param theClob
+     *            the Clob value to set
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setClob(int parameterIndex, Clob theClob) throws SQLException;
+
+    /**
+     * Sets the Command property for this RowSet - the command is an SQL Query
+     * which runs when the <code>execute</code> method is invoked. This
+     * property is optional for datasources that do not support commands.
+     * 
+     * @param cmd
+     *            a String containing the SQL Query. Can be null.
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setCommand(String cmd) throws SQLException;
+
+    /**
+     * Sets the concurrency property of this RowSet. The default value is
+     * ResultSet.CONCUR_READ_ONLY.
+     * 
+     * @param concurrency
+     *            the new concurrency value - one of: ResultSet.CONCUR_READ_ONLY
+     *            or ResultSet.CONCUR_UPDATABLE
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setConcurrency(int concurrency) throws SQLException;
+
+    /**
+     * Sets the Data Source Name property for the RowSet.
+     * <p>
+     * The Data Source Name can be used to find a <code>DataSource</code>
+     * which has been registered with a naming service - the DataSource can then
+     * be used to create a connection to the database.
+     * 
+     * @param name
+     *            a String with the new Data Source Name.
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setDataSourceName(String name) throws SQLException;
+
+    /**
+     * Sets the value of the specified parameter in the RowSet command with the
+     * value of a supplied java.sql.Date.
+     * 
+     * @param parameterIndex
+     *            index of the parameter to set, where the first parameter has
+     *            index = 1.
+     * @param theDate
+     *            the Date to use
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setDate(int parameterIndex, Date theDate) throws SQLException;
+
+    /**
+     * Sets the value of the specified parameter in the RowSet command with the
+     * value of a supplied java.sql.Date, where the conversion of the Date to an
+     * SQL DATE value is calculated using a supplied Calendar.
+     * 
+     * @param parameterIndex
+     *            index of the parameter to set, where the first parameter has
+     *            index = 1.
+     * @param theDate
+     *            the Date to use
+     * @param theCalendar
+     *            the Calendar to use in converting the Date to an SQL DATE
+     *            value
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setDate(int parameterIndex, Date theDate, Calendar theCalendar)
+            throws SQLException;
+
+    /**
+     * Sets the value of the specified parameter in the RowSet command with the
+     * supplied double.
+     * 
+     * @param parameterIndex
+     *            index of the parameter to set, where the first parameter has
+     *            index = 1.
+     * @param theDouble
+     *            the double value to set
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setDouble(int parameterIndex, double theDouble)
+            throws SQLException;
+
+    /**
+     * Sets the Escape Processing status for this RowSet. If escape processing
+     * is on, the driver performs escape substitution before sending an SQL
+     * command to the database. The default value for escape processing is on.
+     * 
+     * @param enable
+     *            true to enable Escape Processing, false to turn it off.
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setEscapeProcessing(boolean enable) throws SQLException;
+
+    /**
+     * Sets the value of the specified parameter in the RowSet command with the
+     * supplied float.
+     * 
+     * @param parameterIndex
+     *            index of the parameter to set, where the first parameter has
+     *            index = 1.
+     * @param theFloat
+     *            the float value to set
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setFloat(int parameterIndex, float theFloat)
+            throws SQLException;
+
+    /**
+     * Sets the value of the specified parameter in the RowSet command with the
+     * supplied integer.
+     * 
+     * @param parameterIndex
+     *            index of the parameter to set, where the first parameter has
+     *            index = 1.
+     * @param theInteger
+     *            the integer value to set
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setInt(int parameterIndex, int theInteger) throws SQLException;
+
+    /**
+     * Sets the value of the specified parameter in the RowSet command with the
+     * supplied long.
+     * 
+     * @param parameterIndex
+     *            index of the parameter to set, where the first parameter has
+     *            index = 1.
+     * @param theLong
+     *            the long value to set
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setLong(int parameterIndex, long theLong) throws SQLException;
+
+    /**
+     * Sets the maximum number of bytes which can be returned for a column value
+     * where the column type BINARY, VARBINARY, LONGVARBINARYBINARY, CHAR,
+     * VARCHAR, or LONGVARCHAR. Data which exceeds this limit is silently
+     * discarded. For portability, a value greater than 256 is recommended.
+     * 
+     * @param max
+     *            the maximum size of the returned column value in bytes. 0
+     *            means unlimited.
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setMaxFieldSize(int max) throws SQLException;
+
+    /**
+     * Sets the maximum number of rows which can be held by the RowSet. Any
+     * additional rows are silently discarded.
+     * 
+     * @param max
+     *            the maximum number of rows which can be held in the RowSet. 0
+     *            means no limit.
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setMaxRows(int max) throws SQLException;
+
+    /**
+     * Sets the value of the specified parameter in the RowSet command to SQL
+     * NULL.
+     * 
+     * @param parameterIndex
+     *            index of the parameter to set, where the first parameter has
+     *            index = 1.
+     * @param sqlType
+     *            the type of the parameter, as defined by java.sql.Types.
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setNull(int parameterIndex, int sqlType) throws SQLException;
+
+    /**
+     * Sets the value of the specified parameter in the RowSet command to SQL
+     * NULL. This form of the <code>setNull</code> method should be used for
+     * User Defined Types and REF parameters.
+     * 
+     * @param parameterIndex
+     *            index of the parameter to set, where the first parameter has
+     *            index = 1.
+     * @param sqlType
+     *            the type of the parameter, as defined by java.sql.Types.
+     * @param typeName
+     *            the fully qualified name of an SQL User Defined Type or the
+     *            name of the SQL structured type referenced by a REF type.
+     *            Ignored if the sqlType is not a UDT or REF type.
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setNull(int parameterIndex, int sqlType, String typeName)
+            throws SQLException;
+
+    /**
+     * Sets the value of the specified parameter in the RowSet command to a
+     * supplied Java object.
+     * <p>
+     * The JDBC specification provides a standard mapping for Java objects to
+     * SQL data types. Database specific types can be mapped by JDBC driver
+     * specific Java types.
+     * 
+     * @param parameterIndex
+     *            index of the parameter to set, where the first parameter has
+     *            index = 1.
+     * @param theObject
+     *            the Java object containing the data value.
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setObject(int parameterIndex, Object theObject)
+            throws SQLException;
+
+    /**
+     * Sets the value of the specified parameter in the RowSet command to a
+     * supplied Java object.
+     * 
+     * @param parameterIndex
+     *            index of the parameter to set, where the first parameter has
+     *            index = 1.
+     * @param theObject
+     *            the Java object containing the data value.
+     * @param targetSqlType
+     *            the SQL type to send to the database, as defined in
+     *            java.sql.Types.
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setObject(int parameterIndex, Object theObject,
+            int targetSqlType) throws SQLException;
+
+    /**
+     * Sets the value of the specified parameter in the RowSet command to a
+     * supplied Java object.
+     * 
+     * @param parameterIndex
+     *            index of the parameter to set, where the first parameter has
+     *            index = 1.
+     * @param theObject
+     *            the Java object containing the data value.
+     * @param targetSqlType
+     *            the SQL type to send to the database, as defined in
+     *            java.sql.Types.
+     * @param scale
+     *            the number of digits after the decimal point, for
+     *            java.sql.Types.DECIMAL and java.sql.Types.NUMERIC types.
+     *            Ignored for all other types.
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setObject(int parameterIndex, Object theObject,
+            int targetSqlType, int scale) throws SQLException;
+
+    /**
+     * Sets the database Password for this RowSet.
+     * 
+     * @param password
+     *            a string holding the new password
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setPassword(String password) throws SQLException;
+
+    /**
+     * Sets the Timeout value for this RowSet. The timeout is the maximum time
+     * that the driver will wait while executing a command - after this time, an
+     * SQLException is thrown.
+     * 
+     * @param seconds
+     *            the number of seconds for the Timeout.
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setQueryTimeout(int seconds) throws SQLException;
+
+    /**
+     * Sets whether the RowSet is read only or is updateable.
+     * 
+     * @param readOnly
+     *            true to set the RowSet to readonly state, false to allow
+     *            updates.
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setReadOnly(boolean readOnly) throws SQLException;
+
+    /**
+     * Sets the value of the specified parameter in the RowSet command to a
+     * supplied short integer.
+     * 
+     * @param parameterIndex
+     *            index of the parameter to set, where the first parameter has
+     *            index = 1.
+     * @param theShort
+     *            the short value to set
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setShort(int parameterIndex, short theShort)
+            throws SQLException;
+
+    /**
+     * Sets the value of the specified parameter in the RowSet command to a
+     * supplied String. The String is placed into the database as a VARCHAR or
+     * LONGVARCHAR SQL value, depending on the database limits for the length of
+     * VARCHAR values.
+     * 
+     * @param parameterIndex
+     *            index of the parameter to set, where the first parameter has
+     *            index = 1.
+     * @param theString
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setString(int parameterIndex, String theString)
+            throws SQLException;
+
+    /**
+     * Sets the value of the specified parameter in the RowSet command to a
+     * supplied java.sql.Time, converting to an SQL TIME value using the system
+     * default Calendar.
+     * 
+     * @param parameterIndex
+     *            index of the parameter to set, where the first parameter has
+     *            index = 1.
+     * @param theTime
+     *            the Time value to set
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setTime(int parameterIndex, Time theTime) throws SQLException;
+
+    /**
+     * Sets the value of the specified parameter in the RowSet command to a
+     * supplied java.sql.Time, converting to an SQL TIME value using a supplied
+     * Calendar.
+     * 
+     * @param parameterIndex
+     *            index of the parameter to set, where the first parameter has
+     *            index = 1.
+     * @param theTime
+     *            the Time value to set
+     * @param theCalendar
+     *            the Calendar to use in the conversion operation
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setTime(int parameterIndex, Time theTime, Calendar theCalendar)
+            throws SQLException;
+
+    /**
+     * Sets the value of the specified parameter in the RowSet command to a
+     * supplied java.sql.Timestamp, converting to an SQL TIMESTAMP value using
+     * the system default Calendar.
+     * 
+     * @param parameterIndex
+     *            index of the parameter to set, where the first parameter has
+     *            index = 1.
+     * @param theTimestamp
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setTimestamp(int parameterIndex, Timestamp theTimestamp)
+            throws SQLException;
+
+    /**
+     * Sets the value of the specified parameter in the RowSet command to a
+     * supplied java.sql.Timestamp converting to an SQL TIMESTAMP value using a
+     * supplied Calendar.
+     * 
+     * @param parameterIndex
+     *            index of the parameter to set, where the first parameter has
+     *            index = 1.
+     * @param theTimestamp
+     * @param theCalendar
+     *            the Calendar to use in the conversion operation
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setTimestamp(int parameterIndex, Timestamp theTimestamp,
+            Calendar theCalendar) throws SQLException;
+
+    /**
+     * Updates the target instance's transaction isolation level to one of a
+     * discrete set of possible values.
+     * 
+     * @param level
+     *            the new transaction isolation level. One of:
+     *            Connection.TRANSACTION_READ_UNCOMMITTED,
+     *            Connection.TRANSACTION_READ_COMMITTED,
+     *            Connection.TRANSACTION_REPEATABLE_READ, or
+     *            Connection.TRANSACTION_SERIALIZABLE
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setTransactionIsolation(int level) throws SQLException;
+
+    /**
+     * Sets the type of this RowSet. By default, the type is non-scrollable.
+     * 
+     * @param type
+     *            the new type for the RowSet. One of:
+     *            ResultSet.TYPE_FORWARD_ONLY,
+     *            ResultSet.TYPE_SCROLL_INSENSITIVE, or
+     *            ResultSet.TYPE_SCROLL_SENSITIVE
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setType(int type) throws SQLException;
+
+    /**
+     * Sets the Map used to map SQL User Defined Types to Java classes.
+     * 
+     * @param theTypeMap
+     *            a Map which defines the names of SQL UDTs and the Java classes
+     *            to which they are mapped.
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setTypeMap(Map theTypeMap)
+            throws SQLException;
+
+    /**
+     * Sets the Username property for the RowSet, used to authenticate a
+     * connection to the database.
+     * 
+     * @param theUsername
+     *            a String containing the User Name
+     * @throws SQLException
+     *             if an error occurs accessing the database.
+     */
+    public void setUsername(String theUsername) throws SQLException;
+}

Added: db/derby/code/trunk/java/stubs/jsr169/javax/sql/RowSetEvent.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/stubs/jsr169/javax/sql/RowSetEvent.java?rev=671940&view=auto
==============================================================================
--- db/derby/code/trunk/java/stubs/jsr169/javax/sql/RowSetEvent.java (added)
+++ db/derby/code/trunk/java/stubs/jsr169/javax/sql/RowSetEvent.java Thu Jun 26 09:41:10 2008
@@ -0,0 +1,53 @@
+/* 
+ * 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 javax.sql;
+
+import java.util.EventObject;
+import java.io.Serializable;
+
+/**
+ * An event which is sent when specific events happen to a RowSet object. The
+ * events are sent to inform registered listeners that changes have occurred to
+ * the RowSet. The events covered are:
+ * <ol>
+ * <li>A single row in the RowSet changes</li>
+ * <li>The whole set of data in the RowSet changes</li>
+ * <li>The RowSet cursor position changes</li>
+ * </ol>
+ * The event contains a reference to the RowSet object which generated the
+ * message so that the listeners can extract whatever information they need from
+ * that reference.
+ * 
+ */
+public class RowSetEvent extends EventObject implements Serializable {
+
+    private static final long serialVersionUID = -1875450876546332005L;
+
+    /**
+     * Creates a RowSetEvent object containing a reference to the RowSet object
+     * that generated the event. Information about the changes that have
+     * occurred to the RowSet can be extracted from the RowSet using one or more
+     * of the query methods available on the RowSet.
+     * 
+     * @param theSource
+     *            the RowSet which generated the event
+     */
+    public RowSetEvent(RowSet theSource) {
+        super(theSource);
+    }
+}

Added: db/derby/code/trunk/java/stubs/jsr169/javax/sql/RowSetInternal.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/stubs/jsr169/javax/sql/RowSetInternal.java?rev=671940&view=auto
==============================================================================
--- db/derby/code/trunk/java/stubs/jsr169/javax/sql/RowSetInternal.java (added)
+++ db/derby/code/trunk/java/stubs/jsr169/javax/sql/RowSetInternal.java Thu Jun 26 09:41:10 2008
@@ -0,0 +1,86 @@
+/* 
+ * 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 javax.sql;
+
+import java.sql.SQLException;
+import java.sql.Connection;
+import java.sql.ResultSet;
+
+/**
+ * An interface provided by a RowSet object to either a RowSetReader or a
+ * RowSetWriter, providing facilities to read and update the internal state of
+ * the RowSet.
+ */
+public interface RowSetInternal {
+
+    /**
+     * Gets the Connection associated with this RowSet object.
+     * 
+     * @return the Connection
+     * @throws SQLException
+     *             if there is a problem accessing the database.
+     */
+    public Connection getConnection() throws SQLException;
+
+    /**
+     * Gets the ResultSet that was the original (unmodified) content of the
+     * RowSet.
+     * <p>
+     * The ResultSet cursor is positioned before the first row of data
+     * 
+     * @return the ResultSet that contained the original data value of the
+     *         RowSet
+     * @throws SQLException
+     *             if there is a problem accessing the database.
+     */
+    public ResultSet getOriginal() throws SQLException;
+
+    /**
+     * Gets the original value of the current row only. If the current row did
+     * not have an original value, then an empty value is returned.
+     * 
+     * @return a ResultSet containing the value of the current row only.
+     * @throws SQLException
+     *             if there is a problem accessing the database, or if the
+     *             cursor is not on a valid row (before first, after last or
+     *             pointing to the insert row).
+     */
+    public ResultSet getOriginalRow() throws SQLException;
+
+    /**
+     * Gets the parameter values that have been set for this RowSet's command.
+     * 
+     * @return an Object array containing the values of parameters that have
+     *         been set.
+     * @throws SQLException
+     *             if there is a problem accessing the database.
+     */
+    public Object[] getParams() throws SQLException;
+
+    /**
+     * Sets RowSetMetaData for this RowSet. The RowSetMetaData is used by a
+     * RowSetReader to set values giving information about the RowSet's columns.
+     * 
+     * @param theMetaData
+     *            a RowSetMetaData holding the metadata about the RowSet's
+     *            columns.
+     * @throws SQLException
+     *             if there is a problem accessing the database.
+     */
+    public void setMetaData(RowSetMetaData theMetaData) throws SQLException;
+}

Added: db/derby/code/trunk/java/stubs/jsr169/javax/sql/RowSetListener.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/stubs/jsr169/javax/sql/RowSetListener.java?rev=671940&view=auto
==============================================================================
--- db/derby/code/trunk/java/stubs/jsr169/javax/sql/RowSetListener.java (added)
+++ db/derby/code/trunk/java/stubs/jsr169/javax/sql/RowSetListener.java Thu Jun 26 09:41:10 2008
@@ -0,0 +1,62 @@
+/* 
+ * 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 javax.sql;
+
+import java.util.EventListener;
+
+/**
+ * An interface used to send notification of events occurring in a RowSet. To
+ * receive the notification events, an object must implement the RowSetListener
+ * interface and then register itself with the RowSet of interest using the
+ * <code>RowSet.addRowSetListener</code> method.
+ */
+public interface RowSetListener extends EventListener {
+
+    /**
+     * Notifies the listener that one of the RowSet's rows has changed.
+     * 
+     * @param theEvent
+     *            a RowSetEvent that contains information about the RowSet
+     *            involved. This information can be used to retrieve information
+     *            about the change, such as the new cursor position.
+     */
+    public void cursorMoved(RowSetEvent theEvent);
+
+    /**
+     * Notifies the listener that the RowSet's cursor has moved.
+     * 
+     * @param theEvent
+     *            theEvent a RowSetEvent that contains information about the
+     *            RowSet involved. This information can be used to retrieve
+     *            information about the change, such as the updated data values.
+     */
+    public void rowChanged(RowSetEvent theEvent);
+
+    /**
+     * Notifies the listener that the RowSet's entire contents have been updated
+     * (an example is the execution of a command which retrieves new data from
+     * the database).
+     * 
+     * @param theEvent
+     *            theEvent a RowSetEvent that contains information about the
+     *            RowSet involved. This information can be used to retrieve
+     *            information about the change, such as the updated rows of
+     *            data.
+     */
+    public void rowSetChanged(RowSetEvent theEvent);
+}

Added: db/derby/code/trunk/java/stubs/jsr169/javax/sql/RowSetMetaData.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/stubs/jsr169/javax/sql/RowSetMetaData.java?rev=671940&view=auto
==============================================================================
--- db/derby/code/trunk/java/stubs/jsr169/javax/sql/RowSetMetaData.java (added)
+++ db/derby/code/trunk/java/stubs/jsr169/javax/sql/RowSetMetaData.java Thu Jun 26 09:41:10 2008
@@ -0,0 +1,283 @@
+/* 
+ * 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 javax.sql;
+
+import java.sql.ResultSetMetaData;
+import java.sql.SQLException;
+
+/**
+ * An interface which provides facilities for getting information about the
+ * columns in a RowSet.
+ * <p>
+ * RowSetMetaData extends ResultSetMetaData, adding new operations for carrying
+ * out value sets.
+ * <p>
+ * Application code would not normally call this interface directly. It would be
+ * called internally when <code>RowSet.execute</code> is called.
+ */
+public interface RowSetMetaData extends ResultSetMetaData {
+
+    /**
+     * Sets automatic numbering for a specified column in the RowSet. If
+     * automatic numbering is on, the column is read only. The default value is
+     * for automatic numbering to be off.
+     * 
+     * @param columnIndex
+     *            the index number for the column, where the first column has
+     *            index 1.
+     * @param autoIncrement
+     *            true to set automatic numbering on, false to turn it off.
+     * @throws SQLException
+     *             if a problem occurs accessing the database
+     */
+    public void setAutoIncrement(int columnIndex, boolean autoIncrement)
+            throws SQLException;
+
+    /**
+     * Sets the case sensitive property for a specified column in the RowSet.
+     * The default is that the column is not case sensitive.
+     * 
+     * @param columnIndex
+     *            the index number for the column, where the first column has
+     *            index 1.
+     * @param caseSensitive
+     *            true to make the column case sensitive, false to make it not
+     *            case sensitive.
+     * @throws SQLException
+     *             if a problem occurs accessing the database
+     */
+    public void setCaseSensitive(int columnIndex, boolean caseSensitive)
+            throws SQLException;
+
+    /**
+     * Sets the Catalog Name for a specified column in the RowSet.
+     * 
+     * @param columnIndex
+     *            the index number for the column, where the first column has
+     *            index 1.
+     * @param catalogName
+     *            a string containing the new Catalog Name
+     * @throws SQLException
+     *             if a problem occurs accessing the database
+     */
+    public void setCatalogName(int columnIndex, String catalogName)
+            throws SQLException;
+
+    /**
+     * Sets the number of columns in the Row Set.
+     * 
+     * @param columnCount
+     *            an integer containing the number of columns in the RowSet.
+     * @throws SQLException
+     *             if a problem occurs accessing the database
+     */
+    public void setColumnCount(int columnCount) throws SQLException;
+
+    /**
+     * Sets the normal maximum width in characters for a specified column in the
+     * RowSet.
+     * 
+     * @param columnIndex
+     *            the index number for the column, where the first column has
+     *            index 1.
+     * @param displaySize
+     *            an integer with the normal maximum column width in characters
+     * @throws SQLException
+     *             if a problem occurs accessing the database
+     */
+    public void setColumnDisplaySize(int columnIndex, int displaySize)
+            throws SQLException;
+
+    /**
+     * 
+     * @param columnIndex
+     *            the index number for the column, where the first column has
+     *            index 1.
+     * @param theLabel
+     * @throws SQLException
+     *             if a problem occurs accessing the database
+     */
+    public void setColumnLabel(int columnIndex, String theLabel)
+            throws SQLException;
+
+    /**
+     * Sets the suggested column label for a specified column in the RowSet.
+     * This label is typically used in displaying or printing the column.
+     * 
+     * @param columnIndex
+     *            the index number for the column, where the first column has
+     *            index 1.
+     * @param theColumnName
+     *            a string containing the column label
+     * @throws SQLException
+     *             if a problem occurs accessing the database
+     */
+    public void setColumnName(int columnIndex, String theColumnName)
+            throws SQLException;
+
+    /**
+     * Sets the SQL type for a specified column in the RowSet
+     * 
+     * @param columnIndex
+     *            the index number for the column, where the first column has
+     *            index 1.
+     * @param theSQLType
+     *            an integer containing the SQL Type, as defined by
+     *            java.sql.Types.
+     * @throws SQLException
+     *             if a problem occurs accessing the database
+     */
+    public void setColumnType(int columnIndex, int theSQLType)
+            throws SQLException;
+
+    /**
+     * Sets the Type Name for a specified column in the RowSet, where the data
+     * type is specific to the datasource.
+     * 
+     * @param columnIndex
+     *            the index number for the column, where the first column has
+     *            index 1.
+     * @param theTypeName
+     *            a string containing the Type Name for the column
+     * @throws SQLException
+     *             if a problem occurs accessing the database
+     */
+    public void setColumnTypeName(int columnIndex, String theTypeName)
+            throws SQLException;
+
+    /**
+     * Sets whether a specified column is a currency value.
+     * 
+     * @param columnIndex
+     *            the index number for the column, where the first column has
+     *            index 1.
+     * @param isCurrency
+     *            true if the column should be treated as a currency value,
+     *            false if it should not be treated as a currency value.
+     * @throws SQLException
+     *             if a problem occurs accessing the database
+     */
+    public void setCurrency(int columnIndex, boolean isCurrency)
+            throws SQLException;
+
+    /**
+     * Sets whether a specified column can contain SQL NULL values.
+     * 
+     * @param columnIndex
+     *            the index number for the column, where the first column has
+     *            index 1.
+     * @param nullability
+     *            an integer which is one of the following values:
+     *            ResultSetMetaData.columnNoNulls,
+     *            ResultSetMetaData.columnNullable, or
+     *            ResultSetMetaData.columnNullableUnknown
+     *            <p>
+     *            The default value is ResultSetMetaData.columnNullableUnknown
+     * @throws SQLException
+     *             if a problem occurs accessing the database
+     */
+    public void setNullable(int columnIndex, int nullability)
+            throws SQLException;
+
+    /**
+     * Sets the number of decimal digits for a specified column in the RowSet.
+     * 
+     * @param columnIndex
+     *            the index number for the column, where the first column has
+     *            index 1.
+     * @param thePrecision
+     *            an integer containing the number of decimal digits
+     * @throws SQLException
+     *             if a problem occurs accessing the database
+     */
+    public void setPrecision(int columnIndex, int thePrecision)
+            throws SQLException;
+
+    /**
+     * For the column specified by <code>columnIndex</code> declares how many
+     * digits there should be after a decimal point.
+     * 
+     * @param columnIndex
+     *            the index number for the column, where the first column has
+     *            index 1.
+     * @param theScale
+     *            an integer containing the number of digits after the decimal
+     *            point
+     * @throws SQLException
+     *             if a problem occurs accessing the database
+     */
+    public void setScale(int columnIndex, int theScale) throws SQLException;
+
+    /**
+     * Sets the Schema Name for a specified column in the RowSet
+     * 
+     * @param columnIndex
+     *            the index number for the column, where the first column has
+     *            index 1.
+     * @param theSchemaName
+     *            a String containing the schema name
+     * @throws SQLException
+     *             if a problem occurs accessing the database
+     */
+    public void setSchemaName(int columnIndex, String theSchemaName)
+            throws SQLException;
+
+    /**
+     * Sets whether a specified column can be used in a search involving a WHERE
+     * clause. The default value is false.
+     * 
+     * @param columnIndex
+     *            the index number for the column, where the first column has
+     *            index 1.
+     * @param isSearchable
+     *            true of the column can be used in a WHERE clause search, false
+     *            otherwise.
+     * @throws SQLException
+     *             if a problem occurs accessing the database
+     */
+    public void setSearchable(int columnIndex, boolean isSearchable)
+            throws SQLException;
+
+    /**
+     * Sets if a specified column can contain signed numbers
+     * 
+     * @param columnIndex
+     *            the index number for the column, where the first column has
+     *            index 1.
+     * @param isSigned
+     *            true if the column can contain signed numbers, false otherwise
+     * @throws SQLException
+     *             if a problem occurs accessing the database
+     */
+    public void setSigned(int columnIndex, boolean isSigned)
+            throws SQLException;
+
+    /**
+     * Sets the Table Name for a specified column in the RowSet
+     * 
+     * @param columnIndex
+     *            the index number for the column, where the first column has
+     *            index 1.
+     * @param theTableName
+     *            a String containing the Table Name for the column
+     * @throws SQLException
+     *             if a problem occurs accessing the database
+     */
+    public void setTableName(int columnIndex, String theTableName)
+            throws SQLException;
+}

Added: db/derby/code/trunk/java/stubs/jsr169/javax/sql/RowSetReader.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/stubs/jsr169/javax/sql/RowSetReader.java?rev=671940&view=auto
==============================================================================
--- db/derby/code/trunk/java/stubs/jsr169/javax/sql/RowSetReader.java (added)
+++ db/derby/code/trunk/java/stubs/jsr169/javax/sql/RowSetReader.java Thu Jun 26 09:41:10 2008
@@ -0,0 +1,50 @@
+/* 
+ * 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 javax.sql;
+
+import java.sql.SQLException;
+
+/**
+ * An interface which provides functionality for a disconnected RowSet to get
+ * data from a data source into its rows. The RowSet calls the RowSetReader
+ * interface when the RowSet's execute method is invoked - a RowSetReader must
+ * first be registered with the RowSet for this to work.
+ */
+public interface RowSetReader {
+
+    /**
+     * Reads new data into the RowSet. The calling RowSet object must itself
+     * implement the RowSetInternal interface and the RowSetReader must be
+     * registered as a Reader on the RowSet.
+     * <p>
+     * This method adds rows into the calling RowSet. The Reader may invoke any
+     * of the RowSet's methods except for the <code>execute</code> method
+     * (calling execute will cause an SQLException to be thrown). However, when
+     * the Reader calls the RowSet's methods, no events are sent to listeners -
+     * any listeners are informed by the calling RowSet's execute method once
+     * the Reader returns from the readData method.
+     * 
+     * @param theCaller
+     *            must be the calling RowSet object, which must have implemented
+     *            the RowSetInternal interface.
+     * @throws SQLException
+     *             if a problem occurs accessing the database or if the Reader
+     *             calls the RowSet.execute method.
+     */
+    public void readData(RowSetInternal theCaller) throws SQLException;
+}

Added: db/derby/code/trunk/java/stubs/jsr169/javax/sql/RowSetWriter.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/stubs/jsr169/javax/sql/RowSetWriter.java?rev=671940&view=auto
==============================================================================
--- db/derby/code/trunk/java/stubs/jsr169/javax/sql/RowSetWriter.java (added)
+++ db/derby/code/trunk/java/stubs/jsr169/javax/sql/RowSetWriter.java Thu Jun 26 09:41:10 2008
@@ -0,0 +1,52 @@
+/* 
+ * 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 javax.sql;
+
+import java.sql.SQLException;
+
+/**
+ * An interface which provides functionality for a disconnected RowSet to put
+ * data updates back to the data source from which the RowSet was originally
+ * populated. An object implementing this interface is called a Writer.
+ * <p>
+ * The Writer must establish a connection to the RowSet's data source before
+ * writing the data. The RowSet calling this interface must implement the
+ * RowSetInternal interface.
+ * <p>
+ * The Writer may encounter a situation where the updated data being written
+ * back to the data source has already been updated in the data source. How a
+ * conflict of this kind is handled is determined by the implementation of the
+ * Writer.
+ */
+public interface RowSetWriter {
+
+    /**
+     * Writes changes in the RowSet associated with this RowSetWriter back to
+     * its data source.
+     * 
+     * @param theRowSet
+     *            the RowSet object. This RowSet must a) Implement the
+     *            RowSetInternal interface and b) have have this RowSetWriter
+     *            registered with it and c) must call this method internally
+     * @return true if the modified data was written, false otherwise (which
+     *         typically implies some form of conflict)
+     * @throws SQLException
+     *             if a problem occurs accessing the database
+     */
+    public boolean writeData(RowSetInternal theRowSet) throws SQLException;
+}

Modified: db/derby/code/trunk/tools/ant/properties/dirs.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/ant/properties/dirs.properties?rev=671940&r1=671939&r2=671940&view=diff
==============================================================================
--- db/derby/code/trunk/tools/ant/properties/dirs.properties (original)
+++ db/derby/code/trunk/tools/ant/properties/dirs.properties Thu Jun 26 09:41:10 2008
@@ -42,6 +42,9 @@
 jarsdist.dir=${basedir}/jars
 metadata.out.dir=${out.dir}/org/apache/derby/impl/jdbc
 
+out.stubs.dir=${out.dir}/stubs
+out.jsr169.dir=${out.stubs.dir}/jsr169
+
 #
 # OpenSource dirs
 #
@@ -49,6 +52,10 @@
 derby.dir=org/apache/derby
 derbysrc.dir=${basedir}/java
 
+derby.stubs.dir=${derbysrc.dir}/stubs
+derby.jsr169.src.dir=${derby.stubs.dir}/jsr169
+
+derby.engine.src.dir=${derbysrc.dir}/engine
 derby.engine.src.dir=${derbysrc.dir}/engine
 derby.drda.src.dir=${derbysrc.dir}/drda
 derby.client.src.dir=${derbysrc.dir}/client



Mime
View raw message