*/ void setBlob(String parameterName, InputStream inputStream, long length) throws SQLException; /** * Sets the designated parameter to the given <code>java.sql.Blob</code> object. * The driver converts this to an SQL <code>BLOB</code> value when it * sends it to the database. * * @param parameterName the name of the parameter * @param x a <code>Blob</code> object that maps an SQL <code>BLOB</code> value * @exception SQLException if a database access error occurs or * this method is called on a closed <code>CallableStatement</code> * @exception SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ void setBlob (String parameterName, Blob x) throws SQLException; /** * Sets the designated parameter to a <code>InputStream</code> object. * This method differs from the <code>setBinaryStream (int, InputStream)</code> * method because it informs the driver that the parameter value should be * sent to the server as a <code>BLOB</code>. When the <code>setBinaryStream</code> method is used, * the driver may have to do extra work to determine whether the parameter * data should be send to the server as a <code>LONGVARBINARY</code> or a <code>BLOB</code> * * <P><B>Note:</B> Consult your JDBC driver documentation to determine if * it might be more efficient to use a version of * <code>setBlob</code> which takes a length parameter. * * @param parameterName the name of the parameter * @param inputStream An object that contains the data to set the parameter * value to. * @throws SQLException if a database access error occurs or * this method is called on a closed <code>CallableStatement</code> * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * * @since 1.6 */ void setBlob(String parameterName, InputStream inputStream) throws SQLException; /** * Sets the designated parameter in this <code>RowSet</code> object's command * with the given <code>Clob</code> value. The driver will convert this * to the <code>CLOB</code> value that the <code>Clob</code> object * represents before sending it to the database. * * @param i the first parameter is 1, the second is 2, ... * @param x an object representing a CLOB * @exception SQLException if a database access error occurs */ void setClob (int i, Clob x) throws SQLException; /** * Sets the designated parameter to a <code>Reader</code> object. The reader must contain the number * of characters specified by length otherwise a <code>SQLException</code> will be * generated when the <code>PreparedStatement</code> is executed. *This method differs from the <code>setCharacterStream (int, Reader, int)</code> method * because it informs the driver that the parameter value should be sent to * the server as a <code>CLOB</code>. When the <code>setCharacterStream</code> method is used, the * driver may have to do extra work to determine whether the parameter * data should be sent to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code> * @param parameterIndex index of the first parameter is 1, the second is 2, ... * @param reader An object that contains the data to set the parameter value to. * @param length the number of characters in the parameter data. * @throws SQLException if a database access error occurs, this method is called on * a closed <code>PreparedStatement</code>, if parameterIndex does not correspond to a parameter * marker in the SQL statement, or if the length specified is less than zero. * * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @since 1.6 */ void setClob(int parameterIndex, Reader reader, long length) throws SQLException; /** * Sets the designated parameter to a <code>Reader</code> object. * This method differs from the <code>setCharacterStream (int, Reader)</code> method * because it informs the driver that the parameter value should be sent to * the server as a <code>CLOB</code>. When the <code>setCharacterStream</code> method is used, the * driver may have to do extra work to determine whether the parameter * data should be sent to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code> * * <P><B>Note:</B> Consult your JDBC driver documentation to determine if * it might be more efficient to use a version of * <code>setClob</code> which takes a length parameter. * * @param parameterIndex index of the first parameter is 1, the second is 2, ... * @param reader An object that contains the data to set the parameter value to. * @throws SQLException if a database access error occurs, this method is called on * a closed <code>PreparedStatement</code>or if parameterIndex does not correspond to a parameter * marker in the SQL statement * * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @since 1.6 */ void setClob(int parameterIndex, Reader reader) throws SQLException; /** * Sets the designated parameter to a <code>Reader</code> object. The <code>reader</code> must contain the number * of characters specified by length otherwise a <code>SQLException</code> will be * generated when the <code>CallableStatement</code> is executed. * This method differs from the <code>setCharacterStream (int, Reader, int)</code> method * because it informs the driver that the parameter value should be sent to * the server as a <code>CLOB</code>. When the <code>setCharacterStream</code> method is used, the * driver may have to do extra work to determine whether the parameter * data should be send to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code> * @param parameterName the name of the parameter to be set * @param reader An object that contains the data to set the parameter value to. * @param length the number of characters in the parameter data. * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if the length specified is less than zero; * a database access error occurs or * this method is called on a closed <code>CallableStatement</code> * @exception SQLFeatureNotSupportedException if the JDBC driver does not support * this method * * @since 1.6 */ void setClob(String parameterName, Reader reader, long length) throws SQLException; /** * Sets the designated parameter to the given <code>java.sql.Clob</code> object. * The driver converts this to an SQL <code>CLOB</code> value when it * sends it to the database. * * @param parameterName the name of the parameter * @param x a <code>Clob</code> object that maps an SQL <code>CLOB</code> value * @exception SQLException if a database access error occurs or * this method is called on a closed <code>CallableStatement</code> * @exception SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ void setClob (String parameterName, Clob x) throws SQLException; /** * Sets the designated parameter to a <code>Reader</code> object. * This method differs from the <code>setCharacterStream (int, Reader)</code> method * because it informs the driver that the parameter value should be sent to * the server as a <code>CLOB</code>. When the <code>setCharacterStream</code> method is used, the * driver may have to do extra work to determine whether the parameter * data should be send to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code> * * <P><B>Note:</B> Consult your JDBC driver documentation to determine if * it might be more efficient to use a version of * <code>setClob</code> which takes a length parameter. * * @param parameterName the name of the parameter * @param reader An object that contains the data to set the parameter value to. * @throws SQLException if a database access error occurs or this method is called on * a closed <code>CallableStatement</code> * * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @since 1.6 */ void setClob(String parameterName, Reader reader) throws SQLException; /** * Sets the designated parameter in this <code>RowSet</code> object's command * with the given <code>Array</code> value. The driver will convert this * to the <code>ARRAY</code> value that the <code>Array</code> object * represents before sending it to the database. * * @param i the first parameter is 1, the second is 2, ... * @param x an object representing an SQL array * @exception SQLException if a database access error occurs */ void setArray (int i, Array x) throws SQLException; /** * Sets the designated parameter in this <code>RowSet</code> object's command * with the given <code>java.sql.Date</code> value. The driver will convert this * to an SQL <code>DATE</code> value, using the given <code>java.util.Calendar</code> * object to calculate the date. * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value * @param cal the <code>java.util.Calendar</code> object to use for calculating the date * @exception SQLException if a database access error occurs */ void setDate(int parameterIndex, java.sql.Date x, Calendar cal) throws SQLException; /** * Sets the designated parameter to the given <code>java.sql.Date</code> value * using the default time zone of the virtual machine that is running * the application. * The driver converts this * to an SQL <code>DATE</code> value when it sends it to the database. * * @param parameterName the name of the parameter * @param x the parameter value * @exception SQLException if a database access error occurs or * this method is called on a closed <code>CallableStatement</code> * @exception SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getDate * @since 1.4 */ void setDate(String parameterName, java.sql.Date x) throws SQLException; /** * Sets the designated parameter to the given <code>java.sql.Date</code> value, * using the given <code>Calendar</code> object. The driver uses * the <code>Calendar</code> object to construct an SQL <code>DATE</code> value, * which the driver then sends to the database. With a * a <code>Calendar</code> object, the driver can calculate the date * taking into account a custom timezone. If no * <code>Calendar</code> object is specified, the driver uses the default * timezone, which is that of the virtual machine running the application. * * @param parameterName the name of the parameter * @param x the parameter value * @param cal the <code>Calendar</code> object the driver will use * to construct the date * @exception SQLException if a database access error occurs or * this method is called on a closed <code>CallableStatement</code> * @exception SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getDate * @since 1.4 */ void setDate(String parameterName, java.sql.Date x, Calendar cal) throws SQLException; /** * Sets the designated parameter in this <code>RowSet</code> object's command * with the given <code>java.sql.Time</code> value. The driver will convert this * to an SQL <code>TIME</code> value, using the given <code>java.util.Calendar</code> * object to calculate it, before sending it to the database. * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value * @param cal the <code>java.util.Calendar</code> object to use for calculating the time * @exception SQLException if a database access error occurs */ void setTime(int parameterIndex, java.sql.Time x, Calendar cal) throws SQLException; /** * Sets the designated parameter to the given <code>java.sql.Time</code> value. * The driver converts this * to an SQL <code>TIME</code> value when it sends it to the database. * * @param parameterName the name of the parameter * @param x the parameter value * @exception SQLException if a database access error occurs or * this method is called on a closed <code>CallableStatement</code> * @exception SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getTime * @since 1.4 */ void setTime(String parameterName, java.sql.Time x) throws SQLException; /** * Sets the designated parameter to the given <code>java.sql.Time</code> value, * using the given <code>Calendar</code> object. The driver uses * the <code>Calendar</code> object to construct an SQL <code>TIME</code> value, * which the driver then sends to the database. With a * a <code>Calendar</code> object, the driver can calculate the time * taking into account a custom timezone. If no * <code>Calendar</code> object is specified, the driver uses the default * timezone, which is that of the virtual machine running the application. * * @param parameterName the name of the parameter * @param x the parameter value * @param cal the <code>Calendar</code> object the driver will use * to construct the time * @exception SQLException if a database access error occurs or * this method is called on a closed <code>CallableStatement</code> * @exception SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getTime * @since 1.4 */ void setTime(String parameterName, java.sql.Time x, Calendar cal) throws SQLException; /** * Sets the designated parameter in this <code>RowSet</code> object's command * with the given <code>java.sql.Timestamp</code> value. The driver will * convert this to an SQL <code>TIMESTAMP</code> value, using the given * <code>java.util.Calendar</code> object to calculate it, before sending it to the * database. * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value * @param cal the <code>java.util.Calendar</code> object to use for calculating the * timestamp * @exception SQLException if a database access error occurs */ void setTimestamp(int parameterIndex, java.sql.Timestamp x, Calendar cal) throws SQLException; /** * Sets the designated parameter to the given <code>java.sql.Timestamp</code> value, * using the given <code>Calendar</code> object. The driver uses * the <code>Calendar</code> object to construct an SQL <code>TIMESTAMP</code> value, * which the driver then sends to the database. With a * a <code>Calendar</code> object, the driver can calculate the timestamp * taking into account a custom timezone. If no * <code>Calendar</code> object is specified, the driver uses the default * timezone, which is that of the virtual machine running the application. * * @param parameterName the name of the parameter * @param x the parameter value * @param cal the <code>Calendar</code> object the driver will use * to construct the timestamp * @exception SQLException if a database access error occurs or * this method is called on a closed <code>CallableStatement</code> * @exception SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getTimestamp * @since 1.4 */ void setTimestamp(String parameterName, java.sql.Timestamp x, Calendar cal) throws SQLException; /** * Clears the parameters set for this <code>RowSet</code> object's command. * <P>In general, parameter values remain in force for repeated use of a * <code>RowSet</code> object. Setting a parameter value automatically clears its * previous value. However, in some cases it is useful to immediately * release the resources used by the current parameter values, which can * be done by calling the method <code>clearParameters</code>. * * @exception SQLException if a database access error occurs */ void clearParameters() throws SQLException; //--------------------------------------------------------------------- // Reading and writing data //--------------------------------------------------------------------- /** * Fills this <code>RowSet</code> object with data. * <P> * The <code>execute</code> method may use the following properties * to create a connection for reading data: url, data source name, * user name, password, transaction isolation, and type map. * * The <code>execute</code> method may use the following properties * to create a statement to execute a command: * command, read only, maximum field size, * maximum rows, escape processing, and query timeout. * <P> * If the required properties have not been set, an exception is * thrown. If this method is successful, the current contents of the rowset are * discarded and the rowset's metadata is also (re)set. If there are * outstanding updates, they are ignored. * <P> * If this <code>RowSet</code> object does not maintain a continuous connection * with its source of data, it may use a reader (a <code>RowSetReader</code> * object) to fill itself with data. In this case, a reader will have been * registered with this <code>RowSet</code> object, and the method * <code>execute</code> will call on the reader's <code>readData</code> * method as part of its implementation. * * @exception SQLException if a database access error occurs or any of the * properties necessary for making a connection and creating * a statement have not been set */ void execute() throws SQLException; //-------------------------------------------------------------------- // Events //-------------------------------------------------------------------- /** * Registers the given listener so that it will be notified of events * that occur on this <code>RowSet</code> object. * * @param listener a component that has implemented the <code>RowSetListener</code> * interface and wants to be notified when events occur on this * <code>RowSet</code> object * @see #removeRowSetListener */ void addRowSetListener(RowSetListener listener); /** * Removes the specified listener from the list of components that will be * notified when an event occurs on this <code>RowSet</code> object. * * @param listener a component that has been registered as a listener for this * <code>RowSet</code> object * @see #addRowSetListener */ void removeRowSetListener(RowSetListener listener); /** * Sets the designated parameter to the given <code>java.sql.SQLXML</code> object. The driver converts this to an * SQL <code>XML</code> value when it sends it to the database. * @param parameterIndex index of the first parameter is 1, the second is 2, ... * @param xmlObject a <code>SQLXML</code> object that maps an SQL <code>XML</code> value * @throws SQLException if a database access error occurs, this method * is called on a closed result set, * the <code>java.xml.transform.Result</code>, * <code>Writer</code> or <code>OutputStream</code> has not been closed * for the <code>SQLXML</code> object or * if there is an error processing the XML value. The <code>getCause</code> method * of the exception may provide a more detailed exception, for example, if the * stream does not contain valid XML. * @since 1.6 */ void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException; /** * Sets the designated parameter to the given <code>java.sql.SQLXML</code> object. The driver converts this to an * <code>SQL XML</code> value when it sends it to the database. * @param parameterName the name of the parameter * @param xmlObject a <code>SQLXML</code> object that maps an <code>SQL XML</code> value * @throws SQLException if a database access error occurs, this method * is called on a closed result set, * the <code>java.xml.transform.Result</code>, * <code>Writer</code> or <code>OutputStream</code> has not been closed * for the <code>SQLXML</code> object or * if there is an error processing the XML value. The <code>getCause</code> method * of the exception may provide a more detailed exception, for example, if the * stream does not contain valid XML. * @since 1.6 */ void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException; /** * Sets the designated parameter to the given <code>java.sql.RowId</code> object. The * driver converts this to a SQL <code>ROWID</code> value when it sends it * to the database * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value * @throws SQLException if a database access error occurs * * @since 1.6 */ void setRowId(int parameterIndex, RowId x) throws SQLException; /** * Sets the designated parameter to the given <code>java.sql.RowId</code> object. The * driver converts this to a SQL <code>ROWID</code> when it sends it to the * database. * * @param parameterName the name of the parameter * @param x the parameter value * @throws SQLException if a database access error occurs * @since 1.6 */ void setRowId(String parameterName, RowId x) throws SQLException; /** * Sets the designated paramter to the given <code>String</code> object. * The driver converts this to a SQL <code>NCHAR</code> or * <code>NVARCHAR</code> or <code>LONGNVARCHAR</code> value * (depending on the argument's * size relative to the driver's limits on <code>NVARCHAR</code> values) * when it sends it to the database. * * @param parameterIndex of the first parameter is 1, the second is 2, ... * @param value the parameter value * @throws SQLException if the driver does not support national * character sets; if the driver can detect that a data conversion * error could occur ; or if a database access error occurs * @since 1.6 */ void setNString(int parameterIndex, String value) throws SQLException; /** * Sets the designated paramter to the given <code>String</code> object. * The driver converts this to a SQL <code>NCHAR</code> or * <code>NVARCHAR</code> or <code>LONGNVARCHAR</code> * @param parameterName the name of the column to be set * @param value the parameter value * @throws SQLException if the driver does not support national * character sets; if the driver can detect that a data conversion * error could occur; or if a database access error occurs * @since 1.6 */ public void setNString(String parameterName, String value) throws SQLException; /** * Sets the designated parameter to a <code>Reader</code> object. The * <code>Reader</code> reads the data till end-of-file is reached. The * driver does the necessary conversion from Java character format to * the national character set in the database. * @param parameterIndex of the first parameter is 1, the second is 2, ... * @param value the parameter value * @param length the number of characters in the parameter data. * @throws SQLException if the driver does not support national * character sets; if the driver can detect that a data conversion * error could occur ; or if a database access error occurs * @since 1.6Lines 1501–2000 of 2186. Previous lines Load more
*/ void setBlob(String parameterName, InputStream inputStream, long length) throws SQLException; /** * Sets the designated parameter to the given <code>java.sql.Blob</code> object. * The driver converts this to an SQL <code>BLOB</code> value when it * sends it to the database. * * @param parameterName the name of the parameter * @param x a <code>Blob</code> object that maps an SQL <code>BLOB</code> value * @exception SQLException if a database access error occurs or * this method is called on a closed <code>CallableStatement</code> * @exception SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ void setBlob (String parameterName, Blob x) throws SQLException; /** * Sets the designated parameter to a <code>InputStream</code> object. * This method differs from the <code>setBinaryStream (int, InputStream)</code> * method because it informs the driver that the parameter value should be * sent to the server as a <code>BLOB</code>. When the <code>setBinaryStream</code> method is used, * the driver may have to do extra work to determine whether the parameter * data should be send to the server as a <code>LONGVARBINARY</code> or a <code>BLOB</code> * * <P><B>Note:</B> Consult your JDBC driver documentation to determine if * it might be more efficient to use a version of * <code>setBlob</code> which takes a length parameter. * * @param parameterName the name of the parameter * @param inputStream An object that contains the data to set the parameter * value to. * @throws SQLException if a database access error occurs or * this method is called on a closed <code>CallableStatement</code> * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * * @since 1.6 */ void setBlob(String parameterName, InputStream inputStream) throws SQLException; /** * Sets the designated parameter in this <code>RowSet</code> object's command * with the given <code>Clob</code> value. The driver will convert this * to the <code>CLOB</code> value that the <code>Clob</code> object * represents before sending it to the database. * * @param i the first parameter is 1, the second is 2, ... * @param x an object representing a CLOB * @exception SQLException if a database access error occurs */ void setClob (int i, Clob x) throws SQLException; /** * Sets the designated parameter to a <code>Reader</code> object. The reader must contain the number * of characters specified by length otherwise a <code>SQLException</code> will be * generated when the <code>PreparedStatement</code> is executed. *This method differs from the <code>setCharacterStream (int, Reader, int)</code> method * because it informs the driver that the parameter value should be sent to * the server as a <code>CLOB</code>. When the <code>setCharacterStream</code> method is used, the * driver may have to do extra work to determine whether the parameter * data should be sent to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code> * @param parameterIndex index of the first parameter is 1, the second is 2, ... * @param reader An object that contains the data to set the parameter value to. * @param length the number of characters in the parameter data. * @throws SQLException if a database access error occurs, this method is called on * a closed <code>PreparedStatement</code>, if parameterIndex does not correspond to a parameter * marker in the SQL statement, or if the length specified is less than zero. * * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @since 1.6 */ void setClob(int parameterIndex, Reader reader, long length) throws SQLException; /** * Sets the designated parameter to a <code>Reader</code> object. * This method differs from the <code>setCharacterStream (int, Reader)</code> method * because it informs the driver that the parameter value should be sent to * the server as a <code>CLOB</code>. When the <code>setCharacterStream</code> method is used, the * driver may have to do extra work to determine whether the parameter * data should be sent to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code> * * <P><B>Note:</B> Consult your JDBC driver documentation to determine if * it might be more efficient to use a version of * <code>setClob</code> which takes a length parameter. * * @param parameterIndex index of the first parameter is 1, the second is 2, ... * @param reader An object that contains the data to set the parameter value to. * @throws SQLException if a database access error occurs, this method is called on * a closed <code>PreparedStatement</code>or if parameterIndex does not correspond to a parameter * marker in the SQL statement * * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @since 1.6 */ void setClob(int parameterIndex, Reader reader) throws SQLException; /** * Sets the designated parameter to a <code>Reader</code> object. The <code>reader</code> must contain the number * of characters specified by length otherwise a <code>SQLException</code> will be * generated when the <code>CallableStatement</code> is executed. * This method differs from the <code>setCharacterStream (int, Reader, int)</code> method * because it informs the driver that the parameter value should be sent to * the server as a <code>CLOB</code>. When the <code>setCharacterStream</code> method is used, the * driver may have to do extra work to determine whether the parameter * data should be send to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code> * @param parameterName the name of the parameter to be set * @param reader An object that contains the data to set the parameter value to. * @param length the number of characters in the parameter data. * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if the length specified is less than zero; * a database access error occurs or * this method is called on a closed <code>CallableStatement</code> * @exception SQLFeatureNotSupportedException if the JDBC driver does not support * this method * * @since 1.6 */ void setClob(String parameterName, Reader reader, long length) throws SQLException; /** * Sets the designated parameter to the given <code>java.sql.Clob</code> object. * The driver converts this to an SQL <code>CLOB</code> value when it * sends it to the database. * * @param parameterName the name of the parameter * @param x a <code>Clob</code> object that maps an SQL <code>CLOB</code> value * @exception SQLException if a database access error occurs or * this method is called on a closed <code>CallableStatement</code> * @exception SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ void setClob (String parameterName, Clob x) throws SQLException; /** * Sets the designated parameter to a <code>Reader</code> object. * This method differs from the <code>setCharacterStream (int, Reader)</code> method * because it informs the driver that the parameter value should be sent to * the server as a <code>CLOB</code>. When the <code>setCharacterStream</code> method is used, the * driver may have to do extra work to determine whether the parameter * data should be send to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code> * * <P><B>Note:</B> Consult your JDBC driver documentation to determine if * it might be more efficient to use a version of * <code>setClob</code> which takes a length parameter. * * @param parameterName the name of the parameter * @param reader An object that contains the data to set the parameter value to. * @throws SQLException if a database access error occurs or this method is called on * a closed <code>CallableStatement</code> * * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @since 1.6 */ void setClob(String parameterName, Reader reader) throws SQLException; /** * Sets the designated parameter in this <code>RowSet</code> object's command * with the given <code>Array</code> value. The driver will convert this * to the <code>ARRAY</code> value that the <code>Array</code> object * represents before sending it to the database. * * @param i the first parameter is 1, the second is 2, ... * @param x an object representing an SQL array * @exception SQLException if a database access error occurs */ void setArray (int i, Array x) throws SQLException; /** * Sets the designated parameter in this <code>RowSet</code> object's command * with the given <code>java.sql.Date</code> value. The driver will convert this * to an SQL <code>DATE</code> value, using the given <code>java.util.Calendar</code> * object to calculate the date. * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value * @param cal the <code>java.util.Calendar</code> object to use for calculating the date * @exception SQLException if a database access error occurs */ void setDate(int parameterIndex, java.sql.Date x, Calendar cal) throws SQLException; /** * Sets the designated parameter to the given <code>java.sql.Date</code> value * using the default time zone of the virtual machine that is running * the application. * The driver converts this * to an SQL <code>DATE</code> value when it sends it to the database. * * @param parameterName the name of the parameter * @param x the parameter value * @exception SQLException if a database access error occurs or * this method is called on a closed <code>CallableStatement</code> * @exception SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getDate * @since 1.4 */ void setDate(String parameterName, java.sql.Date x) throws SQLException; /** * Sets the designated parameter to the given <code>java.sql.Date</code> value, * using the given <code>Calendar</code> object. The driver uses * the <code>Calendar</code> object to construct an SQL <code>DATE</code> value, * which the driver then sends to the database. With a * a <code>Calendar</code> object, the driver can calculate the date * taking into account a custom timezone. If no * <code>Calendar</code> object is specified, the driver uses the default * timezone, which is that of the virtual machine running the application. * * @param parameterName the name of the parameter * @param x the parameter value * @param cal the <code>Calendar</code> object the driver will use * to construct the date * @exception SQLException if a database access error occurs or * this method is called on a closed <code>CallableStatement</code> * @exception SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getDate * @since 1.4 */ void setDate(String parameterName, java.sql.Date x, Calendar cal) throws SQLException; /** * Sets the designated parameter in this <code>RowSet</code> object's command * with the given <code>java.sql.Time</code> value. The driver will convert this * to an SQL <code>TIME</code> value, using the given <code>java.util.Calendar</code> * object to calculate it, before sending it to the database. * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value * @param cal the <code>java.util.Calendar</code> object to use for calculating the time * @exception SQLException if a database access error occurs */ void setTime(int parameterIndex, java.sql.Time x, Calendar cal) throws SQLException; /** * Sets the designated parameter to the given <code>java.sql.Time</code> value. * The driver converts this * to an SQL <code>TIME</code> value when it sends it to the database. * * @param parameterName the name of the parameter * @param x the parameter value * @exception SQLException if a database access error occurs or * this method is called on a closed <code>CallableStatement</code> * @exception SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getTime * @since 1.4 */ void setTime(String parameterName, java.sql.Time x) throws SQLException; /** * Sets the designated parameter to the given <code>java.sql.Time</code> value, * using the given <code>Calendar</code> object. The driver uses * the <code>Calendar</code> object to construct an SQL <code>TIME</code> value, * which the driver then sends to the database. With a * a <code>Calendar</code> object, the driver can calculate the time * taking into account a custom timezone. If no * <code>Calendar</code> object is specified, the driver uses the default * timezone, which is that of the virtual machine running the application. * * @param parameterName the name of the parameter * @param x the parameter value * @param cal the <code>Calendar</code> object the driver will use * to construct the time * @exception SQLException if a database access error occurs or * this method is called on a closed <code>CallableStatement</code> * @exception SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getTime * @since 1.4 */ void setTime(String parameterName, java.sql.Time x, Calendar cal) throws SQLException; /** * Sets the designated parameter in this <code>RowSet</code> object's command * with the given <code>java.sql.Timestamp</code> value. The driver will * convert this to an SQL <code>TIMESTAMP</code> value, using the given * <code>java.util.Calendar</code> object to calculate it, before sending it to the * database. * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value * @param cal the <code>java.util.Calendar</code> object to use for calculating the * timestamp * @exception SQLException if a database access error occurs */ void setTimestamp(int parameterIndex, java.sql.Timestamp x, Calendar cal) throws SQLException; /** * Sets the designated parameter to the given <code>java.sql.Timestamp</code> value, * using the given <code>Calendar</code> object. The driver uses * the <code>Calendar</code> object to construct an SQL <code>TIMESTAMP</code> value, * which the driver then sends to the database. With a * a <code>Calendar</code> object, the driver can calculate the timestamp * taking into account a custom timezone. If no * <code>Calendar</code> object is specified, the driver uses the default * timezone, which is that of the virtual machine running the application. * * @param parameterName the name of the parameter * @param x the parameter value * @param cal the <code>Calendar</code> object the driver will use * to construct the timestamp * @exception SQLException if a database access error occurs or * this method is called on a closed <code>CallableStatement</code> * @exception SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getTimestamp * @since 1.4 */ void setTimestamp(String parameterName, java.sql.Timestamp x, Calendar cal) throws SQLException; /** * Clears the parameters set for this <code>RowSet</code> object's command. * <P>In general, parameter values remain in force for repeated use of a * <code>RowSet</code> object. Setting a parameter value automatically clears its * previous value. However, in some cases it is useful to immediately * release the resources used by the current parameter values, which can * be done by calling the method <code>clearParameters</code>. * * @exception SQLException if a database access error occurs */ void clearParameters() throws SQLException; //--------------------------------------------------------------------- // Reading and writing data //--------------------------------------------------------------------- /** * Fills this <code>RowSet</code> object with data. * <P> * The <code>execute</code> method may use the following properties * to create a connection for reading data: url, data source name, * user name, password, transaction isolation, and type map. * * The <code>execute</code> method may use the following properties * to create a statement to execute a command: * command, read only, maximum field size, * maximum rows, escape processing, and query timeout. * <P> * If the required properties have not been set, an exception is * thrown. If this method is successful, the current contents of the rowset are * discarded and the rowset's metadata is also (re)set. If there are * outstanding updates, they are ignored. * <P> * If this <code>RowSet</code> object does not maintain a continuous connection * with its source of data, it may use a reader (a <code>RowSetReader</code> * object) to fill itself with data. In this case, a reader will have been * registered with this <code>RowSet</code> object, and the method * <code>execute</code> will call on the reader's <code>readData</code> * method as part of its implementation. * * @exception SQLException if a database access error occurs or any of the * properties necessary for making a connection and creating * a statement have not been set */ void execute() throws SQLException; //-------------------------------------------------------------------- // Events //-------------------------------------------------------------------- /** * Registers the given listener so that it will be notified of events * that occur on this <code>RowSet</code> object. * * @param listener a component that has implemented the <code>RowSetListener</code> * interface and wants to be notified when events occur on this * <code>RowSet</code> object * @see #removeRowSetListener */ void addRowSetListener(RowSetListener listener); /** * Removes the specified listener from the list of components that will be * notified when an event occurs on this <code>RowSet</code> object. * * @param listener a component that has been registered as a listener for this * <code>RowSet</code> object * @see #addRowSetListener */ void removeRowSetListener(RowSetListener listener); /** * Sets the designated parameter to the given <code>java.sql.SQLXML</code> object. The driver converts this to an * SQL <code>XML</code> value when it sends it to the database. * @param parameterIndex index of the first parameter is 1, the second is 2, ... * @param xmlObject a <code>SQLXML</code> object that maps an SQL <code>XML</code> value * @throws SQLException if a database access error occurs, this method * is called on a closed result set, * the <code>java.xml.transform.Result</code>, * <code>Writer</code> or <code>OutputStream</code> has not been closed * for the <code>SQLXML</code> object or * if there is an error processing the XML value. The <code>getCause</code> method * of the exception may provide a more detailed exception, for example, if the * stream does not contain valid XML. * @since 1.6 */ void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException; /** * Sets the designated parameter to the given <code>java.sql.SQLXML</code> object. The driver converts this to an * <code>SQL XML</code> value when it sends it to the database. * @param parameterName the name of the parameter * @param xmlObject a <code>SQLXML</code> object that maps an <code>SQL XML</code> value * @throws SQLException if a database access error occurs, this method * is called on a closed result set, * the <code>java.xml.transform.Result</code>, * <code>Writer</code> or <code>OutputStream</code> has not been closed * for the <code>SQLXML</code> object or * if there is an error processing the XML value. The <code>getCause</code> method * of the exception may provide a more detailed exception, for example, if the * stream does not contain valid XML. * @since 1.6 */ void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException; /** * Sets the designated parameter to the given <code>java.sql.RowId</code> object. The * driver converts this to a SQL <code>ROWID</code> value when it sends it * to the database * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value * @throws SQLException if a database access error occurs * * @since 1.6 */ void setRowId(int parameterIndex, RowId x) throws SQLException; /** * Sets the designated parameter to the given <code>java.sql.RowId</code> object. The * driver converts this to a SQL <code>ROWID</code> when it sends it to the * database. * * @param parameterName the name of the parameter * @param x the parameter value * @throws SQLException if a database access error occurs * @since 1.6 */ void setRowId(String parameterName, RowId x) throws SQLException; /** * Sets the designated paramter to the given <code>String</code> object. * The driver converts this to a SQL <code>NCHAR</code> or * <code>NVARCHAR</code> or <code>LONGNVARCHAR</code> value * (depending on the argument's * size relative to the driver's limits on <code>NVARCHAR</code> values) * when it sends it to the database. * * @param parameterIndex of the first parameter is 1, the second is 2, ... * @param value the parameter value * @throws SQLException if the driver does not support national * character sets; if the driver can detect that a data conversion * error could occur ; or if a database access error occurs * @since 1.6 */ void setNString(int parameterIndex, String value) throws SQLException; /** * Sets the designated paramter to the given <code>String</code> object. * The driver converts this to a SQL <code>NCHAR</code> or * <code>NVARCHAR</code> or <code>LONGNVARCHAR</code> * @param parameterName the name of the column to be set * @param value the parameter value * @throws SQLException if the driver does not support national * character sets; if the driver can detect that a data conversion * error could occur; or if a database access error occurs * @since 1.6 */ public void setNString(String parameterName, String value) throws SQLException; /** * Sets the designated parameter to a <code>Reader</code> object. The * <code>Reader</code> reads the data till end-of-file is reached. The * driver does the necessary conversion from Java character format to * the national character set in the database. * @param parameterIndex of the first parameter is 1, the second is 2, ... * @param value the parameter value * @param length the number of characters in the parameter data. * @throws SQLException if the driver does not support national * character sets; if the driver can detect that a data conversion * error could occur ; or if a database access error occurs * @since 1.6