Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/javax/sql/RowSet.java
38829 views
/*1* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package javax.sql;2627import java.sql.*;28import java.io.*;29import java.math.*;30import java.util.*;3132/**33* The interface that adds support to the JDBC API for the34* JavaBeans™ component model.35* A rowset, which can be used as a JavaBeans component in36* a visual Bean development environment, can be created and37* configured at design time and executed at run time.38* <P>39* The <code>RowSet</code>40* interface provides a set of JavaBeans properties that allow a <code>RowSet</code>41* instance to be configured to connect to a JDBC data source and read42* some data from the data source. A group of setter methods (<code>setInt</code>,43* <code>setBytes</code>, <code>setString</code>, and so on)44* provide a way to pass input parameters to a rowset's command property.45* This command is the SQL query the rowset uses when it gets its data from46* a relational database, which is generally the case.47* <P>48* The <code>RowSet</code>49* interface supports JavaBeans events, allowing other components in an50* application to be notified when an event occurs on a rowset,51* such as a change in its value.52*53* <P>The <code>RowSet</code> interface is unique in that it is intended to be54* implemented using the rest of the JDBC API. In other words, a55* <code>RowSet</code> implementation is a layer of software that executes "on top"56* of a JDBC driver. Implementations of the <code>RowSet</code> interface can57* be provided by anyone, including JDBC driver vendors who want to58* provide a <code>RowSet</code> implementation as part of their JDBC products.59* <P>60* A <code>RowSet</code> object may make a connection with a data source and61* maintain that connection throughout its life cycle, in which case it is62* called a <i>connected</i> rowset. A rowset may also make a connection with63* a data source, get data from it, and then close the connection. Such a rowset64* is called a <i>disconnected</i> rowset. A disconnected rowset may make65* changes to its data while it is disconnected and then send the changes back66* to the original source of the data, but it must reestablish a connection to do so.67* <P>68* A disconnected rowset may have a reader (a <code>RowSetReader</code> object)69* and a writer (a <code>RowSetWriter</code> object) associated with it.70* The reader may be implemented in many different ways to populate a rowset71* with data, including getting data from a non-relational data source. The72* writer can also be implemented in many different ways to propagate changes73* made to the rowset's data back to the underlying data source.74* <P>75* Rowsets are easy to use. The <code>RowSet</code> interface extends the standard76* <code>java.sql.ResultSet</code> interface. The <code>RowSetMetaData</code>77* interface extends the <code>java.sql.ResultSetMetaData</code> interface.78* Thus, developers familiar79* with the JDBC API will have to learn a minimal number of new APIs to80* use rowsets. In addition, third-party software tools that work with81* JDBC <code>ResultSet</code> objects will also easily be made to work with rowsets.82*83* @since 1.484*/8586public interface RowSet extends ResultSet {8788//-----------------------------------------------------------------------89// Properties90//-----------------------------------------------------------------------9192//-----------------------------------------------------------------------93// The following properties may be used to create a Connection.94//-----------------------------------------------------------------------9596/**97* Retrieves the url property this <code>RowSet</code> object will use to98* create a connection if it uses the <code>DriverManager</code>99* instead of a <code>DataSource</code> object to establish the connection.100* The default value is <code>null</code>.101*102* @return a string url103* @exception SQLException if a database access error occurs104* @see #setUrl105*/106String getUrl() throws SQLException;107108/**109* Sets the URL this <code>RowSet</code> object will use when it uses the110* <code>DriverManager</code> to create a connection.111*112* Setting this property is optional. If a URL is used, a JDBC driver113* that accepts the URL must be loaded before the114* rowset is used to connect to a database. The rowset will use the URL115* internally to create a database connection when reading or writing116* data. Either a URL or a data source name is used to create a117* connection, whichever was set to non null value most recently.118*119* @param url a string value; may be <code>null</code>120* @exception SQLException if a database access error occurs121* @see #getUrl122*/123void setUrl(String url) throws SQLException;124125/**126* Retrieves the logical name that identifies the data source for this127* <code>RowSet</code> object.128*129* @return a data source name130* @see #setDataSourceName131* @see #setUrl132*/133String getDataSourceName();134135/**136* Sets the data source name property for this <code>RowSet</code> object to the137* given <code>String</code>.138* <P>139* The value of the data source name property can be used to do a lookup of140* a <code>DataSource</code> object that has been registered with a naming141* service. After being retrieved, the <code>DataSource</code> object can be142* used to create a connection to the data source that it represents.143*144* @param name the logical name of the data source for this <code>RowSet</code>145* object; may be <code>null</code>146* @exception SQLException if a database access error occurs147* @see #getDataSourceName148*/149void setDataSourceName(String name) throws SQLException;150151/**152* Retrieves the username used to create a database connection for this153* <code>RowSet</code> object.154* The username property is set at run time before calling the method155* <code>execute</code>. It is156* not usually part of the serialized state of a <code>RowSet</code> object.157*158* @return the username property159* @see #setUsername160*/161String getUsername();162163/**164* Sets the username property for this <code>RowSet</code> object to the165* given <code>String</code>.166*167* @param name a user name168* @exception SQLException if a database access error occurs169* @see #getUsername170*/171void setUsername(String name) throws SQLException;172173/**174* Retrieves the password used to create a database connection.175* The password property is set at run time before calling the method176* <code>execute</code>. It is not usually part of the serialized state177* of a <code>RowSet</code> object.178*179* @return the password for making a database connection180* @see #setPassword181*/182String getPassword();183184/**185* Sets the database password for this <code>RowSet</code> object to186* the given <code>String</code>.187*188* @param password the password string189* @exception SQLException if a database access error occurs190* @see #getPassword191*/192void setPassword(String password) throws SQLException;193194/**195* Retrieves the transaction isolation level set for this196* <code>RowSet</code> object.197*198* @return the transaction isolation level; one of199* <code>Connection.TRANSACTION_READ_UNCOMMITTED</code>,200* <code>Connection.TRANSACTION_READ_COMMITTED</code>,201* <code>Connection.TRANSACTION_REPEATABLE_READ</code>, or202* <code>Connection.TRANSACTION_SERIALIZABLE</code>203* @see #setTransactionIsolation204*/205int getTransactionIsolation();206207/**208* Sets the transaction isolation level for this <code>RowSet</code> object.209*210* @param level the transaction isolation level; one of211* <code>Connection.TRANSACTION_READ_UNCOMMITTED</code>,212* <code>Connection.TRANSACTION_READ_COMMITTED</code>,213* <code>Connection.TRANSACTION_REPEATABLE_READ</code>, or214* <code>Connection.TRANSACTION_SERIALIZABLE</code>215* @exception SQLException if a database access error occurs216* @see #getTransactionIsolation217*/218void setTransactionIsolation(int level) throws SQLException;219220/**221* Retrieves the <code>Map</code> object associated with this222* <code>RowSet</code> object, which specifies the custom mapping223* of SQL user-defined types, if any. The default is for the224* type map to be empty.225*226* @return a <code>java.util.Map</code> object containing the names of227* SQL user-defined types and the Java classes to which they are228* to be mapped229*230* @exception SQLException if a database access error occurs231* @see #setTypeMap232*/233java.util.Map<String,Class<?>> getTypeMap() throws SQLException;234235/**236* Installs the given <code>java.util.Map</code> object as the default237* type map for this <code>RowSet</code> object. This type map will be238* used unless another type map is supplied as a method parameter.239*240* @param map a <code>java.util.Map</code> object containing the names of241* SQL user-defined types and the Java classes to which they are242* to be mapped243* @exception SQLException if a database access error occurs244* @see #getTypeMap245*/246void setTypeMap(java.util.Map<String,Class<?>> map) throws SQLException;247248//-----------------------------------------------------------------------249// The following properties may be used to create a Statement.250//-----------------------------------------------------------------------251252/**253* Retrieves this <code>RowSet</code> object's command property.254*255* The command property contains a command string, which must be an SQL256* query, that can be executed to fill the rowset with data.257* The default value is <code>null</code>.258*259* @return the command string; may be <code>null</code>260* @see #setCommand261*/262String getCommand();263264/**265* Sets this <code>RowSet</code> object's command property to the given266* SQL query.267*268* This property is optional269* when a rowset gets its data from a data source that does not support270* commands, such as a spreadsheet.271*272* @param cmd the SQL query that will be used to get the data for this273* <code>RowSet</code> object; may be <code>null</code>274* @exception SQLException if a database access error occurs275* @see #getCommand276*/277void setCommand(String cmd) throws SQLException;278279/**280* Retrieves whether this <code>RowSet</code> object is read-only.281* If updates are possible, the default is for a rowset to be282* updatable.283* <P>284* Attempts to update a read-only rowset will result in an285* <code>SQLException</code> being thrown.286*287* @return <code>true</code> if this <code>RowSet</code> object is288* read-only; <code>false</code> if it is updatable289* @see #setReadOnly290*/291boolean isReadOnly();292293/**294* Sets whether this <code>RowSet</code> object is read-only to the295* given <code>boolean</code>.296*297* @param value <code>true</code> if read-only; <code>false</code> if298* updatable299* @exception SQLException if a database access error occurs300* @see #isReadOnly301*/302void setReadOnly(boolean value) throws SQLException;303304/**305* Retrieves the maximum number of bytes that may be returned306* for certain column values.307* This limit applies only to <code>BINARY</code>,308* <code>VARBINARY</code>, <code>LONGVARBINARYBINARY</code>, <code>CHAR</code>,309* <code>VARCHAR</code>, <code>LONGVARCHAR</code>, <code>NCHAR</code>310* and <code>NVARCHAR</code> columns.311* If the limit is exceeded, the excess data is silently discarded.312*313* @return the current maximum column size limit; zero means that there314* is no limit315* @exception SQLException if a database access error occurs316* @see #setMaxFieldSize317*/318int getMaxFieldSize() throws SQLException;319320/**321* Sets the maximum number of bytes that can be returned for a column322* value to the given number of bytes.323* This limit applies only to <code>BINARY</code>,324* <code>VARBINARY</code>, <code>LONGVARBINARYBINARY</code>, <code>CHAR</code>,325* <code>VARCHAR</code>, <code>LONGVARCHAR</code>, <code>NCHAR</code>326* and <code>NVARCHAR</code> columns.327* If the limit is exceeded, the excess data is silently discarded.328* For maximum portability, use values greater than 256.329*330* @param max the new max column size limit in bytes; zero means unlimited331* @exception SQLException if a database access error occurs332* @see #getMaxFieldSize333*/334void setMaxFieldSize(int max) throws SQLException;335336/**337* Retrieves the maximum number of rows that this <code>RowSet</code>338* object can contain.339* If the limit is exceeded, the excess rows are silently dropped.340*341* @return the current maximum number of rows that this <code>RowSet</code>342* object can contain; zero means unlimited343* @exception SQLException if a database access error occurs344* @see #setMaxRows345*/346int getMaxRows() throws SQLException;347348/**349* Sets the maximum number of rows that this <code>RowSet</code>350* object can contain to the specified number.351* If the limit is exceeded, the excess rows are silently dropped.352*353* @param max the new maximum number of rows; zero means unlimited354* @exception SQLException if a database access error occurs355* @see #getMaxRows356*/357void setMaxRows(int max) throws SQLException;358359/**360* Retrieves whether escape processing is enabled for this361* <code>RowSet</code> object.362* If escape scanning is enabled, which is the default, the driver will do363* escape substitution before sending an SQL statement to the database.364*365* @return <code>true</code> if escape processing is enabled;366* <code>false</code> if it is disabled367* @exception SQLException if a database access error occurs368* @see #setEscapeProcessing369*/370boolean getEscapeProcessing() throws SQLException;371372/**373* Sets escape processing for this <code>RowSet</code> object on or374* off. If escape scanning is on (the default), the driver will do375* escape substitution before sending an SQL statement to the database.376*377* @param enable <code>true</code> to enable escape processing;378* <code>false</code> to disable it379* @exception SQLException if a database access error occurs380* @see #getEscapeProcessing381*/382void setEscapeProcessing(boolean enable) throws SQLException;383384/**385* Retrieves the maximum number of seconds the driver will wait for386* a statement to execute.387* If this limit is exceeded, an <code>SQLException</code> is thrown.388*389* @return the current query timeout limit in seconds; zero means390* unlimited391* @exception SQLException if a database access error occurs392* @see #setQueryTimeout393*/394int getQueryTimeout() throws SQLException;395396/**397* Sets the maximum time the driver will wait for398* a statement to execute to the given number of seconds.399* If this limit is exceeded, an <code>SQLException</code> is thrown.400*401* @param seconds the new query timeout limit in seconds; zero means402* that there is no limit403* @exception SQLException if a database access error occurs404* @see #getQueryTimeout405*/406void setQueryTimeout(int seconds) throws SQLException;407408/**409* Sets the type of this <code>RowSet</code> object to the given type.410* This method is used to change the type of a rowset, which is by411* default read-only and non-scrollable.412*413* @param type one of the <code>ResultSet</code> constants specifying a type:414* <code>ResultSet.TYPE_FORWARD_ONLY</code>,415* <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or416* <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>417* @exception SQLException if a database access error occurs418* @see java.sql.ResultSet#getType419*/420void setType(int type) throws SQLException;421422/**423* Sets the concurrency of this <code>RowSet</code> object to the given424* concurrency level. This method is used to change the concurrency level425* of a rowset, which is by default <code>ResultSet.CONCUR_READ_ONLY</code>426*427* @param concurrency one of the <code>ResultSet</code> constants specifying a428* concurrency level: <code>ResultSet.CONCUR_READ_ONLY</code> or429* <code>ResultSet.CONCUR_UPDATABLE</code>430* @exception SQLException if a database access error occurs431* @see ResultSet#getConcurrency432*/433void setConcurrency(int concurrency) throws SQLException;434435//-----------------------------------------------------------------------436// Parameters437//-----------------------------------------------------------------------438439/**440* The <code>RowSet</code> setter methods are used to set any input parameters441* needed by the <code>RowSet</code> object's command.442* Parameters are set at run time, as opposed to design time.443*/444445/**446* Sets the designated parameter in this <code>RowSet</code> object's SQL447* command to SQL <code>NULL</code>.448*449* <P><B>Note:</B> You must specify the parameter's SQL type.450*451* @param parameterIndex the first parameter is 1, the second is 2, ...452* @param sqlType a SQL type code defined by <code>java.sql.Types</code>453* @exception SQLException if a database access error occurs454*/455void setNull(int parameterIndex, int sqlType) throws SQLException;456457/**458* Sets the designated parameter to SQL <code>NULL</code>.459*460* <P><B>Note:</B> You must specify the parameter's SQL type.461*462* @param parameterName the name of the parameter463* @param sqlType the SQL type code defined in <code>java.sql.Types</code>464* @exception SQLException if a database access error occurs or465* this method is called on a closed <code>CallableStatement</code>466* @exception SQLFeatureNotSupportedException if the JDBC driver does not support467* this method468* @since 1.4469*/470void setNull(String parameterName, int sqlType) throws SQLException;471472/**473* Sets the designated parameter in this <code>RowSet</code> object's SQL474* command to SQL <code>NULL</code>. This version of the method <code>setNull</code>475* should be used for SQL user-defined types (UDTs) and <code>REF</code> type476* parameters. Examples of UDTs include: <code>STRUCT</code>, <code>DISTINCT</code>,477* <code>JAVA_OBJECT</code>, and named array types.478*479* <P><B>Note:</B> To be portable, applications must give the480* SQL type code and the fully qualified SQL type name when specifying481* a NULL UDT or <code>REF</code> parameter. In the case of a UDT,482* the name is the type name of the parameter itself. For a <code>REF</code>483* parameter, the name is the type name of the referenced type. If484* a JDBC driver does not need the type code or type name information,485* it may ignore it.486*487* Although it is intended for UDT and <code>REF</code> parameters,488* this method may be used to set a null parameter of any JDBC type.489* If the parameter does not have a user-defined or <code>REF</code> type,490* the typeName parameter is ignored.491*492*493* @param paramIndex the first parameter is 1, the second is 2, ...494* @param sqlType a value from <code>java.sql.Types</code>495* @param typeName the fully qualified name of an SQL UDT or the type496* name of the SQL structured type being referenced by a <code>REF</code>497* type; ignored if the parameter is not a UDT or <code>REF</code> type498* @exception SQLException if a database access error occurs499*/500void setNull (int paramIndex, int sqlType, String typeName)501throws SQLException;502503/**504* Sets the designated parameter to SQL <code>NULL</code>.505* This version of the method <code>setNull</code> should506* be used for user-defined types and REF type parameters. Examples507* of user-defined types include: STRUCT, DISTINCT, JAVA_OBJECT, and508* named array types.509*510* <P><B>Note:</B> To be portable, applications must give the511* SQL type code and the fully-qualified SQL type name when specifying512* a NULL user-defined or REF parameter. In the case of a user-defined type513* the name is the type name of the parameter itself. For a REF514* parameter, the name is the type name of the referenced type. If515* a JDBC driver does not need the type code or type name information,516* it may ignore it.517*518* Although it is intended for user-defined and Ref parameters,519* this method may be used to set a null parameter of any JDBC type.520* If the parameter does not have a user-defined or REF type, the given521* typeName is ignored.522*523*524* @param parameterName the name of the parameter525* @param sqlType a value from <code>java.sql.Types</code>526* @param typeName the fully-qualified name of an SQL user-defined type;527* ignored if the parameter is not a user-defined type or528* SQL <code>REF</code> value529* @exception SQLException if a database access error occurs or530* this method is called on a closed <code>CallableStatement</code>531* @exception SQLFeatureNotSupportedException if the JDBC driver does not support532* this method533* @since 1.4534*/535void setNull (String parameterName, int sqlType, String typeName)536throws SQLException;537538/**539* Sets the designated parameter in this <code>RowSet</code> object's command540* to the given Java <code>boolean</code> value. The driver converts this to541* an SQL <code>BIT</code> value before sending it to the database.542*543* @param parameterIndex the first parameter is 1, the second is 2, ...544* @param x the parameter value545* @exception SQLException if a database access error occurs546*/547void setBoolean(int parameterIndex, boolean x) throws SQLException;548549/**550* Sets the designated parameter to the given Java <code>boolean</code> value.551* The driver converts this552* to an SQL <code>BIT</code> or <code>BOOLEAN</code> value when it sends it to the database.553*554* @param parameterName the name of the parameter555* @param x the parameter value556* @exception SQLException if a database access error occurs or557* this method is called on a closed <code>CallableStatement</code>558* @see #getBoolean559* @exception SQLFeatureNotSupportedException if the JDBC driver does not support560* this method561* @since 1.4562*/563void setBoolean(String parameterName, boolean x) throws SQLException;564565/**566* Sets the designated parameter in this <code>RowSet</code> object's command567* to the given Java <code>byte</code> value. The driver converts this to568* an SQL <code>TINYINT</code> value before sending it to the database.569*570* @param parameterIndex the first parameter is 1, the second is 2, ...571* @param x the parameter value572* @exception SQLException if a database access error occurs573*/574void setByte(int parameterIndex, byte x) throws SQLException;575576/**577* Sets the designated parameter to the given Java <code>byte</code> value.578* The driver converts this579* to an SQL <code>TINYINT</code> value when it sends it to the database.580*581* @param parameterName the name of the parameter582* @param x the parameter value583* @exception SQLException if a database access error occurs or584* this method is called on a closed <code>CallableStatement</code>585* @exception SQLFeatureNotSupportedException if the JDBC driver does not support586* this method587* @see #getByte588* @since 1.4589*/590void setByte(String parameterName, byte x) throws SQLException;591592/**593* Sets the designated parameter in this <code>RowSet</code> object's command594* to the given Java <code>short</code> value. The driver converts this to595* an SQL <code>SMALLINT</code> value before sending it to the database.596*597* @param parameterIndex the first parameter is 1, the second is 2, ...598* @param x the parameter value599* @exception SQLException if a database access error occurs600*/601void setShort(int parameterIndex, short x) throws SQLException;602603/**604* Sets the designated parameter to the given Java <code>short</code> value.605* The driver converts this606* to an SQL <code>SMALLINT</code> value when it sends it to the database.607*608* @param parameterName the name of the parameter609* @param x the parameter value610* @exception SQLException if a database access error occurs or611* this method is called on a closed <code>CallableStatement</code>612* @exception SQLFeatureNotSupportedException if the JDBC driver does not support613* this method614* @see #getShort615* @since 1.4616*/617void setShort(String parameterName, short x) throws SQLException;618619/**620* Sets the designated parameter in this <code>RowSet</code> object's command621* to the given Java <code>int</code> value. The driver converts this to622* an SQL <code>INTEGER</code> value before sending it to the database.623*624* @param parameterIndex the first parameter is 1, the second is 2, ...625* @param x the parameter value626* @exception SQLException if a database access error occurs627*/628void setInt(int parameterIndex, int x) throws SQLException;629630/**631* Sets the designated parameter to the given Java <code>int</code> value.632* The driver converts this633* to an SQL <code>INTEGER</code> value when it sends it to the database.634*635* @param parameterName the name of the parameter636* @param x the parameter value637* @exception SQLException if a database access error occurs or638* this method is called on a closed <code>CallableStatement</code>639* @exception SQLFeatureNotSupportedException if the JDBC driver does not support640* this method641* @see #getInt642* @since 1.4643*/644void setInt(String parameterName, int x) throws SQLException;645646/**647* Sets the designated parameter in this <code>RowSet</code> object's command648* to the given Java <code>long</code> value. The driver converts this to649* an SQL <code>BIGINT</code> value before sending it to the database.650*651* @param parameterIndex the first parameter is 1, the second is 2, ...652* @param x the parameter value653* @exception SQLException if a database access error occurs654*/655void setLong(int parameterIndex, long x) throws SQLException;656657/**658* Sets the designated parameter to the given Java <code>long</code> value.659* The driver converts this660* to an SQL <code>BIGINT</code> value when it sends it to the database.661*662* @param parameterName the name of the parameter663* @param x the parameter value664* @exception SQLException if a database access error occurs or665* this method is called on a closed <code>CallableStatement</code>666* @exception SQLFeatureNotSupportedException if the JDBC driver does not support667* this method668* @see #getLong669* @since 1.4670*/671void setLong(String parameterName, long x) throws SQLException;672673/**674* Sets the designated parameter in this <code>RowSet</code> object's command675* to the given Java <code>float</code> value. The driver converts this to676* an SQL <code>REAL</code> value before sending it to the database.677*678* @param parameterIndex the first parameter is 1, the second is 2, ...679* @param x the parameter value680* @exception SQLException if a database access error occurs681*/682void setFloat(int parameterIndex, float x) throws SQLException;683684/**685* Sets the designated parameter to the given Java <code>float</code> value.686* The driver converts this687* to an SQL <code>FLOAT</code> value when it sends it to the database.688*689* @param parameterName the name of the parameter690* @param x the parameter value691* @exception SQLException if a database access error occurs or692* this method is called on a closed <code>CallableStatement</code>693* @exception SQLFeatureNotSupportedException if the JDBC driver does not support694* this method695* @see #getFloat696* @since 1.4697*/698void setFloat(String parameterName, float x) throws SQLException;699700/**701* Sets the designated parameter in this <code>RowSet</code> object's command702* to the given Java <code>double</code> value. The driver converts this to703* an SQL <code>DOUBLE</code> value before sending it to the database.704*705* @param parameterIndex the first parameter is 1, the second is 2, ...706* @param x the parameter value707* @exception SQLException if a database access error occurs708*/709void setDouble(int parameterIndex, double x) throws SQLException;710711/**712* Sets the designated parameter to the given Java <code>double</code> value.713* The driver converts this714* to an SQL <code>DOUBLE</code> value when it sends it to the database.715*716* @param parameterName the name of the parameter717* @param x the parameter value718* @exception SQLException if a database access error occurs or719* this method is called on a closed <code>CallableStatement</code>720* @exception SQLFeatureNotSupportedException if the JDBC driver does not support721* this method722* @see #getDouble723* @since 1.4724*/725void setDouble(String parameterName, double x) throws SQLException;726727/**728* Sets the designated parameter in this <code>RowSet</code> object's command729* to the given <code>java.math.BigDeciaml</code> value.730* The driver converts this to731* an SQL <code>NUMERIC</code> value before sending it to the database.732*733* @param parameterIndex the first parameter is 1, the second is 2, ...734* @param x the parameter value735* @exception SQLException if a database access error occurs736*/737void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException;738739/**740* Sets the designated parameter to the given741* <code>java.math.BigDecimal</code> value.742* The driver converts this to an SQL <code>NUMERIC</code> value when743* it sends it to the database.744*745* @param parameterName the name of the parameter746* @param x the parameter value747* @exception SQLException if a database access error occurs or748* this method is called on a closed <code>CallableStatement</code>749* @exception SQLFeatureNotSupportedException if the JDBC driver does not support750* this method751* @see #getBigDecimal752* @since 1.4753*/754void setBigDecimal(String parameterName, BigDecimal x) throws SQLException;755756/**757* Sets the designated parameter in this <code>RowSet</code> object's command758* to the given Java <code>String</code> value. Before sending it to the759* database, the driver converts this to an SQL <code>VARCHAR</code> or760* <code>LONGVARCHAR</code> value, depending on the argument's size relative761* to the driver's limits on <code>VARCHAR</code> values.762*763* @param parameterIndex the first parameter is 1, the second is 2, ...764* @param x the parameter value765* @exception SQLException if a database access error occurs766*/767void setString(int parameterIndex, String x) throws SQLException;768769/**770* Sets the designated parameter to the given Java <code>String</code> value.771* The driver converts this772* to an SQL <code>VARCHAR</code> or <code>LONGVARCHAR</code> value773* (depending on the argument's774* size relative to the driver's limits on <code>VARCHAR</code> values)775* when it sends it to the database.776*777* @param parameterName the name of the parameter778* @param x the parameter value779* @exception SQLException if a database access error occurs or780* this method is called on a closed <code>CallableStatement</code>781* @exception SQLFeatureNotSupportedException if the JDBC driver does not support782* this method783* @see #getString784* @since 1.4785*/786void setString(String parameterName, String x) throws SQLException;787788/**789* Sets the designated parameter in this <code>RowSet</code> object's command790* to the given Java array of <code>byte</code> values. Before sending it to the791* database, the driver converts this to an SQL <code>VARBINARY</code> or792* <code>LONGVARBINARY</code> value, depending on the argument's size relative793* to the driver's limits on <code>VARBINARY</code> values.794*795* @param parameterIndex the first parameter is 1, the second is 2, ...796* @param x the parameter value797* @exception SQLException if a database access error occurs798*/799void setBytes(int parameterIndex, byte x[]) throws SQLException;800801/**802* Sets the designated parameter to the given Java array of bytes.803* The driver converts this to an SQL <code>VARBINARY</code> or804* <code>LONGVARBINARY</code> (depending on the argument's size relative805* to the driver's limits on <code>VARBINARY</code> values) when it sends806* it to the database.807*808* @param parameterName the name of the parameter809* @param x the parameter value810* @exception SQLException if a database access error occurs or811* this method is called on a closed <code>CallableStatement</code>812* @exception SQLFeatureNotSupportedException if the JDBC driver does not support813* this method814* @see #getBytes815* @since 1.4816*/817void setBytes(String parameterName, byte x[]) throws SQLException;818819/**820* Sets the designated parameter in this <code>RowSet</code> object's command821* to the given <code>java.sql.Date</code> value. The driver converts this to822* an SQL <code>DATE</code> value before sending it to the database, using the823* default <code>java.util.Calendar</code> to calculate the date.824*825* @param parameterIndex the first parameter is 1, the second is 2, ...826* @param x the parameter value827* @exception SQLException if a database access error occurs828*/829void setDate(int parameterIndex, java.sql.Date x) throws SQLException;830831/**832* Sets the designated parameter in this <code>RowSet</code> object's command833* to the given <code>java.sql.Time</code> value. The driver converts this to834* an SQL <code>TIME</code> value before sending it to the database, using the835* default <code>java.util.Calendar</code> to calculate it.836*837* @param parameterIndex the first parameter is 1, the second is 2, ...838* @param x the parameter value839* @exception SQLException if a database access error occurs840*/841void setTime(int parameterIndex, java.sql.Time x) throws SQLException;842843/**844* Sets the designated parameter in this <code>RowSet</code> object's command845* to the given <code>java.sql.Timestamp</code> value. The driver converts this to846* an SQL <code>TIMESTAMP</code> value before sending it to the database, using the847* default <code>java.util.Calendar</code> to calculate it.848*849* @param parameterIndex the first parameter is 1, the second is 2, ...850* @param x the parameter value851* @exception SQLException if a database access error occurs852*/853void setTimestamp(int parameterIndex, java.sql.Timestamp x)854throws SQLException;855856/**857* Sets the designated parameter to the given <code>java.sql.Timestamp</code> value.858* The driver859* converts this to an SQL <code>TIMESTAMP</code> value when it sends it to the860* database.861*862* @param parameterName the name of the parameter863* @param x the parameter value864* @exception SQLException if a database access error occurs or865* this method is called on a closed <code>CallableStatement</code>866* @exception SQLFeatureNotSupportedException if the JDBC driver does not support867* this method868* @see #getTimestamp869* @since 1.4870*/871void setTimestamp(String parameterName, java.sql.Timestamp x)872throws SQLException;873874/**875* Sets the designated parameter in this <code>RowSet</code> object's command876* to the given <code>java.io.InputStream</code> value.877* It may be more practical to send a very large ASCII value via a878* <code>java.io.InputStream</code> rather than as a <code>LONGVARCHAR</code>879* parameter. The driver will read the data from the stream880* as needed until it reaches end-of-file.881*882* <P><B>Note:</B> This stream object can either be a standard883* Java stream object or your own subclass that implements the884* standard interface.885*886* @param parameterIndex the first parameter is 1, the second is 2, ...887* @param x the Java input stream that contains the ASCII parameter value888* @param length the number of bytes in the stream889* @exception SQLException if a database access error occurs890*/891void setAsciiStream(int parameterIndex, java.io.InputStream x, int length)892throws SQLException;893894/**895* Sets the designated parameter to the given input stream, which will have896* the specified number of bytes.897* When a very large ASCII value is input to a <code>LONGVARCHAR</code>898* parameter, it may be more practical to send it via a899* <code>java.io.InputStream</code>. Data will be read from the stream900* as needed until end-of-file is reached. The JDBC driver will901* do any necessary conversion from ASCII to the database char format.902*903* <P><B>Note:</B> This stream object can either be a standard904* Java stream object or your own subclass that implements the905* standard interface.906*907* @param parameterName the name of the parameter908* @param x the Java input stream that contains the ASCII parameter value909* @param length the number of bytes in the stream910* @exception SQLException if a database access error occurs or911* this method is called on a closed <code>CallableStatement</code>912* @exception SQLFeatureNotSupportedException if the JDBC driver does not support913* this method914* @since 1.4915*/916void setAsciiStream(String parameterName, java.io.InputStream x, int length)917throws SQLException;918919/**920* Sets the designated parameter in this <code>RowSet</code> object's command921* to the given <code>java.io.InputStream</code> value.922* It may be more practical to send a very large binary value via a923* <code>java.io.InputStream</code> rather than as a <code>LONGVARBINARY</code>924* parameter. The driver will read the data from the stream925* as needed until it reaches end-of-file.926*927* <P><B>Note:</B> This stream object can either be a standard928* Java stream object or your own subclass that implements the929* standard interface.930*931* @param parameterIndex the first parameter is 1, the second is 2, ...932* @param x the java input stream which contains the binary parameter value933* @param length the number of bytes in the stream934* @exception SQLException if a database access error occurs935*/936void setBinaryStream(int parameterIndex, java.io.InputStream x,937int length) throws SQLException;938939/**940* Sets the designated parameter to the given input stream, which will have941* the specified number of bytes.942* When a very large binary value is input to a <code>LONGVARBINARY</code>943* parameter, it may be more practical to send it via a944* <code>java.io.InputStream</code> object. The data will be read from the stream945* as needed until end-of-file is reached.946*947* <P><B>Note:</B> This stream object can either be a standard948* Java stream object or your own subclass that implements the949* standard interface.950*951* @param parameterName the name of the parameter952* @param x the java input stream which contains the binary parameter value953* @param length the number of bytes in the stream954* @exception SQLException if a database access error occurs or955* this method is called on a closed <code>CallableStatement</code>956* @exception SQLFeatureNotSupportedException if the JDBC driver does not support957* this method958* @since 1.4959*/960void setBinaryStream(String parameterName, java.io.InputStream x,961int length) throws SQLException;962963/**964* Sets the designated parameter in this <code>RowSet</code> object's command965* to the given <code>java.io.Reader</code> value.966* It may be more practical to send a very large UNICODE value via a967* <code>java.io.Reader</code> rather than as a <code>LONGVARCHAR</code>968* parameter. The driver will read the data from the stream969* as needed until it reaches end-of-file.970*971* <P><B>Note:</B> This stream object can either be a standard972* Java stream object or your own subclass that implements the973* standard interface.974*975* @param parameterIndex the first parameter is 1, the second is 2, ...976* @param reader the <code>Reader</code> object that contains the UNICODE data977* to be set978* @param length the number of characters in the stream979* @exception SQLException if a database access error occurs980*/981void setCharacterStream(int parameterIndex,982Reader reader,983int length) throws SQLException;984985/**986* Sets the designated parameter to the given <code>Reader</code>987* object, which is the given number of characters long.988* When a very large UNICODE value is input to a <code>LONGVARCHAR</code>989* parameter, it may be more practical to send it via a990* <code>java.io.Reader</code> object. The data will be read from the stream991* as needed until end-of-file is reached. The JDBC driver will992* do any necessary conversion from UNICODE to the database char format.993*994* <P><B>Note:</B> This stream object can either be a standard995* Java stream object or your own subclass that implements the996* standard interface.997*998* @param parameterName the name of the parameter999* @param reader the <code>java.io.Reader</code> object that1000* contains the UNICODE data used as the designated parameter1001* @param length the number of characters in the stream1002* @exception SQLException if a database access error occurs or1003* this method is called on a closed <code>CallableStatement</code>1004* @exception SQLFeatureNotSupportedException if the JDBC driver does not support1005* this method1006* @since 1.41007*/1008void setCharacterStream(String parameterName,1009java.io.Reader reader,1010int length) throws SQLException;10111012/**1013* Sets the designated parameter in this <code>RowSet</code> object's command1014* to the given input stream.1015* When a very large ASCII value is input to a <code>LONGVARCHAR</code>1016* parameter, it may be more practical to send it via a1017* <code>java.io.InputStream</code>. Data will be read from the stream1018* as needed until end-of-file is reached. The JDBC driver will1019* do any necessary conversion from ASCII to the database char format.1020*1021* <P><B>Note:</B> This stream object can either be a standard1022* Java stream object or your own subclass that implements the1023* standard interface.1024* <P><B>Note:</B> Consult your JDBC driver documentation to determine if1025* it might be more efficient to use a version of1026* <code>setAsciiStream</code> which takes a length parameter.1027*1028* @param parameterIndex the first parameter is 1, the second is 2, ...1029* @param x the Java input stream that contains the ASCII parameter value1030* @exception SQLException if a database access error occurs or1031* this method is called on a closed <code>PreparedStatement</code>1032* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method1033* @since 1.61034*/1035void setAsciiStream(int parameterIndex, java.io.InputStream x)1036throws SQLException;10371038/**1039* Sets the designated parameter to the given input stream.1040* When a very large ASCII value is input to a <code>LONGVARCHAR</code>1041* parameter, it may be more practical to send it via a1042* <code>java.io.InputStream</code>. Data will be read from the stream1043* as needed until end-of-file is reached. The JDBC driver will1044* do any necessary conversion from ASCII to the database char format.1045*1046* <P><B>Note:</B> This stream object can either be a standard1047* Java stream object or your own subclass that implements the1048* standard interface.1049* <P><B>Note:</B> Consult your JDBC driver documentation to determine if1050* it might be more efficient to use a version of1051* <code>setAsciiStream</code> which takes a length parameter.1052*1053* @param parameterName the name of the parameter1054* @param x the Java input stream that contains the ASCII parameter value1055* @exception SQLException if a database access error occurs or1056* this method is called on a closed <code>CallableStatement</code>1057* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method1058* @since 1.61059*/1060void setAsciiStream(String parameterName, java.io.InputStream x)1061throws SQLException;10621063/**1064* Sets the designated parameter in this <code>RowSet</code> object's command1065* to the given input stream.1066* When a very large binary value is input to a <code>LONGVARBINARY</code>1067* parameter, it may be more practical to send it via a1068* <code>java.io.InputStream</code> object. The data will be read from the1069* stream as needed until end-of-file is reached.1070*1071* <P><B>Note:</B> This stream object can either be a standard1072* Java stream object or your own subclass that implements the1073* standard interface.1074* <P><B>Note:</B> Consult your JDBC driver documentation to determine if1075* it might be more efficient to use a version of1076* <code>setBinaryStream</code> which takes a length parameter.1077*1078* @param parameterIndex the first parameter is 1, the second is 2, ...1079* @param x the java input stream which contains the binary parameter value1080* @exception SQLException if a database access error occurs or1081* this method is called on a closed <code>PreparedStatement</code>1082* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method1083* @since 1.61084*/1085void setBinaryStream(int parameterIndex, java.io.InputStream x)1086throws SQLException;10871088/**1089* Sets the designated parameter to the given input stream.1090* When a very large binary value is input to a <code>LONGVARBINARY</code>1091* parameter, it may be more practical to send it via a1092* <code>java.io.InputStream</code> object. The data will be read from the1093* stream as needed until end-of-file is reached.1094*1095* <P><B>Note:</B> This stream object can either be a standard1096* Java stream object or your own subclass that implements the1097* standard interface.1098* <P><B>Note:</B> Consult your JDBC driver documentation to determine if1099* it might be more efficient to use a version of1100* <code>setBinaryStream</code> which takes a length parameter.1101*1102* @param parameterName the name of the parameter1103* @param x the java input stream which contains the binary parameter value1104* @exception SQLException if a database access error occurs or1105* this method is called on a closed <code>CallableStatement</code>1106* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method1107* @since 1.61108*/1109void setBinaryStream(String parameterName, java.io.InputStream x)1110throws SQLException;11111112/**1113* Sets the designated parameter in this <code>RowSet</code> object's command1114* to the given <code>Reader</code>1115* object.1116* When a very large UNICODE value is input to a <code>LONGVARCHAR</code>1117* parameter, it may be more practical to send it via a1118* <code>java.io.Reader</code> object. The data will be read from the stream1119* as needed until end-of-file is reached. The JDBC driver will1120* do any necessary conversion from UNICODE to the database char format.1121*1122* <P><B>Note:</B> This stream object can either be a standard1123* Java stream object or your own subclass that implements the1124* standard interface.1125* <P><B>Note:</B> Consult your JDBC driver documentation to determine if1126* it might be more efficient to use a version of1127* <code>setCharacterStream</code> which takes a length parameter.1128*1129* @param parameterIndex the first parameter is 1, the second is 2, ...1130* @param reader the <code>java.io.Reader</code> object that contains the1131* Unicode data1132* @exception SQLException if a database access error occurs or1133* this method is called on a closed <code>PreparedStatement</code>1134* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method1135* @since 1.61136*/1137void setCharacterStream(int parameterIndex,1138java.io.Reader reader) throws SQLException;11391140/**1141* Sets the designated parameter to the given <code>Reader</code>1142* object.1143* When a very large UNICODE value is input to a <code>LONGVARCHAR</code>1144* parameter, it may be more practical to send it via a1145* <code>java.io.Reader</code> object. The data will be read from the stream1146* as needed until end-of-file is reached. The JDBC driver will1147* do any necessary conversion from UNICODE to the database char format.1148*1149* <P><B>Note:</B> This stream object can either be a standard1150* Java stream object or your own subclass that implements the1151* standard interface.1152* <P><B>Note:</B> Consult your JDBC driver documentation to determine if1153* it might be more efficient to use a version of1154* <code>setCharacterStream</code> which takes a length parameter.1155*1156* @param parameterName the name of the parameter1157* @param reader the <code>java.io.Reader</code> object that contains the1158* Unicode data1159* @exception SQLException if a database access error occurs or1160* this method is called on a closed <code>CallableStatement</code>1161* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method1162* @since 1.61163*/1164void setCharacterStream(String parameterName,1165java.io.Reader reader) throws SQLException;11661167/**1168* Sets the designated parameter in this <code>RowSet</code> object's command1169* to a <code>Reader</code> object. The1170* <code>Reader</code> reads the data till end-of-file is reached. The1171* driver does the necessary conversion from Java character format to1172* the national character set in the database.11731174* <P><B>Note:</B> This stream object can either be a standard1175* Java stream object or your own subclass that implements the1176* standard interface.1177* <P><B>Note:</B> Consult your JDBC driver documentation to determine if1178* it might be more efficient to use a version of1179* <code>setNCharacterStream</code> which takes a length parameter.1180*1181* @param parameterIndex of the first parameter is 1, the second is 2, ...1182* @param value the parameter value1183* @throws SQLException if the driver does not support national1184* character sets; if the driver can detect that a data conversion1185* error could occur ; if a database access error occurs; or1186* this method is called on a closed <code>PreparedStatement</code>1187* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method1188* @since 1.61189*/1190void setNCharacterStream(int parameterIndex, Reader value) throws SQLException;1191119211931194/**1195* Sets the designated parameter in this <code>RowSet</code> object's command1196* with the given Java <code>Object</code>. For integral values, the1197* <code>java.lang</code> equivalent objects should be used (for example,1198* an instance of the class <code>Integer</code> for an <code>int</code>).1199*1200* If the second argument is an <code>InputStream</code> then the stream must contain1201* the number of bytes specified by scaleOrLength. If the second argument is a1202* <code>Reader</code> then the reader must contain the number of characters specified * by scaleOrLength. If these conditions are not true the driver will generate a1203* <code>SQLException</code> when the prepared statement is executed.1204*1205* <p>The given Java object will be converted to the targetSqlType1206* before being sent to the database.1207* <P>1208* If the object is of a class implementing <code>SQLData</code>,1209* the rowset should call the method <code>SQLData.writeSQL</code>1210* to write the object to an <code>SQLOutput</code> data stream.1211* If, on the other hand, the object is of a class implementing1212* <code>Ref</code>, <code>Blob</code>, <code>Clob</code>, <code>NClob</code>,1213* <code>Struct</code>, <code>java.net.URL</code>,1214* or <code>Array</code>, the driver should pass it to the database as a1215* value of the corresponding SQL type.1216*1217*1218* <p>Note that this method may be used to pass datatabase-specific1219* abstract data types.1220*1221* @param parameterIndex the first parameter is 1, the second is 2, ...1222* @param x the object containing the input parameter value1223* @param targetSqlType the SQL type (as defined in <code>java.sql.Types</code>)1224* to be sent to the database. The scale argument may further qualify this1225* type.1226* @param scaleOrLength for <code>java.sql.Types.DECIMAL</code>1227* or <code>java.sql.Types.NUMERIC types</code>,1228* this is the number of digits after the decimal point. For1229* Java Object types <code>InputStream</code> and <code>Reader</code>,1230* this is the length1231* of the data in the stream or reader. For all other types,1232* this value will be ignored.1233* @exception SQLException if a database access error occurs1234* @see java.sql.Types1235*/1236void setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength)1237throws SQLException;12381239/**1240* Sets the value of the designated parameter with the given object. The second1241* argument must be an object type; for integral values, the1242* <code>java.lang</code> equivalent objects should be used.1243*1244* <p>The given Java object will be converted to the given targetSqlType1245* before being sent to the database.1246*1247* If the object has a custom mapping (is of a class implementing the1248* interface <code>SQLData</code>),1249* the JDBC driver should call the method <code>SQLData.writeSQL</code> to write it1250* to the SQL data stream.1251* If, on the other hand, the object is of a class implementing1252* <code>Ref</code>, <code>Blob</code>, <code>Clob</code>, <code>NClob</code>,1253* <code>Struct</code>, <code>java.net.URL</code>,1254* or <code>Array</code>, the driver should pass it to the database as a1255* value of the corresponding SQL type.1256* <P>1257* Note that this method may be used to pass datatabase-1258* specific abstract data types.1259*1260* @param parameterName the name of the parameter1261* @param x the object containing the input parameter value1262* @param targetSqlType the SQL type (as defined in java.sql.Types) to be1263* sent to the database. The scale argument may further qualify this type.1264* @param scale for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types,1265* this is the number of digits after the decimal point. For all other1266* types, this value will be ignored.1267* @exception SQLException if a database access error occurs or1268* this method is called on a closed <code>CallableStatement</code>1269* @exception SQLFeatureNotSupportedException if <code>targetSqlType</code> is1270* a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>,1271* <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>,1272* <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>,1273* <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code>1274* or <code>STRUCT</code> data type and the JDBC driver does not support1275* this data type1276* @see Types1277* @see #getObject1278* @since 1.41279*/1280void setObject(String parameterName, Object x, int targetSqlType, int scale)1281throws SQLException;12821283/**1284* Sets the designated parameter in this <code>RowSet</code> object's command1285* with a Java <code>Object</code>. For integral values, the1286* <code>java.lang</code> equivalent objects should be used.1287* This method is like <code>setObject</code> above, but the scale used is the scale1288* of the second parameter. Scalar values have a scale of zero. Literal1289* values have the scale present in the literal.1290* <P>1291* Even though it is supported, it is not recommended that this method1292* be called with floating point input values.1293*1294* @param parameterIndex the first parameter is 1, the second is 2, ...1295* @param x the object containing the input parameter value1296* @param targetSqlType the SQL type (as defined in <code>java.sql.Types</code>)1297* to be sent to the database1298* @exception SQLException if a database access error occurs1299*/1300void setObject(int parameterIndex, Object x,1301int targetSqlType) throws SQLException;13021303/**1304* Sets the value of the designated parameter with the given object.1305* This method is like the method <code>setObject</code>1306* above, except that it assumes a scale of zero.1307*1308* @param parameterName the name of the parameter1309* @param x the object containing the input parameter value1310* @param targetSqlType the SQL type (as defined in java.sql.Types) to be1311* sent to the database1312* @exception SQLException if a database access error occurs or1313* this method is called on a closed <code>CallableStatement</code>1314* @exception SQLFeatureNotSupportedException if <code>targetSqlType</code> is1315* a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>,1316* <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>,1317* <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>,1318* <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code>1319* or <code>STRUCT</code> data type and the JDBC driver does not support1320* this data type1321* @see #getObject1322* @since 1.41323*/1324void setObject(String parameterName, Object x, int targetSqlType)1325throws SQLException;13261327/**1328* Sets the value of the designated parameter with the given object.1329* The second parameter must be of type <code>Object</code>; therefore, the1330* <code>java.lang</code> equivalent objects should be used for built-in types.1331*1332* <p>The JDBC specification specifies a standard mapping from1333* Java <code>Object</code> types to SQL types. The given argument1334* will be converted to the corresponding SQL type before being1335* sent to the database.1336*1337* <p>Note that this method may be used to pass datatabase-1338* specific abstract data types, by using a driver-specific Java1339* type.1340*1341* If the object is of a class implementing the interface <code>SQLData</code>,1342* the JDBC driver should call the method <code>SQLData.writeSQL</code>1343* to write it to the SQL data stream.1344* If, on the other hand, the object is of a class implementing1345* <code>Ref</code>, <code>Blob</code>, <code>Clob</code>, <code>NClob</code>,1346* <code>Struct</code>, <code>java.net.URL</code>,1347* or <code>Array</code>, the driver should pass it to the database as a1348* value of the corresponding SQL type.1349* <P>1350* This method throws an exception if there is an ambiguity, for example, if the1351* object is of a class implementing more than one of the interfaces named above.1352*1353* @param parameterName the name of the parameter1354* @param x the object containing the input parameter value1355* @exception SQLException if a database access error occurs,1356* this method is called on a closed <code>CallableStatement</code> or if the given1357* <code>Object</code> parameter is ambiguous1358* @exception SQLFeatureNotSupportedException if the JDBC driver does not support1359* this method1360* @see #getObject1361* @since 1.41362*/1363void setObject(String parameterName, Object x) throws SQLException;13641365/**1366* Sets the designated parameter in this <code>RowSet</code> object's command1367* with a Java <code>Object</code>. For integral values, the1368* <code>java.lang</code> equivalent objects should be used.1369*1370* <p>The JDBC specification provides a standard mapping from1371* Java Object types to SQL types. The driver will convert the1372* given Java object to its standard SQL mapping before sending it1373* to the database.1374*1375* <p>Note that this method may be used to pass datatabase-specific1376* abstract data types by using a driver-specific Java type.1377*1378* If the object is of a class implementing <code>SQLData</code>,1379* the rowset should call the method <code>SQLData.writeSQL</code>1380* to write the object to an <code>SQLOutput</code> data stream.1381* If, on the other hand, the object is of a class implementing1382* <code>Ref</code>, <code>Blob</code>, <code>Clob</code>, <code>NClob</code>,1383* <code>Struct</code>, <code>java.net.URL</code>,1384* or <code>Array</code>, the driver should pass it to the database as a1385* value of the corresponding SQL type.1386*1387* <P>1388* An exception is thrown if there is an ambiguity, for example, if the1389* object is of a class implementing more than one of these interfaces.1390*1391* @param parameterIndex The first parameter is 1, the second is 2, ...1392* @param x The object containing the input parameter value1393* @exception SQLException if a database access error occurs1394*/1395void setObject(int parameterIndex, Object x) throws SQLException;139613971398/**1399* Sets the designated parameter in this <code>RowSet</code> object's command1400* with the given <code>Ref</code> value. The driver will convert this1401* to the appropriate <code>REF(<structured-type>)</code> value.1402*1403* @param i the first parameter is 1, the second is 2, ...1404* @param x an object representing data of an SQL <code>REF</code> type1405* @exception SQLException if a database access error occurs1406*/1407void setRef (int i, Ref x) throws SQLException;14081409/**1410* Sets the designated parameter in this <code>RowSet</code> object's command1411* with the given <code>Blob</code> value. The driver will convert this1412* to the <code>BLOB</code> value that the <code>Blob</code> object1413* represents before sending it to the database.1414*1415* @param i the first parameter is 1, the second is 2, ...1416* @param x an object representing a BLOB1417* @exception SQLException if a database access error occurs1418*/1419void setBlob (int i, Blob x) throws SQLException;14201421/**1422* Sets the designated parameter to a <code>InputStream</code> object. The inputstream must contain the number1423* of characters specified by length otherwise a <code>SQLException</code> will be1424* generated when the <code>PreparedStatement</code> is executed.1425* This method differs from the <code>setBinaryStream (int, InputStream, int)</code>1426* method because it informs the driver that the parameter value should be1427* sent to the server as a <code>BLOB</code>. When the <code>setBinaryStream</code> method is used,1428* the driver may have to do extra work to determine whether the parameter1429* data should be sent to the server as a <code>LONGVARBINARY</code> or a <code>BLOB</code>1430* @param parameterIndex index of the first parameter is 1,1431* the second is 2, ...1432* @param inputStream An object that contains the data to set the parameter1433* value to.1434* @param length the number of bytes in the parameter data.1435* @throws SQLException if a database access error occurs,1436* this method is called on a closed <code>PreparedStatement</code>,1437* if parameterIndex does not correspond1438* to a parameter marker in the SQL statement, if the length specified1439* is less than zero or if the number of bytes in the inputstream does not match1440* the specified length.1441* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method1442*1443* @since 1.61444*/1445void setBlob(int parameterIndex, InputStream inputStream, long length)1446throws SQLException;14471448/**1449* Sets the designated parameter to a <code>InputStream</code> object.1450* This method differs from the <code>setBinaryStream (int, InputStream)</code>1451* method because it informs the driver that the parameter value should be1452* sent to the server as a <code>BLOB</code>. When the <code>setBinaryStream</code> method is used,1453* the driver may have to do extra work to determine whether the parameter1454* data should be sent to the server as a <code>LONGVARBINARY</code> or a <code>BLOB</code>1455*1456* <P><B>Note:</B> Consult your JDBC driver documentation to determine if1457* it might be more efficient to use a version of1458* <code>setBlob</code> which takes a length parameter.1459*1460* @param parameterIndex index of the first parameter is 1,1461* the second is 2, ...1462* @param inputStream An object that contains the data to set the parameter1463* value to.1464* @throws SQLException if a database access error occurs,1465* this method is called on a closed <code>PreparedStatement</code> or1466* if parameterIndex does not correspond1467* to a parameter marker in the SQL statement,1468* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method1469*1470* @since 1.61471*/1472void setBlob(int parameterIndex, InputStream inputStream)1473throws SQLException;14741475/**1476* Sets the designated parameter to a <code>InputStream</code> object. The <code>inputstream</code> must contain the number1477* of characters specified by length, otherwise a <code>SQLException</code> will be1478* generated when the <code>CallableStatement</code> is executed.1479* This method differs from the <code>setBinaryStream (int, InputStream, int)</code>1480* method because it informs the driver that the parameter value should be1481* sent to the server as a <code>BLOB</code>. When the <code>setBinaryStream</code> method is used,1482* the driver may have to do extra work to determine whether the parameter1483* data should be sent to the server as a <code>LONGVARBINARY</code> or a <code>BLOB</code>1484*1485* @param parameterName the name of the parameter to be set1486* the second is 2, ...1487*1488* @param inputStream An object that contains the data to set the parameter1489* value to.1490* @param length the number of bytes in the parameter data.1491* @throws SQLException if parameterIndex does not correspond1492* to a parameter marker in the SQL statement, or if the length specified1493* is less than zero; if the number of bytes in the inputstream does not match1494* the specified length; if a database access error occurs or1495* this method is called on a closed <code>CallableStatement</code>1496* @exception SQLFeatureNotSupportedException if the JDBC driver does not support1497* this method1498*1499* @since 1.61500*/1501void setBlob(String parameterName, InputStream inputStream, long length)1502throws SQLException;15031504/**1505* Sets the designated parameter to the given <code>java.sql.Blob</code> object.1506* The driver converts this to an SQL <code>BLOB</code> value when it1507* sends it to the database.1508*1509* @param parameterName the name of the parameter1510* @param x a <code>Blob</code> object that maps an SQL <code>BLOB</code> value1511* @exception SQLException if a database access error occurs or1512* this method is called on a closed <code>CallableStatement</code>1513* @exception SQLFeatureNotSupportedException if the JDBC driver does not support1514* this method1515* @since 1.61516*/1517void setBlob (String parameterName, Blob x) throws SQLException;15181519/**1520* Sets the designated parameter to a <code>InputStream</code> object.1521* This method differs from the <code>setBinaryStream (int, InputStream)</code>1522* method because it informs the driver that the parameter value should be1523* sent to the server as a <code>BLOB</code>. When the <code>setBinaryStream</code> method is used,1524* the driver may have to do extra work to determine whether the parameter1525* data should be send to the server as a <code>LONGVARBINARY</code> or a <code>BLOB</code>1526*1527* <P><B>Note:</B> Consult your JDBC driver documentation to determine if1528* it might be more efficient to use a version of1529* <code>setBlob</code> which takes a length parameter.1530*1531* @param parameterName the name of the parameter1532* @param inputStream An object that contains the data to set the parameter1533* value to.1534* @throws SQLException if a database access error occurs or1535* this method is called on a closed <code>CallableStatement</code>1536* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method1537*1538* @since 1.61539*/1540void setBlob(String parameterName, InputStream inputStream)1541throws SQLException;15421543/**1544* Sets the designated parameter in this <code>RowSet</code> object's command1545* with the given <code>Clob</code> value. The driver will convert this1546* to the <code>CLOB</code> value that the <code>Clob</code> object1547* represents before sending it to the database.1548*1549* @param i the first parameter is 1, the second is 2, ...1550* @param x an object representing a CLOB1551* @exception SQLException if a database access error occurs1552*/1553void setClob (int i, Clob x) throws SQLException;15541555/**1556* Sets the designated parameter to a <code>Reader</code> object. The reader must contain the number1557* of characters specified by length otherwise a <code>SQLException</code> will be1558* generated when the <code>PreparedStatement</code> is executed.1559*This method differs from the <code>setCharacterStream (int, Reader, int)</code> method1560* because it informs the driver that the parameter value should be sent to1561* the server as a <code>CLOB</code>. When the <code>setCharacterStream</code> method is used, the1562* driver may have to do extra work to determine whether the parameter1563* data should be sent to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code>1564* @param parameterIndex index of the first parameter is 1, the second is 2, ...1565* @param reader An object that contains the data to set the parameter value to.1566* @param length the number of characters in the parameter data.1567* @throws SQLException if a database access error occurs, this method is called on1568* a closed <code>PreparedStatement</code>, if parameterIndex does not correspond to a parameter1569* marker in the SQL statement, or if the length specified is less than zero.1570*1571* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method1572* @since 1.61573*/1574void setClob(int parameterIndex, Reader reader, long length)1575throws SQLException;15761577/**1578* Sets the designated parameter to a <code>Reader</code> object.1579* This method differs from the <code>setCharacterStream (int, Reader)</code> method1580* because it informs the driver that the parameter value should be sent to1581* the server as a <code>CLOB</code>. When the <code>setCharacterStream</code> method is used, the1582* driver may have to do extra work to determine whether the parameter1583* data should be sent to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code>1584*1585* <P><B>Note:</B> Consult your JDBC driver documentation to determine if1586* it might be more efficient to use a version of1587* <code>setClob</code> which takes a length parameter.1588*1589* @param parameterIndex index of the first parameter is 1, the second is 2, ...1590* @param reader An object that contains the data to set the parameter value to.1591* @throws SQLException if a database access error occurs, this method is called on1592* a closed <code>PreparedStatement</code>or if parameterIndex does not correspond to a parameter1593* marker in the SQL statement1594*1595* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method1596* @since 1.61597*/1598void setClob(int parameterIndex, Reader reader)1599throws SQLException;16001601/**1602* Sets the designated parameter to a <code>Reader</code> object. The <code>reader</code> must contain the number1603* of characters specified by length otherwise a <code>SQLException</code> will be1604* generated when the <code>CallableStatement</code> is executed.1605* This method differs from the <code>setCharacterStream (int, Reader, int)</code> method1606* because it informs the driver that the parameter value should be sent to1607* the server as a <code>CLOB</code>. When the <code>setCharacterStream</code> method is used, the1608* driver may have to do extra work to determine whether the parameter1609* data should be send to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code>1610* @param parameterName the name of the parameter to be set1611* @param reader An object that contains the data to set the parameter value to.1612* @param length the number of characters in the parameter data.1613* @throws SQLException if parameterIndex does not correspond to a parameter1614* marker in the SQL statement; if the length specified is less than zero;1615* a database access error occurs or1616* this method is called on a closed <code>CallableStatement</code>1617* @exception SQLFeatureNotSupportedException if the JDBC driver does not support1618* this method1619*1620* @since 1.61621*/1622void setClob(String parameterName, Reader reader, long length)1623throws SQLException;16241625/**1626* Sets the designated parameter to the given <code>java.sql.Clob</code> object.1627* The driver converts this to an SQL <code>CLOB</code> value when it1628* sends it to the database.1629*1630* @param parameterName the name of the parameter1631* @param x a <code>Clob</code> object that maps an SQL <code>CLOB</code> value1632* @exception SQLException if a database access error occurs or1633* this method is called on a closed <code>CallableStatement</code>1634* @exception SQLFeatureNotSupportedException if the JDBC driver does not support1635* this method1636* @since 1.61637*/1638void setClob (String parameterName, Clob x) throws SQLException;16391640/**1641* Sets the designated parameter to a <code>Reader</code> object.1642* This method differs from the <code>setCharacterStream (int, Reader)</code> method1643* because it informs the driver that the parameter value should be sent to1644* the server as a <code>CLOB</code>. When the <code>setCharacterStream</code> method is used, the1645* driver may have to do extra work to determine whether the parameter1646* data should be send to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code>1647*1648* <P><B>Note:</B> Consult your JDBC driver documentation to determine if1649* it might be more efficient to use a version of1650* <code>setClob</code> which takes a length parameter.1651*1652* @param parameterName the name of the parameter1653* @param reader An object that contains the data to set the parameter value to.1654* @throws SQLException if a database access error occurs or this method is called on1655* a closed <code>CallableStatement</code>1656*1657* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method1658* @since 1.61659*/1660void setClob(String parameterName, Reader reader)1661throws SQLException;16621663/**1664* Sets the designated parameter in this <code>RowSet</code> object's command1665* with the given <code>Array</code> value. The driver will convert this1666* to the <code>ARRAY</code> value that the <code>Array</code> object1667* represents before sending it to the database.1668*1669* @param i the first parameter is 1, the second is 2, ...1670* @param x an object representing an SQL array1671* @exception SQLException if a database access error occurs1672*/1673void setArray (int i, Array x) throws SQLException;16741675/**1676* Sets the designated parameter in this <code>RowSet</code> object's command1677* with the given <code>java.sql.Date</code> value. The driver will convert this1678* to an SQL <code>DATE</code> value, using the given <code>java.util.Calendar</code>1679* object to calculate the date.1680*1681* @param parameterIndex the first parameter is 1, the second is 2, ...1682* @param x the parameter value1683* @param cal the <code>java.util.Calendar</code> object to use for calculating the date1684* @exception SQLException if a database access error occurs1685*/1686void setDate(int parameterIndex, java.sql.Date x, Calendar cal)1687throws SQLException;16881689/**1690* Sets the designated parameter to the given <code>java.sql.Date</code> value1691* using the default time zone of the virtual machine that is running1692* the application.1693* The driver converts this1694* to an SQL <code>DATE</code> value when it sends it to the database.1695*1696* @param parameterName the name of the parameter1697* @param x the parameter value1698* @exception SQLException if a database access error occurs or1699* this method is called on a closed <code>CallableStatement</code>1700* @exception SQLFeatureNotSupportedException if the JDBC driver does not support1701* this method1702* @see #getDate1703* @since 1.41704*/1705void setDate(String parameterName, java.sql.Date x)1706throws SQLException;17071708/**1709* Sets the designated parameter to the given <code>java.sql.Date</code> value,1710* using the given <code>Calendar</code> object. The driver uses1711* the <code>Calendar</code> object to construct an SQL <code>DATE</code> value,1712* which the driver then sends to the database. With a1713* a <code>Calendar</code> object, the driver can calculate the date1714* taking into account a custom timezone. If no1715* <code>Calendar</code> object is specified, the driver uses the default1716* timezone, which is that of the virtual machine running the application.1717*1718* @param parameterName the name of the parameter1719* @param x the parameter value1720* @param cal the <code>Calendar</code> object the driver will use1721* to construct the date1722* @exception SQLException if a database access error occurs or1723* this method is called on a closed <code>CallableStatement</code>1724* @exception SQLFeatureNotSupportedException if the JDBC driver does not support1725* this method1726* @see #getDate1727* @since 1.41728*/1729void setDate(String parameterName, java.sql.Date x, Calendar cal)1730throws SQLException;17311732/**1733* Sets the designated parameter in this <code>RowSet</code> object's command1734* with the given <code>java.sql.Time</code> value. The driver will convert this1735* to an SQL <code>TIME</code> value, using the given <code>java.util.Calendar</code>1736* object to calculate it, before sending it to the database.1737*1738* @param parameterIndex the first parameter is 1, the second is 2, ...1739* @param x the parameter value1740* @param cal the <code>java.util.Calendar</code> object to use for calculating the time1741* @exception SQLException if a database access error occurs1742*/1743void setTime(int parameterIndex, java.sql.Time x, Calendar cal)1744throws SQLException;17451746/**1747* Sets the designated parameter to the given <code>java.sql.Time</code> value.1748* The driver converts this1749* to an SQL <code>TIME</code> value when it sends it to the database.1750*1751* @param parameterName the name of the parameter1752* @param x the parameter value1753* @exception SQLException if a database access error occurs or1754* this method is called on a closed <code>CallableStatement</code>1755* @exception SQLFeatureNotSupportedException if the JDBC driver does not support1756* this method1757* @see #getTime1758* @since 1.41759*/1760void setTime(String parameterName, java.sql.Time x)1761throws SQLException;17621763/**1764* Sets the designated parameter to the given <code>java.sql.Time</code> value,1765* using the given <code>Calendar</code> object. The driver uses1766* the <code>Calendar</code> object to construct an SQL <code>TIME</code> value,1767* which the driver then sends to the database. With a1768* a <code>Calendar</code> object, the driver can calculate the time1769* taking into account a custom timezone. If no1770* <code>Calendar</code> object is specified, the driver uses the default1771* timezone, which is that of the virtual machine running the application.1772*1773* @param parameterName the name of the parameter1774* @param x the parameter value1775* @param cal the <code>Calendar</code> object the driver will use1776* to construct the time1777* @exception SQLException if a database access error occurs or1778* this method is called on a closed <code>CallableStatement</code>1779* @exception SQLFeatureNotSupportedException if the JDBC driver does not support1780* this method1781* @see #getTime1782* @since 1.41783*/1784void setTime(String parameterName, java.sql.Time x, Calendar cal)1785throws SQLException;17861787/**1788* Sets the designated parameter in this <code>RowSet</code> object's command1789* with the given <code>java.sql.Timestamp</code> value. The driver will1790* convert this to an SQL <code>TIMESTAMP</code> value, using the given1791* <code>java.util.Calendar</code> object to calculate it, before sending it to the1792* database.1793*1794* @param parameterIndex the first parameter is 1, the second is 2, ...1795* @param x the parameter value1796* @param cal the <code>java.util.Calendar</code> object to use for calculating the1797* timestamp1798* @exception SQLException if a database access error occurs1799*/1800void setTimestamp(int parameterIndex, java.sql.Timestamp x, Calendar cal)1801throws SQLException;18021803/**1804* Sets the designated parameter to the given <code>java.sql.Timestamp</code> value,1805* using the given <code>Calendar</code> object. The driver uses1806* the <code>Calendar</code> object to construct an SQL <code>TIMESTAMP</code> value,1807* which the driver then sends to the database. With a1808* a <code>Calendar</code> object, the driver can calculate the timestamp1809* taking into account a custom timezone. If no1810* <code>Calendar</code> object is specified, the driver uses the default1811* timezone, which is that of the virtual machine running the application.1812*1813* @param parameterName the name of the parameter1814* @param x the parameter value1815* @param cal the <code>Calendar</code> object the driver will use1816* to construct the timestamp1817* @exception SQLException if a database access error occurs or1818* this method is called on a closed <code>CallableStatement</code>1819* @exception SQLFeatureNotSupportedException if the JDBC driver does not support1820* this method1821* @see #getTimestamp1822* @since 1.41823*/1824void setTimestamp(String parameterName, java.sql.Timestamp x, Calendar cal)1825throws SQLException;18261827/**1828* Clears the parameters set for this <code>RowSet</code> object's command.1829* <P>In general, parameter values remain in force for repeated use of a1830* <code>RowSet</code> object. Setting a parameter value automatically clears its1831* previous value. However, in some cases it is useful to immediately1832* release the resources used by the current parameter values, which can1833* be done by calling the method <code>clearParameters</code>.1834*1835* @exception SQLException if a database access error occurs1836*/1837void clearParameters() throws SQLException;18381839//---------------------------------------------------------------------1840// Reading and writing data1841//---------------------------------------------------------------------18421843/**1844* Fills this <code>RowSet</code> object with data.1845* <P>1846* The <code>execute</code> method may use the following properties1847* to create a connection for reading data: url, data source name,1848* user name, password, transaction isolation, and type map.1849*1850* The <code>execute</code> method may use the following properties1851* to create a statement to execute a command:1852* command, read only, maximum field size,1853* maximum rows, escape processing, and query timeout.1854* <P>1855* If the required properties have not been set, an exception is1856* thrown. If this method is successful, the current contents of the rowset are1857* discarded and the rowset's metadata is also (re)set. If there are1858* outstanding updates, they are ignored.1859* <P>1860* If this <code>RowSet</code> object does not maintain a continuous connection1861* with its source of data, it may use a reader (a <code>RowSetReader</code>1862* object) to fill itself with data. In this case, a reader will have been1863* registered with this <code>RowSet</code> object, and the method1864* <code>execute</code> will call on the reader's <code>readData</code>1865* method as part of its implementation.1866*1867* @exception SQLException if a database access error occurs or any of the1868* properties necessary for making a connection and creating1869* a statement have not been set1870*/1871void execute() throws SQLException;18721873//--------------------------------------------------------------------1874// Events1875//--------------------------------------------------------------------18761877/**1878* Registers the given listener so that it will be notified of events1879* that occur on this <code>RowSet</code> object.1880*1881* @param listener a component that has implemented the <code>RowSetListener</code>1882* interface and wants to be notified when events occur on this1883* <code>RowSet</code> object1884* @see #removeRowSetListener1885*/1886void addRowSetListener(RowSetListener listener);18871888/**1889* Removes the specified listener from the list of components that will be1890* notified when an event occurs on this <code>RowSet</code> object.1891*1892* @param listener a component that has been registered as a listener for this1893* <code>RowSet</code> object1894* @see #addRowSetListener1895*/1896void removeRowSetListener(RowSetListener listener);18971898/**1899* Sets the designated parameter to the given <code>java.sql.SQLXML</code> object. The driver converts this to an1900* SQL <code>XML</code> value when it sends it to the database.1901* @param parameterIndex index of the first parameter is 1, the second is 2, ...1902* @param xmlObject a <code>SQLXML</code> object that maps an SQL <code>XML</code> value1903* @throws SQLException if a database access error occurs, this method1904* is called on a closed result set,1905* the <code>java.xml.transform.Result</code>,1906* <code>Writer</code> or <code>OutputStream</code> has not been closed1907* for the <code>SQLXML</code> object or1908* if there is an error processing the XML value. The <code>getCause</code> method1909* of the exception may provide a more detailed exception, for example, if the1910* stream does not contain valid XML.1911* @since 1.61912*/1913void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException;19141915/**1916* Sets the designated parameter to the given <code>java.sql.SQLXML</code> object. The driver converts this to an1917* <code>SQL XML</code> value when it sends it to the database.1918* @param parameterName the name of the parameter1919* @param xmlObject a <code>SQLXML</code> object that maps an <code>SQL XML</code> value1920* @throws SQLException if a database access error occurs, this method1921* is called on a closed result set,1922* the <code>java.xml.transform.Result</code>,1923* <code>Writer</code> or <code>OutputStream</code> has not been closed1924* for the <code>SQLXML</code> object or1925* if there is an error processing the XML value. The <code>getCause</code> method1926* of the exception may provide a more detailed exception, for example, if the1927* stream does not contain valid XML.1928* @since 1.61929*/1930void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException;19311932/**1933* Sets the designated parameter to the given <code>java.sql.RowId</code> object. The1934* driver converts this to a SQL <code>ROWID</code> value when it sends it1935* to the database1936*1937* @param parameterIndex the first parameter is 1, the second is 2, ...1938* @param x the parameter value1939* @throws SQLException if a database access error occurs1940*1941* @since 1.61942*/1943void setRowId(int parameterIndex, RowId x) throws SQLException;19441945/**1946* Sets the designated parameter to the given <code>java.sql.RowId</code> object. The1947* driver converts this to a SQL <code>ROWID</code> when it sends it to the1948* database.1949*1950* @param parameterName the name of the parameter1951* @param x the parameter value1952* @throws SQLException if a database access error occurs1953* @since 1.61954*/1955void setRowId(String parameterName, RowId x) throws SQLException;19561957/**1958* Sets the designated parameter to the given <code>String</code> object.1959* The driver converts this to a SQL <code>NCHAR</code> or1960* <code>NVARCHAR</code> or <code>LONGNVARCHAR</code> value1961* (depending on the argument's1962* size relative to the driver's limits on <code>NVARCHAR</code> values)1963* when it sends it to the database.1964*1965* @param parameterIndex of the first parameter is 1, the second is 2, ...1966* @param value the parameter value1967* @throws SQLException if the driver does not support national1968* character sets; if the driver can detect that a data conversion1969* error could occur ; or if a database access error occurs1970* @since 1.61971*/1972void setNString(int parameterIndex, String value) throws SQLException;19731974/**1975* Sets the designated parameter to the given <code>String</code> object.1976* The driver converts this to a SQL <code>NCHAR</code> or1977* <code>NVARCHAR</code> or <code>LONGNVARCHAR</code>1978* @param parameterName the name of the column to be set1979* @param value the parameter value1980* @throws SQLException if the driver does not support national1981* character sets; if the driver can detect that a data conversion1982* error could occur; or if a database access error occurs1983* @since 1.61984*/1985public void setNString(String parameterName, String value)1986throws SQLException;19871988/**1989* Sets the designated parameter to a <code>Reader</code> object. The1990* <code>Reader</code> reads the data till end-of-file is reached. The1991* driver does the necessary conversion from Java character format to1992* the national character set in the database.1993* @param parameterIndex of the first parameter is 1, the second is 2, ...1994* @param value the parameter value1995* @param length the number of characters in the parameter data.1996* @throws SQLException if the driver does not support national1997* character sets; if the driver can detect that a data conversion1998* error could occur ; or if a database access error occurs1999* @since 1.62000*/2001void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException;20022003/**2004* Sets the designated parameter to a <code>Reader</code> object. The2005* <code>Reader</code> reads the data till end-of-file is reached. The2006* driver does the necessary conversion from Java character format to2007* the national character set in the database.2008* @param parameterName the name of the column to be set2009* @param value the parameter value2010* @param length the number of characters in the parameter data.2011* @throws SQLException if the driver does not support national2012* character sets; if the driver can detect that a data conversion2013* error could occur; or if a database access error occurs2014* @since 1.62015*/2016public void setNCharacterStream(String parameterName, Reader value, long length)2017throws SQLException;20182019/**2020* Sets the designated parameter to a <code>Reader</code> object. The2021* <code>Reader</code> reads the data till end-of-file is reached. The2022* driver does the necessary conversion from Java character format to2023* the national character set in the database.20242025* <P><B>Note:</B> This stream object can either be a standard2026* Java stream object or your own subclass that implements the2027* standard interface.2028* <P><B>Note:</B> Consult your JDBC driver documentation to determine if2029* it might be more efficient to use a version of2030* <code>setNCharacterStream</code> which takes a length parameter.2031*2032* @param parameterName the name of the parameter2033* @param value the parameter value2034* @throws SQLException if the driver does not support national2035* character sets; if the driver can detect that a data conversion2036* error could occur ; if a database access error occurs; or2037* this method is called on a closed <code>CallableStatement</code>2038* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method2039* @since 1.62040*/2041void setNCharacterStream(String parameterName, Reader value) throws SQLException;20422043/**2044* Sets the designated parameter to a <code>java.sql.NClob</code> object. The object2045* implements the <code>java.sql.NClob</code> interface. This <code>NClob</code>2046* object maps to a SQL <code>NCLOB</code>.2047* @param parameterName the name of the column to be set2048* @param value the parameter value2049* @throws SQLException if the driver does not support national2050* character sets; if the driver can detect that a data conversion2051* error could occur; or if a database access error occurs2052* @since 1.62053*/2054void setNClob(String parameterName, NClob value) throws SQLException;20552056/**2057* Sets the designated parameter to a <code>Reader</code> object. The <code>reader</code> must contain the number2058* of characters specified by length otherwise a <code>SQLException</code> will be2059* generated when the <code>CallableStatement</code> is executed.2060* This method differs from the <code>setCharacterStream (int, Reader, int)</code> method2061* because it informs the driver that the parameter value should be sent to2062* the server as a <code>NCLOB</code>. When the <code>setCharacterStream</code> method is used, the2063* driver may have to do extra work to determine whether the parameter2064* data should be send to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code>2065*2066* @param parameterName the name of the parameter to be set2067* @param reader An object that contains the data to set the parameter value to.2068* @param length the number of characters in the parameter data.2069* @throws SQLException if parameterIndex does not correspond to a parameter2070* marker in the SQL statement; if the length specified is less than zero;2071* if the driver does not support national2072* character sets; if the driver can detect that a data conversion2073* error could occur; if a database access error occurs or2074* this method is called on a closed <code>CallableStatement</code>2075* @exception SQLFeatureNotSupportedException if the JDBC driver does not support2076* this method2077* @since 1.62078*/2079void setNClob(String parameterName, Reader reader, long length)2080throws SQLException;20812082/**2083* Sets the designated parameter to a <code>Reader</code> object.2084* This method differs from the <code>setCharacterStream (int, Reader)</code> method2085* because it informs the driver that the parameter value should be sent to2086* the server as a <code>NCLOB</code>. When the <code>setCharacterStream</code> method is used, the2087* driver may have to do extra work to determine whether the parameter2088* data should be send to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code>2089* <P><B>Note:</B> Consult your JDBC driver documentation to determine if2090* it might be more efficient to use a version of2091* <code>setNClob</code> which takes a length parameter.2092*2093* @param parameterName the name of the parameter2094* @param reader An object that contains the data to set the parameter value to.2095* @throws SQLException if the driver does not support national character sets;2096* if the driver can detect that a data conversion2097* error could occur; if a database access error occurs or2098* this method is called on a closed <code>CallableStatement</code>2099* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method2100*2101* @since 1.62102*/2103void setNClob(String parameterName, Reader reader)2104throws SQLException;21052106/**2107* Sets the designated parameter to a <code>Reader</code> object. The reader must contain the number2108* of characters specified by length otherwise a <code>SQLException</code> will be2109* generated when the <code>PreparedStatement</code> is executed.2110* This method differs from the <code>setCharacterStream (int, Reader, int)</code> method2111* because it informs the driver that the parameter value should be sent to2112* the server as a <code>NCLOB</code>. When the <code>setCharacterStream</code> method is used, the2113* driver may have to do extra work to determine whether the parameter2114* data should be sent to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code>2115* @param parameterIndex index of the first parameter is 1, the second is 2, ...2116* @param reader An object that contains the data to set the parameter value to.2117* @param length the number of characters in the parameter data.2118* @throws SQLException if parameterIndex does not correspond to a parameter2119* marker in the SQL statement; if the length specified is less than zero;2120* if the driver does not support national character sets;2121* if the driver can detect that a data conversion2122* error could occur; if a database access error occurs or2123* this method is called on a closed <code>PreparedStatement</code>2124* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method2125*2126* @since 1.62127*/2128void setNClob(int parameterIndex, Reader reader, long length)2129throws SQLException;21302131/**2132* Sets the designated parameter to a <code>java.sql.NClob</code> object. The driver converts this to a2133* SQL <code>NCLOB</code> value when it sends it to the database.2134* @param parameterIndex of the first parameter is 1, the second is 2, ...2135* @param value the parameter value2136* @throws SQLException if the driver does not support national2137* character sets; if the driver can detect that a data conversion2138* error could occur ; or if a database access error occurs2139* @since 1.62140*/2141void setNClob(int parameterIndex, NClob value) throws SQLException;21422143/**2144* Sets the designated parameter to a <code>Reader</code> object.2145* This method differs from the <code>setCharacterStream (int, Reader)</code> method2146* because it informs the driver that the parameter value should be sent to2147* the server as a <code>NCLOB</code>. When the <code>setCharacterStream</code> method is used, the2148* driver may have to do extra work to determine whether the parameter2149* data should be sent to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code>2150* <P><B>Note:</B> Consult your JDBC driver documentation to determine if2151* it might be more efficient to use a version of2152* <code>setNClob</code> which takes a length parameter.2153*2154* @param parameterIndex index of the first parameter is 1, the second is 2, ...2155* @param reader An object that contains the data to set the parameter value to.2156* @throws SQLException if parameterIndex does not correspond to a parameter2157* marker in the SQL statement;2158* if the driver does not support national character sets;2159* if the driver can detect that a data conversion2160* error could occur; if a database access error occurs or2161* this method is called on a closed <code>PreparedStatement</code>2162* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method2163*2164* @since 1.62165*/2166void setNClob(int parameterIndex, Reader reader)2167throws SQLException;21682169/**2170* Sets the designated parameter to the given <code>java.net.URL</code> value.2171* The driver converts this to an SQL <code>DATALINK</code> value2172* when it sends it to the database.2173*2174* @param parameterIndex the first parameter is 1, the second is 2, ...2175* @param x the <code>java.net.URL</code> object to be set2176* @exception SQLException if a database access error occurs or2177* this method is called on a closed <code>PreparedStatement</code>2178* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method2179* @since 1.42180*/2181void setURL(int parameterIndex, java.net.URL x) throws SQLException;2182218321842185}218621872188