Path: blob/master/src/java.sql.rowset/share/classes/com/sun/rowset/JdbcRowSetImpl.java
40948 views
/*1* Copyright (c) 2003, 2019, 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 com.sun.rowset;2627import java.sql.*;28import javax.sql.*;29import javax.naming.*;30import java.io.*;31import java.math.*;32import java.util.*;3334import javax.sql.rowset.*;3536/**37* The standard implementation of the {@code JdbcRowSet} interface. See the interface38* definition for full behavior and implementation requirements.39*40* @author Jonathan Bruce, Amit Handa41*/4243public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {4445/**46* The {@code Connection} object that is this rowset's47* current connection to the database. This field is set48* internally when the connection is established.49*/50private Connection conn;5152/**53* The {@code PreparedStatement} object that is this rowset's54* current command. This field is set internally when the method55* {@code execute} creates the {@code PreparedStatement}56* object.57*/58private PreparedStatement ps;5960/**61* The {@code ResultSet} object that is this rowset's62* current result set. This field is set internally when the method63* {@code execute} executes the rowset's command and thereby64* creates the rowset's {@code ResultSet} object.65*/66private ResultSet rs;6768/**69* The {@code RowSetMetaDataImpl} object that is constructed when70* a {@code ResultSet} object is passed to the {@code JdbcRowSet}71* constructor. This helps in constructing all metadata associated72* with the {@code ResultSet} object using the setter methods of73* {@code RowSetMetaDataImpl}.74*/75private RowSetMetaDataImpl rowsMD;7677/**78* The {@code ResultSetMetaData} object from which this79* {@code RowSetMetaDataImpl} is formed and which helps in getting80* the metadata information.81*/82private ResultSetMetaData resMD;838485/**86* The Vector holding the Match Columns87*/88private Vector<Integer> iMatchColumns;8990/**91* The Vector that will hold the Match Column names.92*/93private Vector<String> strMatchColumns;949596protected transient JdbcRowSetResourceBundle resBundle;9798/**99* Constructs a default {@code JdbcRowSet} object.100* The new instance of {@code JdbcRowSet} will serve as a proxy101* for the {@code ResultSet} object it creates, and by so doing,102* it will make it possible to use the result set as a JavaBeans103* component.104* <P>105* The following is true of a default {@code JdbcRowSet} instance:106* <UL>107* <LI>Does not show deleted rows108* <LI>Has no time limit for how long a driver may take to109* execute the rowset's command110* <LI>Has no limit for the number of rows it may contain111* <LI>Has no limit for the number of bytes a column may contain112* <LI>Has a scrollable cursor and does not show changes113* made by others114* <LI>Will not see uncommitted data (make "dirty" reads)115* <LI>Has escape processing turned on116* <LI>Has its connection's type map set to {@code null}117* <LI>Has an empty {@code Hashtable} object for storing any118* parameters that are set119* </UL>120* A newly created {@code JdbcRowSet} object must have its121* {@code execute} method invoked before other public methods122* are called on it; otherwise, such method calls will cause an123* exception to be thrown.124*125* @throws SQLException [1] if any of its public methods are called prior126* to calling the {@code execute} method; [2] if invalid JDBC driver127* properties are set or [3] if no connection to a data source exists.128*/129public JdbcRowSetImpl() {130conn = null;131ps = null;132rs = null;133134try {135resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();136} catch(IOException ioe) {137throw new RuntimeException(ioe);138}139140141initParams();142143// set the defaults144145try {146setShowDeleted(false);147} catch(SQLException sqle) {148System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setshowdeleted").toString() +149sqle.getLocalizedMessage());150}151152try {153setQueryTimeout(0);154} catch(SQLException sqle) {155System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setquerytimeout").toString() +156sqle.getLocalizedMessage());157}158159try {160setMaxRows(0);161} catch(SQLException sqle) {162System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setmaxrows").toString() +163sqle.getLocalizedMessage());164}165166try {167setMaxFieldSize(0);168} catch(SQLException sqle) {169System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setmaxfieldsize").toString() +170sqle.getLocalizedMessage());171}172173try {174setEscapeProcessing(true);175} catch(SQLException sqle) {176System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setescapeprocessing").toString() +177sqle.getLocalizedMessage());178}179180try {181setConcurrency(ResultSet.CONCUR_UPDATABLE);182} catch (SQLException sqle) {183System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setconcurrency").toString() +184sqle.getLocalizedMessage());185}186187setTypeMap(null);188189try {190setType(ResultSet.TYPE_SCROLL_INSENSITIVE);191} catch(SQLException sqle){192System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.settype").toString() +193sqle.getLocalizedMessage());194}195196setReadOnly(true);197198try {199setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);200} catch(SQLException sqle){201System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.settransactionisolation").toString() +202sqle.getLocalizedMessage());203}204205//Instantiating the vector for MatchColumns206207iMatchColumns = new Vector<Integer>(10);208for(int i = 0; i < 10 ; i++) {209iMatchColumns.add(i,Integer.valueOf(-1));210}211212strMatchColumns = new Vector<String>(10);213for(int j = 0; j < 10; j++) {214strMatchColumns.add(j,null);215}216}217218/**219* Constructs a default {@code JdbcRowSet} object given a220* valid {@code Connection} object. The new221* instance of {@code JdbcRowSet} will serve as a proxy for222* the {@code ResultSet} object it creates, and by so doing,223* it will make it possible to use the result set as a JavaBeans224* component.225* <P>226* The following is true of a default {@code JdbcRowSet} instance:227* <UL>228* <LI>Does not show deleted rows229* <LI>Has no time limit for how long a driver may take to230* execute the rowset's command231* <LI>Has no limit for the number of rows it may contain232* <LI>Has no limit for the number of bytes a column may contain233* <LI>Has a scrollable cursor and does not show changes234* made by others235* <LI>Will not see uncommitted data (make "dirty" reads)236* <LI>Has escape processing turned on237* <LI>Has its connection's type map set to {@code null}238* <LI>Has an empty {@code Hashtable} object for storing any239* parameters that are set240* </UL>241* A newly created {@code JdbcRowSet} object must have its242* {@code execute} method invoked before other public methods243* are called on it; otherwise, such method calls will cause an244* exception to be thrown.245*246* @throws SQLException [1] if any of its public methods are called prior247* to calling the {@code execute} method, [2] if invalid JDBC driver248* properties are set, or [3] if no connection to a data source exists.249*/250public JdbcRowSetImpl(Connection con) throws SQLException {251252conn = con;253ps = null;254rs = null;255256try {257resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();258} catch(IOException ioe) {259throw new RuntimeException(ioe);260}261262263initParams();264// set the defaults265setShowDeleted(false);266setQueryTimeout(0);267setMaxRows(0);268setMaxFieldSize(0);269270setParams();271272setReadOnly(true);273setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);274setEscapeProcessing(true);275setTypeMap(null);276277//Instantiating the vector for MatchColumns278279iMatchColumns = new Vector<Integer>(10);280for(int i = 0; i < 10 ; i++) {281iMatchColumns.add(i,Integer.valueOf(-1));282}283284strMatchColumns = new Vector<String>(10);285for(int j = 0; j < 10; j++) {286strMatchColumns.add(j,null);287}288}289290/**291* Constructs a default {@code JdbcRowSet} object using the292* URL, username, and password arguments supplied. The new293* instance of {@code JdbcRowSet} will serve as a proxy for294* the {@code ResultSet} object it creates, and by so doing,295* it will make it possible to use the result set as a JavaBeans296* component.297*298* <P>299* The following is true of a default {@code JdbcRowSet} instance:300* <UL>301* <LI>Does not show deleted rows302* <LI>Has no time limit for how long a driver may take to303* execute the rowset's command304* <LI>Has no limit for the number of rows it may contain305* <LI>Has no limit for the number of bytes a column may contain306* <LI>Has a scrollable cursor and does not show changes307* made by others308* <LI>Will not see uncommitted data (make "dirty" reads)309* <LI>Has escape processing turned on310* <LI>Has its connection's type map set to {@code null}311* <LI>Has an empty {@code Hashtable} object for storing any312* parameters that are set313* </UL>314*315* @param url a JDBC URL for the database to which this {@code JdbcRowSet}316* object will be connected. The form for a JDBC URL is317* {@code jdbc:subprotocol:subname}.318* @param user the database user on whose behalf the connection319* is being made320* @param password the user's password321*322* @throws SQLException if a database access error occurs323*324*/325public JdbcRowSetImpl(String url, String user, String password) throws SQLException {326conn = null;327ps = null;328rs = null;329330try {331resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();332} catch(IOException ioe) {333throw new RuntimeException(ioe);334}335336337initParams();338339// Pass the arguments to BaseRowSet340// setter methods now.341342setUsername(user);343setPassword(password);344setUrl(url);345346// set the defaults347setShowDeleted(false);348setQueryTimeout(0);349setMaxRows(0);350setMaxFieldSize(0);351352setParams();353354setReadOnly(true);355setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);356setEscapeProcessing(true);357setTypeMap(null);358359//Instantiating the vector for MatchColumns360361iMatchColumns = new Vector<Integer>(10);362for(int i = 0; i < 10 ; i++) {363iMatchColumns.add(i,Integer.valueOf(-1));364}365366strMatchColumns = new Vector<String>(10);367for(int j = 0; j < 10; j++) {368strMatchColumns.add(j,null);369}370}371372373/**374* Constructs a {@code JdbcRowSet} object using the given valid375* {@code ResultSet} object. The new376* instance of {@code JdbcRowSet} will serve as a proxy for377* the {@code ResultSet} object, and by so doing,378* it will make it possible to use the result set as a JavaBeans379* component.380*381* <P>382* The following is true of a default {@code JdbcRowSet} instance:383* <UL>384* <LI>Does not show deleted rows385* <LI>Has no time limit for how long a driver may take to386* execute the rowset's command387* <LI>Has no limit for the number of rows it may contain388* <LI>Has no limit for the number of bytes a column may contain389* <LI>Has a scrollable cursor and does not show changes390* made by others391* <LI>Will not see uncommitted data (make "dirty" reads)392* <LI>Has escape processing turned on393* <LI>Has its connection's type map set to {@code null}394* <LI>Has an empty {@code Hashtable} object for storing any395* parameters that are set396* </UL>397*398* @param res a valid {@code ResultSet} object399*400* @throws SQLException if a database access occurs due to a non401* valid ResultSet handle.402*/403public JdbcRowSetImpl(ResultSet res) throws SQLException {404405// A ResultSet handle encapsulates a connection handle.406// But there is no way we can retrieve a Connection handle407// from a ResultSet object.408// So to avoid any anomalies we keep the conn = null409// The passed rs handle will be a wrapper around for410// "this" object's all operations.411conn = null;412413ps = null;414415rs = res;416417try {418resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();419} catch(IOException ioe) {420throw new RuntimeException(ioe);421}422423424initParams();425426// get the values from the resultset handle.427setShowDeleted(false);428setQueryTimeout(0);429setMaxRows(0);430setMaxFieldSize(0);431432setParams();433434setReadOnly(true);435setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);436setEscapeProcessing(true);437setTypeMap(null);438439// Get a handle to ResultSetMetaData440// Construct RowSetMetaData out of it.441442resMD = rs.getMetaData();443444rowsMD = new RowSetMetaDataImpl();445446initMetaData(rowsMD, resMD);447448//Instantiating the vector for MatchColumns449450iMatchColumns = new Vector<Integer>(10);451for(int i = 0; i < 10 ; i++) {452iMatchColumns.add(i,Integer.valueOf(-1));453}454455strMatchColumns = new Vector<String>(10);456for(int j = 0; j < 10; j++) {457strMatchColumns.add(j,null);458}459}460461/**462* Initializes the given {@code RowSetMetaData} object with the values463* in the given {@code ResultSetMetaData} object.464*465* @param md the {@code RowSetMetaData} object for this466* {@code JdbcRowSetImpl} object, which will be set with467* values from rsmd468* @param rsmd the {@code ResultSetMetaData} object from which new469* values for md will be read470* @throws SQLException if an error occurs471*/472protected void initMetaData(RowSetMetaData md, ResultSetMetaData rsmd) throws SQLException {473int numCols = rsmd.getColumnCount();474475md.setColumnCount(numCols);476for (int col=1; col <= numCols; col++) {477md.setAutoIncrement(col, rsmd.isAutoIncrement(col));478md.setCaseSensitive(col, rsmd.isCaseSensitive(col));479md.setCurrency(col, rsmd.isCurrency(col));480md.setNullable(col, rsmd.isNullable(col));481md.setSigned(col, rsmd.isSigned(col));482md.setSearchable(col, rsmd.isSearchable(col));483md.setColumnDisplaySize(col, rsmd.getColumnDisplaySize(col));484md.setColumnLabel(col, rsmd.getColumnLabel(col));485md.setColumnName(col, rsmd.getColumnName(col));486md.setSchemaName(col, rsmd.getSchemaName(col));487md.setPrecision(col, rsmd.getPrecision(col));488md.setScale(col, rsmd.getScale(col));489md.setTableName(col, rsmd.getTableName(col));490md.setCatalogName(col, rsmd.getCatalogName(col));491md.setColumnType(col, rsmd.getColumnType(col));492md.setColumnTypeName(col, rsmd.getColumnTypeName(col));493}494}495496497protected void checkState() throws SQLException {498499// If all the three i.e. conn, ps & rs are500// simultaneously null implies we are not connected501// to the db, implies undesirable state so throw exception502503if (conn == null && ps == null && rs == null ) {504throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.invalstate").toString());505}506}507508//---------------------------------------------------------------------509// Reading and writing data510//---------------------------------------------------------------------511512/**513* Creates the internal {@code ResultSet} object for which this514* {@code JdbcRowSet} object is a wrapper, effectively515* making the result set a JavaBeans component.516* <P>517* Certain properties must have been set before this method is called518* so that it can establish a connection to a database and execute the519* query that will create the result set. If a {@code DataSource}520* object will be used to create the connection, properties for the521* data source name, user name, and password must be set. If the522* {@code DriverManager} will be used, the properties for the523* URL, user name, and password must be set. In either case, the524* property for the command must be set. If the command has placeholder525* parameters, those must also be set. This method throws526* an exception if the required properties are not set.527* <P>528* Other properties have default values that may optionally be set529* to new values. The {@code execute} method will use the value530* for the command property to create a {@code PreparedStatement}531* object and set its properties (escape processing, maximum field532* size, maximum number of rows, and query timeout limit) to be those533* of this rowset.534*535* @throws SQLException if (1) a database access error occurs,536* (2) any required JDBC properties are not set, or (3) if an537* invalid connection exists.538*/539public void execute() throws SQLException {540/*541* To execute based on the properties:542* i) determine how to get a connection543* ii) prepare the statement544* iii) set the properties of the statement545* iv) parse the params. and set them546* v) execute the statement547*548* During all of this try to tolerate as many errors549* as possible, many drivers will not support all of550* the properties and will/should throw SQLException551* at us...552*553*/554555prepare();556557// set the properties of our shiny new statement558setProperties(ps);559560561// set the parameters562decodeParams(getParams(), ps);563564565// execute the statement566rs = ps.executeQuery();567568569// notify listeners570notifyRowSetChanged();571572573}574575protected void setProperties(PreparedStatement ps) throws SQLException {576577try {578ps.setEscapeProcessing(getEscapeProcessing());579} catch (SQLException ex) {580System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setescapeprocessing").toString() +581ex.getLocalizedMessage());582}583584try {585ps.setMaxFieldSize(getMaxFieldSize());586} catch (SQLException ex) {587System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setmaxfieldsize").toString() +588ex.getLocalizedMessage());589}590591try {592ps.setMaxRows(getMaxRows());593} catch (SQLException ex) {594System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setmaxrows").toString() +595ex.getLocalizedMessage());596}597598try {599ps.setQueryTimeout(getQueryTimeout());600} catch (SQLException ex) {601System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setquerytimeout").toString() +602ex.getLocalizedMessage());603}604605}606607private Connection connect() throws SQLException {608609// Get a JDBC connection.610611// First check for Connection handle object as such if612// "this" initialized using conn.613614if(conn != null) {615return conn;616617} else if (getDataSourceName() != null) {618619// Connect using JNDI.620try {621Context ctx = new InitialContext();622DataSource ds = (DataSource)ctx.lookup623(getDataSourceName());624//return ds.getConnection(getUsername(),getPassword());625626if(getUsername() != null && !getUsername().isEmpty()) {627return ds.getConnection(getUsername(),getPassword());628} else {629return ds.getConnection();630}631}632catch (javax.naming.NamingException ex) {633throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.connect").toString());634}635636} else if (getUrl() != null) {637// Check only for getUrl() != null because638// user, passwd can be null639// Connect using the driver manager.640641return DriverManager.getConnection642(getUrl(), getUsername(), getPassword());643}644else {645return null;646}647648}649650651protected PreparedStatement prepare() throws SQLException {652// get a connection653conn = connect();654655try {656657Map<String, Class<?>> aMap = getTypeMap();658if( aMap != null) {659conn.setTypeMap(aMap);660}661ps = conn.prepareStatement(getCommand(),ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);662} catch (SQLException ex) {663System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.prepare").toString() +664ex.getLocalizedMessage());665666if (ps != null)667ps.close();668if (conn != null)669conn.close();670671throw new SQLException(ex.getMessage());672}673674return ps;675}676677@SuppressWarnings("deprecation")678private void decodeParams(Object[] params, PreparedStatement ps)679throws SQLException {680681// There is a corresponding decodeParams in JdbcRowSetImpl682// which does the same as this method. This is a design flaw.683// Update the CachedRowsetReader.decodeParams when you update684// this method.685686// Adding the same comments to CachedRowsetReader.decodeParams.687688int arraySize;689Object[] param = null;690691for (int i=0; i < params.length; i++) {692if (params[i] instanceof Object[]) {693param = (Object[])params[i];694695if (param.length == 2) {696if (param[0] == null) {697ps.setNull(i + 1, ((Integer)param[1]).intValue());698continue;699}700701if (param[0] instanceof java.sql.Date ||702param[0] instanceof java.sql.Time ||703param[0] instanceof java.sql.Timestamp) {704System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.detecteddate"));705if (param[1] instanceof java.util.Calendar) {706System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.detectedcalendar"));707ps.setDate(i + 1, (java.sql.Date)param[0],708(java.util.Calendar)param[1]);709continue;710}711else {712throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.paramtype").toString());713}714}715716if (param[0] instanceof Reader) {717ps.setCharacterStream(i + 1, (Reader)param[0],718((Integer)param[1]).intValue());719continue;720}721722/*723* What's left should be setObject(int, Object, scale)724*/725if (param[1] instanceof Integer) {726ps.setObject(i + 1, param[0], ((Integer)param[1]).intValue());727continue;728}729730} else if (param.length == 3) {731732if (param[0] == null) {733ps.setNull(i + 1, ((Integer)param[1]).intValue(),734(String)param[2]);735continue;736}737738if (param[0] instanceof java.io.InputStream) {739switch (((Integer)param[2]).intValue()) {740case JdbcRowSetImpl.UNICODE_STREAM_PARAM:741ps.setUnicodeStream(i + 1,742(java.io.InputStream)param[0],743((Integer)param[1]).intValue());744break;745case JdbcRowSetImpl.BINARY_STREAM_PARAM:746ps.setBinaryStream(i + 1,747(java.io.InputStream)param[0],748((Integer)param[1]).intValue());749break;750case JdbcRowSetImpl.ASCII_STREAM_PARAM:751ps.setAsciiStream(i + 1,752(java.io.InputStream)param[0],753((Integer)param[1]).intValue());754break;755default:756throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.paramtype").toString());757}758}759760/*761* no point at looking at the first element now;762* what's left must be the setObject() cases.763*/764if (param[1] instanceof Integer && param[2] instanceof Integer) {765ps.setObject(i + 1, param[0], ((Integer)param[1]).intValue(),766((Integer)param[2]).intValue());767continue;768}769770throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.paramtype").toString());771772} else {773// common case - this catches all SQL92 types774ps.setObject(i + 1, params[i]);775continue;776}777} else {778// Try to get all the params to be set here779ps.setObject(i + 1, params[i]);780781}782}783}784785/**786* Moves the cursor for this rowset's {@code ResultSet}787* object down one row from its current position.788* A {@code ResultSet} cursor is initially positioned789* before the first row; the first call to the method790* {@code next} makes the first row the current row; the791* second call makes the second row the current row, and so on.792*793* <P>If an input stream is open for the current row, a call794* to the method {@code next} will795* implicitly close it. A {@code ResultSet} object's796* warning chain is cleared when a new row is read.797*798* @return {@code true} if the new current row is valid;799* {@code false} if there are no more rows800* @throws SQLException if a database access error occurs801* or this rowset does not currently have a valid connection,802* prepared statement, and result set803*/804public boolean next() throws SQLException {805checkState();806807boolean b = rs.next();808notifyCursorMoved();809return b;810}811812/**813* Releases this rowset's {@code ResultSet} object's database and814* JDBC resources immediately instead of waiting for815* this to happen when it is automatically closed.816*817* <P><B>Note:</B> A {@code ResultSet} object818* is automatically closed by the819* {@code Statement} object that generated it when820* that {@code Statement} object is closed,821* re-executed, or is used to retrieve the next result from a822* sequence of multiple results. A {@code ResultSet} object823* is also automatically closed when it is garbage collected.824*825* @throws SQLException if a database access error occurs826*/827public void close() throws SQLException {828if (rs != null)829rs.close();830if (ps != null)831ps.close();832if (conn != null)833conn.close();834}835836/**837* Reports whether the last column read from this rowset's838* {@code ResultSet} object had a value of SQL {@code NULL}.839* Note that you must first call one of the {@code getXXX} methods840* on a column to try to read its value and then call841* the method {@code wasNull} to see if the value read was842* SQL {@code NULL}.843*844* @return {@code true} if the last column value read was SQL845* {@code NULL} and {@code false} otherwise846* @throws SQLException if a database access error occurs847* or this rowset does not have a currently valid connection,848* prepared statement, and result set849*/850public boolean wasNull() throws SQLException {851checkState();852853return rs.wasNull();854}855856//======================================================================857// Methods for accessing results by column index858//======================================================================859860/**861* Gets the value of the designated column in the current row862* of this rowset's {@code ResultSet} object as863* a {@code String}.864*865* @param columnIndex the first column is 1, the second is 2, and so on866* @return the column value; if the value is SQL {@code NULL}, the867* value returned is {@code null}868* @throws SQLException if (1) a database access error occurs869* or (2) this rowset does not currently have a valid connection,870* prepared statement, and result set871*/872public String getString(int columnIndex) throws SQLException {873checkState();874875return rs.getString(columnIndex);876}877878/**879* Gets the value of the designated column in the current row880* of this rowset's {@code ResultSet} object as881* a {@code boolean}.882*883* @param columnIndex the first column is 1, the second is 2, and so on884* @return the column value; if the value is SQL {@code NULL}, the885* value returned is {@code false}886* @throws SQLException if (1) a database access error occurs887* or (2) this rowset does not have a currently valid connection,888* prepared statement, and result set889*/890public boolean getBoolean(int columnIndex) throws SQLException {891checkState();892893return rs.getBoolean(columnIndex);894}895896/**897* Gets the value of the designated column in the current row898* of this rowset's {@code ResultSet} object as899* a {@code byte}.900*901* @param columnIndex the first column is 1, the second is 2, and so on902* @return the column value; if the value is SQL {@code NULL}, the903* value returned is {@code 0}904* @throws SQLException if (1) a database access error occurs905* or (2) this rowset does not have a currently valid connection,906* prepared statement, and result set907*/908public byte getByte(int columnIndex) throws SQLException {909checkState();910911return rs.getByte(columnIndex);912}913914/**915* Gets the value of the designated column in the current row916* of this rowset's {@code ResultSet} object as917* a {@code short}.918*919* @param columnIndex the first column is 1, the second is 2, and so on920* @return the column value; if the value is SQL {@code NULL}, the921* value returned is {@code 0}922* @throws SQLException if (1) a database access error occurs923* or (2) this rowset does not have a currently valid connection,924* prepared statement, and result set925*/926public short getShort(int columnIndex) throws SQLException {927checkState();928929return rs.getShort(columnIndex);930}931932/**933* Gets the value of the designated column in the current row934* of this rowset's {@code ResultSet} object as935* an {@code int}.936*937* @param columnIndex the first column is 1, the second is 2, and so on938* @return the column value; if the value is SQL {@code NULL}, the939* value returned is {@code 0}940* @throws SQLException if (1) a database access error occurs941* or (2) this rowset does not have a currently valid connection,942* prepared statement, and result set943*/944public int getInt(int columnIndex) throws SQLException {945checkState();946947return rs.getInt(columnIndex);948}949950/**951* Gets the value of the designated column in the current row952* of this rowset's {@code ResultSet} object as953* a {@code long}.954*955* @param columnIndex the first column is 1, the second is 2, and so on956* @return the column value; if the value is SQL {@code NULL}, the957* value returned is {@code 0}958* @throws SQLException if (1) a database access error occurs959* or (2) this rowset does not have a currently valid connection,960* prepared statement, and result set961*/962public long getLong(int columnIndex) throws SQLException {963checkState();964965return rs.getLong(columnIndex);966}967968/**969* Gets the value of the designated column in the current row970* of this rowset's {@code ResultSet} object as971* a {@code float}.972*973* @param columnIndex the first column is 1, the second is 2, and so on974* @return the column value; if the value is SQL {@code NULL}, the975* value returned is {@code 0}976* @throws SQLException if (1) a database access error occurs977* or (2) this rowset does not have a currently valid connection,978* prepared statement, and result set979*/980public float getFloat(int columnIndex) throws SQLException {981checkState();982983return rs.getFloat(columnIndex);984}985986/**987* Gets the value of the designated column in the current row988* of this rowset's {@code ResultSet} object as989* a {@code double}.990*991* @param columnIndex the first column is 1, the second is 2, and so on992* @return the column value; if the value is SQL {@code NULL}, the993* value returned is {@code 0}994* @throws SQLException if (1) a database access error occurs995* or (2) this rowset does not have a currently valid connection,996* prepared statement, and result set997*/998public double getDouble(int columnIndex) throws SQLException {999checkState();10001001return rs.getDouble(columnIndex);1002}10031004/**1005* Gets the value of the designated column in the current row1006* of this rowset's {@code ResultSet} object as1007* a {@code java.sql.BigDecimal}.1008*1009* @param columnIndex the first column is 1, the second is 2, and so on1010* @param scale the number of digits to the right of the decimal point1011* @return the column value; if the value is SQL {@code NULL}, the1012* value returned is {@code null}1013* @throws SQLException if (1) database access error occurs1014* or (2) this rowset does not have a currently valid connection,1015* prepared statement, and result set1016* @deprecated1017*/1018@Deprecated1019public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException {1020checkState();10211022return rs.getBigDecimal(columnIndex, scale);1023}10241025/**1026* Gets the value of the designated column in the current row1027* of this rowset's {@code ResultSet} object as1028* a {@code byte} array in the Java programming language.1029* The bytes represent the raw values returned by the driver.1030*1031* @param columnIndex the first column is 1, the second is 2, and so on1032* @return the column value; if the value is SQL {@code NULL}, the1033* value returned is {@code null}1034* @throws SQLException if (1) a database access error occurs1035* or (2) this rowset does not have a currently valid connection,1036* prepared statement, and result set1037*/1038public byte[] getBytes(int columnIndex) throws SQLException {1039checkState();10401041return rs.getBytes(columnIndex);1042}10431044/**1045* Gets the value of the designated column in the current row1046* of this rowset's {@code ResultSet} object as1047* a {@code java.sql.Date} object in the Java programming language.1048*1049* @param columnIndex the first column is 1, the second is 2, and so on1050* @return the column value; if the value is SQL {@code NULL}, the1051* value returned is {@code null}1052* @throws SQLException if (1) a database access error occurs1053* or (2) this rowset does not have a currently valid connection,1054* prepared statement, and result set1055*/1056public java.sql.Date getDate(int columnIndex) throws SQLException {1057checkState();10581059return rs.getDate(columnIndex);1060}10611062/**1063* Gets the value of the designated column in the current row1064* of this rowset's {@code ResultSet} object as1065* a {@code java.sql.Time} object in the Java programming language.1066*1067* @param columnIndex the first column is 1, the second is 2, and so on1068* @return the column value; if the value is SQL {@code NULL}, the1069* value returned is {@code null}1070* @throws SQLException if (1) a database access error occurs1071* or (2) this rowset does not have a currently valid connection,1072* prepared statement, and result set1073*/1074public java.sql.Time getTime(int columnIndex) throws SQLException {1075checkState();10761077return rs.getTime(columnIndex);1078}10791080/**1081* Gets the value of the designated column in the current row1082* of this rowset's {@code ResultSet} object as1083* a {@code java.sql.Timestamp} object in the Java programming language.1084*1085* @param columnIndex the first column is 1, the second is 2, and so on1086* @return the column value; if the value is SQL {@code NULL}, the1087* value returned is {@code null}1088* @throws SQLException if (1) a database access error occurs1089* or (2) this rowset does not have a currently valid connection,1090* prepared statement, and result set1091*/1092public java.sql.Timestamp getTimestamp(int columnIndex) throws SQLException {1093checkState();10941095return rs.getTimestamp(columnIndex);1096}10971098/**1099* Gets the value of the designated column in the current row1100* of this rowset's {@code ResultSet} object as1101* a stream of ASCII characters. The value can then be read in chunks from the1102* stream. This method is particularly1103* suitable for retrieving large {@code LONGVARCHAR} values.1104* The JDBC driver will1105* do any necessary conversion from the database format into ASCII.1106*1107* <P><B>Note:</B> All the data in the returned stream must be1108* read prior to getting the value of any other column. The next1109* call to a {@code getXXX} method implicitly closes the stream. Also, a1110* stream may return {@code 0} when the method1111* {@code InputStream.available}1112* is called whether there is data available or not.1113*1114* @param columnIndex the first column is 1, the second is 2, and so on1115* @return a Java input stream that delivers the database column value1116* as a stream of one-byte ASCII characters;1117* if the value is SQL {@code NULL}, the1118* value returned is {@code null}1119* @throws SQLException if (1) database access error occurs1120* (2) this rowset does not have a currently valid connection,1121* prepared statement, and result set1122*/1123public java.io.InputStream getAsciiStream(int columnIndex) throws SQLException {1124checkState();11251126return rs.getAsciiStream(columnIndex);1127}11281129/**1130* Gets the value of the designated column in the current row1131* of this rowset's {@code ResultSet} object as1132* as a stream of Unicode characters.1133* The value can then be read in chunks from the1134* stream. This method is particularly1135* suitable for retrieving large{@code LONGVARCHAR} values. The JDBC driver will1136* do any necessary conversion from the database format into Unicode.1137* The byte format of the Unicode stream must be Java UTF-8,1138* as specified in the Java virtual machine specification.1139*1140* <P><B>Note:</B> All the data in the returned stream must be1141* read prior to getting the value of any other column. The next1142* call to a {@code getXXX} method implicitly closes the stream. Also, a1143* stream may return {@code 0} when the method1144* {@code InputStream.available}1145* is called whether there is data available or not.1146*1147* @param columnIndex the first column is 1, the second is 2, and so on1148* @return a Java input stream that delivers the database column value1149* as a stream in Java UTF-8 byte format;1150* if the value is SQL {@code NULL}, the value returned is {@code null}1151* @throws SQLException if (1) a database access error occurs1152* or (2) this rowset does not have a currently valid connection,1153* prepared statement, and result set1154* @deprecated use {@code getCharacterStream} in place of1155* {@code getUnicodeStream}1156*/1157@Deprecated1158public java.io.InputStream getUnicodeStream(int columnIndex) throws SQLException {1159checkState();11601161return rs.getUnicodeStream(columnIndex);1162}11631164/**1165* Gets the value of a column in the current row as a stream of1166* the value of the designated column in the current row1167* of this rowset's {@code ResultSet} object as a binary stream of1168* uninterpreted bytes. The value can then be read in chunks from the1169* stream. This method is particularly1170* suitable for retrieving large {@code LONGVARBINARY} values.1171*1172* <P><B>Note:</B> All the data in the returned stream must be1173* read prior to getting the value of any other column. The next1174* call to a {@code getXXX} method implicitly closes the stream. Also, a1175* stream may return {@code 0} when the method1176* {@code InputStream.available}1177* is called whether there is data available or not.1178*1179* @param columnIndex the first column is 1, the second is 2, and so on1180* @return a Java input stream that delivers the database column value1181* as a stream of uninterpreted bytes;1182* if the value is SQL {@code NULL}, the value returned is {@code null}1183* @throws SQLException if (1) a database access error occurs1184* or (2) this rowset does not have a currently valid connection,1185* prepared statement, and result set1186*/1187public java.io.InputStream getBinaryStream(int columnIndex) throws SQLException {1188checkState();11891190return rs.getBinaryStream(columnIndex);1191}119211931194//======================================================================1195// Methods for accessing results by column name1196//======================================================================11971198/**1199* Gets the value of the designated column in the current row1200* of this rowset's {@code ResultSet} object as1201* a {@code String}.1202*1203* @param columnName the SQL name of the column1204* @return the column value; if the value is SQL {@code NULL}, the1205* value returned is {@code null}1206* @throws SQLException if (1) a database access error occurs1207* or (2) this rowset does not have a currently valid connection,1208* prepared statement, and result set1209*/1210public String getString(String columnName) throws SQLException {1211return getString(findColumn(columnName));1212}12131214/**1215* Gets the value of the designated column in the current row1216* of this rowset's {@code ResultSet} object as1217* a {@code boolean}.1218*1219* @param columnName the SQL name of the column1220* @return the column value; if the value is SQL {@code NULL}, the1221* value returned is {@code false}1222* @throws SQLException if (1) a database access error occurs1223* or (2) this rowset does not have a currently valid connection,1224* prepared statement, and result set1225*/1226public boolean getBoolean(String columnName) throws SQLException {1227return getBoolean(findColumn(columnName));1228}12291230/**1231* Gets the value of the designated column in the current row1232* of this rowset's {@code ResultSet} object as1233* a {@code byte}.1234*1235* @param columnName the SQL name of the column1236* @return the column value; if the value is SQL {@code NULL}, the1237* value returned is {@code 0}1238* @throws SQLException if (1) a database access error occurs1239* or (2) this rowset does not have a currently valid connection,1240* prepared statement, and result set1241*/1242public byte getByte(String columnName) throws SQLException {1243return getByte(findColumn(columnName));1244}12451246/**1247* Gets the value of the designated column in the current row1248* of this rowset's {@code ResultSet} object as1249* a {@code short}.1250*1251* @param columnName the SQL name of the column1252* @return the column value; if the value is SQL {@code NULL}, the1253* value returned is {@code 0}1254* @throws SQLException if (1) a database access error occurs1255* or (2) this rowset does not have a currently valid connection,1256* prepared statement, and result set1257*/1258public short getShort(String columnName) throws SQLException {1259return getShort(findColumn(columnName));1260}12611262/**1263* Gets the value of the designated column in the current row1264* of this rowset's {@code ResultSet} object as1265* an {@code int}.1266*1267* @param columnName the SQL name of the column1268* @return the column value; if the value is SQL {@code NULL}, the1269* value returned is {@code 0}1270* @throws SQLException if (1) a database access error occurs1271* or (2) this rowset does not have a currently valid connection,1272* prepared statement, and result set1273*/1274public int getInt(String columnName) throws SQLException {1275return getInt(findColumn(columnName));1276}12771278/**1279* Gets the value of the designated column in the current row1280* of this rowset's {@code ResultSet} object as1281* a {@code long}.1282*1283* @param columnName the SQL name of the column1284* @return the column value; if the value is SQL {@code NULL}, the1285* value returned is {@code 0}1286* @throws SQLException if a database access error occurs1287* or this rowset does not have a currently valid connection,1288* prepared statement, and result set1289*/1290public long getLong(String columnName) throws SQLException {1291return getLong(findColumn(columnName));1292}12931294/**1295* Gets the value of the designated column in the current row1296* of this rowset's {@code ResultSet} object as1297* a {@code float}.1298*1299* @param columnName the SQL name of the column1300* @return the column value; if the value is SQL {@code NULL}, the1301* value returned is {@code 0}1302* @throws SQLException if (1) a database access error occurs1303* or (2) this rowset does not have a currently valid connection,1304* prepared statement, and result set1305*/1306public float getFloat(String columnName) throws SQLException {1307return getFloat(findColumn(columnName));1308}13091310/**1311* Gets the value of the designated column in the current row1312* of this rowset's {@code ResultSet} object as1313* a {@code double}.1314*1315* @param columnName the SQL name of the column1316* @return the column value; if the value is SQL {@code NULL}, the1317* value returned is {@code 0}1318* @throws SQLException if (1) a database access error occurs1319* or (2) this rowset does not have a currently valid connection,1320* prepared statement, and result set1321*/1322public double getDouble(String columnName) throws SQLException {1323return getDouble(findColumn(columnName));1324}13251326/**1327* Gets the value of the designated column in the current row1328* of this rowset's {@code ResultSet} object as1329* a {@code java.math.BigDecimal}.1330*1331* @param columnName the SQL name of the column1332* @param scale the number of digits to the right of the decimal point1333* @return the column value; if the value is SQL {@code NULL}, the1334* value returned is {@code null}1335* @throws SQLException if (1) adatabase access error occurs1336* or (2) this rowset does not have a currently valid connection,1337* prepared statement, and result set1338* @deprecated1339*/1340@Deprecated1341public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException {1342return getBigDecimal(findColumn(columnName), scale);1343}13441345/**1346* Gets the value of the designated column in the current row1347* of this rowset's {@code ResultSet} object as1348* a {@code byte} array in the Java programming language.1349* The bytes represent the raw values returned by the driver.1350*1351* @param columnName the SQL name of the column1352* @return the column value; if the value is SQL {@code NULL}, the1353* value returned is {@code null}1354* @throws SQLException if (1) a database access error occurs1355* or (2) this rowset does not have a currently valid connection,1356* prepared statement, and result set1357*/1358public byte[] getBytes(String columnName) throws SQLException {1359return getBytes(findColumn(columnName));1360}13611362/**1363* Gets the value of the designated column in the current row1364* of this rowset's {@code ResultSet} object as1365* a {@code java.sql.Date} object in the Java programming language.1366*1367* @param columnName the SQL name of the column1368* @return the column value; if the value is SQL {@code NULL}, the1369* value returned is {@code null}1370* @throws SQLException if (1) a database access error occurs1371* or (2) this rowset does not have a currently valid connection,1372* prepared statement, and result set1373*/1374public java.sql.Date getDate(String columnName) throws SQLException {1375return getDate(findColumn(columnName));1376}13771378/**1379* Gets the value of the designated column in the current row1380* of this rowset's {@code ResultSet} object as1381* a {@code java.sql.Time} object in the Java programming language.1382*1383* @param columnName the SQL name of the column1384* @return the column value;1385* if the value is SQL {@code NULL},1386* the value returned is {@code null}1387* @throws SQLException if (1) a database access error occurs1388* or (2) this rowset does not have a currently valid connection,1389* prepared statement, and result set1390*/1391public java.sql.Time getTime(String columnName) throws SQLException {1392return getTime(findColumn(columnName));1393}13941395/**1396* Gets the value of the designated column in the current row1397* of this rowset's {@code ResultSet} object as1398* a {@code java.sql.Timestamp} object.1399*1400* @param columnName the SQL name of the column1401* @return the column value; if the value is SQL {@code NULL}, the1402* value returned is {@code null}1403* @throws SQLException if (1) a database access error occurs1404* or (2) this rowset does not have a currently valid connection,1405* prepared statement, and result set1406*/1407public java.sql.Timestamp getTimestamp(String columnName) throws SQLException {1408return getTimestamp(findColumn(columnName));1409}14101411/**1412* Gets the value of the designated column in the current row1413* of this rowset's {@code ResultSet} object as a stream of1414* ASCII characters. The value can then be read in chunks from the1415* stream. This method is particularly1416* suitable for retrieving large {@code LONGVARCHAR} values.1417* The JDBC driver will1418* do any necessary conversion from the database format into ASCII.1419*1420* <P><B>Note:</B> All the data in the returned stream must be1421* read prior to getting the value of any other column. The next1422* call to a {@code getXXX} method implicitly closes the stream. Also, a1423* stream may return {@code 0} when the method {@code available}1424* is called whether there is data available or not.1425*1426* @param columnName the SQL name of the column1427* @return a Java input stream that delivers the database column value1428* as a stream of one-byte ASCII characters.1429* If the value is SQL {@code NULL},1430* the value returned is {@code null}.1431* @throws SQLException if (1) a database access error occurs1432* or (2) this rowset does not have a currently valid connection,1433* prepared statement, and result set1434*/1435public java.io.InputStream getAsciiStream(String columnName) throws SQLException {1436return getAsciiStream(findColumn(columnName));1437}14381439/**1440* Gets the value of the designated column in the current row1441* of this rowset's {@code ResultSet} object as a stream of1442* Unicode characters. The value can then be read in chunks from the1443* stream. This method is particularly1444* suitable for retrieving large {@code LONGVARCHAR} values.1445* The JDBC driver will1446* do any necessary conversion from the database format into Unicode.1447* The byte format of the Unicode stream must be Java UTF-8,1448* as defined in the Java virtual machine specification.1449*1450* <P><B>Note:</B> All the data in the returned stream must be1451* read prior to getting the value of any other column. The next1452* call to a {@code getXXX} method implicitly closes the stream. Also, a1453* stream may return {@code 0} when the method {@code available}1454* is called whether there is data available or not.1455*1456* @param columnName the SQL name of the column1457* @return a Java input stream that delivers the database column value1458* as a stream of two-byte Unicode characters.1459* If the value is SQL {@code NULL},1460* the value returned is {@code null}.1461* @throws SQLException if (1) a database access error occurs1462* or (2) this rowset does not have a currently valid connection,1463* prepared statement, and result set1464* @deprecated1465*/1466@Deprecated1467public java.io.InputStream getUnicodeStream(String columnName) throws SQLException {1468return getUnicodeStream(findColumn(columnName));1469}14701471/**1472* Gets the value of the designated column in the current row1473* of this rowset's {@code ResultSet} object as a stream of uninterpreted1474* {@code byte}s.1475* The value can then be read in chunks from the1476* stream. This method is particularly1477* suitable for retrieving large {@code LONGVARBINARY}1478* values.1479*1480* <P><B>Note:</B> All the data in the returned stream must be1481* read prior to getting the value of any other column. The next1482* call to a {@code getXXX} method implicitly closes the stream. Also, a1483* stream may return {@code 0} when the method {@code available}1484* is called whether there is data available or not.1485*1486* @param columnName the SQL name of the column1487* @return a Java input stream that delivers the database column value1488* as a stream of uninterpreted bytes;1489* if the value is SQL {@code NULL}, the result is {@code null}1490* @throws SQLException if (1) a database access error occurs1491* or (2) this rowset does not have a currently valid connection,1492* prepared statement, and result set1493*/1494public java.io.InputStream getBinaryStream(String columnName) throws SQLException {1495return getBinaryStream(findColumn(columnName));1496}149714981499//=====================================================================1500// Advanced features:1501//=====================================================================15021503/**1504* Returns the first warning reported by calls on this rowset's1505* {@code ResultSet} object.1506* Subsequent warnings on this rowset's {@code ResultSet} object1507* will be chained to the {@code SQLWarning} object that1508* this method returns.1509*1510* <P>The warning chain is automatically cleared each time a new1511* row is read.1512*1513* <P><B>Note:</B> This warning chain only covers warnings caused1514* by {@code ResultSet} methods. Any warning caused by1515* {@code Statement} methods1516* (such as reading OUT parameters) will be chained on the1517* {@code Statement} object.1518*1519* @return the first {@code SQLWarning} object reported or {@code null}1520* @throws SQLException if (1) a database access error occurs1521* or (2) this rowset does not have a currently valid connection,1522* prepared statement, and result set1523*/1524public SQLWarning getWarnings() throws SQLException {1525checkState();15261527return rs.getWarnings();1528}15291530/**1531* Clears all warnings reported on this rowset's {@code ResultSet} object.1532* After this method is called, the method {@code getWarnings}1533* returns {@code null} until a new warning is1534* reported for this rowset's {@code ResultSet} object.1535*1536* @throws SQLException if (1) a database access error occurs1537* or (2) this rowset does not have a currently valid connection,1538* prepared statement, and result set1539*/1540public void clearWarnings() throws SQLException {1541checkState();15421543rs.clearWarnings();1544}15451546/**1547* Gets the name of the SQL cursor used by this rowset's {@code ResultSet}1548* object.1549*1550* <P>In SQL, a result table is retrieved through a cursor that is1551* named. The current row of a result set can be updated or deleted1552* using a positioned update/delete statement that references the1553* cursor name. To insure that the cursor has the proper isolation1554* level to support update, the cursor's {@code select} statement should be1555* of the form 'select for update'. If the 'for update' clause is1556* omitted, the positioned updates may fail.1557*1558* <P>The JDBC API supports this SQL feature by providing the name of the1559* SQL cursor used by a {@code ResultSet} object.1560* The current row of a {@code ResultSet} object1561* is also the current row of this SQL cursor.1562*1563* <P><B>Note:</B> If positioned update is not supported, a1564* {@code SQLException} is thrown.1565*1566* @return the SQL name for this rowset's {@code ResultSet} object's cursor1567* @throws SQLException if (1) a database access error occurs1568* or (2) xthis rowset does not have a currently valid connection,1569* prepared statement, and result set1570*/1571public String getCursorName() throws SQLException {1572checkState();15731574return rs.getCursorName();1575}15761577/**1578* Retrieves the number, types and properties of1579* this rowset's {@code ResultSet} object's columns.1580*1581* @return the description of this rowset's {@code ResultSet}1582* object's columns1583* @throws SQLException if (1) a database access error occurs1584* or (2) this rowset does not have a currently valid connection,1585* prepared statement, and result set1586*/1587public ResultSetMetaData getMetaData() throws SQLException {15881589checkState();15901591// It may be the case that JdbcRowSet might not have been1592// initialized with ResultSet handle and may be by PreparedStatement1593// internally when we set JdbcRowSet.setCommand().1594// We may require all the basic properties of setEscapeProcessing1595// setMaxFieldSize etc. which an application can use before we call1596// execute.1597try {1598checkState();1599} catch(SQLException sqle) {1600prepare();1601// will return ResultSetMetaData1602return ps.getMetaData();1603}1604return rs.getMetaData();1605}16061607/**1608* <p>Gets the value of the designated column in the current row1609* of this rowset's {@code ResultSet} object as1610* an {@code Object}.1611*1612* <p>This method will return the value of the given column as a1613* Java object. The type of the Java object will be the default1614* Java object type corresponding to the column's SQL type,1615* following the mapping for built-in types specified in the JDBC1616* specification.1617*1618* <p>This method may also be used to read datatabase-specific1619* abstract data types.1620*1621* In the JDBC 3.0 API, the behavior of method1622* {@code getObject} is extended to materialize1623* data of SQL user-defined types. When a column contains1624* a structured or distinct value, the behavior of this method is as1625* if it were a call to: {@code getObject(columnIndex,1626* this.getStatement().getConnection().getTypeMap())}.1627*1628* @param columnIndex the first column is 1, the second is 2, and so on1629* @return a {@code java.lang.Object} holding the column value1630* @throws SQLException if (1) a database access error occurs1631* or (2) this rowset does not currently have a valid connection,1632* prepared statement, and result set1633*/1634public Object getObject(int columnIndex) throws SQLException {1635checkState();16361637return rs.getObject(columnIndex);1638}16391640/**1641* <p>Gets the value of the designated column in the current row1642* of this rowset's {@code ResultSet} object as1643* an {@code Object}.1644*1645* <p>This method will return the value of the given column as a1646* Java object. The type of the Java object will be the default1647* Java object type corresponding to the column's SQL type,1648* following the mapping for built-in types specified in the JDBC1649* specification.1650*1651* <p>This method may also be used to read datatabase-specific1652* abstract data types.1653*1654* In the JDBC 3.0 API, the behavior of the method1655* {@code getObject} is extended to materialize1656* data of SQL user-defined types. When a column contains1657* a structured or distinct value, the behavior of this method is as1658* if it were a call to: {@code getObject(columnIndex,1659* this.getStatement().getConnection().getTypeMap())}.1660*1661* @param columnName the SQL name of the column1662* @return a {@code java.lang.Object} holding the column value1663* @throws SQLException if (1) a database access error occurs1664* or (2) this rowset does not currently have a valid connection,1665* prepared statement, and result set1666*/1667public Object getObject(String columnName) throws SQLException {1668return getObject(findColumn(columnName));1669}16701671//----------------------------------------------------------------16721673/**1674* Maps the given {@code JdbcRowSetImpl} column name to its1675* {@code JdbcRowSetImpl} column index and reflects this on1676* the internal {@code ResultSet} object.1677*1678* @param columnName the name of the column1679* @return the column index of the given column name1680* @throws SQLException if (1) a database access error occurs1681* (2) this rowset does not have a currently valid connection,1682* prepared statement, and result set1683*/1684public int findColumn(String columnName) throws SQLException {1685checkState();16861687return rs.findColumn(columnName);1688}168916901691//--------------------------JDBC 2.0-----------------------------------16921693//---------------------------------------------------------------------1694// Getters and Setters1695//---------------------------------------------------------------------16961697/**1698* Gets the value of the designated column in the current row1699* of this rowset's {@code ResultSet} object as a1700* {@code java.io.Reader} object.1701* @return a {@code java.io.Reader} object that contains the column1702* value; if the value is SQL {@code NULL}, the value returned is1703* {@code null}.1704* @param columnIndex the first column is 1, the second is 2, and so on1705*1706*/1707public java.io.Reader getCharacterStream(int columnIndex) throws SQLException {1708checkState();17091710return rs.getCharacterStream(columnIndex);1711}17121713/**1714* Gets the value of the designated column in the current row1715* of this rowset's {@code ResultSet} object as a1716* {@code java.io.Reader} object.1717*1718* @return a {@code java.io.Reader} object that contains the column1719* value; if the value is SQL {@code NULL}, the value returned is1720* {@code null}.1721* @param columnName the name of the column1722* @return the value in the specified column as a {@code java.io.Reader}1723*1724*/1725public java.io.Reader getCharacterStream(String columnName) throws SQLException {1726return getCharacterStream(findColumn(columnName));1727}17281729/**1730* Gets the value of the designated column in the current row1731* of this rowset's {@code ResultSet} object as a1732* {@code java.math.BigDecimal} with full precision.1733*1734* @param columnIndex the first column is 1, the second is 2, and so on1735* @return the column value (full precision);1736* if the value is SQL {@code NULL}, the value returned is1737* {@code null}.1738* @throws SQLException if a database access error occurs1739* or this rowset does not currently have a valid1740* connection, prepared statement, and result set1741*/1742public BigDecimal getBigDecimal(int columnIndex) throws SQLException {1743checkState();17441745return rs.getBigDecimal(columnIndex);1746}17471748/**1749* Gets the value of the designated column in the current row1750* of this rowset's {@code ResultSet} object as a1751* {@code java.math.BigDecimal} with full precision.1752*1753* @param columnName the column name1754* @return the column value (full precision);1755* if the value is SQL {@code NULL}, the value returned is1756* {@code null}.1757* @throws SQLException if a database access error occurs1758* or this rowset does not currently have a valid1759* connection, prepared statement, and result set1760*/1761public BigDecimal getBigDecimal(String columnName) throws SQLException {1762return getBigDecimal(findColumn(columnName));1763}17641765//---------------------------------------------------------------------1766// Traversal/Positioning1767//---------------------------------------------------------------------17681769/**1770* Indicates whether the cursor is before the first row in1771* this rowset's {@code ResultSet} object.1772*1773* @return {@code true} if the cursor is before the first row;1774* {@code false} if the cursor is at any other position or the1775* result set contains no rows1776* @throws SQLException if a database access error occurs1777* or this rowset does not currently have a valid1778* connection, prepared statement, and result set1779*/1780public boolean isBeforeFirst() throws SQLException {1781checkState();17821783return rs.isBeforeFirst();1784}17851786/**1787* Indicates whether the cursor is after the last row in1788* this rowset's {@code ResultSet} object.1789*1790* @return {@code true} if the cursor is after the last row;1791* {@code false} if the cursor is at any other position or the1792* result set contains no rows1793* @throws SQLException if a database access error occurs1794* or this rowset does not currently have a valid1795* connection, prepared statement, and result set1796*/1797public boolean isAfterLast() throws SQLException {1798checkState();17991800return rs.isAfterLast();1801}18021803/**1804* Indicates whether the cursor is on the first row of1805* this rowset's {@code ResultSet} object.1806*1807* @return {@code true} if the cursor is on the first row;1808* {@code false} otherwise1809* @throws SQLException if a database access error occurs1810* or this rowset does not currently have a valid1811* connection, prepared statement, and result set1812*/1813public boolean isFirst() throws SQLException {1814checkState();18151816return rs.isFirst();1817}18181819/**1820* Indicates whether the cursor is on the last row of1821* this rowset's {@code ResultSet} object.1822* Note: Calling the method {@code isLast} may be expensive1823* because the JDBC driver1824* might need to fetch ahead one row in order to determine1825* whether the current row is the last row in the result set.1826*1827* @return {@code true} if the cursor is on the last row;1828* {@code false} otherwise1829* @throws SQLException if a database access error occurs1830* or this rowset does not currently have a valid1831* connection, prepared statement, and result set1832*1833*/1834public boolean isLast() throws SQLException {1835checkState();18361837return rs.isLast();1838}18391840/**1841* Moves the cursor to the front of1842* this rowset's {@code ResultSet} object, just before the1843* first row. This method has no effect if the result set contains no rows.1844*1845* @throws SQLException if (1) a database access error occurs,1846* (2) the result set type is {@code TYPE_FORWARD_ONLY},1847* or (3) this rowset does not currently have a valid1848* connection, prepared statement, and result set1849*/1850public void beforeFirst() throws SQLException {1851checkState();18521853rs.beforeFirst();1854notifyCursorMoved();1855}18561857/**1858* Moves the cursor to the end of1859* this rowset's {@code ResultSet} object, just after the1860* last row. This method has no effect if the result set contains no rows.1861* @throws SQLException if (1) a database access error occurs,1862* (2) the result set type is {@code TYPE_FORWARD_ONLY},1863* or (3) this rowset does not currently have a valid1864* connection, prepared statement, and result set1865*/1866public void afterLast() throws SQLException {1867checkState();18681869rs.afterLast();1870notifyCursorMoved();1871}18721873/**1874* Moves the cursor to the first row in1875* this rowset's {@code ResultSet} object.1876*1877* @return {@code true} if the cursor is on a valid row;1878* {@code false} if there are no rows in the result set1879* @throws SQLException if (1) a database access error occurs,1880* (2) the result set type is {@code TYPE_FORWARD_ONLY},1881* or (3) this rowset does not currently have a valid1882* connection, prepared statement, and result set1883*/1884public boolean first() throws SQLException {1885checkState();18861887boolean b = rs.first();1888notifyCursorMoved();1889return b;18901891}18921893/**1894* Moves the cursor to the last row in1895* this rowset's {@code ResultSet} object.1896*1897* @return {@code true} if the cursor is on a valid row;1898* {@code false} if there are no rows in the result set1899* @throws SQLException if (1) a database access error occurs,1900* (2) the result set type is {@code TYPE_FORWARD_ONLY},1901* or (3) this rowset does not currently have a valid1902* connection, prepared statement, and result set1903*/1904public boolean last() throws SQLException {1905checkState();19061907boolean b = rs.last();1908notifyCursorMoved();1909return b;1910}19111912/**1913* Retrieves the current row number. The first row is number 1, the1914* second is number 2, and so on.1915*1916* @return the current row number; {@code 0} if there is no current row1917* @throws SQLException if a database access error occurs1918* or this rowset does not currently have a valid connection,1919* prepared statement, and result set1920*/1921public int getRow() throws SQLException {1922checkState();19231924return rs.getRow();1925}19261927/**1928* Moves the cursor to the given row number in1929* this rowset's internal {@code ResultSet} object.1930*1931* <p>If the row number is positive, the cursor moves to1932* the given row number with respect to the1933* beginning of the result set. The first row is row 1, the second1934* is row 2, and so on.1935*1936* <p>If the given row number is negative, the cursor moves to1937* an absolute row position with respect to1938* the end of the result set. For example, calling the method1939* {@code absolute(-1)} positions the1940* cursor on the last row, calling the method {@code absolute(-2)}1941* moves the cursor to the next-to-last row, and so on.1942*1943* <p>An attempt to position the cursor beyond the first/last row in1944* the result set leaves the cursor before the first row or after1945* the last row.1946*1947* <p><B>Note:</B> Calling {@code absolute(1)} is the same1948* as calling {@code first()}. Calling {@code absolute(-1)}1949* is the same as calling {@code last()}.1950*1951* @return {@code true} if the cursor is on the result set;1952* {@code false} otherwise1953* @throws SQLException if (1) a database access error occurs,1954* (2) the row is {@code 0}, (3) the result set1955* type is {@code TYPE_FORWARD_ONLY}, or (4) this1956* rowset does not currently have a valid connection,1957* prepared statement, and result set1958*/1959public boolean absolute(int row) throws SQLException {1960checkState();19611962boolean b = rs.absolute(row);1963notifyCursorMoved();1964return b;1965}19661967/**1968* Moves the cursor a relative number of rows, either positive or negative.1969* Attempting to move beyond the first/last row in the1970* result set positions the cursor before/after the1971* the first/last row. Calling {@code relative(0)} is valid, but does1972* not change the cursor position.1973*1974* <p>Note: Calling the method {@code relative(1)}1975* is different from calling the method {@code next()}1976* because is makes sense to call {@code next()} when there1977* is no current row,1978* for example, when the cursor is positioned before the first row1979* or after the last row of the result set.1980*1981* @return {@code true} if the cursor is on a row;1982* {@code false} otherwise1983* @throws SQLException if (1) a database access error occurs,1984* (2) there is no current row, (3) the result set1985* type is {@code TYPE_FORWARD_ONLY}, or (4) this1986* rowset does not currently have a valid connection,1987* prepared statement, and result set1988*/1989public boolean relative(int rows) throws SQLException {1990checkState();19911992boolean b = rs.relative(rows);1993notifyCursorMoved();1994return b;1995}19961997/**1998* Moves the cursor to the previous row in this1999* {@code ResultSet} object.2000*2001* <p><B>Note:</B> Calling the method {@code previous()} is not the same as2002* calling the method {@code relative(-1)} because it2003* makes sense to call {@code previous()} when there is no current row.2004*2005* @return {@code true} if the cursor is on a valid row;2006* {@code false} if it is off the result set2007* @throws SQLException if (1) a database access error occurs,2008* (2) the result set type is {@code TYPE_FORWARD_ONLY},2009* or (3) this rowset does not currently have a valid2010* connection, prepared statement, and result set2011*/2012public boolean previous() throws SQLException {2013checkState();20142015boolean b = rs.previous();2016notifyCursorMoved();2017return b;2018}20192020/**2021* Gives a hint as to the direction in which the rows in this2022* {@code ResultSet} object will be processed.2023* The initial value is determined by the2024* {@code Statement} object2025* that produced this rowset's {@code ResultSet} object.2026* The fetch direction may be changed at any time.2027*2028* @throws SQLException if (1) a database access error occurs,2029* (2) the result set type is {@code TYPE_FORWARD_ONLY}2030* and the fetch direction is not {@code FETCH_FORWARD},2031* or (3) this rowset does not currently have a valid2032* connection, prepared statement, and result set2033* @see java.sql.Statement#setFetchDirection2034*/2035public void setFetchDirection(int direction) throws SQLException {2036checkState();20372038rs.setFetchDirection(direction);2039}20402041/**2042* Returns the fetch direction for this2043* {@code ResultSet} object.2044*2045* @return the current fetch direction for this rowset's2046* {@code ResultSet} object2047* @throws SQLException if a database access error occurs2048* or this rowset does not currently have a valid connection,2049* prepared statement, and result set2050*/2051public int getFetchDirection() throws SQLException {2052try {2053checkState();2054} catch(SQLException sqle) {2055super.getFetchDirection();2056}2057return rs.getFetchDirection();2058}20592060/**2061* Gives the JDBC driver a hint as to the number of rows that should2062* be fetched from the database when more rows are needed for this2063* {@code ResultSet} object.2064* If the fetch size specified is zero, the JDBC driver2065* ignores the value and is free to make its own best guess as to what2066* the fetch size should be. The default value is set by the2067* {@code Statement} object2068* that created the result set. The fetch size may be changed at any time.2069*2070* @param rows the number of rows to fetch2071* @throws SQLException if (1) a database access error occurs, (2) the2072* condition {@code 0 <= rows <= this.getMaxRows()} is not2073* satisfied, or (3) this rowset does not currently have a valid2074* connection, prepared statement, and result set2075*2076*/2077public void setFetchSize(int rows) throws SQLException {2078checkState();20792080rs.setFetchSize(rows);2081}20822083/**2084*2085* Returns the fetch size for this2086* {@code ResultSet} object.2087*2088* @return the current fetch size for this rowset's {@code ResultSet} object2089* @throws SQLException if a database access error occurs2090* or this rowset does not currently have a valid connection,2091* prepared statement, and result set2092*/2093public int getType() throws SQLException {2094try {2095checkState();2096} catch(SQLException sqle) {2097return super.getType();2098}20992100// If the ResultSet has not been created, then return the default type2101// otherwise return the type from the ResultSet.2102if(rs == null) {2103return super.getType();2104} else {2105int rstype = rs.getType();2106return rstype;2107}210821092110}21112112/**2113* Returns the concurrency mode of this rowset's {@code ResultSet} object.2114* The concurrency used is determined by the2115* {@code Statement} object that created the result set.2116*2117* @return the concurrency type, either {@code CONCUR_READ_ONLY}2118* or {@code CONCUR_UPDATABLE}2119* @throws SQLException if (1) a database access error occurs2120* or (2) this rowset does not currently have a valid connection,2121* prepared statement, and result set2122*/2123public int getConcurrency() throws SQLException {2124try {2125checkState();2126} catch(SQLException sqle) {2127super.getConcurrency();2128}2129return rs.getConcurrency();2130}21312132//---------------------------------------------------------------------2133// Updates2134//---------------------------------------------------------------------21352136/**2137* Indicates whether the current row has been updated. The value returned2138* depends on whether or not the result set can detect updates.2139*2140* @return {@code true} if the row has been visibly updated2141* by the owner or another, and updates are detected2142* @throws SQLException if a database access error occurs2143* or this rowset does not currently have a valid connection,2144* prepared statement, and result set2145* @see java.sql.DatabaseMetaData#updatesAreDetected2146*/2147public boolean rowUpdated() throws SQLException {2148checkState();21492150return rs.rowUpdated();2151}21522153/**2154* Indicates whether the current row has had an insertion.2155* The value returned depends on whether or not this2156* {@code ResultSet} object can detect visible inserts.2157*2158* @return {@code true} if a row has had an insertion2159* and insertions are detected; {@code false} otherwise2160* @throws SQLException if a database access error occurs2161* or this rowset does not currently have a valid connection,2162* prepared statement, and result set2163* @see java.sql.DatabaseMetaData#insertsAreDetected2164*2165*/2166public boolean rowInserted() throws SQLException {2167checkState();21682169return rs.rowInserted();2170}21712172/**2173* Indicates whether a row has been deleted. A deleted row may leave2174* a visible "hole" in a result set. This method can be used to2175* detect holes in a result set. The value returned depends on whether2176* or not this rowset's {@code ResultSet} object can detect deletions.2177*2178* @return {@code true} if a row was deleted and deletions are detected;2179* {@code false} otherwise2180* @throws SQLException if a database access error occurs2181* or this rowset does not currently have a valid connection,2182* prepared statement, and result set2183* @see java.sql.DatabaseMetaData#deletesAreDetected2184*/2185public boolean rowDeleted() throws SQLException {2186checkState();21872188return rs.rowDeleted();2189}21902191/**2192* Gives a nullable column a null value.2193*2194* The {@code updateXXX} methods are used to update column values in the2195* current row or the insert row. The {@code updateXXX} methods do not2196* update the underlying database; instead the {@code updateRow}2197* or {@code insertRow} methods are called to update the database.2198*2199* @param columnIndex the first column is 1, the second is 2, and so on2200* @throws SQLException if a database access error occurs2201* or this rowset does not currently have a valid connection,2202* prepared statement, and result set2203*/2204public void updateNull(int columnIndex) throws SQLException {2205checkState();22062207// To check the type and concurrency of the ResultSet2208// to verify whether updates are possible or not2209checkTypeConcurrency();22102211rs.updateNull(columnIndex);2212}22132214/**2215* Updates the designated column with a {@code boolean} value.2216* The {@code updateXXX} methods are used to update column values in the2217* current row or the insert row. The {@code updateXXX} methods do not2218* update the underlying database; instead the {@code updateRow} or2219* {@code insertRow} methods are called to update the database.2220*2221* @param columnIndex the first column is 1, the second is 2, and so on2222* @param x the new column value2223* @throws SQLException if a database access error occurs2224* or this rowset does not currently have a valid connection,2225* prepared statement, and result set2226*2227*/2228public void updateBoolean(int columnIndex, boolean x) throws SQLException {2229checkState();22302231// To check the type and concurrency of the ResultSet2232// to verify whether updates are possible or not2233checkTypeConcurrency();22342235rs.updateBoolean(columnIndex, x);2236}22372238/**2239* Updates the designated column with a {@code byte} value.2240* The {@code updateXXX} methods are used to update column values in the2241* current row or the insert row. The {@code updateXXX} methods do not2242* update the underlying database; instead the {@code updateRow} or2243* {@code insertRow} methods are called to update the database.2244*2245*2246* @param columnIndex the first column is 1, the second is 2, and so on2247* @param x the new column value2248* @throws SQLException if a database access error occurs2249* or this rowset does not currently have a valid connection,2250* prepared statement, and result set2251*2252*/2253public void updateByte(int columnIndex, byte x) throws SQLException {2254checkState();22552256// To check the type and concurrency of the ResultSet2257// to verify whether updates are possible or not2258checkTypeConcurrency();22592260rs.updateByte(columnIndex, x);2261}22622263/**2264* Updates the designated column with a {@code short} value.2265* The {@code updateXXX} methods are used to update column values in the2266* current row or the insert row. The {@code updateXXX} methods do not2267* update the underlying database; instead the {@code updateRow} or2268* {@code insertRow} methods are called to update the database.2269*2270* @param columnIndex the first column is 1, the second is 2, and so on2271* @param x the new column value2272* @throws SQLException if a database access error occurs2273* or this rowset does not currently have a valid connection,2274* prepared statement, and result set2275*2276*/2277public void updateShort(int columnIndex, short x) throws SQLException {2278checkState();22792280// To check the type and concurrency of the ResultSet2281// to verify whether updates are possible or not2282checkTypeConcurrency();22832284rs.updateShort(columnIndex, x);2285}22862287/**2288* Updates the designated column with an {@code int} value.2289* The {@code updateXXX} methods are used to update column values in the2290* current row or the insert row. The {@code updateXXX} methods do not2291* update the underlying database; instead the {@code updateRow} or2292* {@code insertRow} methods are called to update the database.2293*2294* @param columnIndex the first column is 1, the second is 2, and so on2295* @param x the new column value2296* @throws SQLException if a database access error occurs2297* or this rowset does not currently have a valid connection,2298* prepared statement, and result set2299*/2300public void updateInt(int columnIndex, int x) throws SQLException {2301checkState();23022303// To check the type and concurrency of the ResultSet2304// to verify whether updates are possible or not2305checkTypeConcurrency();23062307rs.updateInt(columnIndex, x);2308}23092310/**2311* Updates the designated column with a {@code long} value.2312* The {@code updateXXX} methods are used to update column values in the2313* current row or the insert row. The {@code updateXXX} methods do not2314* update the underlying database; instead the {@code updateRow} or2315* {@code insertRow} methods are called to update the database.2316*2317* @param columnIndex the first column is 1, the second is 2, and so on2318* @param x the new column value2319* @throws SQLException if a database access error occurs2320* or this rowset does not currently have a valid connection,2321* prepared statement, and result set2322*2323*/2324public void updateLong(int columnIndex, long x) throws SQLException {2325checkState();23262327// To check the type and concurrency of the ResultSet2328// to verify whether updates are possible or not2329checkTypeConcurrency();23302331rs.updateLong(columnIndex, x);2332}23332334/**2335* Updates the designated column with a {@code float} value.2336* The {@code updateXXX} methods are used to update column values in the2337* current row or the insert row. The {@code updateXXX} methods do not2338* update the underlying database; instead the {@code updateRow} or2339* {@code insertRow} methods are called to update the database.2340*2341* @param columnIndex the first column is 1, the second is 2, and so on2342* @param x the new column value2343* @throws SQLException if a database access error occurs2344* or this rowset does not currently have a valid connection,2345* prepared statement, and result set2346*2347*/2348public void updateFloat(int columnIndex, float x) throws SQLException {2349checkState();23502351// To check the type and concurrency of the ResultSet2352// to verify whether updates are possible or not2353checkTypeConcurrency();23542355rs.updateFloat(columnIndex, x);2356}23572358/**2359* Updates the designated column with a {@code double} value.2360* The {@code updateXXX} methods are used to update column values in the2361* current row or the insert row. The {@code updateXXX} methods do not2362* update the underlying database; instead the {@code updateRow} or2363* {@code insertRow} methods are called to update the database.2364*2365* @param columnIndex the first column is 1, the second is 2, and so on2366* @param x the new column value2367* @throws SQLException if a database access error occurs2368* or this rowset does not currently have a valid connection,2369* prepared statement, and result set2370*2371*/2372public void updateDouble(int columnIndex, double x) throws SQLException {2373checkState();23742375// To check the type and concurrency of the ResultSet2376// to verify whether updates are possible or not2377checkTypeConcurrency();23782379rs.updateDouble(columnIndex, x);2380}23812382/**2383* Updates the designated column with a {@code java.math.BigDecimal}2384* value.2385* The {@code updateXXX} methods are used to update column values in the2386* current row or the insert row. The {@code updateXXX} methods do not2387* update the underlying database; instead the {@code updateRow} or2388* {@code insertRow} methods are called to update the database.2389*2390* @param columnIndex the first column is 1, the second is 2, and so on2391* @param x the new column value2392* @throws SQLException if a database access error occurs2393* or this rowset does not currently have a valid connection,2394* prepared statement, and result set2395*2396*/2397public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException {2398checkState();23992400// To check the type and concurrency of the ResultSet2401// to verify whether updates are possible or not2402checkTypeConcurrency();24032404rs.updateBigDecimal(columnIndex, x);2405}24062407/**2408* Updates the designated column with a {@code String} value.2409* The {@code updateXXX} methods are used to update column values in the2410* current row or the insert row. The {@code updateXXX} methods do not2411* update the underlying database; instead the {@code updateRow} or2412* {@code insertRow} methods are called to update the database.2413*2414* @param columnIndex the first column is 1, the second is 2, and so on2415* @param x the new column value2416* @throws SQLException if a database access error occurs2417* or this rowset does not currently have a valid connection,2418* prepared statement, and result set2419*2420*/2421public void updateString(int columnIndex, String x) throws SQLException {2422checkState();24232424// To check the type and concurrency of the ResultSet2425// to verify whether updates are possible or not2426checkTypeConcurrency();24272428rs.updateString(columnIndex, x);2429}24302431/**2432* Updates the designated column with a {@code byte} array value.2433* The {@code updateXXX} methods are used to update column values in the2434* current row or the insert row. The {@code updateXXX} methods do not2435* update the underlying database; instead the {@code updateRow} or2436* {@code insertRow} methods are called to update the database.2437*2438* @param columnIndex the first column is 1, the second is 2, and so on2439* @param x the new column value2440* @throws SQLException if a database access error occurs2441* or this rowset does not currently have a valid connection,2442* prepared statement, and result set2443*2444*/2445public void updateBytes(int columnIndex, byte x[]) throws SQLException {2446checkState();24472448// To check the type and concurrency of the ResultSet2449// to verify whether updates are possible or not2450checkTypeConcurrency();24512452rs.updateBytes(columnIndex, x);2453}24542455/**2456* Updates the designated column with a {@code java.sql.Date} value.2457* The {@code updateXXX} methods are used to update column values in the2458* current row or the insert row. The {@code updateXXX} methods do not2459* update the underlying database; instead the {@code updateRow} or2460* {@code insertRow} methods are called to update the database.2461*2462* @param columnIndex the first column is 1, the second is 2, and so on2463* @param x the new column value2464* @throws SQLException if a database access error occurs2465* or this rowset does not currently have a valid connection,2466* prepared statement, and result set2467*2468*/2469public void updateDate(int columnIndex, java.sql.Date x) throws SQLException {2470checkState();24712472// To check the type and concurrency of the ResultSet2473// to verify whether updates are possible or not2474checkTypeConcurrency();24752476rs.updateDate(columnIndex, x);2477}247824792480/**2481* Updates the designated column with a {@code java.sql.Time} value.2482* The {@code updateXXX} methods are used to update column values in the2483* current row or the insert row. The {@code updateXXX} methods do not2484* update the underlying database; instead the {@code updateRow} or2485* {@code insertRow} methods are called to update the database.2486*2487* @param columnIndex the first column is 1, the second is 2, and so on2488* @param x the new column value2489* @throws SQLException if a database access error occurs2490* or this rowset does not currently have a valid connection,2491* prepared statement, and result set2492*2493*/2494public void updateTime(int columnIndex, java.sql.Time x) throws SQLException {2495checkState();24962497// To check the type and concurrency of the ResultSet2498// to verify whether updates are possible or not2499checkTypeConcurrency();25002501rs.updateTime(columnIndex, x);2502}25032504/**2505* Updates the designated column with a {@code java.sql.Timestamp}2506* value.2507* The {@code updateXXX} methods are used to update column values in the2508* current row or the insert row. The {@code updateXXX} methods do not2509* update the underlying database; instead the {@code updateRow} or2510* {@code insertRow} methods are called to update the database.2511*2512* @param columnIndex the first column is 1, the second is 2, and so on2513* @param x the new column value2514* @throws SQLException if a database access error occurs2515* or this rowset does not currently have a valid connection,2516* prepared statement, and result set2517*2518*/2519public void updateTimestamp(int columnIndex, java.sql.Timestamp x) throws SQLException {2520checkState();25212522// To check the type and concurrency of the ResultSet2523// to verify whether updates are possible or not2524checkTypeConcurrency();25252526rs.updateTimestamp(columnIndex, x);2527}25282529/**2530* Updates the designated column with an ascii stream value.2531* The {@code updateXXX} methods are used to update column values in the2532* current row or the insert row. The {@code updateXXX} methods do not2533* update the underlying database; instead the {@code updateRow} or2534* {@code insertRow} methods are called to update the database.2535*2536* @param columnIndex the first column is 1, the second is 2, and so on2537* @param x the new column value2538* @param length the length of the stream2539* @throws SQLException if (1) a database access error occurs2540* (2) or this rowset does not currently have a valid connection,2541* prepared statement, and result set2542*2543*/2544public void updateAsciiStream(int columnIndex, java.io.InputStream x, int length) throws SQLException {2545checkState();25462547// To check the type and concurrency of the ResultSet2548// to verify whether updates are possible or not2549checkTypeConcurrency();25502551rs.updateAsciiStream(columnIndex, x, length);2552}25532554/**2555* Updates the designated column with a binary stream value.2556* The {@code updateXXX} methods are used to update column values in the2557* current row or the insert row. The {@code updateXXX} methods do not2558* update the underlying database; instead the {@code updateRow} or2559* {@code insertRow} methods are called to update the database.2560*2561* @param columnIndex the first column is 1, the second is 2, and so on2562* @param x the new column value2563* @param length the length of the stream2564* @throws SQLException if a database access error occurs2565* or this rowset does not currently have a valid connection,2566* prepared statement, and result set2567*2568*/2569public void updateBinaryStream(int columnIndex, java.io.InputStream x, int length) throws SQLException {2570checkState();25712572// To check the type and concurrency of the ResultSet2573// to verify whether updates are possible or not2574checkTypeConcurrency();25752576rs.updateBinaryStream(columnIndex, x, length);2577}25782579/**2580* Updates the designated column with a character stream value.2581* The {@code updateXXX} methods are used to update column values in the2582* current row or the insert row. The {@code updateXXX} methods do not2583* update the underlying database; instead the {@code updateRow} or2584* {@code insertRow} methods are called to update the database.2585*2586* @param columnIndex the first column is 1, the second is 2, and so on2587* @param x the new column value2588* @param length the length of the stream2589* @throws SQLException if a database access error occurs2590* or this rowset does not currently have a valid connection,2591* prepared statement, and result set2592*2593*/2594public void updateCharacterStream(int columnIndex, java.io.Reader x, int length) throws SQLException {2595checkState();25962597// To check the type and concurrency of the ResultSet2598// to verify whether updates are possible or not2599checkTypeConcurrency();26002601rs.updateCharacterStream(columnIndex, x, length);2602}26032604/**2605* Updates the designated column with an {@code Object} value.2606* The {@code updateXXX} methods are used to update column values in the2607* current row or the insert row. The {@code updateXXX} methods do not2608* update the underlying database; instead the {@code updateRow} or2609* {@code insertRow} methods are called to update the database.2610*2611* @param columnIndex the first column is 1, the second is 2, and so on2612* @param x the new column value2613* @param scale for {@code java.sql.Types.DECIMAl}2614* or {@code java.sql.Types.NUMERIC} types,2615* this is the number of digits after the decimal point. For all other2616* types this value will be ignored.2617* @throws SQLException if a database access error occurs2618* or this rowset does not currently have a valid connection,2619* prepared statement, and result set2620*2621*/2622public void updateObject(int columnIndex, Object x, int scale) throws SQLException {2623checkState();26242625// To check the type and concurrency of the ResultSet2626// to verify whether updates are possible or not2627checkTypeConcurrency();26282629rs.updateObject(columnIndex, x, scale);2630}26312632/**2633* Updates the designated column with an {@code Object} value.2634* The {@code updateXXX} methods are used to update column values in the2635* current row or the insert row. The {@code updateXXX} methods do not2636* update the underlying database; instead the {@code updateRow} or2637* {@code insertRow} methods are called to update the database.2638*2639* @param columnIndex the first column is 1, the second is 2, and so on2640* @param x the new column value2641* @throws SQLException if a database access error occurs2642* or this rowset does not currently have a valid connection,2643* prepared statement, and result set2644*2645*/2646public void updateObject(int columnIndex, Object x) throws SQLException {2647checkState();26482649// To check the type and concurrency of the ResultSet2650// to verify whether updates are possible or not2651checkTypeConcurrency();26522653rs.updateObject(columnIndex, x);2654}26552656/**2657* Updates the designated column with a {@code null} value.2658* The {@code updateXXX} methods are used to update column values in the2659* current row or the insert row. The {@code updateXXX} methods do not2660* update the underlying database; instead the {@code updateRow} or2661* {@code insertRow} methods are called to update the database.2662*2663* @param columnName the name of the column2664* @throws SQLException if a database access error occurs2665* or this rowset does not currently have a valid connection,2666* prepared statement, and result set2667*2668*/2669public void updateNull(String columnName) throws SQLException {2670updateNull(findColumn(columnName));2671}26722673/**2674* Updates the designated column with a {@code boolean} value.2675* The {@code updateXXX} methods are used to update column values in the2676* current row or the insert row. The {@code updateXXX} methods do not2677* update the underlying database; instead the {@code updateRow} or2678* {@code insertRow} methods are called to update the database.2679*2680* @param columnName the name of the column2681* @param x the new column value2682* @throws SQLException if a database access error occurs2683*2684*/2685public void updateBoolean(String columnName, boolean x) throws SQLException {2686updateBoolean(findColumn(columnName), x);2687}26882689/**2690* Updates the designated column with a {@code byte} value.2691* The {@code updateXXX} methods are used to update column values in the2692* current row or the insert row. The {@code updateXXX} methods do not2693* update the underlying database; instead the {@code updateRow} or2694* {@code insertRow} methods are called to update the database.2695*2696* @param columnName the name of the column2697* @param x the new column value2698* @throws SQLException if a database access error occurs2699*2700*/2701public void updateByte(String columnName, byte x) throws SQLException {2702updateByte(findColumn(columnName), x);2703}27042705/**2706* Updates the designated column with a {@code short} value.2707* The {@code updateXXX} methods are used to update column values in the2708* current row or the insert row. The {@code updateXXX} methods do not2709* update the underlying database; instead the {@code updateRow} or2710* {@code insertRow} methods are called to update the database.2711*2712* @param columnName the name of the column2713* @param x the new column value2714* @throws SQLException if a database access error occurs2715*2716*/2717public void updateShort(String columnName, short x) throws SQLException {2718updateShort(findColumn(columnName), x);2719}27202721/**2722* Updates the designated column with an {@code int} value.2723* The {@code updateXXX} methods are used to update column values in the2724* current row or the insert row. The {@code updateXXX} methods do not2725* update the underlying database; instead the {@code updateRow} or2726* {@code insertRow} methods are called to update the database.2727*2728* @param columnName the name of the column2729* @param x the new column value2730* @throws SQLException if a database access error occurs2731*2732*/2733public void updateInt(String columnName, int x) throws SQLException {2734updateInt(findColumn(columnName), x);2735}27362737/**2738* Updates the designated column with a {@code long} value.2739* The {@code updateXXX} methods are used to update column values in the2740* current row or the insert row. The {@code updateXXX} methods do not2741* update the underlying database; instead the {@code updateRow} or2742* {@code insertRow} methods are called to update the database.2743*2744* @param columnName the name of the column2745* @param x the new column value2746* @throws SQLException if a database access error occurs2747*2748*/2749public void updateLong(String columnName, long x) throws SQLException {2750updateLong(findColumn(columnName), x);2751}27522753/**2754* Updates the designated column with a {@code float } value.2755* The {@code updateXXX} methods are used to update column values in the2756* current row or the insert row. The {@code updateXXX} methods do not2757* update the underlying database; instead the {@code updateRow} or2758* {@code insertRow} methods are called to update the database.2759*2760* @param columnName the name of the column2761* @param x the new column value2762* @throws SQLException if a database access error occurs2763*2764*/2765public void updateFloat(String columnName, float x) throws SQLException {2766updateFloat(findColumn(columnName), x);2767}27682769/**2770* Updates the designated column with a {@code double} value.2771* The {@code updateXXX} methods are used to update column values in the2772* current row or the insert row. The {@code updateXXX} methods do not2773* update the underlying database; instead the {@code updateRow} or2774* {@code insertRow} methods are called to update the database.2775*2776* @param columnName the name of the column2777* @param x the new column value2778* @throws SQLException if a database access error occurs2779*2780*/2781public void updateDouble(String columnName, double x) throws SQLException {2782updateDouble(findColumn(columnName), x);2783}27842785/**2786* Updates the designated column with a {@code java.sql.BigDecimal}2787* value.2788* The {@code updateXXX} methods are used to update column values in the2789* current row or the insert row. The {@code updateXXX} methods do not2790* update the underlying database; instead the {@code updateRow} or2791* {@code insertRow} methods are called to update the database.2792*2793* @param columnName the name of the column2794* @param x the new column value2795* @throws SQLException if a database access error occurs2796*2797*/2798public void updateBigDecimal(String columnName, BigDecimal x) throws SQLException {2799updateBigDecimal(findColumn(columnName), x);2800}28012802/**2803* Updates the designated column with a {@code String} value.2804* The {@code updateXXX} methods are used to update column values in the2805* current row or the insert row. The {@code updateXXX} methods do not2806* update the underlying database; instead the {@code updateRow} or2807* {@code insertRow} methods are called to update the database.2808*2809* @param columnName the name of the column2810* @param x the new column value2811* @throws SQLException if a database access error occurs2812*2813*/2814public void updateString(String columnName, String x) throws SQLException {2815updateString(findColumn(columnName), x);2816}28172818/**2819* Updates the designated column with a {@code boolean} value.2820* The {@code updateXXX} methods are used to update column values in the2821* current row or the insert row. The {@code updateXXX} methods do not2822* update the underlying database; instead the {@code updateRow} or2823* {@code insertRow} methods are called to update the database.2824*2825* JDBC 2.02826*2827* Updates a column with a byte array value.2828*2829* The {@code updateXXX} methods are used to update column values in the2830* current row, or the insert row. The {@code updateXXX} methods do not2831* update the underlying database; instead the {@code updateRow} or {@code insertRow}2832* methods are called to update the database.2833*2834* @param columnName the name of the column2835* @param x the new column value2836* @throws SQLException if a database access error occurs2837*2838*/2839public void updateBytes(String columnName, byte x[]) throws SQLException {2840updateBytes(findColumn(columnName), x);2841}28422843/**2844* Updates the designated column with a {@code java.sql.Date} value.2845* The {@code updateXXX} methods are used to update column values in the2846* current row or the insert row. The {@code updateXXX} methods do not2847* update the underlying database; instead the {@code updateRow} or2848* {@code insertRow} methods are called to update the database.2849*2850* @param columnName the name of the column2851* @param x the new column value2852* @throws SQLException if a database access error occurs2853*2854*/2855public void updateDate(String columnName, java.sql.Date x) throws SQLException {2856updateDate(findColumn(columnName), x);2857}28582859/**2860* Updates the designated column with a {@code java.sql.Time} value.2861* The {@code updateXXX} methods are used to update column values in the2862* current row or the insert row. The {@code updateXXX} methods do not2863* update the underlying database; instead the {@code updateRow} or2864* {@code insertRow} methods are called to update the database.2865*2866* @param columnName the name of the column2867* @param x the new column value2868* @throws SQLException if a database access error occurs2869*2870*/2871public void updateTime(String columnName, java.sql.Time x) throws SQLException {2872updateTime(findColumn(columnName), x);2873}28742875/**2876* Updates the designated column with a {@code java.sql.Timestamp}2877* value.2878* The {@code updateXXX} methods are used to update column values in the2879* current row or the insert row. The {@code updateXXX} methods do not2880* update the underlying database; instead the {@code updateRow} or2881* {@code insertRow} methods are called to update the database.2882*2883* @param columnName the name of the column2884* @param x the new column value2885* @throws SQLException if a database access error occurs2886*2887*/2888public void updateTimestamp(String columnName, java.sql.Timestamp x) throws SQLException {2889updateTimestamp(findColumn(columnName), x);2890}28912892/**2893* Updates the designated column with an ascii stream value.2894* The {@code updateXXX} methods are used to update column values in the2895* current row or the insert row. The {@code updateXXX} methods do not2896* update the underlying database; instead the {@code updateRow} or2897* {@code insertRow} methods are called to update the database.2898*2899* @param columnName the name of the column2900* @param x the new column value2901* @param length the length of the stream2902* @throws SQLException if a database access error occurs2903*2904*/2905public void updateAsciiStream(String columnName, java.io.InputStream x, int length) throws SQLException {2906updateAsciiStream(findColumn(columnName), x, length);2907}29082909/**2910* Updates the designated column with a binary stream value.2911* The {@code updateXXX} methods are used to update column values in the2912* current row or the insert row. The {@code updateXXX} methods do not2913* update the underlying database; instead the {@code updateRow} or2914* {@code insertRow} methods are called to update the database.2915*2916* @param columnName the name of the column2917* @param x the new column value2918* @param length the length of the stream2919* @throws SQLException if a database access error occurs2920*2921*/2922public void updateBinaryStream(String columnName, java.io.InputStream x, int length) throws SQLException {2923updateBinaryStream(findColumn(columnName), x, length);2924}29252926/**2927* Updates the designated column with a character stream value.2928* The {@code updateXXX} methods are used to update column values2929* in the current row or the insert row. The {@code updateXXX}2930* methods do not update the underlying database; instead the2931* {@code updateRow} or {@code insertRow} methods are called2932* to update the database.2933*2934* @param columnName the name of the column2935* @param reader the new column {@code Reader} stream value2936* @param length the length of the stream2937* @throws SQLException if a database access error occurs2938*2939*/2940public void updateCharacterStream(String columnName, java.io.Reader reader, int length) throws SQLException {2941updateCharacterStream(findColumn(columnName), reader, length);2942}29432944/**2945* Updates the designated column with an {@code Object} value.2946* The {@code updateXXX} methods are used to update column values in the2947* current row or the insert row. The {@code updateXXX} methods do not2948* update the underlying database; instead the {@code updateRow} or2949* {@code insertRow} methods are called to update the database.2950*2951* @param columnName the name of the column2952* @param x the new column value2953* @param scale for {@code java.sql.Types.DECIMAL}2954* or {@code java.sql.Types.NUMERIC} types,2955* this is the number of digits after the decimal point. For all other2956* types this value will be ignored.2957* @throws SQLException if a database access error occurs2958*2959*/2960public void updateObject(String columnName, Object x, int scale) throws SQLException {2961updateObject(findColumn(columnName), x, scale);2962}29632964/**2965* Updates the designated column with an {@code Object} value.2966* The {@code updateXXX} methods are used to update column values in the2967* current row or the insert row. The {@code updateXXX} methods do not2968* update the underlying database; instead the {@code updateRow} or2969* {@code insertRow} methods are called to update the database.2970*2971* @param columnName the name of the column2972* @param x the new column value2973* @throws SQLException if a database access error occurs2974*2975*/2976public void updateObject(String columnName, Object x) throws SQLException {2977updateObject(findColumn(columnName), x);2978}29792980/**2981* Inserts the contents of the insert row into this2982* {@code ResultSet} object and into the database2983* and also notifies listeners that a row has changed.2984* The cursor must be on the insert row when this method is called.2985*2986* @throws SQLException if (1) a database access error occurs,2987* (2) this method is called when the cursor is not2988* on the insert row, (3) not all non-nullable columns in2989* the insert row have been given a value, or (4) this2990* rowset does not currently have a valid connection,2991* prepared statement, and result set2992*/2993public void insertRow() throws SQLException {2994checkState();29952996rs.insertRow();2997notifyRowChanged();2998}29993000/**3001* Updates the underlying database with the new contents of the3002* current row of this rowset's {@code ResultSet} object3003* and notifies listeners that a row has changed.3004* This method cannot be called when the cursor is on the insert row.3005*3006* @throws SQLException if (1) a database access error occurs,3007* (2) this method is called when the cursor is3008* on the insert row, (3) the concurrency of the result3009* set is {@code ResultSet.CONCUR_READ_ONLY}, or3010* (4) this rowset does not currently have a valid connection,3011* prepared statement, and result set3012*/3013public void updateRow() throws SQLException {3014checkState();30153016rs.updateRow();3017notifyRowChanged();3018}30193020/**3021* Deletes the current row from this rowset's {@code ResultSet} object3022* and from the underlying database and also notifies listeners that a row3023* has changed. This method cannot be called when the cursor is on the insert3024* row.3025*3026* @throws SQLException if a database access error occurs3027* or if this method is called when the cursor is on the insert row3028* @throws SQLException if (1) a database access error occurs,3029* (2) this method is called when the cursor is before the3030* first row, after the last row, or on the insert row,3031* (3) the concurrency of this rowset's result3032* set is {@code ResultSet.CONCUR_READ_ONLY}, or3033* (4) this rowset does not currently have a valid connection,3034* prepared statement, and result set3035*/3036public void deleteRow() throws SQLException {3037checkState();30383039rs.deleteRow();3040notifyRowChanged();3041}30423043/**3044* Refreshes the current row of this rowset's {@code ResultSet}3045* object with its most recent value in the database. This method3046* cannot be called when the cursor is on the insert row.3047*3048* <P>The {@code refreshRow} method provides a way for an3049* application to explicitly tell the JDBC driver to refetch3050* a row(s) from the database. An application may want to call3051* {@code refreshRow} when caching or prefetching is being3052* done by the JDBC driver to fetch the latest value of a row3053* from the database. The JDBC driver may actually refresh multiple3054* rows at once if the fetch size is greater than one.3055*3056* <P> All values are refetched subject to the transaction isolation3057* level and cursor sensitivity. If {@code refreshRow} is called after3058* calling an {@code updateXXX} method, but before calling3059* the method {@code updateRow}, then the3060* updates made to the row are lost. Calling the method3061* {@code refreshRow} frequently will likely slow performance.3062*3063* @throws SQLException if (1) a database access error occurs,3064* (2) this method is called when the cursor is3065* on the insert row, or (3) this rowset does not3066* currently have a valid connection, prepared statement,3067* and result set3068*3069*/3070public void refreshRow() throws SQLException {3071checkState();30723073rs.refreshRow();3074}30753076/**3077* Cancels the updates made to the current row in this3078* {@code ResultSet} object and notifies listeners that a row3079* has changed. This method may be called after calling an3080* {@code updateXXX} method(s) and before calling3081* the method {@code updateRow} to roll back3082* the updates made to a row. If no updates have been made or3083* {@code updateRow} has already been called, this method has no3084* effect.3085*3086* @throws SQLException if (1) a database access error occurs,3087* (2) this method is called when the cursor is3088* on the insert row, or (3) this rowset does not3089* currently have a valid connection, prepared statement,3090* and result set3091*/3092public void cancelRowUpdates() throws SQLException {3093checkState();30943095rs.cancelRowUpdates();30963097notifyRowChanged();3098}30993100/**3101* Moves the cursor to the insert row. The current cursor position is3102* remembered while the cursor is positioned on the insert row.3103*3104* The insert row is a special row associated with an updatable3105* result set. It is essentially a buffer where a new row may3106* be constructed by calling the {@code updateXXX} methods prior to3107* inserting the row into the result set.3108*3109* Only the {@code updateXXX}, {@code getXXX},3110* and {@code insertRow} methods may be3111* called when the cursor is on the insert row. All of the columns in3112* a result set must be given a value each time this method is3113* called before calling {@code insertRow}.3114* An {@code updateXXX} method must be called before a3115* {@code getXXX} method can be called on a column value.3116*3117* @throws SQLException if (1) a database access error occurs,3118* (2) this rowset's {@code ResultSet} object is3119* not updatable, or (3) this rowset does not3120* currently have a valid connection, prepared statement,3121* and result set3122*3123*/3124public void moveToInsertRow() throws SQLException {3125checkState();31263127rs.moveToInsertRow();3128}31293130/**3131* Moves the cursor to the remembered cursor position, usually the3132* current row. This method has no effect if the cursor is not on3133* the insert row.3134*3135* @throws SQLException if (1) a database access error occurs,3136* (2) this rowset's {@code ResultSet} object is3137* not updatable, or (3) this rowset does not3138* currently have a valid connection, prepared statement,3139* and result set3140*/3141public void moveToCurrentRow() throws SQLException {3142checkState();31433144rs.moveToCurrentRow();3145}31463147/**3148* Returns the {@code Statement} object that produced this3149* {@code ResultSet} object.3150* If the result set was generated some other way, such as by a3151* {@code DatabaseMetaData} method, this method returns3152* {@code null}.3153*3154* @return the {@code Statement} object that produced3155* this rowset's {@code ResultSet} object or {@code null}3156* if the result set was produced some other way3157* @throws SQLException if a database access error occurs3158*/3159public java.sql.Statement getStatement() throws SQLException {31603161if(rs != null)3162{3163return rs.getStatement();3164} else {3165return null;3166}3167}31683169/**3170* Returns the value of the designated column in the current row3171* of this rowset's {@code ResultSet} object as an {@code Object}.3172* This method uses the given {@code Map} object3173* for the custom mapping of the3174* SQL structured or distinct type that is being retrieved.3175*3176* @param i the first column is 1, the second is 2, and so on3177* @param map a {@code java.util.Map} object that contains the mapping3178* from SQL type names to classes in the Java programming language3179* @return an {@code Object} in the Java programming language3180* representing the SQL value3181* @throws SQLException if (1) a database access error occurs3182* or (2) this rowset does not currently have a valid connection,3183* prepared statement, and result set3184*/3185public Object getObject(int i, java.util.Map<String,Class<?>> map)3186throws SQLException3187{3188checkState();31893190return rs.getObject(i, map);3191}31923193/**3194* Returns the value of the designated column in the current row3195* of this rowset's {@code ResultSet} object as a {@code Ref} object.3196*3197* @param i the first column is 1, the second is 2, and so on3198* @return a {@code Ref} object representing an SQL {@code REF} value3199* @throws SQLException if (1) a database access error occurs3200* or (2) this rowset does not currently have a valid connection,3201* prepared statement, and result set3202*/3203public Ref getRef(int i) throws SQLException {3204checkState();32053206return rs.getRef(i);3207}320832093210/**3211* Returns the value of the designated column in the current row3212* of this rowset's {@code ResultSet} object as a {@code Blob} object.3213*3214* @param i the first column is 1, the second is 2, and so on3215* @return a {@code Blob} object representing the SQL {@code BLOB}3216* value in the specified column3217* @throws SQLException if (1) a database access error occurs3218* or (2) this rowset does not currently have a valid connection,3219* prepared statement, and result set3220*/3221public Blob getBlob(int i) throws SQLException {3222checkState();32233224return rs.getBlob(i);3225}32263227/**3228* Returns the value of the designated column in the current row3229* of this rowset's {@code ResultSet} object as a {@code Clob} object.3230*3231* @param i the first column is 1, the second is 2, and so on3232* @return a {@code Clob} object representing the SQL {@code CLOB}3233* value in the specified column3234* @throws SQLException if (1) a database access error occurs3235* or (2) this rowset does not currently have a valid connection,3236* prepared statement, and result set3237*/3238public Clob getClob(int i) throws SQLException {3239checkState();32403241return rs.getClob(i);3242}32433244/**3245* Returns the value of the designated column in the current row3246* of this rowset's {@code ResultSet} object as an {@code Array} object.3247*3248* @param i the first column is 1, the second is 2, and so on.3249* @return an {@code Array} object representing the SQL {@code ARRAY}3250* value in the specified column3251* @throws SQLException if (1) a database access error occurs3252* or (2) this rowset does not currently have a valid connection,3253* prepared statement, and result set3254*/3255public Array getArray(int i) throws SQLException {3256checkState();32573258return rs.getArray(i);3259}32603261/**3262* Returns the value of the designated column in the current row3263* of this rowset's {@code ResultSet} object as an {@code Object}.3264* This method uses the specified {@code Map} object for3265* custom mapping if appropriate.3266*3267* @param colName the name of the column from which to retrieve the value3268* @param map a {@code java.util.Map} object that contains the mapping3269* from SQL type names to classes in the Java programming language3270* @return an {@code Object} representing the SQL3271* value in the specified column3272* @throws SQLException if (1) a database access error occurs3273* or (2) this rowset does not currently have a valid connection,3274* prepared statement, and result set3275*/3276public Object getObject(String colName, java.util.Map<String,Class<?>> map)3277throws SQLException3278{3279return getObject(findColumn(colName), map);3280}32813282/**3283* Returns the value of the designated column in the current row3284* of this rowset's {@code ResultSet} object as a {@code Ref} object.3285*3286* @param colName the column name3287* @return a {@code Ref} object representing the SQL {@code REF} value in3288* the specified column3289* @throws SQLException if (1) a database access error occurs3290* or (2) this rowset does not currently have a valid connection,3291* prepared statement, and result set3292*/3293public Ref getRef(String colName) throws SQLException {3294return getRef(findColumn(colName));3295}32963297/**3298* Returns the value of the designated column in the current row3299* of this rowset's {@code ResultSet} object as a {@code Blob} object.3300*3301* @param colName the name of the column from which to retrieve the value3302* @return a {@code Blob} object representing the SQL {@code BLOB}3303* value in the specified column3304* @throws SQLException if (1) a database access error occurs3305* or (2) this rowset does not currently have a valid connection,3306* prepared statement, and result set3307*/3308public Blob getBlob(String colName) throws SQLException {3309return getBlob(findColumn(colName));3310}33113312/**3313* Returns the value of the designated column in the current row3314* of this rowset's {@code ResultSet} object as a {@code Clob} object.3315*3316* @param colName the name of the column from which to retrieve the value3317* @return a {@code Clob} object representing the SQL {@code CLOB}3318* value in the specified column3319* @throws SQLException if (1) a database access error occurs3320* or (2) this rowset does not currently have a valid connection,3321* prepared statement, and result set3322*/3323public Clob getClob(String colName) throws SQLException {3324return getClob(findColumn(colName));3325}33263327/**3328* Returns the value of the designated column in the current row3329* of this rowset's {@code ResultSet} object as an {@code Array} object.3330*3331* @param colName the name of the column from which to retrieve the value3332* @return an {@code Array} object representing the SQL {@code ARRAY}3333* value in the specified column3334* @throws SQLException if (1) a database access error occurs3335* or (2) this rowset does not currently have a valid connection,3336* prepared statement, and result set3337*/3338public Array getArray(String colName) throws SQLException {3339return getArray(findColumn(colName));3340}33413342/**3343* Returns the value of the designated column in the current row3344* of this rowset's {@code ResultSet} object as a {@code java.sql.Date}3345* object. This method uses the given calendar to construct an appropriate3346* millisecond value for the date if the underlying database does not store3347* timezone information.3348*3349* @param columnIndex the first column is 1, the second is 2, and so on3350* @param cal the {@code java.util.Calendar} object3351* to use in constructing the date3352* @return the column value as a {@code java.sql.Date} object;3353* if the value is SQL {@code NULL},3354* the value returned is {@code null}3355* @throws SQLException if (1) a database access error occurs3356* or (2) this rowset does not currently have a valid connection,3357* prepared statement, and result set3358*/3359public java.sql.Date getDate(int columnIndex, Calendar cal) throws SQLException {3360checkState();33613362return rs.getDate(columnIndex, cal);3363}33643365/**3366* Returns the value of the designated column in the current row3367* of this rowset's {@code ResultSet} object as a {@code java.sql.Date}3368* object. This method uses the given calendar to construct an appropriate3369* millisecond value for the date if the underlying database does not store3370* timezone information.3371*3372* @param columnName the SQL name of the column from which to retrieve the value3373* @param cal the {@code java.util.Calendar} object3374* to use in constructing the date3375* @return the column value as a {@code java.sql.Date} object;3376* if the value is SQL {@code NULL},3377* the value returned is {@code null}3378* @throws SQLException if a database access error occurs3379* or this rowset does not currently have a valid connection,3380* prepared statement, and result set3381*3382*/3383public java.sql.Date getDate(String columnName, Calendar cal) throws SQLException {3384return getDate(findColumn(columnName), cal);3385}33863387/**3388* Returns the value of the designated column in the current row3389* of this rowset's {@code ResultSet} object as a {@code java.sql.Time}3390* object. This method uses the given calendar to construct an appropriate3391* millisecond value for the date if the underlying database does not store3392* timezone information.3393*3394* @param columnIndex the first column is 1, the second is 2, and so on3395* @param cal the {@code java.util.Calendar} object3396* to use in constructing the time3397* @return the column value as a {@code java.sql.Time} object;3398* if the value is SQL {@code NULL},3399* the value returned is {@code null} in the Java programming language3400* @throws SQLException if a database access error occurs3401* or this rowset does not currently have a valid connection,3402* prepared statement, and result set3403*/3404public java.sql.Time getTime(int columnIndex, Calendar cal) throws SQLException {3405checkState();34063407return rs.getTime(columnIndex, cal);3408}34093410/**3411* Returns the value of the designated column in the current row3412* of this rowset's {@code ResultSet} object as a {@code java.sql.Time}3413* object. This method uses the given calendar to construct an appropriate3414* millisecond value for the date if the underlying database does not store3415* timezone information.3416*3417* @param columnName the SQL name of the column3418* @param cal the {@code java.util.Calendar} object3419* to use in constructing the time3420* @return the column value as a {@code java.sql.Time} object;3421* if the value is SQL {@code NULL},3422* the value returned is {@code null} in the Java programming language3423* @throws SQLException if a database access error occurs3424* or this rowset does not currently have a valid connection,3425* prepared statement, and result set3426*/3427public java.sql.Time getTime(String columnName, Calendar cal) throws SQLException {3428return getTime(findColumn(columnName), cal);3429}34303431/**3432* Returns the value of the designated column in the current row3433* of this rowset's {@code ResultSet} object as a3434* {@code java.sql.Timestamp} object.3435* This method uses the given calendar to construct an appropriate millisecond3436* value for the timestamp if the underlying database does not store3437* timezone information.3438*3439* @param columnIndex the first column is 1, the second is 2, and so on3440* @param cal the {@code java.util.Calendar} object3441* to use in constructing the timestamp3442* @return the column value as a {@code java.sql.Timestamp} object;3443* if the value is SQL {@code NULL},3444* the value returned is {@code null}3445* @throws SQLException if a database access error occurs3446* or this rowset does not currently have a valid connection,3447* prepared statement, and result set3448*/3449public java.sql.Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException {3450checkState();34513452return rs.getTimestamp(columnIndex, cal);3453}34543455/**3456* Returns the value of the designated column in the current row3457* of this rowset's {@code ResultSet} object as a3458* {@code java.sql.Timestamp} object.3459* This method uses the given calendar to construct an appropriate millisecond3460* value for the timestamp if the underlying database does not store3461* timezone information.3462*3463* @param columnName the SQL name of the column3464* @param cal the {@code java.util.Calendar} object3465* to use in constructing the timestamp3466* @return the column value as a {@code java.sql.Timestamp} object;3467* if the value is SQL {@code NULL},3468* the value returned is {@code null}3469* @throws SQLException if a database access error occurs3470* or this rowset does not currently have a valid connection,3471* prepared statement, and result set3472*/3473public java.sql.Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException {3474return getTimestamp(findColumn(columnName), cal);3475}347634773478/**3479* Sets the designated column in either the current row or the insert3480* row of this {@code JdbcRowSetImpl} object with the given3481* {@code double} value.3482*3483* This method updates a column value in either the current row or3484* the insert row of this rowset, but it does not update the3485* database. If the cursor is on a row in the rowset, the3486* method {@link #updateRow} must be called to update the database.3487* If the cursor is on the insert row, the method {@link #insertRow}3488* must be called, which will insert the new row into both this rowset3489* and the database. Both of these methods must be called before the3490* cursor moves to another row.3491*3492* @param columnIndex the first column is {@code 1}, the second3493* is {@code 2}, and so on; must be {@code 1} or larger3494* and equal to or less than the number of columns in this rowset3495* @param ref the new {@code Ref} column value3496* @throws SQLException if (1) the given column index is out of bounds,3497* (2) the cursor is not on one of this rowset's rows or its3498* insert row, or (3) this rowset is3499* {@code ResultSet.CONCUR_READ_ONLY}3500*/3501public void updateRef(int columnIndex, java.sql.Ref ref)3502throws SQLException {3503checkState();3504rs.updateRef(columnIndex, ref);3505}35063507/**3508* Sets the designated column in either the current row or the insert3509* row of this {@code JdbcRowSetImpl} object with the given3510* {@code double} value.3511*3512* This method updates a column value in either the current row or3513* the insert row of this rowset, but it does not update the3514* database. If the cursor is on a row in the rowset, the3515* method {@link #updateRow} must be called to update the database.3516* If the cursor is on the insert row, the method {@link #insertRow}3517* must be called, which will insert the new row into both this rowset3518* and the database. Both of these methods must be called before the3519* cursor moves to another row.3520*3521* @param columnName a {@code String} object that must match the3522* SQL name of a column in this rowset, ignoring case3523* @param ref the new column value3524* @throws SQLException if (1) the given column name does not match the3525* name of a column in this rowset, (2) the cursor is not on3526* one of this rowset's rows or its insert row, or (3) this3527* rowset is {@code ResultSet.CONCUR_READ_ONLY}3528*/3529public void updateRef(String columnName, java.sql.Ref ref)3530throws SQLException {3531updateRef(findColumn(columnName), ref);3532}35333534/**3535* Sets the designated column in either the current row or the insert3536* row of this {@code JdbcRowSetImpl} object with the given3537* {@code double} value.3538*3539* This method updates a column value in either the current row or3540* the insert row of this rowset, but it does not update the3541* database. If the cursor is on a row in the rowset, the3542* method {@link #updateRow} must be called to update the database.3543* If the cursor is on the insert row, the method {@link #insertRow}3544* must be called, which will insert the new row into both this rowset3545* and the database. Both of these methods must be called before the3546* cursor moves to another row.3547*3548* @param columnIndex the first column is {@code 1}, the second3549* is {@code 2}, and so on; must be {@code 1} or larger3550* and equal to or less than the number of columns in this rowset3551* @param c the new column {@code Clob} value3552* @throws SQLException if (1) the given column index is out of bounds,3553* (2) the cursor is not on one of this rowset's rows or its3554* insert row, or (3) this rowset is3555* {@code ResultSet.CONCUR_READ_ONLY}3556*/3557public void updateClob(int columnIndex, Clob c) throws SQLException {3558checkState();3559rs.updateClob(columnIndex, c);3560}356135623563/**3564* Sets the designated column in either the current row or the insert3565* row of this {@code JdbcRowSetImpl} object with the given3566* {@code double} value.3567*3568* This method updates a column value in either the current row or3569* the insert row of this rowset, but it does not update the3570* database. If the cursor is on a row in the rowset, the3571* method {@link #updateRow} must be called to update the database.3572* If the cursor is on the insert row, the method {@link #insertRow}3573* must be called, which will insert the new row into both this rowset3574* and the database. Both of these methods must be called before the3575* cursor moves to another row.3576*3577* @param columnName a {@code String} object that must match the3578* SQL name of a column in this rowset, ignoring case3579* @param c the new column {@code Clob} value3580* @throws SQLException if (1) the given column name does not match the3581* name of a column in this rowset, (2) the cursor is not on3582* one of this rowset's rows or its insert row, or (3) this3583* rowset is {@code ResultSet.CONCUR_READ_ONLY}3584*/3585public void updateClob(String columnName, Clob c) throws SQLException {3586updateClob(findColumn(columnName), c);3587}35883589/**3590* Sets the designated column in either the current row or the insert3591* row of this {@code JdbcRowSetImpl} object with the given3592* {@code java.sql.Blob} value.3593*3594* This method updates a column value in either the current row or3595* the insert row of this rowset, but it does not update the3596* database. If the cursor is on a row in the rowset, the3597* method {@link #updateRow} must be called to update the database.3598* If the cursor is on the insert row, the method {@link #insertRow}3599* must be called, which will insert the new row into both this rowset3600* and the database. Both of these methods must be called before the3601* cursor moves to another row.3602*3603* @param columnIndex the first column is {@code 1}, the second3604* is {@code 2}, and so on; must be {@code 1} or larger3605* and equal to or less than the number of columns in this rowset3606* @param b the new column {@code Blob} value3607* @throws SQLException if (1) the given column index is out of bounds,3608* (2) the cursor is not on one of this rowset's rows or its3609* insert row, or (3) this rowset is3610* {@code ResultSet.CONCUR_READ_ONLY}3611*/3612public void updateBlob(int columnIndex, Blob b) throws SQLException {3613checkState();3614rs.updateBlob(columnIndex, b);3615}36163617/**3618* Sets the designated column in either the current row or the insert3619* row of this {@code JdbcRowSetImpl} object with the given3620* {@code java.sql.Blob } value.3621*3622* This method updates a column value in either the current row or3623* the insert row of this rowset, but it does not update the3624* database. If the cursor is on a row in the rowset, the3625* method {@link #updateRow} must be called to update the database.3626* If the cursor is on the insert row, the method {@link #insertRow}3627* must be called, which will insert the new row into both this rowset3628* and the database. Both of these methods must be called before the3629* cursor moves to another row.3630*3631* @param columnName a {@code String} object that must match the3632* SQL name of a column in this rowset, ignoring case3633* @param b the new column {@code Blob} value3634* @throws SQLException if (1) the given column name does not match the3635* name of a column in this rowset, (2) the cursor is not on3636* one of this rowset's rows or its insert row, or (3) this3637* rowset is {@code ResultSet.CONCUR_READ_ONLY}3638*/3639public void updateBlob(String columnName, Blob b) throws SQLException {3640updateBlob(findColumn(columnName), b);3641}36423643/**3644* Sets the designated column in either the current row or the insert3645* row of this {@code JdbcRowSetImpl} object with the given3646* {@code java.sql.Array} values.3647*3648* This method updates a column value in either the current row or3649* the insert row of this rowset, but it does not update the3650* database. If the cursor is on a row in the rowset, the3651* method {@link #updateRow} must be called to update the database.3652* If the cursor is on the insert row, the method {@link #insertRow}3653* must be called, which will insert the new row into both this rowset3654* and the database. Both of these methods must be called before the3655* cursor moves to another row.3656*3657* @param columnIndex the first column is {@code 1}, the second3658* is {@code 2}, and so on; must be {@code 1} or larger3659* and equal to or less than the number of columns in this rowset3660* @param a the new column {@code Array} value3661* @throws SQLException if (1) the given column index is out of bounds,3662* (2) the cursor is not on one of this rowset's rows or its3663* insert row, or (3) this rowset is3664* {@code ResultSet.CONCUR_READ_ONLY}3665*/3666public void updateArray(int columnIndex, Array a) throws SQLException {3667checkState();3668rs.updateArray(columnIndex, a);3669}36703671/**3672* Sets the designated column in either the current row or the insert3673* row of this {@code JdbcRowSetImpl} object with the given3674* {@code java.sql.Array} value.3675*3676* This method updates a column value in either the current row or3677* the insert row of this rowset, but it does not update the3678* database. If the cursor is on a row in the rowset, the3679* method {@link #updateRow} must be called to update the database.3680* If the cursor is on the insert row, the method {@link #insertRow}3681* must be called, which will insert the new row into both this rowset3682* and the database. Both of these methods must be called before the3683* cursor moves to another row.3684*3685* @param columnName a {@code String} object that must match the3686* SQL name of a column in this rowset, ignoring case3687* @param a the new column {@code Array} value3688* @throws SQLException if (1) the given column name does not match the3689* name of a column in this rowset, (2) the cursor is not on3690* one of this rowset's rows or its insert row, or (3) this3691* rowset is {@code ResultSet.CONCUR_READ_ONLY}3692*/3693public void updateArray(String columnName, Array a) throws SQLException {3694updateArray(findColumn(columnName), a);3695}36963697/**3698* Provide interface coverage for getURL(int) in {@code ResultSet->RowSet}3699*/3700public java.net.URL getURL(int columnIndex) throws SQLException {3701checkState();3702return rs.getURL(columnIndex);3703}37043705/**3706* Provide interface coverage for getURL(String) in {@code ResultSet->RowSet}3707*/3708public java.net.URL getURL(String columnName) throws SQLException {3709return getURL(findColumn(columnName));3710}37113712/**3713* Return the RowSetWarning object for the current row of a3714* {@code JdbcRowSetImpl}3715*/3716public RowSetWarning getRowSetWarnings() throws SQLException {3717return null;3718}3719/**3720* Unsets the designated parameter to the given int array.3721* This was set using {@code setMatchColumn}3722* as the column which will form the basis of the join.3723* <P>3724* The parameter value unset by this method should be same3725* as was set.3726*3727* @param columnIdxes the index into this rowset3728* object's internal representation of parameter values3729* @throws SQLException if an error occurs or the3730* parameter index is out of bounds or if the columnIdx is3731* not the same as set using {@code setMatchColumn(int [])}3732*/3733public void unsetMatchColumn(int[] columnIdxes) throws SQLException {37343735int i_val;3736for( int j= 0 ;j < columnIdxes.length; j++) {3737i_val = (Integer.parseInt(iMatchColumns.get(j).toString()));3738if(columnIdxes[j] != i_val) {3739throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols").toString());3740}3741}37423743for( int i = 0;i < columnIdxes.length ;i++) {3744iMatchColumns.set(i,Integer.valueOf(-1));3745}3746}37473748/**3749* Unsets the designated parameter to the given String array.3750* This was set using {@code setMatchColumn}3751* as the column which will form the basis of the join.3752* <P>3753* The parameter value unset by this method should be same3754* as was set.3755*3756* @param columnIdxes the index into this rowset3757* object's internal representation of parameter values3758* @throws SQLException if an error occurs or the3759* parameter index is out of bounds or if the columnName is3760* not the same as set using {@code setMatchColumn(String [])}3761*/3762public void unsetMatchColumn(String[] columnIdxes) throws SQLException {37633764for(int j = 0 ;j < columnIdxes.length; j++) {3765if( !columnIdxes[j].equals(strMatchColumns.get(j)) ){3766throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols").toString());3767}3768}37693770for(int i = 0 ; i < columnIdxes.length; i++) {3771strMatchColumns.set(i,null);3772}3773}37743775/**3776* Retrieves the column name as {@code String} array3777* that was set using {@code setMatchColumn(String [])}3778* for this rowset.3779*3780* @return a {@code String} array object that contains the column names3781* for the rowset which has this the match columns3782*3783* @throws SQLException if an error occurs or column name is not set3784*/3785public String[] getMatchColumnNames() throws SQLException {37863787String []str_temp = new String[strMatchColumns.size()];37883789if( strMatchColumns.get(0) == null) {3790throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.setmatchcols").toString());3791}37923793strMatchColumns.copyInto(str_temp);3794return str_temp;3795}37963797/**3798* Retrieves the column id as {@code int} array that was set using3799* {@code setMatchColumn(int [])} for this rowset.3800*3801* @return an {@code int} array object that contains the column ids3802* for the rowset which has this as the match columns.3803*3804* @throws SQLException if an error occurs or column index is not set3805*/3806public int[] getMatchColumnIndexes() throws SQLException {38073808Integer []int_temp = new Integer[iMatchColumns.size()];3809int [] i_temp = new int[iMatchColumns.size()];3810int i_val;38113812i_val = iMatchColumns.get(0);38133814if( i_val == -1 ) {3815throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.setmatchcols").toString());3816}381738183819iMatchColumns.copyInto(int_temp);38203821for(int i = 0; i < int_temp.length; i++) {3822i_temp[i] = (int_temp[i]).intValue();3823}38243825return i_temp;3826}38273828/**3829* Sets the designated parameter to the given int array.3830* This forms the basis of the join for the3831* {@code JoinRowSet} as the column which will form the basis of the3832* join.3833* <P>3834* The parameter value set by this method is stored internally and3835* will be supplied as the appropriate parameter in this rowset's3836* command when the method {@code getMatchColumnIndexes} is called.3837*3838* @param columnIdxes the indexes into this rowset3839* object's internal representation of parameter values; the3840* first parameter is 0, the second is 1, and so on; must be3841* {@code 0} or greater3842* @throws SQLException if an error occurs or the3843* parameter index is out of bounds3844*/3845public void setMatchColumn(int[] columnIdxes) throws SQLException {38463847for(int j = 0 ; j < columnIdxes.length; j++) {3848if( columnIdxes[j] < 0 ) {3849throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols1").toString());3850}3851}3852for(int i = 0 ;i < columnIdxes.length; i++) {3853iMatchColumns.add(i,Integer.valueOf(columnIdxes[i]));3854}3855}38563857/**3858* Sets the designated parameter to the given String array.3859* This forms the basis of the join for the3860* {@code JoinRowSet} as the column which will form the basis of the3861* join.3862* <P>3863* The parameter value set by this method is stored internally and3864* will be supplied as the appropriate parameter in this rowset's3865* command when the method {@code getMatchColumn} is called.3866*3867* @param columnNames the name of the column into this rowset3868* object's internal representation of parameter values3869* @throws SQLException if an error occurs or the3870* parameter index is out of bounds3871*/3872public void setMatchColumn(String[] columnNames) throws SQLException {38733874for(int j = 0; j < columnNames.length; j++) {3875if( columnNames[j] == null || columnNames[j].isEmpty()) {3876throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols2").toString());3877}3878}3879for( int i = 0; i < columnNames.length; i++) {3880strMatchColumns.add(i,columnNames[i]);3881}3882}388338843885/**3886* Sets the designated parameter to the given {@code int}3887* object. This forms the basis of the join for the3888* {@code JoinRowSet} as the column which will form the basis of the3889* join.3890* <P>3891* The parameter value set by this method is stored internally and3892* will be supplied as the appropriate parameter in this rowset's3893* command when the method {@code getMatchColumn} is called.3894*3895* @param columnIdx the index into this rowset3896* object's internal representation of parameter values; the3897* first parameter is 0, the second is 1, and so on; must be3898* {@code 0} or greater3899* @throws SQLException if an error occurs or the3900* parameter index is out of bounds3901*/3902public void setMatchColumn(int columnIdx) throws SQLException {3903// validate, if col is ok to be set3904if(columnIdx < 0) {3905throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols1").toString());3906} else {3907// set iMatchColumn3908iMatchColumns.set(0, Integer.valueOf(columnIdx));3909//strMatchColumn = null;3910}3911}39123913/**3914* Sets the designated parameter to the given {@code String}3915* object. This forms the basis of the join for the3916* {@code JoinRowSet} as the column which will form the basis of the3917* join.3918* <P>3919* The parameter value set by this method is stored internally and3920* will be supplied as the appropriate parameter in this rowset's3921* command when the method {@code getMatchColumn} is called.3922*3923* @param columnName the name of the column into this rowset3924* object's internal representation of parameter values3925* @throws SQLException if an error occurs or the3926* parameter index is out of bounds3927*/3928public void setMatchColumn(String columnName) throws SQLException {3929// validate, if col is ok to be set3930if(columnName == null || (columnName= columnName.trim()).isEmpty()) {3931throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols2").toString());3932} else {3933// set strMatchColumn3934strMatchColumns.set(0, columnName);3935//iMatchColumn = -1;3936}3937}39383939/**3940* Unsets the designated parameter to the given {@code int}3941* object. This was set using {@code setMatchColumn}3942* as the column which will form the basis of the join.3943* <P>3944* The parameter value unset by this method should be same3945* as was set.3946*3947* @param columnIdx the index into this rowset3948* object's internal representation of parameter values3949* @throws SQLException if an error occurs or the3950* parameter index is out of bounds or if the columnIdx is3951* not the same as set using {@code setMatchColumn(int)}3952*/3953public void unsetMatchColumn(int columnIdx) throws SQLException {3954// check if we are unsetting the SAME column3955if(! iMatchColumns.get(0).equals(Integer.valueOf(columnIdx) ) ) {3956throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.unsetmatch").toString());3957} else if(strMatchColumns.get(0) != null) {3958throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.usecolname").toString());3959} else {3960// that is, we are unsetting it.3961iMatchColumns.set(0, Integer.valueOf(-1));3962}3963}39643965/**3966* Unsets the designated parameter to the given {@code String}3967* object. This was set using {@code setMatchColumn}3968* as the column which will form the basis of the join.3969* <P>3970* The parameter value unset by this method should be same3971* as was set.3972*3973* @param columnName the index into this rowset3974* object's internal representation of parameter values3975* @throws SQLException if an error occurs or the3976* parameter index is out of bounds or if the columnName is3977* not the same as set using {@code setMatchColumn(String)}3978*3979*/3980public void unsetMatchColumn(String columnName) throws SQLException {3981// check if we are unsetting the same column3982columnName = columnName.trim();39833984if(!((strMatchColumns.get(0)).equals(columnName))) {3985throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.unsetmatch").toString());3986} else if(iMatchColumns.get(0) > 0) {3987throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.usecolid").toString());3988} else {3989strMatchColumns.set(0, null); // that is, we are unsetting it.3990}3991}39923993/**3994* Retrieves the {@code DatabaseMetaData} associated with3995* the connection handle associated with this3996* {@code JdbcRowSet} object.3997*3998* @return the {@code DatabaseMetadata} associated3999* with the rowset's connection.4000* @throws SQLException if a database access error occurs4001*/4002public DatabaseMetaData getDatabaseMetaData() throws SQLException {4003Connection con = connect();4004return con.getMetaData();4005}40064007/**4008* Retrieves the {@code ParameterMetaData} associated with4009* the connection handle associated with this4010* {@code JdbcRowSet} object.4011*4012* @return the {@code ParameterMetadata} associated4013* with the rowset's connection.4014* @throws SQLException if a database access error occurs4015*/4016public ParameterMetaData getParameterMetaData() throws SQLException {4017prepare();4018return (ps.getParameterMetaData());4019}40204021/**4022* Commits all updates in this {@code JdbcRowSet} object by4023* wrapping the internal {@code Connection} object and calling4024* its {@code commit} method.4025* This method sets this {@code JdbcRowSet} object's private field4026* {@code rs} to {@code null} after saving its value to another4027* object, but only if the {@code ResultSet}4028* constant {@code HOLD_CURSORS_OVER_COMMIT} has not been set.4029* (The field {@code rs} is this {@code JdbcRowSet} object's4030* {@code ResultSet} object.)4031*4032* @throws SQLException if autoCommit is set to true or if a database4033* access error occurs4034*/4035public void commit() throws SQLException {4036conn.commit();40374038// Checking the holadbility value and making the result set handle null4039// Added as per Rave requirements40404041if( conn.getHoldability() != HOLD_CURSORS_OVER_COMMIT) {4042rs = null;4043}4044}40454046/**4047* Sets auto-commit on the internal {@code Connection} object with this4048* {@code JdbcRowSet}4049*4050* @throws SQLException if a database access error occurs4051*/4052public void setAutoCommit(boolean autoCommit) throws SQLException {4053// The connection object should be there4054// in order to commit the connection handle on or off.40554056if(conn != null) {4057conn.setAutoCommit(autoCommit);4058} else {4059// Coming here means the connection object is null.4060// So generate a connection handle internally, since4061// a JdbcRowSet is always connected to a db, it is fine4062// to get a handle to the connection.40634064// Get hold of a connection handle4065// and change the autcommit as passesd.4066conn = connect();40674068// After setting the below the conn.getAutoCommit()4069// should return the same value.4070conn.setAutoCommit(autoCommit);40714072}4073}40744075/**4076* Returns the auto-commit status with this {@code JdbcRowSet}.4077*4078* @return true if auto commit is true; false otherwise4079* @throws SQLException if a database access error occurs4080*/4081public boolean getAutoCommit() throws SQLException {4082return conn.getAutoCommit();4083}40844085/**4086* Rolls back all the updates in this {@code JdbcRowSet} object by4087* wrapping the internal {@code Connection} object and calling its4088* {@code rollback} method.4089* This method sets this {@code JdbcRowSet} object's private field4090* {@code rs} to {@code null} after saving its value to another object.4091* (The field {@code rs} is this {@code JdbcRowSet} object's4092* internal {@code ResultSet} object.)4093*4094* @throws SQLException if autoCommit is set to true or a database4095* access error occurs4096*/4097public void rollback() throws SQLException {4098conn.rollback();40994100// Makes the result ste handle null after rollback4101// Added as per Rave requirements41024103rs = null;4104}410541064107/**4108* Rollbacks all the updates in the {@code JdbcRowSet} back to the4109* last {@code Savepoint} transaction marker. Wraps the internal4110* {@code Connection} object and call it's rollback method4111*4112* @param s the {@code Savepoint} transaction marker to roll the4113* transaction to.4114* @throws SQLException if autoCommit is set to true; or ia a database4115* access error occurs4116*/4117public void rollback(Savepoint s) throws SQLException {4118conn.rollback(s);4119}41204121// Setting the ResultSet Type and Concurrency4122protected void setParams() throws SQLException {4123if(rs == null) {4124setType(ResultSet.TYPE_SCROLL_INSENSITIVE);4125setConcurrency(ResultSet.CONCUR_UPDATABLE);4126}4127else {4128setType(rs.getType());4129setConcurrency(rs.getConcurrency());4130}4131}413241334134// Checking ResultSet Type and Concurrency4135private void checkTypeConcurrency() throws SQLException {4136if(rs.getType() == TYPE_FORWARD_ONLY ||4137rs.getConcurrency() == CONCUR_READ_ONLY) {4138throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.resnotupd").toString());4139}4140}41414142// Returns a Connection Handle4143// Added as per Rave requirements41444145/**4146* Gets this {@code JdbcRowSet} object's Connection property4147*4148*4149* @return the {@code Connection} object associated with this rowset;4150*/41514152protected Connection getConnection() {4153return conn;4154}41554156// Sets the connection handle with the parameter4157// Added as per rave requirements41584159/**4160* Sets this {@code JdbcRowSet} object's connection property4161* to the given {@code Connection} object.4162*4163* @param connection the {@code Connection} object.4164*/41654166protected void setConnection(Connection connection) {4167conn = connection;4168}41694170// Returns a PreparedStatement Handle4171// Added as per Rave requirements41724173/**4174* Gets this {@code JdbcRowSet} object's PreparedStatement property4175*4176*4177* @return the {@code PreparedStatement} object associated with this rowset;4178*/41794180protected PreparedStatement getPreparedStatement() {4181return ps;4182}41834184//Sets the prepared statement handle to the parameter4185// Added as per Rave requirements41864187/**4188* Sets this {@code JdbcRowSet} object's preparedtsatement property4189* to the given {@code PreparedStatemennt} object.4190*4191* @param preparedStatement the {@code PreparedStatement} object4192*4193*/4194protected void setPreparedStatement(PreparedStatement preparedStatement) {4195ps = preparedStatement;4196}41974198// Returns a ResultSet handle4199// Added as per Rave requirements42004201/**4202* Gets this {@code JdbcRowSet} object's ResultSet property4203*4204*4205* @return the {@code ResultSet} object associated with this rowset;4206*/42074208protected ResultSet getResultSet() throws SQLException {42094210checkState();42114212return rs;4213}42144215// Sets the result set handle to the parameter4216// Added as per Rave requirements42174218/**4219* Sets this {@code JdbcRowSet} object's resultset property4220* to the given {@code ResultSet} object.4221*4222* @param resultSet the {@code ResultSet} object4223*4224*/4225protected void setResultSet(ResultSet resultSet) {4226rs = resultSet;4227}42284229/**4230* Sets this {@code JdbcRowSet} object's {@code command} property to4231* the given {@code String} object and clears the parameters, if any,4232* that were set for the previous command. In addition,4233* if the {@code command} property has previously been set to a4234* non-null value and it is4235* different from the {@code String} object supplied,4236* this method sets this {@code JdbcRowSet} object's private fields4237* {@code ps} and {@code rs} to {@code null}.4238* (The field {@code ps} is its {@code PreparedStatement} object, and4239* the field {@code rs} is its {@code ResultSet} object.)4240* <P>4241* The {@code command} property may not be needed if the {@code RowSet}4242* object gets its data from a source that does not support commands,4243* such as a spreadsheet or other tabular file.4244* Thus, this property is optional and may be {@code null}.4245*4246* @param command a {@code String} object containing an SQL query4247* that will be set as this {@code RowSet} object's command4248* property; may be {@code null} but may not be an empty string4249* @throws SQLException if an empty string is provided as the command value4250* @see #getCommand4251*/4252public void setCommand(String command) throws SQLException {42534254if (getCommand() != null) {4255if(!getCommand().equals(command)) {4256super.setCommand(command);4257ps = null;4258rs = null;4259}4260}4261else {4262super.setCommand(command);4263}4264}42654266/**4267* Sets the {@code dataSourceName} property for this {@code JdbcRowSet}4268* object to the given logical name and sets this {@code JdbcRowSet} object's4269* Url property to {@code null}. In addition, if the {@code dataSourceName}4270* property has previously been set and is different from the one supplied,4271* this method sets this {@code JdbcRowSet} object's private fields4272* {@code ps}, {@code rs}, and {@code conn} to {@code null}.4273* (The field {@code ps} is its {@code PreparedStatement} object,4274* the field {@code rs} is its {@code ResultSet} object, and4275* the field {@code conn} is its {@code Connection} object.)4276* <P>4277* The name supplied to this method must have been bound to a4278* {@code DataSource} object in a JNDI naming service so that an4279* application can do a lookup using that name to retrieve the4280* {@code DataSource} object bound to it. The {@code DataSource}4281* object can then be used to establish a connection to the data source it4282* represents.4283* <P>4284* Users should set either the Url property or the dataSourceName property.4285* If both properties are set, the driver will use the property set most recently.4286*4287* @param dsName a {@code String} object with the name that can be supplied4288* to a naming service based on JNDI technology to retrieve the4289* {@code DataSource} object that can be used to get a connection;4290* may be {@code null}4291* @throws SQLException if there is a problem setting the4292* {@code dataSourceName} property4293* @see #getDataSourceName4294*/4295public void setDataSourceName(String dsName) throws SQLException{42964297if(getDataSourceName() != null) {4298if(!getDataSourceName().equals(dsName)) {4299super.setDataSourceName(dsName);4300conn = null;4301ps = null;4302rs = null;4303}4304}4305else {4306super.setDataSourceName(dsName);4307}4308}430943104311/**4312* Sets the Url property for this {@code JdbcRowSet} object4313* to the given {@code String} object and sets the dataSource name4314* property to {@code null}. In addition, if the Url property has4315* previously been set to a non {@code null} value and its value4316* is different from the value to be set,4317* this method sets this {@code JdbcRowSet} object's private fields4318* {@code ps}, {@code rs}, and {@code conn} to {@code null}.4319* (The field {@code ps} is its {@code PreparedStatement} object,4320* the field {@code rs} is its {@code ResultSet} object, and4321* the field {@code conn} is its {@code Connection} object.)4322* <P>4323* The Url property is a JDBC URL that is used when4324* the connection is created using a JDBC technology-enabled driver4325* ("JDBC driver") and the {@code DriverManager}.4326* The correct JDBC URL for the specific driver to be used can be found4327* in the driver documentation. Although there are guidelines for how4328* a JDBC URL is formed,4329* a driver vendor can specify any {@code String} object except4330* one with a length of {@code 0} (an empty string).4331* <P>4332* Setting the Url property is optional if connections are established using4333* a {@code DataSource} object instead of the {@code DriverManager}.4334* The driver will use either the URL property or the4335* dataSourceName property to create a connection, whichever was4336* specified most recently. If an application uses a JDBC URL, it4337* must load a JDBC driver that accepts the JDBC URL before it uses the4338* {@code RowSet} object to connect to a database. The {@code RowSet}4339* object will use the URL internally to create a database connection in order4340* to read or write data.4341*4342* @param url a {@code String} object that contains the JDBC URL4343* that will be used to establish the connection to a database for this4344* {@code RowSet} object; may be {@code null} but must not4345* be an empty string4346* @throws SQLException if an error occurs setting the Url property or the4347* parameter supplied is a string with a length of {@code 0} (an4348* empty string)4349* @see #getUrl4350*/43514352public void setUrl(String url) throws SQLException {43534354if(getUrl() != null) {4355if(!getUrl().equals(url)) {4356super.setUrl(url);4357conn = null;4358ps = null;4359rs = null;4360}4361}4362else {4363super.setUrl(url);4364}4365}43664367/**4368* Sets the username property for this {@code JdbcRowSet} object4369* to the given user name. Because it4370* is not serialized, the username property is set at run time before4371* calling the method {@code execute}. In addition,4372* if the {@code username} property is already set with a4373* non-null value and that value is different from the {@code String}4374* object to be set,4375* this method sets this {@code JdbcRowSet} object's private fields4376* {@code ps}, {@code rs}, and {@code conn} to {@code null}.4377* (The field {@code ps} is its {@code PreparedStatement} object,4378* {@code rs} is its {@code ResultSet} object, and4379* {@code conn} is its {@code Connection} object.)4380* Setting these fields to {@code null} ensures that only current4381* values will be used.4382*4383* @param uname the {@code String} object containing the user name that4384* is supplied to the data source to create a connection. It may be null.4385* @see #getUsername4386*/4387public void setUsername(String uname) {43884389if( getUsername() != null) {4390if(!getUsername().equals(uname)) {4391super.setUsername(uname);4392conn = null;4393ps = null;4394rs = null;4395}4396}4397else{4398super.setUsername(uname);4399}4400}44014402/**4403* Sets the password property for this {@code JdbcRowSet} object4404* to the given {@code String} object. Because it4405* is not serialized, the password property is set at run time before4406* calling the method {@code execute}. Its default valus is4407* {@code null}. In addition,4408* if the {@code password} property is already set with a4409* non-null value and that value is different from the one being set,4410* this method sets this {@code JdbcRowSet} object's private fields4411* {@code ps}, {@code rs}, and {@code conn} to {@code null}.4412* (The field {@code ps} is its {@code PreparedStatement} object,4413* {@code rs} is its {@code ResultSet} object, and4414* {@code conn} is its {@code Connection} object.)4415* Setting these fields to {@code null} ensures that only current4416* values will be used.4417*4418* @param password the {@code String} object that represents the password4419* that must be supplied to the database to create a connection4420*/4421public void setPassword(String password) {44224423if ( getPassword() != null) {4424if(!getPassword().equals(password)) {4425super.setPassword(password);4426conn = null;4427ps = null;4428rs = null;4429}4430}4431else{4432super.setPassword(password);4433}4434}44354436/**4437* Sets the type for this {@code RowSet} object to the specified type.4438* The default type is {@code ResultSet.TYPE_SCROLL_INSENSITIVE}.4439*4440* @param type one of the following constants:4441* {@code ResultSet.TYPE_FORWARD_ONLY},4442* {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or4443* {@code ResultSet.TYPE_SCROLL_SENSITIVE}4444* @throws SQLException if the parameter supplied is not one of the4445* following constants:4446* {@code ResultSet.TYPE_FORWARD_ONLY} or4447* {@code ResultSet.TYPE_SCROLL_INSENSITIVE}4448* {@code ResultSet.TYPE_SCROLL_SENSITIVE}4449* @see #getConcurrency4450* @see #getType4451*/44524453public void setType(int type) throws SQLException {44544455int oldVal;44564457try {4458oldVal = getType();4459}catch(SQLException ex) {4460oldVal = 0;4461}44624463if(oldVal != type) {4464super.setType(type);4465}44664467}44684469/**4470* Sets the concurrency for this {@code RowSet} object to4471* the specified concurrency. The default concurrency for any {@code RowSet}4472* object (connected or disconnected) is {@code ResultSet.CONCUR_UPDATABLE},4473* but this method may be called at any time to change the concurrency.4474*4475* @param concur one of the following constants:4476* {@code ResultSet.CONCUR_READ_ONLY} or4477* {@code ResultSet.CONCUR_UPDATABLE}4478* @throws SQLException if the parameter supplied is not one of the4479* following constants:4480* {@code ResultSet.CONCUR_UPDATABLE} or4481* {@code ResultSet.CONCUR_READ_ONLY}4482* @see #getConcurrency4483* @see #isReadOnly4484*/4485public void setConcurrency(int concur) throws SQLException {44864487int oldVal;44884489try {4490oldVal = getConcurrency();4491}catch(NullPointerException ex) {4492oldVal = 0;4493}44944495if(oldVal != concur) {4496super.setConcurrency(concur);4497}44984499}45004501/**4502* Retrieves the value of the designated {@code SQL XML} parameter as a4503* {@code SQLXML} object in the Java programming language.4504* @param columnIndex the first column is 1, the second is 2, ...4505* @return a SQLXML object that maps an SQL XML value4506* @throws SQLException if a database access error occurs4507* @since 1.64508*/4509public SQLXML getSQLXML(int columnIndex) throws SQLException {4510throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());4511}45124513/**4514* Retrieves the value of the designated {@code SQL XML} parameter as a4515* {@code SQLXML} object in the Java programming language.4516* @param colName the name of the column from which to retrieve the value4517* @return a SQLXML object that maps an SQL XML value4518* @throws SQLException if a database access error occurs4519*/4520public SQLXML getSQLXML(String colName) throws SQLException {4521throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());4522}45234524/**4525* Retrieves the value of the designated column in the current row of this4526* {@code ResultSet} object as a java.sql.RowId object in the Java4527* programming language.4528*4529* @param columnIndex the first column is 1, the second 2, ...4530* @return the column value if the value is a SQL {@code NULL} the4531* value returned is {@code null}4532* @throws SQLException if a database access error occurs4533* @since 1.64534*/4535public RowId getRowId(int columnIndex) throws SQLException {4536throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());4537}45384539/**4540* Retrieves the value of the designated column in the current row of this4541* {@code ResultSet} object as a java.sql.RowId object in the Java4542* programming language.4543*4544* @param columnName the name of the column4545* @return the column value if the value is a SQL {@code NULL} the4546* value returned is {@code null}4547* @throws SQLException if a database access error occurs4548* @since 1.64549*/4550public RowId getRowId(String columnName) throws SQLException {4551throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());4552}45534554/**4555* Updates the designated column with a {@code RowId} value. The updater4556* methods are used to update column values in the current row or the insert4557* row. The updater methods do not update the underlying database; instead4558* the {@code updateRow} or {@code insertRow} methods are called4559* to update the database.4560*4561* @param columnIndex the first column is 1, the second 2, ...4562* @param x the column value4563* @throws SQLException if a database access occurs4564* @since 1.64565*/4566public void updateRowId(int columnIndex, RowId x) throws SQLException {4567throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());4568}45694570/**4571* Updates the designated column with a {@code RowId} value. The updater4572* methods are used to update column values in the current row or the insert4573* row. The updater methods do not update the underlying database; instead4574* the {@code updateRow} or {@code insertRow} methods are called4575* to update the database.4576*4577* @param columnName the name of the column4578* @param x the column value4579* @throws SQLException if a database access occurs4580* @since 1.64581*/4582public void updateRowId(String columnName, RowId x) throws SQLException {4583throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());4584}45854586/**4587* Retrieves the holdability of this ResultSet object4588* @return either ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT4589* @throws SQLException if a database error occurs4590* @since 1.64591*/4592public int getHoldability() throws SQLException {4593throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());4594}45954596/**4597* Retrieves whether this ResultSet object has been closed. A ResultSet is closed if the4598* method close has been called on it, or if it is automatically closed.4599* @return true if this ResultSet object is closed; false if it is still open4600* @throws SQLException if a database access error occurs4601* @since 1.64602*/4603public boolean isClosed() throws SQLException {4604throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());4605}46064607/**4608* This method is used for updating columns that support National Character sets.4609* It can be used for updating NCHAR,NVARCHAR and LONGNVARCHAR columns.4610* @param columnIndex the first column is 1, the second 2, ...4611* @param nString the value for the column to be updated4612* @throws SQLException if a database access error occurs4613* @since 1.64614*/4615public void updateNString(int columnIndex, String nString) throws SQLException {4616throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());4617}46184619/**4620* This method is used for updating columns that support National Character sets.4621* It can be used for updating NCHAR,NVARCHAR and LONGNVARCHAR columns.4622* @param columnName name of the Column4623* @param nString the value for the column to be updated4624* @throws SQLException if a database access error occurs4625* @since 1.64626*/4627public void updateNString(String columnName, String nString) throws SQLException {4628throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());4629}463046314632/*o4633* This method is used for updating SQL {@code NCLOB} type that maps4634* to {@code java.sql.Types.NCLOB}4635* @param columnIndex the first column is 1, the second 2, ...4636* @param nClob the value for the column to be updated4637* @throws SQLException if a database access error occurs4638* @since 1.64639*/4640public void updateNClob(int columnIndex, NClob nClob) throws SQLException {4641throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());4642}46434644/**4645* This method is used for updating SQL {@code NCLOB} type that maps4646* to {@code java.sql.Types.NCLOB}4647* @param columnName name of the column4648* @param nClob the value for the column to be updated4649* @throws SQLException if a database access error occurs4650* @since 1.64651*/4652public void updateNClob(String columnName, NClob nClob) throws SQLException {4653throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());4654}46554656/**4657* Retrieves the value of the designated column in the current row4658* of this {@code ResultSet} object as a {@code NClob} object4659* in the Java programming language.4660*4661* @param i the first column is 1, the second is 2, ...4662* @return a {@code NClob} object representing the SQL4663* {@code NCLOB} value in the specified column4664* @exception SQLException if a database access error occurs4665* @since 1.64666*/4667public NClob getNClob(int i) throws SQLException {4668throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());4669}467046714672/**4673* Retrieves the value of the designated column in the current row4674* of this {@code ResultSet} object as a {@code NClob} object4675* in the Java programming language.4676*4677* @param colName the name of the column from which to retrieve the value4678* @return a {@code NClob} object representing the SQL {@code NCLOB}4679* value in the specified column4680* @exception SQLException if a database access error occurs4681* @since 1.64682*/4683public NClob getNClob(String colName) throws SQLException {4684throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());4685}46864687public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException{4688return null;4689}46904691public boolean isWrapperFor(Class<?> interfaces) throws SQLException {4692return false;4693}46944695/**4696* Sets the designated parameter to the given {@code java.sql.SQLXML} object. The driver converts this to an4697* SQL {@code XML} value when it sends it to the database.4698* @param parameterIndex index of the first parameter is 1, the second is 2, ...4699* @param xmlObject a {@code SQLXML} object that maps an SQL {@code XML} value4700* @throws SQLException if a database access error occurs4701* @since 1.64702*/4703public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException {4704throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());4705}47064707/**4708* Sets the designated parameter to the given {@code java.sql.SQLXML} object. The driver converts this to an4709* {@code SQL XML} value when it sends it to the database.4710* @param parameterName the name of the parameter4711* @param xmlObject a {@code SQLXML} object that maps an {@code SQL XML} value4712* @throws SQLException if a database access error occurs4713* @since 1.64714*/4715public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException {4716throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());4717}47184719/**4720* Sets the designated parameter to the given {@code java.sql.RowId} object. The4721* driver converts this to a SQL {@code ROWID} value when it sends it4722* to the database4723*4724* @param parameterIndex the first parameter is 1, the second is 2, ...4725* @param x the parameter value4726* @throws SQLException if a database access error occurs4727*4728* @since 1.64729*/4730public void setRowId(int parameterIndex, RowId x) throws SQLException {4731throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());4732}47334734/**4735* Sets the designated parameter to the given {@code java.sql.RowId} object. The4736* driver converts this to a SQL {@code ROWID} when it sends it to the4737* database.4738*4739* @param parameterName the name of the parameter4740* @param x the parameter value4741* @throws SQLException if a database access error occurs4742* @since 1.64743*/4744public void setRowId(String parameterName, RowId x) throws SQLException {4745throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());4746}474747484749/**4750* Sets the designated parameter to the given {@code String} object.4751* The driver converts this to a SQL {@code NCHAR} or4752* {@code NVARCHAR} or {@code LONGNVARCHAR} value4753* (depending on the argument's4754* size relative to the driver's limits on {@code NVARCHAR} values)4755* when it sends it to the database.4756*4757* @param parameterIndex of the first parameter is 1, the second is 2, ...4758* @param value the parameter value4759* @throws SQLException if the driver does not support national4760* character sets; if the driver can detect that a data conversion4761* error could occur ; or if a database access error occurs4762* @since 1.64763*/4764public void setNString(int parameterIndex, String value) throws SQLException {4765throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());4766}476747684769/**4770* Sets the designated parameter in this {@code RowSet} object's command4771* to a {@code Reader} object. The4772* {@code Reader} reads the data till end-of-file is reached. The4773* driver does the necessary conversion from Java character format to4774* the national character set in the database.47754776* <P><B>Note:</B> This stream object can either be a standard4777* Java stream object or your own subclass that implements the4778* standard interface.4779* <P><B>Note:</B> Consult your JDBC driver documentation to determine if4780* it might be more efficient to use a version of4781* {@code setNCharacterStream} which takes a length parameter.4782*4783* @param parameterIndex of the first parameter is 1, the second is 2, ...4784* @param value the parameter value4785* @throws SQLException if the driver does not support national4786* character sets; if the driver can detect that a data conversion4787* error could occur ; if a database access error occurs; or4788* this method is called on a closed {@code PreparedStatement}4789* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method4790* @since 1.64791*/4792public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException {4793throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());4794}47954796/**4797* Sets the designated parameter to a {@code java.sql.NClob} object. The object4798* implements the {@code java.sql.NClob} interface. This {@code NClob}4799* object maps to a SQL {@code NCLOB}.4800* @param parameterName the name of the column to be set4801* @param value the parameter value4802* @throws SQLException if the driver does not support national4803* character sets; if the driver can detect that a data conversion4804* error could occur; or if a database access error occurs4805* @since 1.64806*/4807public void setNClob(String parameterName, NClob value) throws SQLException {4808throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());4809}481048114812/**4813* Retrieves the value of the designated column in the current row4814* of this {@code ResultSet} object as a4815* {@code java.io.Reader} object.4816* It is intended for use when4817* accessing {@code NCHAR},{@code NVARCHAR}4818* and {@code LONGNVARCHAR} columns.4819*4820* @return a {@code java.io.Reader} object that contains the column4821* value; if the value is SQL {@code NULL}, the value returned is4822* {@code null} in the Java programming language.4823* @param columnIndex the first column is 1, the second is 2, ...4824* @exception SQLException if a database access error occurs4825* @since 1.64826*/4827public java.io.Reader getNCharacterStream(int columnIndex) throws SQLException {4828throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());4829}483048314832/**4833* Retrieves the value of the designated column in the current row4834* of this {@code ResultSet} object as a4835* {@code java.io.Reader} object.4836* It is intended for use when4837* accessing {@code NCHAR},{@code NVARCHAR}4838* and {@code LONGNVARCHAR} columns.4839*4840* @param columnName the name of the column4841* @return a {@code java.io.Reader} object that contains the column4842* value; if the value is SQL {@code NULL}, the value returned is4843* {@code null} in the Java programming language4844* @exception SQLException if a database access error occurs4845* @since 1.64846*/4847public java.io.Reader getNCharacterStream(String columnName) throws SQLException {4848throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());4849}48504851/**4852* Updates the designated column with a {@code java.sql.SQLXML} value.4853* The updater4854* methods are used to update column values in the current row or the insert4855* row. The updater methods do not update the underlying database; instead4856* the {@code updateRow} or {@code insertRow} methods are called4857* to update the database.4858* @param columnIndex the first column is 1, the second 2, ...4859* @param xmlObject the value for the column to be updated4860* @throws SQLException if a database access error occurs4861* @since 1.64862*/4863public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException {4864throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());4865}48664867/**4868* Updates the designated column with a {@code java.sql.SQLXML} value.4869* The updater4870* methods are used to update column values in the current row or the insert4871* row. The updater methods do not update the underlying database; instead4872* the {@code updateRow} or {@code insertRow} methods are called4873* to update the database.4874*4875* @param columnName the name of the column4876* @param xmlObject the column value4877* @throws SQLException if a database access occurs4878* @since 1.64879*/4880public void updateSQLXML(String columnName, SQLXML xmlObject) throws SQLException {4881throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());4882}48834884/**4885* Retrieves the value of the designated column in the current row4886* of this {@code ResultSet} object as4887* a {@code String} in the Java programming language.4888* It is intended for use when4889* accessing {@code NCHAR},{@code NVARCHAR}4890* and {@code LONGNVARCHAR} columns.4891*4892* @param columnIndex the first column is 1, the second is 2, ...4893* @return the column value; if the value is SQL {@code NULL}, the4894* value returned is {@code null}4895* @exception SQLException if a database access error occurs4896* @since 1.64897*/4898public String getNString(int columnIndex) throws SQLException {4899throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());4900}49014902/**4903* Retrieves the value of the designated column in the current row4904* of this {@code ResultSet} object as4905* a {@code String} in the Java programming language.4906* It is intended for use when4907* accessing {@code NCHAR},{@code NVARCHAR}4908* and {@code LONGNVARCHAR} columns.4909*4910* @param columnName the SQL name of the column4911* @return the column value; if the value is SQL {@code NULL}, the4912* value returned is {@code null}4913* @exception SQLException if a database access error occurs4914* @since 1.64915*/4916public String getNString(String columnName) throws SQLException {4917throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());4918}49194920/**4921* Updates the designated column with a character stream value, which will4922* have the specified number of bytes. The driver does the necessary conversion4923* from Java character format to the national character set in the database.4924* It is intended for use when updating NCHAR,NVARCHAR and LONGNVARCHAR columns.4925* The updater methods are used to update column values in the current row or4926* the insert row. The updater methods do not update the underlying database;4927* instead the updateRow or insertRow methods are called to update the database.4928*4929* @param columnIndex the first column is 1, the second is 2, ...4930* @param x the new column value4931* @param length the length of the stream4932* @exception SQLException if a database access error occurs4933* @since 1.64934*/4935public void updateNCharacterStream(int columnIndex,4936java.io.Reader x,4937long length)4938throws SQLException {4939throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());4940}49414942/**4943* Updates the designated column with a character stream value, which will4944* have the specified number of bytes. The driver does the necessary conversion4945* from Java character format to the national character set in the database.4946* It is intended for use when updating NCHAR,NVARCHAR and LONGNVARCHAR columns.4947* The updater methods are used to update column values in the current row or4948* the insert row. The updater methods do not update the underlying database;4949* instead the updateRow or insertRow methods are called to update the database.4950*4951* @param columnName name of the Column4952* @param x the new column value4953* @param length the length of the stream4954* @exception SQLException if a database access error occurs4955* @since 1.64956*/4957public void updateNCharacterStream(String columnName,4958java.io.Reader x,4959long length)4960throws SQLException {4961throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());4962}49634964/**4965* Updates the designated column with a character stream value. The4966* driver does the necessary conversion from Java character format to4967* the national character set in the database.4968* It is intended for use when4969* updating {@code NCHAR},{@code NVARCHAR}4970* and {@code LONGNVARCHAR} columns.4971*4972* The updater methods are used to update column values in the4973* current row or the insert row. The updater methods do not4974* update the underlying database; instead the {@code updateRow} or4975* {@code insertRow} methods are called to update the database.4976*4977* <P><B>Note:</B> Consult your JDBC driver documentation to determine if4978* it might be more efficient to use a version of4979* {@code updateNCharacterStream} which takes a length parameter.4980*4981* @param columnIndex the first column is 1, the second is 2, ...4982* @param x the new column value4983* @exception SQLException if a database access error occurs,4984* the result set concurrency is {@code CONCUR_READ_ONLY} or this4985* method is called on a closed result set4986* @exception SQLFeatureNotSupportedException if the JDBC driver does not support4987* this method4988* @since 1.64989*/4990public void updateNCharacterStream(int columnIndex,4991java.io.Reader x) throws SQLException {4992throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());4993}49944995/**4996* Updates the designated column with a character stream value. The4997* driver does the necessary conversion from Java character format to4998* the national character set in the database.4999* It is intended for use when5000* updating {@code NCHAR},{@code NVARCHAR}5001* and {@code LONGNVARCHAR} columns.5002*5003* The updater methods are used to update column values in the5004* current row or the insert row. The updater methods do not5005* update the underlying database; instead the {@code updateRow} or5006* {@code insertRow} methods are called to update the database.5007*5008* <P><B>Note:</B> Consult your JDBC driver documentation to determine if5009* it might be more efficient to use a version of5010* {@code updateNCharacterStream} which takes a length parameter.5011*5012* @param columnLabel the label for the column specified with the SQL AS clause.5013* If the SQL AS clause was not specified, then the label is the name of the column5014* @param reader the {@code java.io.Reader} object containing5015* the new column value5016* @exception SQLException if a database access error occurs,5017* the result set concurrency is {@code CONCUR_READ_ONLY} or5018* this method is called on a closed result set5019* @exception SQLFeatureNotSupportedException if the JDBC driver does not support5020* this method5021* @since 1.65022*/5023public void updateNCharacterStream(String columnLabel,5024java.io.Reader reader) throws SQLException {5025throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5026}50275028/**5029* Updates the designated column using the given input stream, which5030* will have the specified number of bytes.5031* When a very large ASCII value is input to a {@code LONGVARCHAR}5032* parameter, it may be more practical to send it via a5033* {@code java.io.InputStream}. Data will be read from the stream5034* as needed until end-of-file is reached. The JDBC driver will5035* do any necessary conversion from ASCII to the database char format.5036*5037* <P><B>Note:</B> This stream object can either be a standard5038* Java stream object or your own subclass that implements the5039* standard interface.5040* <p>5041* The updater methods are used to update column values in the5042* current row or the insert row. The updater methods do not5043* update the underlying database; instead the {@code updateRow} or5044* {@code insertRow} methods are called to update the database.5045*5046* @param columnIndex the first column is 1, the second is 2, ...5047* @param inputStream An object that contains the data to set the parameter5048* value to.5049* @param length the number of bytes in the parameter data.5050* @exception SQLException if a database access error occurs,5051* the result set concurrency is {@code CONCUR_READ_ONLY}5052* or this method is called on a closed result set5053* @exception SQLFeatureNotSupportedException if the JDBC driver does not support5054* this method5055* @since 1.65056*/5057public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException{5058throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5059}50605061/**5062* Updates the designated column using the given input stream, which5063* will have the specified number of bytes.5064* When a very large ASCII value is input to a {@code LONGVARCHAR}5065* parameter, it may be more practical to send it via a5066* {@code java.io.InputStream}. Data will be read from the stream5067* as needed until end-of-file is reached. The JDBC driver will5068* do any necessary conversion from ASCII to the database char format.5069*5070* <P><B>Note:</B> This stream object can either be a standard5071* Java stream object or your own subclass that implements the5072* standard interface.5073* <p>5074* The updater methods are used to update column values in the5075* current row or the insert row. The updater methods do not5076* update the underlying database; instead the {@code updateRow} or5077* {@code insertRow} methods are called to update the database.5078*5079* @param columnLabel the label for the column specified with the SQL AS clause.5080* If the SQL AS clause was not specified,5081* then the label is the name of the column.5082* @param inputStream An object that contains the data to set the parameter5083* value to.5084* @param length the number of bytes in the parameter data.5085* @exception SQLException if a database access error occurs,5086* the result set concurrency is {@code CONCUR_READ_ONLY}5087* or this method is called on a closed result set5088* @exception SQLFeatureNotSupportedException if the JDBC driver does not support5089* this method5090* @since 1.65091*/5092public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException {5093throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5094}50955096/**5097* Updates the designated column using the given input stream.5098* When a very large ASCII value is input to a {@code LONGVARCHAR}5099* parameter, it may be more practical to send it via a5100* {@code java.io.InputStream}. Data will be read from the stream5101* as needed until end-of-file is reached. The JDBC driver will5102* do any necessary conversion from ASCII to the database char format.5103*5104* <P><B>Note:</B> This stream object can either be a standard5105* Java stream object or your own subclass that implements the5106* standard interface.5107*5108* <P><B>Note:</B> Consult your JDBC driver documentation to determine if5109* it might be more efficient to use a version of5110* {@code updateBlob} which takes a length parameter.5111* <p>5112* The updater methods are used to update column values in the5113* current row or the insert row. The updater methods do not5114* update the underlying database; instead the {@code updateRow} or5115* {@code insertRow} methods are called to update the database.5116*5117* @param columnIndex the first column is 1, the second is 2, ...5118* @param inputStream An object that contains the data to set the parameter5119* value to.5120* @exception SQLException if a database access error occurs,5121* the result set concurrency is {@code CONCUR_READ_ONLY}5122* or this method is called on a closed result set5123* @exception SQLFeatureNotSupportedException if the JDBC driver does not support5124* this method5125* @since 1.65126*/5127public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException {5128throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5129}51305131/**5132* Updates the designated column using the given input stream.5133* When a very large ASCII value is input to a {@code LONGVARCHAR}5134* parameter, it may be more practical to send it via a5135* {@code java.io.InputStream}. Data will be read from the stream5136* as needed until end-of-file is reached. The JDBC driver will5137* do any necessary conversion from ASCII to the database char format.5138*5139* <P><B>Note:</B> This stream object can either be a standard5140* Java stream object or your own subclass that implements the5141* standard interface.5142* <P><B>Note:</B> Consult your JDBC driver documentation to determine if5143* it might be more efficient to use a version of5144* {@code updateBlob} which takes a length parameter.5145* <p>5146* The updater methods are used to update column values in the5147* current row or the insert row. The updater methods do not5148* update the underlying database; instead the {@code updateRow} or5149* {@code insertRow} methods are called to update the database.5150*5151* @param columnLabel the label for the column specified with the SQL AS clause.5152* If the SQL AS clause was not specified, then the label5153* is the name of the column5154* @param inputStream An object that contains the data to set the parameter5155* value to.5156* @exception SQLException if a database access error occurs,5157* the result set concurrency is {@code CONCUR_READ_ONLY}5158* or this method is called on a closed result set5159* @exception SQLFeatureNotSupportedException if the JDBC driver does not support5160* this method5161* @since 1.65162*/5163public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException {5164throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5165}51665167/**5168* Updates the designated column using the given {@code Reader}5169* object, which is the given number of characters long.5170* When a very large UNICODE value is input to a {@code LONGVARCHAR}5171* parameter, it may be more practical to send it via a5172* {@code java.io.Reader} object. The data will be read from the stream5173* as needed until end-of-file is reached. The JDBC driver will5174* do any necessary conversion from UNICODE to the database char format.5175*5176* <P><B>Note:</B> This stream object can either be a standard5177* Java stream object or your own subclass that implements the5178* standard interface.5179* <p>5180* The updater methods are used to update column values in the5181* current row or the insert row. The updater methods do not5182* update the underlying database; instead the {@code updateRow} or5183* {@code insertRow} methods are called to update the database.5184*5185* @param columnIndex the first column is 1, the second is 2, ...5186* @param reader An object that contains the data to set the parameter value to.5187* @param length the number of characters in the parameter data.5188* @exception SQLException if a database access error occurs,5189* the result set concurrency is {@code CONCUR_READ_ONLY}5190* or this method is called on a closed result set5191* @exception SQLFeatureNotSupportedException if the JDBC driver does not support5192* this method5193* @since 1.65194*/5195public void updateClob(int columnIndex, Reader reader, long length) throws SQLException {5196throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5197}51985199/**5200* Updates the designated column using the given {@code Reader}5201* object, which is the given number of characters long.5202* When a very large UNICODE value is input to a {@code LONGVARCHAR}5203* parameter, it may be more practical to send it via a5204* {@code java.io.Reader} object. The data will be read from the stream5205* as needed until end-of-file is reached. The JDBC driver will5206* do any necessary conversion from UNICODE to the database char format.5207*5208* <P><B>Note:</B> This stream object can either be a standard5209* Java stream object or your own subclass that implements the5210* standard interface.5211* <p>5212* The updater methods are used to update column values in the5213* current row or the insert row. The updater methods do not5214* update the underlying database; instead the {@code updateRow} or5215* {@code insertRow} methods are called to update the database.5216*5217* @param columnLabel the label for the column specified with the SQL AS clause.5218* If the SQL AS clause was not specified, then the label is the name of the column5219* @param reader An object that contains the data to set the parameter value to.5220* @param length the number of characters in the parameter data.5221* @exception SQLException if a database access error occurs,5222* the result set concurrency is {@code CONCUR_READ_ONLY}5223* or this method is called on a closed result set5224* @exception SQLFeatureNotSupportedException if the JDBC driver does not support5225* this method5226* @since 1.65227*/5228public void updateClob(String columnLabel, Reader reader, long length) throws SQLException {5229throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5230}52315232/**5233* Updates the designated column using the given {@code Reader}5234* object.5235* When a very large UNICODE value is input to a {@code LONGVARCHAR}5236* parameter, it may be more practical to send it via a5237* {@code java.io.Reader} object. The data will be read from the stream5238* as needed until end-of-file is reached. The JDBC driver will5239* do any necessary conversion from UNICODE to the database char format.5240*5241* <P><B>Note:</B> This stream object can either be a standard5242* Java stream object or your own subclass that implements the5243* standard interface.5244* <P><B>Note:</B> Consult your JDBC driver documentation to determine if5245* it might be more efficient to use a version of5246* {@code updateClob} which takes a length parameter.5247* <p>5248* The updater methods are used to update column values in the5249* current row or the insert row. The updater methods do not5250* update the underlying database; instead the {@code updateRow} or5251* {@code insertRow} methods are called to update the database.5252*5253* @param columnIndex the first column is 1, the second is 2, ...5254* @param reader An object that contains the data to set the parameter value to.5255* @exception SQLException if a database access error occurs,5256* the result set concurrency is {@code CONCUR_READ_ONLY}5257* or this method is called on a closed result set5258* @exception SQLFeatureNotSupportedException if the JDBC driver does not support5259* this method5260* @since 1.65261*/5262public void updateClob(int columnIndex, Reader reader) throws SQLException {5263throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5264}52655266/**5267* Updates the designated column using the given {@code Reader}5268* object.5269* When a very large UNICODE value is input to a {@code LONGVARCHAR}5270* parameter, it may be more practical to send it via a5271* {@code java.io.Reader} object. The data will be read from the stream5272* as needed until end-of-file is reached. The JDBC driver will5273* do any necessary conversion from UNICODE to the database char format.5274*5275* <P><B>Note:</B> This stream object can either be a standard5276* Java stream object or your own subclass that implements the5277* standard interface.5278* <P><B>Note:</B> Consult your JDBC driver documentation to determine if5279* it might be more efficient to use a version of5280* {@code updateClob} which takes a length parameter.5281* <p>5282* The updater methods are used to update column values in the5283* current row or the insert row. The updater methods do not5284* update the underlying database; instead the {@code updateRow} or5285* {@code insertRow} methods are called to update the database.5286*5287* @param columnLabel the label for the column specified with the SQL AS clause.5288* If the SQL AS clause was not specified, then the label5289* is the name of the column5290* @param reader An object that contains the data to set the parameter value to.5291* @exception SQLException if a database access error occurs,5292* the result set concurrency is {@code CONCUR_READ_ONLY}5293* or this method is called on a closed result set5294* @exception SQLFeatureNotSupportedException if the JDBC driver does not support5295* this method5296* @since 1.65297*/5298public void updateClob(String columnLabel, Reader reader) throws SQLException {5299throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5300}53015302/**5303* Updates the designated column using the given {@code Reader}5304* object, which is the given number of characters long.5305* When a very large UNICODE value is input to a {@code LONGVARCHAR}5306* parameter, it may be more practical to send it via a5307* {@code java.io.Reader} object. The data will be read from the stream5308* as needed until end-of-file is reached. The JDBC driver will5309* do any necessary conversion from UNICODE to the database char format.5310*5311* <P><B>Note:</B> This stream object can either be a standard5312* Java stream object or your own subclass that implements the5313* standard interface.5314* <p>5315* The updater methods are used to update column values in the5316* current row or the insert row. The updater methods do not5317* update the underlying database; instead the {@code updateRow} or5318* {@code insertRow} methods are called to update the database.5319*5320* @param columnIndex the first column is 1, the second 2, ...5321* @param reader An object that contains the data to set the parameter value to.5322* @param length the number of characters in the parameter data.5323* @throws SQLException if the driver does not support national5324* character sets; if the driver can detect that a data conversion5325* error could occur; this method is called on a closed result set,5326* if a database access error occurs or5327* the result set concurrency is {@code CONCUR_READ_ONLY}5328* @exception SQLFeatureNotSupportedException if the JDBC driver does not support5329* this method5330* @since 1.65331*/5332public void updateNClob(int columnIndex, Reader reader, long length) throws SQLException {5333throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5334}53355336/**5337* Updates the designated column using the given {@code Reader}5338* object, which is the given number of characters long.5339* When a very large UNICODE value is input to a {@code LONGVARCHAR}5340* parameter, it may be more practical to send it via a5341* {@code java.io.Reader} object. The data will be read from the stream5342* as needed until end-of-file is reached. The JDBC driver will5343* do any necessary conversion from UNICODE to the database char format.5344*5345* <P><B>Note:</B> This stream object can either be a standard5346* Java stream object or your own subclass that implements the5347* standard interface.5348* <p>5349* The updater methods are used to update column values in the5350* current row or the insert row. The updater methods do not5351* update the underlying database; instead the {@code updateRow} or5352* {@code insertRow} methods are called to update the database.5353*5354* @param columnLabel the label for the column specified with the SQL AS clause.5355* If the SQL AS clause was not specified, then the label is the name of the column5356* @param reader An object that contains the data to set the parameter value to.5357* @param length the number of characters in the parameter data.5358* @throws SQLException if the driver does not support national5359* character sets; if the driver can detect that a data conversion5360* error could occur; this method is called on a closed result set;5361* if a database access error occurs or5362* the result set concurrency is {@code CONCUR_READ_ONLY}5363* @exception SQLFeatureNotSupportedException if the JDBC driver does not support5364* this method5365* @since 1.65366*/5367public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException {5368throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5369}53705371/**5372* Updates the designated column using the given {@code Reader}5373* object.5374* When a very large UNICODE value is input to a {@code LONGVARCHAR}5375* parameter, it may be more practical to send it via a5376* {@code java.io.Reader} object. The data will be read from the stream5377* as needed until end-of-file is reached. The JDBC driver will5378* do any necessary conversion from UNICODE to the database char format.5379*5380* <P><B>Note:</B> This stream object can either be a standard5381* Java stream object or your own subclass that implements the5382* standard interface.5383* <P><B>Note:</B> Consult your JDBC driver documentation to determine if5384* it might be more efficient to use a version of5385* {@code updateNClob} which takes a length parameter.5386* <p>5387* The updater methods are used to update column values in the5388* current row or the insert row. The updater methods do not5389* update the underlying database; instead the {@code updateRow} or5390* {@code insertRow} methods are called to update the database.5391*5392* @param columnIndex the first column is 1, the second 2, ...5393* @param reader An object that contains the data to set the parameter value to.5394* @throws SQLException if the driver does not support national5395* character sets; if the driver can detect that a data conversion5396* error could occur; this method is called on a closed result set,5397* if a database access error occurs or5398* the result set concurrency is {@code CONCUR_READ_ONLY}5399* @exception SQLFeatureNotSupportedException if the JDBC driver does not support5400* this method5401* @since 1.65402*/5403public void updateNClob(int columnIndex, Reader reader) throws SQLException {5404throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5405}54065407/**5408* Updates the designated column using the given {@code Reader}5409* object.5410* When a very large UNICODE value is input to a {@code LONGVARCHAR}5411* parameter, it may be more practical to send it via a5412* {@code java.io.Reader} object. The data will be read from the stream5413* as needed until end-of-file is reached. The JDBC driver will5414* do any necessary conversion from UNICODE to the database char format.5415*5416* <P><B>Note:</B> This stream object can either be a standard5417* Java stream object or your own subclass that implements the5418* standard interface.5419* <P><B>Note:</B> Consult your JDBC driver documentation to determine if5420* it might be more efficient to use a version of5421* {@code updateNClob} which takes a length parameter.5422* <p>5423* The updater methods are used to update column values in the5424* current row or the insert row. The updater methods do not5425* update the underlying database; instead the {@code updateRow} or5426* {@code insertRow} methods are called to update the database.5427*5428* @param columnLabel the label for the column specified with the SQL AS clause.5429* If the SQL AS clause was not specified, then5430* the label is the name of the column5431* @param reader An object that contains the data to set the parameter value to.5432* @throws SQLException if the driver does not support national5433* character sets; if the driver can detect that a data conversion5434* error could occur; this method is called on a closed result set;5435* if a database access error occurs or5436* the result set concurrency is {@code CONCUR_READ_ONLY}5437* @exception SQLFeatureNotSupportedException if the JDBC driver does not support5438* this method5439* @since 1.65440*/5441public void updateNClob(String columnLabel, Reader reader) throws SQLException {5442throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5443}544454455446/**5447* Updates the designated column with an ascii stream value, which will have5448* the specified number of bytes.5449* The updater methods are used to update column values in the5450* current row or the insert row. The updater methods do not5451* update the underlying database; instead the {@code updateRow} or5452* {@code insertRow} methods are called to update the database.5453*5454* @param columnIndex the first column is 1, the second is 2, ...5455* @param x the new column value5456* @param length the length of the stream5457* @exception SQLException if a database access error occurs,5458* the result set concurrency is {@code CONCUR_READ_ONLY}5459* or this method is called on a closed result set5460* @exception SQLFeatureNotSupportedException if the JDBC driver does not support5461* this method5462* @since 1.65463*/5464public void updateAsciiStream(int columnIndex,5465java.io.InputStream x,5466long length) throws SQLException {5467throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5468}54695470/**5471* Updates the designated column with a binary stream value, which will have5472* the specified number of bytes.5473* The updater methods are used to update column values in the5474* current row or the insert row. The updater methods do not5475* update the underlying database; instead the {@code updateRow} or5476* {@code insertRow} methods are called to update the database.5477*5478* @param columnIndex the first column is 1, the second is 2, ...5479* @param x the new column value5480* @param length the length of the stream5481* @exception SQLException if a database access error occurs,5482* the result set concurrency is {@code CONCUR_READ_ONLY}5483* or this method is called on a closed result set5484* @exception SQLFeatureNotSupportedException if the JDBC driver does not support5485* this method5486* @since 1.65487*/5488public void updateBinaryStream(int columnIndex,5489java.io.InputStream x,5490long length) throws SQLException {5491throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5492}54935494/**5495* Updates the designated column with a character stream value, which will have5496* the specified number of bytes.5497* The updater methods are used to update column values in the5498* current row or the insert row. The updater methods do not5499* update the underlying database; instead the {@code updateRow} or5500* {@code insertRow} methods are called to update the database.5501*5502* @param columnIndex the first column is 1, the second is 2, ...5503* @param x the new column value5504* @param length the length of the stream5505* @exception SQLException if a database access error occurs,5506* the result set concurrency is {@code CONCUR_READ_ONLY}5507* or this method is called on a closed result set5508* @exception SQLFeatureNotSupportedException if the JDBC driver does not support5509* this method5510* @since 1.65511*/5512public void updateCharacterStream(int columnIndex,5513java.io.Reader x,5514long length) throws SQLException {5515throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5516}55175518/**5519* Updates the designated column with an ascii stream value, which will have5520* the specified number of bytes..5521* The updater methods are used to update column values in the5522* current row or the insert row. The updater methods do not5523* update the underlying database; instead the {@code updateRow} or5524* {@code insertRow} methods are called to update the database.5525*5526* @param columnLabel the label for the column specified with the SQL AS clause.5527* If the SQL AS clause was not specified, then5528* the label is the name of the column5529* @param x the new column value5530* @param length the length of the stream5531* @exception SQLException if a database access error occurs,5532* the result set concurrency is {@code CONCUR_READ_ONLY}5533* or this method is called on a closed result set5534* @exception SQLFeatureNotSupportedException if the JDBC driver does not support5535* this method5536* @since 1.65537*/5538public void updateAsciiStream(String columnLabel,5539java.io.InputStream x,5540long length) throws SQLException {5541throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5542}55435544/**5545* Updates the designated column with an ascii stream value.5546* The updater methods are used to update column values in the5547* current row or the insert row. The updater methods do not5548* update the underlying database; instead the {@code updateRow} or5549* {@code insertRow} methods are called to update the database.5550*5551* <P><B>Note:</B> Consult your JDBC driver documentation to determine if5552* it might be more efficient to use a version of5553* {@code updateAsciiStream} which takes a length parameter.5554*5555* @param columnIndex the first column is 1, the second is 2, ...5556* @param x the new column value5557* @exception SQLException if a database access error occurs,5558* the result set concurrency is {@code CONCUR_READ_ONLY}5559* or this method is called on a closed result set5560* @exception SQLFeatureNotSupportedException if the JDBC driver does not support5561* this method5562* @since 1.65563*/5564public void updateAsciiStream(int columnIndex,5565java.io.InputStream x) throws SQLException {5566throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5567}55685569/**5570* Updates the designated column with an ascii stream value.5571* The updater methods are used to update column values in the5572* current row or the insert row. The updater methods do not5573* update the underlying database; instead the {@code updateRow} or5574* {@code insertRow} methods are called to update the database.5575*5576* <P><B>Note:</B> Consult your JDBC driver documentation to determine if5577* it might be more efficient to use a version of5578* {@code updateAsciiStream} which takes a length parameter.5579*5580* @param columnLabel the label for the column specified with the SQL AS clause.5581* If the SQL AS clause was not specified, then the label5582* is the name of the column5583* @param x the new column value5584* @exception SQLException if a database access error occurs,5585* the result set concurrency is {@code CONCUR_READ_ONLY}5586* or this method is called on a closed result set5587* @exception SQLFeatureNotSupportedException if the JDBC driver does not support5588* this method5589* @since 1.65590*/5591public void updateAsciiStream(String columnLabel,5592java.io.InputStream x) throws SQLException {5593throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5594}559555965597/**5598* Updates the designated column with a binary stream value, which will have5599* the specified number of bytes.5600* The updater methods are used to update column values in the5601* current row or the insert row. The updater methods do not5602* update the underlying database; instead the {@code updateRow} or5603* {@code insertRow} methods are called to update the database.5604*5605* @param columnLabel the label for the column specified with the SQL AS clause.5606* If the SQL AS clause was not specified, then5607* the label is the name of the column5608* @param x the new column value5609* @param length the length of the stream5610* @exception SQLException if a database access error occurs,5611* the result set concurrency is {@code CONCUR_READ_ONLY}5612* or this method is called on a closed result set5613* @exception SQLFeatureNotSupportedException if the JDBC driver does not support5614* this method5615* @since 1.65616*/5617public void updateBinaryStream(String columnLabel,5618java.io.InputStream x,5619long length) throws SQLException {5620throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5621}56225623/**5624* Updates the designated column with a binary stream value.5625* The updater methods are used to update column values in the5626* current row or the insert row. The updater methods do not5627* update the underlying database; instead the {@code updateRow} or5628* {@code insertRow} methods are called to update the database.5629*5630* <P><B>Note:</B> Consult your JDBC driver documentation to determine if5631* it might be more efficient to use a version of5632* {@code updateBinaryStream} which takes a length parameter.5633*5634* @param columnIndex the first column is 1, the second is 2, ...5635* @param x the new column value5636* @exception SQLException if a database access error occurs,5637* the result set concurrency is {@code CONCUR_READ_ONLY}5638* or this method is called on a closed result set5639* @exception SQLFeatureNotSupportedException if the JDBC driver does not support5640* this method5641* @since 1.65642*/5643public void updateBinaryStream(int columnIndex,5644java.io.InputStream x) throws SQLException {5645throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5646}564756485649/**5650* Updates the designated column with a binary stream value.5651* The updater methods are used to update column values in the5652* current row or the insert row. The updater methods do not5653* update the underlying database; instead the {@code updateRow} or5654* {@code insertRow} methods are called to update the database.5655*5656* <P><B>Note:</B> Consult your JDBC driver documentation to determine if5657* it might be more efficient to use a version of5658* {@code updateBinaryStream} which takes a length parameter.5659*5660* @param columnLabel the label for the column specified with the SQL AS clause.5661* If the SQL AS clause was not specified, then5662* the label is the name of the column5663* @param x the new column value5664* @exception SQLException if a database access error occurs,5665* the result set concurrency is {@code CONCUR_READ_ONLY}5666* or this method is called on a closed result set5667* @exception SQLFeatureNotSupportedException if the JDBC driver does not support5668* this method5669* @since 1.65670*/5671public void updateBinaryStream(String columnLabel,5672java.io.InputStream x) throws SQLException {5673throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5674}567556765677/**5678* Updates the designated column with a character stream value, which will have5679* the specified number of bytes.5680* The updater methods are used to update column values in the5681* current row or the insert row. The updater methods do not5682* update the underlying database; instead the {@code updateRow} or5683* {@code insertRow} methods are called to update the database.5684*5685* @param columnLabel the label for the column specified with the SQL AS clause.5686* If the SQL AS clause was not specified, then5687* the label is the name of the column5688* @param reader the {@code java.io.Reader} object containing5689* the new column value5690* @param length the length of the stream5691* @exception SQLException if a database access error occurs,5692* the result set concurrency is {@code CONCUR_READ_ONLY}5693* or this method is called on a closed result set5694* @exception SQLFeatureNotSupportedException if the JDBC driver does not support5695* this method5696* @since 1.65697*/5698public void updateCharacterStream(String columnLabel,5699java.io.Reader reader,5700long length) throws SQLException {5701throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5702}57035704/**5705* Updates the designated column with a character stream value.5706* The updater methods are used to update column values in the5707* current row or the insert row. The updater methods do not5708* update the underlying database; instead the {@code updateRow} or5709* {@code insertRow} methods are called to update the database.5710*5711* <P><B>Note:</B> Consult your JDBC driver documentation to determine if5712* it might be more efficient to use a version of5713* {@code updateCharacterStream} which takes a length parameter.5714*5715* @param columnIndex the first column is 1, the second is 2, ...5716* @param x the new column value5717* @exception SQLException if a database access error occurs,5718* the result set concurrency is {@code CONCUR_READ_ONLY}5719* or this method is called on a closed result set5720* @exception SQLFeatureNotSupportedException if the JDBC driver does not support5721* this method5722* @since 1.65723*/5724public void updateCharacterStream(int columnIndex,5725java.io.Reader x) throws SQLException {5726throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5727}57285729/**5730* Updates the designated column with a character stream value.5731* The updater methods are used to update column values in the5732* current row or the insert row. The updater methods do not5733* update the underlying database; instead the {@code updateRow} or5734* {@code insertRow} methods are called to update the database.5735*5736* <P><B>Note:</B> Consult your JDBC driver documentation to determine if5737* it might be more efficient to use a version of5738* {@code updateCharacterStream} which takes a length parameter.5739*5740* @param columnLabel the label for the column specified with the SQL AS clause.5741* If the SQL AS clause was not specified, then the label5742* is the name of the column5743* @param reader the {@code java.io.Reader} object containing5744* the new column value5745* @exception SQLException if a database access error occurs,5746* the result set concurrency is {@code CONCUR_READ_ONLY}5747* or this method is called on a closed result set5748* @exception SQLFeatureNotSupportedException if the JDBC driver does not support5749* this method5750* @since 1.65751*/5752public void updateCharacterStream(String columnLabel,5753java.io.Reader reader) throws SQLException {5754throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5755}575657575758/**5759* Sets the designated parameter to the given {@code java.net.URL} value.5760* The driver converts this to an SQL {@code DATALINK} value5761* when it sends it to the database.5762*5763* @param parameterIndex the first parameter is 1, the second is 2, ...5764* @param x the {@code java.net.URL} object to be set5765* @exception SQLException if a database access error occurs or5766* this method is called on a closed {@code PreparedStatement}5767* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method5768* @since 1.45769*/5770public void setURL(int parameterIndex, java.net.URL x) throws SQLException{5771throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5772}577357745775/**5776* Sets the designated parameter to a {@code Reader} object.5777* This method differs from the {@code setCharacterStream (int, Reader)} method5778* because it informs the driver that the parameter value should be sent to5779* the server as a {@code NCLOB}. When the {@code setCharacterStream} method is used, the5780* driver may have to do extra work to determine whether the parameter5781* data should be sent to the server as a {@code LONGNVARCHAR} or a {@code NCLOB}5782* <P><B>Note:</B> Consult your JDBC driver documentation to determine if5783* it might be more efficient to use a version of5784* {@code setNClob} which takes a length parameter.5785*5786* @param parameterIndex index of the first parameter is 1, the second is 2, ...5787* @param reader An object that contains the data to set the parameter value to.5788* @throws SQLException if parameterIndex does not correspond to a parameter5789* marker in the SQL statement;5790* if the driver does not support national character sets;5791* if the driver can detect that a data conversion5792* error could occur; if a database access error occurs or5793* this method is called on a closed {@code PreparedStatement}5794* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method5795*5796* @since 1.65797*/5798public void setNClob(int parameterIndex, Reader reader)5799throws SQLException{5800throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5801}58025803/**5804* Sets the designated parameter to a {@code Reader} object.5805* The {@code reader} must contain the number5806* of characters specified by length otherwise a {@code SQLException} will be5807* generated when the {@code CallableStatement} is executed.5808* This method differs from the {@code setCharacterStream (int, Reader, int)} method5809* because it informs the driver that the parameter value should be sent to5810* the server as a {@code NCLOB}. When the {@code setCharacterStream} method is used, the5811* driver may have to do extra work to determine whether the parameter5812* data should be send to the server as a {@code LONGNVARCHAR} or a {@code NCLOB}5813*5814* @param parameterName the name of the parameter to be set5815* @param reader An object that contains the data to set the parameter value to.5816* @param length the number of characters in the parameter data.5817* @throws SQLException if parameterIndex does not correspond to a parameter5818* marker in the SQL statement; if the length specified is less than zero;5819* if the driver does not support national5820* character sets; if the driver can detect that a data conversion5821* error could occur; if a database access error occurs or5822* this method is called on a closed {@code CallableStatement}5823* @exception SQLFeatureNotSupportedException if the JDBC driver does not support5824* this method5825* @since 1.65826*/5827public void setNClob(String parameterName, Reader reader, long length)5828throws SQLException{5829throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5830}583158325833/**5834* Sets the designated parameter to a {@code Reader} object.5835* This method differs from the {@code setCharacterStream (int, Reader)} method5836* because it informs the driver that the parameter value should be sent to5837* the server as a {@code NCLOB}. When the {@code setCharacterStream} method is used, the5838* driver may have to do extra work to determine whether the parameter5839* data should be send to the server as a {@code LONGNVARCHAR} or a {@code NCLOB}5840* <P><B>Note:</B> Consult your JDBC driver documentation to determine if5841* it might be more efficient to use a version of5842* {@code setNClob} which takes a length parameter.5843*5844* @param parameterName the name of the parameter5845* @param reader An object that contains the data to set the parameter value to.5846* @throws SQLException if the driver does not support national character sets;5847* if the driver can detect that a data conversion5848* error could occur; if a database access error occurs or5849* this method is called on a closed {@code CallableStatement}5850* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method5851*5852* @since 1.65853*/5854public void setNClob(String parameterName, Reader reader)5855throws SQLException{5856throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5857}585858595860/**5861* Sets the designated parameter to a {@code Reader} object. The reader must contain the number5862* of characters specified by length otherwise a {@code SQLException} will be5863* generated when the {@code PreparedStatement} is executed.5864* This method differs from the {@code setCharacterStream (int, Reader, int)} method5865* because it informs the driver that the parameter value should be sent to5866* the server as a {@code NCLOB}. When the {@code setCharacterStream} method is used, the5867* driver may have to do extra work to determine whether the parameter5868* data should be sent to the server as a {@code LONGNVARCHAR} or a {@code NCLOB}5869*5870* @param parameterIndex index of the first parameter is 1, the second is 2, ...5871* @param reader An object that contains the data to set the parameter value to.5872* @param length the number of characters in the parameter data.5873* @throws SQLException if parameterIndex does not correspond to a parameter5874* marker in the SQL statement; if the length specified is less than zero;5875* if the driver does not support national character sets;5876* if the driver can detect that a data conversion5877* error could occur; if a database access error occurs or5878* this method is called on a closed {@code PreparedStatement}5879* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method5880*5881* @since 1.65882*/5883public void setNClob(int parameterIndex, Reader reader, long length)5884throws SQLException{5885throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5886}588758885889/**5890* Sets the designated parameter to a {@code java.sql.NClob} object.5891* The driver converts this to an5892* SQL {@code NCLOB} value when it sends it to the database.5893* @param parameterIndex of the first parameter is 1, the second is 2, ...5894* @param value the parameter value5895* @throws SQLException if the driver does not support national5896* character sets; if the driver can detect that a data conversion5897* error could occur; or if a database access error occurs5898* @since 1.65899*/5900public void setNClob(int parameterIndex, NClob value) throws SQLException{5901throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5902}590359045905/**5906* Sets the designated parameter to the given {@code String} object.5907* The driver converts this to a SQL {@code NCHAR} or5908* {@code NVARCHAR} or {@code LONGNVARCHAR}5909* @param parameterName the name of the column to be set5910* @param value the parameter value5911* @throws SQLException if the driver does not support national5912* character sets; if the driver can detect that a data conversion5913* error could occur; or if a database access error occurs5914* @since 1.65915*/5916public void setNString(String parameterName, String value)5917throws SQLException{5918throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5919}59205921/**5922* Sets the designated parameter to a {@code Reader} object. The5923* {@code Reader} reads the data till end-of-file is reached. The5924* driver does the necessary conversion from Java character format to5925* the national character set in the database.5926* @param parameterIndex of the first parameter is 1, the second is 2, ...5927* @param value the parameter value5928* @param length the number of characters in the parameter data.5929* @throws SQLException if the driver does not support national5930* character sets; if the driver can detect that a data conversion5931* error could occur ; or if a database access error occurs5932* @since 1.65933*/5934public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException{5935throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5936}5937593859395940/**5941* Sets the designated parameter to a {@code Reader} object. The5942* {@code Reader} reads the data till end-of-file is reached. The5943* driver does the necessary conversion from Java character format to5944* the national character set in the database.5945* @param parameterName the name of the column to be set5946* @param value the parameter value5947* @param length the number of characters in the parameter data.5948* @throws SQLException if the driver does not support national5949* character sets; if the driver can detect that a data conversion5950* error could occur; or if a database access error occurs5951* @since 1.65952*/5953public void setNCharacterStream(String parameterName, Reader value, long length)5954throws SQLException{5955throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5956}59575958/**5959* Sets the designated parameter to a {@code Reader} object. The5960* {@code Reader} reads the data till end-of-file is reached. The5961* driver does the necessary conversion from Java character format to5962* the national character set in the database.59635964* <P><B>Note:</B> This stream object can either be a standard5965* Java stream object or your own subclass that implements the5966* standard interface.5967* <P><B>Note:</B> Consult your JDBC driver documentation to determine if5968* it might be more efficient to use a version of5969* {@code setNCharacterStream} which takes a length parameter.5970*5971* @param parameterName the name of the parameter5972* @param value the parameter value5973* @throws SQLException if the driver does not support national5974* character sets; if the driver can detect that a data conversion5975* error could occur ; if a database access error occurs; or5976* this method is called on a closed {@code CallableStatement}5977* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method5978* @since 1.65979*/5980public void setNCharacterStream(String parameterName, Reader value) throws SQLException{5981throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());5982}59835984/**5985* Sets the designated parameter to the given {@code java.sql.Timestamp} value,5986* using the given {@code Calendar} object. The driver uses5987* the {@code Calendar} object to construct an SQL {@code TIMESTAMP} value,5988* which the driver then sends to the database. With a5989* a {@code Calendar} object, the driver can calculate the timestamp5990* taking into account a custom timezone. If no5991* {@code Calendar} object is specified, the driver uses the default5992* timezone, which is that of the virtual machine running the application.5993*5994* @param parameterName the name of the parameter5995* @param x the parameter value5996* @param cal the {@code Calendar} object the driver will use5997* to construct the timestamp5998* @exception SQLException if a database access error occurs or5999* this method is called on a closed {@code CallableStatement}6000* @exception SQLFeatureNotSupportedException if the JDBC driver does not support6001* this method6002* @see #getTimestamp6003* @since 1.46004*/6005public void setTimestamp(String parameterName, java.sql.Timestamp x, Calendar cal)6006throws SQLException{6007throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6008}60096010/**6011* Sets the designated parameter to a {@code Reader} object. The {@code reader} must contain the number6012* of characters specified by length otherwise a {@code SQLException} will be6013* generated when the {@code CallableStatement} is executed.6014* This method differs from the {@code setCharacterStream (int, Reader, int)} method6015* because it informs the driver that the parameter value should be sent to6016* the server as a {@code CLOB}. When the {@code setCharacterStream} method is used, the6017* driver may have to do extra work to determine whether the parameter6018* data should be send to the server as a {@code LONGVARCHAR} or a {@code CLOB}6019*6020* @param parameterName the name of the parameter to be set6021* @param reader An object that contains the data to set the parameter value to.6022* @param length the number of characters in the parameter data.6023* @throws SQLException if parameterIndex does not correspond to a parameter6024* marker in the SQL statement; if the length specified is less than zero;6025* a database access error occurs or6026* this method is called on a closed {@code CallableStatement}6027* @exception SQLFeatureNotSupportedException if the JDBC driver does not support6028* this method6029*6030* @since 1.66031*/6032public void setClob(String parameterName, Reader reader, long length)6033throws SQLException{6034throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6035}6036603760386039/**6040* Sets the designated parameter to the given {@code java.sql.Clob} object.6041* The driver converts this to an SQL {@code CLOB} value when it6042* sends it to the database.6043*6044* @param parameterName the name of the parameter6045* @param x a {@code Clob} object that maps an SQL {@code CLOB} value6046* @exception SQLException if a database access error occurs or6047* this method is called on a closed {@code CallableStatement}6048* @exception SQLFeatureNotSupportedException if the JDBC driver does not support6049* this method6050* @since 1.66051*/6052public void setClob (String parameterName, Clob x) throws SQLException{6053throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6054}60556056/**6057* Sets the designated parameter to a {@code Reader} object.6058* This method differs from the {@code setCharacterStream (int, Reader)} method6059* because it informs the driver that the parameter value should be sent to6060* the server as a {@code CLOB}. When the {@code setCharacterStream} method is used, the6061* driver may have to do extra work to determine whether the parameter6062* data should be send to the server as a {@code LONGVARCHAR} or a {@code CLOB}6063*6064* <P><B>Note:</B> Consult your JDBC driver documentation to determine if6065* it might be more efficient to use a version of6066* {@code setClob} which takes a length parameter.6067*6068* @param parameterName the name of the parameter6069* @param reader An object that contains the data to set the parameter value to.6070* @throws SQLException if a database access error occurs or this method is called on6071* a closed {@code CallableStatement}6072*6073* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method6074* @since 1.66075*/6076public void setClob(String parameterName, Reader reader)6077throws SQLException{6078throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6079}608060816082/**6083* Sets the designated parameter to the given {@code java.sql.Date} value6084* using the default time zone of the virtual machine that is running6085* the application.6086* The driver converts this6087* to an SQL {@code DATE} value when it sends it to the database.6088*6089* @param parameterName the name of the parameter6090* @param x the parameter value6091* @exception SQLException if a database access error occurs or6092* this method is called on a closed {@code CallableStatement}6093* @exception SQLFeatureNotSupportedException if the JDBC driver does not support6094* this method6095* @see #getDate6096* @since 1.46097*/6098public void setDate(String parameterName, java.sql.Date x)6099throws SQLException{6100throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6101}61026103/**6104* Sets the designated parameter to the given {@code java.sql.Date} value,6105* using the given {@code Calendar} object. The driver uses6106* the {@code Calendar} object to construct an SQL {@code DATE} value,6107* which the driver then sends to the database. With a6108* a {@code Calendar} object, the driver can calculate the date6109* taking into account a custom timezone. If no6110* {@code Calendar} object is specified, the driver uses the default6111* timezone, which is that of the virtual machine running the application.6112*6113* @param parameterName the name of the parameter6114* @param x the parameter value6115* @param cal the {@code Calendar} object the driver will use6116* to construct the date6117* @exception SQLException if a database access error occurs or6118* this method is called on a closed {@code CallableStatement}6119* @exception SQLFeatureNotSupportedException if the JDBC driver does not support6120* this method6121* @see #getDate6122* @since 1.46123*/6124public void setDate(String parameterName, java.sql.Date x, Calendar cal)6125throws SQLException{6126throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6127}612861296130/**6131* Sets the designated parameter to the given {@code java.sql.Time} value.6132* The driver converts this6133* to an SQL {@code TIME} value when it sends it to the database.6134*6135* @param parameterName the name of the parameter6136* @param x the parameter value6137* @exception SQLException if a database access error occurs or6138* this method is called on a closed {@code CallableStatement}6139* @exception SQLFeatureNotSupportedException if the JDBC driver does not support6140* this method6141* @see #getTime6142* @since 1.46143*/6144public void setTime(String parameterName, java.sql.Time x)6145throws SQLException{6146throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6147}61486149/**6150* Sets the designated parameter to the given {@code java.sql.Time} value,6151* using the given {@code Calendar} object. The driver uses6152* the {@code Calendar} object to construct an SQL {@code TIME} value,6153* which the driver then sends to the database. With a6154* a {@code Calendar} object, the driver can calculate the time6155* taking into account a custom timezone. If no6156* {@code Calendar} object is specified, the driver uses the default6157* timezone, which is that of the virtual machine running the application.6158*6159* @param parameterName the name of the parameter6160* @param x the parameter value6161* @param cal the {@code Calendar} object the driver will use6162* to construct the time6163* @exception SQLException if a database access error occurs or6164* this method is called on a closed {@code CallableStatement}6165* @exception SQLFeatureNotSupportedException if the JDBC driver does not support6166* this method6167* @see #getTime6168* @since 1.46169*/6170public void setTime(String parameterName, java.sql.Time x, Calendar cal)6171throws SQLException{6172throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6173}61746175/**6176* Sets the designated parameter to a {@code Reader} object.6177* This method differs from the {@code setCharacterStream (int, Reader)} method6178* because it informs the driver that the parameter value should be sent to6179* the server as a {@code CLOB}. When the {@code setCharacterStream} method is used, the6180* driver may have to do extra work to determine whether the parameter6181* data should be sent to the server as a {@code LONGVARCHAR} or a {@code CLOB}6182*6183* <P><B>Note:</B> Consult your JDBC driver documentation to determine if6184* it might be more efficient to use a version of6185* {@code setClob} which takes a length parameter.6186*6187* @param parameterIndex index of the first parameter is 1, the second is 2, ...6188* @param reader An object that contains the data to set the parameter value to.6189* @throws SQLException if a database access error occurs, this method is called on6190* a closed {@code PreparedStatement} or if parameterIndex does not correspond to a parameter6191* marker in the SQL statement6192*6193* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method6194* @since 1.66195*/6196public void setClob(int parameterIndex, Reader reader)6197throws SQLException{6198throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6199}620062016202/**6203* Sets the designated parameter to a {@code Reader} object. The reader must contain the number6204* of characters specified by length otherwise a {@code SQLException} will be6205* generated when the {@code PreparedStatement} is executed.6206* This method differs from the {@code setCharacterStream (int, Reader, int)} method6207* because it informs the driver that the parameter value should be sent to6208* the server as a {@code CLOB}. When the {@code setCharacterStream} method is used, the6209* driver may have to do extra work to determine whether the parameter6210* data should be sent to the server as a {@code LONGVARCHAR} or a {@code CLOB}6211* @param parameterIndex index of the first parameter is 1, the second is 2, ...6212* @param reader An object that contains the data to set the parameter value to.6213* @param length the number of characters in the parameter data.6214* @throws SQLException if a database access error occurs, this method is called on6215* a closed {@code PreparedStatement}, if parameterIndex does not correspond to a parameter6216* marker in the SQL statement, or if the length specified is less than zero.6217*6218* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method6219* @since 1.66220*/6221public void setClob(int parameterIndex, Reader reader, long length)6222throws SQLException{6223throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6224}622562266227/**6228* Sets the designated parameter to an {@code InputStream} object. The inputstream must contain the number6229* of characters specified by length otherwise a {@code SQLException} will be6230* generated when the {@code PreparedStatement} is executed.6231* This method differs from the {@code setBinaryStream (int, InputStream, int)}6232* method because it informs the driver that the parameter value should be6233* sent to the server as a {@code BLOB}. When the {@code setBinaryStream} method is used,6234* the driver may have to do extra work to determine whether the parameter6235* data should be sent to the server as a {@code LONGVARBINARY} or a {@code BLOB}6236*6237* @param parameterIndex index of the first parameter is 1,6238* the second is 2, ...6239* @param inputStream An object that contains the data to set the parameter6240* value to.6241* @param length the number of bytes in the parameter data.6242* @throws SQLException if a database access error occurs,6243* this method is called on a closed {@code PreparedStatement},6244* if parameterIndex does not correspond6245* to a parameter marker in the SQL statement, if the length specified6246* is less than zero or if the number of bytes in the inputstream does not match6247* the specified length.6248* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method6249*6250* @since 1.66251*/6252public void setBlob(int parameterIndex, InputStream inputStream, long length)6253throws SQLException{6254throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6255}62566257/**6258* Sets the designated parameter to an {@code InputStream} object.6259* This method differs from the {@code setBinaryStream (int, InputStream)}6260* This method differs from the {@code setBinaryStream (int, InputStream)}6261* method because it informs the driver that the parameter value should be6262* sent to the server as a {@code BLOB}. When the {@code setBinaryStream} method is used,6263* the driver may have to do extra work to determine whether the parameter6264* data should be sent to the server as a {@code LONGVARBINARY} or a {@code BLOB}6265*6266* <P><B>Note:</B> Consult your JDBC driver documentation to determine if6267* it might be more efficient to use a version of6268* {@code setBlob} which takes a length parameter.6269*6270* @param parameterIndex index of the first parameter is 1,6271* the second is 2, ...6272*6273* @param inputStream An object that contains the data to set the parameter6274* value to.6275* @throws SQLException if a database access error occurs,6276* this method is called on a closed {@code PreparedStatement} or6277* if parameterIndex does not correspond6278* to a parameter marker in the SQL statement,6279* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method6280*6281* @since 1.66282*/6283public void setBlob(int parameterIndex, InputStream inputStream)6284throws SQLException{6285throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6286}62876288/**6289* Sets the designated parameter to an {@code InputStream} object. The {@code inputstream} must contain the number6290* of characters specified by length, otherwise a {@code SQLException} will be6291* generated when the {@code CallableStatement} is executed.6292* This method differs from the {@code setBinaryStream (int, InputStream, int)}6293* method because it informs the driver that the parameter value should be6294* sent to the server as a {@code BLOB}. When the {@code setBinaryStream} method is used,6295* the driver may have to do extra work to determine whether the parameter6296* data should be sent to the server as a {@code LONGVARBINARY} or a {@code BLOB}6297*6298* @param parameterName the name of the parameter to be set6299* the second is 2, ...6300*6301* @param inputStream An object that contains the data to set the parameter6302* value to.6303* @param length the number of bytes in the parameter data.6304* @throws SQLException if parameterIndex does not correspond6305* to a parameter marker in the SQL statement, or if the length specified6306* is less than zero; if the number of bytes in the inputstream does not match6307* the specified length; if a database access error occurs or6308* this method is called on a closed {@code CallableStatement}6309* @exception SQLFeatureNotSupportedException if the JDBC driver does not support6310* this method6311*6312* @since 1.66313*/6314public void setBlob(String parameterName, InputStream inputStream, long length)6315throws SQLException{6316throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6317}631863196320/**6321* Sets the designated parameter to the given {@code java.sql.Blob} object.6322* The driver converts this to an SQL {@code BLOB} value when it6323* sends it to the database.6324*6325* @param parameterName the name of the parameter6326* @param x a {@code Blob} object that maps an SQL {@code BLOB} value6327* @exception SQLException if a database access error occurs or6328* this method is called on a closed {@code CallableStatement}6329* @exception SQLFeatureNotSupportedException if the JDBC driver does not support6330* this method6331* @since 1.66332*/6333public void setBlob (String parameterName, Blob x) throws SQLException{6334throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6335}63366337/**6338* Sets the designated parameter to an {@code InputStream} object.6339* This method differs from the {@code setBinaryStream (int, InputStream)}6340* method because it informs the driver that the parameter value should be6341* sent to the server as a {@code BLOB}. When the {@code setBinaryStream} method is used,6342* the driver may have to do extra work to determine whether the parameter6343* data should be send to the server as a {@code LONGVARBINARY} or a {@code BLOB}6344*6345* <P><B>Note:</B> Consult your JDBC driver documentation to determine if6346* it might be more efficient to use a version of6347* {@code setBlob} which takes a length parameter.6348*6349* @param parameterName the name of the parameter6350* @param inputStream An object that contains the data to set the parameter6351* value to.6352* @throws SQLException if a database access error occurs or6353* this method is called on a closed {@code CallableStatement}6354* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method6355*6356* @since 1.66357*/6358public void setBlob(String parameterName, InputStream inputStream)6359throws SQLException{6360throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6361}63626363/**6364* Sets the value of the designated parameter with the given object. The second6365* argument must be an object type; for integral values, the6366* {@code java.lang} equivalent objects should be used.6367*6368* <p>The given Java object will be converted to the given targetSqlType6369* before being sent to the database.6370*6371* If the object has a custom mapping (is of a class implementing the6372* interface {@code SQLData}),6373* the JDBC driver should call the method {@code SQLData.writeSQL} to write it6374* to the SQL data stream.6375* If, on the other hand, the object is of a class implementing6376* {@code Ref}, {@code Blob}, {@code Clob}, {@code NClob},6377* {@code Struct}, {@code java.net.URL},6378* or {@code Array}, the driver should pass it to the database as a6379* value of the corresponding SQL type.6380* <P>6381* Note that this method may be used to pass datatabase-6382* specific abstract data types.6383*6384* @param parameterName the name of the parameter6385* @param x the object containing the input parameter value6386* @param targetSqlType the SQL type (as defined in java.sql.Types) to be6387* sent to the database. The scale argument may further qualify this type.6388* @param scale for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types,6389* this is the number of digits after the decimal point. For all other6390* types, this value will be ignored.6391* @exception SQLException if a database access error occurs or6392* this method is called on a closed {@code CallableStatement}6393* @exception SQLFeatureNotSupportedException if {@code targetSqlType} is6394* an {@code ARRAY, BLOB, CLOB,6395* DATALINK, JAVA_OBJECT, NCHAR,6396* NCLOB, NVARCHAR, LONGNVARCHAR,6397* REF, ROWID, SQLXML}6398* or {@code STRUCT} data type and the JDBC driver does not support6399* this data type6400* @see Types6401* @see #getObject6402* @since 1.46403*/6404public void setObject(String parameterName, Object x, int targetSqlType, int scale)6405throws SQLException{6406throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6407}64086409/**6410* Sets the value of the designated parameter with the given object.6411* This method is like the method {@code setObject}6412* above, except that it assumes a scale of zero.6413*6414* @param parameterName the name of the parameter6415* @param x the object containing the input parameter value6416* @param targetSqlType the SQL type (as defined in java.sql.Types) to be6417* sent to the database6418* @exception SQLException if a database access error occurs or6419* this method is called on a closed {@code CallableStatement}6420* @exception SQLFeatureNotSupportedException if {@code targetSqlType} is6421* an {@code ARRAY, BLOB, CLOB,6422* DATALINK, JAVA_OBJECT, NCHAR,6423* NCLOB, NVARCHAR, LONGNVARCHAR,6424* REF, ROWID, SQLXML}6425* or {@code STRUCT} data type and the JDBC driver does not support6426* this data type6427* @see #getObject6428* @since 1.46429*/6430public void setObject(String parameterName, Object x, int targetSqlType)6431throws SQLException{6432throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6433}64346435/**6436* Sets the value of the designated parameter with the given object.6437* The second parameter must be of type {@code Object}; therefore, the6438* {@code java.lang} equivalent objects should be used for built-in types.6439*6440* <p>The JDBC specification specifies a standard mapping from6441* Java {@code Object} types to SQL types. The given argument6442* will be converted to the corresponding SQL type before being6443* sent to the database.6444*6445* <p>Note that this method may be used to pass datatabase-6446* specific abstract data types, by using a driver-specific Java6447* type.6448*6449* If the object is of a class implementing the interface {@code SQLData},6450* the JDBC driver should call the method {@code SQLData.writeSQL}6451* to write it to the SQL data stream.6452* If, on the other hand, the object is of a class implementing6453* {@code Ref}, {@code Blob}, {@code Clob}, {@code NClob},6454* {@code Struct}, {@code java.net.URL},6455* or {@code Array}, the driver should pass it to the database as a6456* value of the corresponding SQL type.6457* <P>6458* This method throws an exception if there is an ambiguity, for example, if the6459* object is of a class implementing more than one of the interfaces named above.6460*6461* @param parameterName the name of the parameter6462* @param x the object containing the input parameter value6463* @exception SQLException if a database access error occurs,6464* this method is called on a closed {@code CallableStatement} or if the given6465* {@code Object} parameter is ambiguous6466* @exception SQLFeatureNotSupportedException if the JDBC driver does not support6467* this method6468* @see #getObject6469* @since 1.46470*/6471public void setObject(String parameterName, Object x) throws SQLException{6472throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6473}64746475/**6476* Sets the designated parameter to the given input stream, which will have6477* the specified number of bytes.6478* When a very large ASCII value is input to a {@code LONGVARCHAR}6479* parameter, it may be more practical to send it via a6480* {@code java.io.InputStream}. Data will be read from the stream6481* as needed until end-of-file is reached. The JDBC driver will6482* do any necessary conversion from ASCII to the database char format.6483*6484* <P><B>Note:</B> This stream object can either be a standard6485* Java stream object or your own subclass that implements the6486* standard interface.6487*6488* @param parameterName the name of the parameter6489* @param x the Java input stream that contains the ASCII parameter value6490* @param length the number of bytes in the stream6491* @exception SQLException if a database access error occurs or6492* this method is called on a closed {@code CallableStatement}6493* @exception SQLFeatureNotSupportedException if the JDBC driver does not support6494* this method6495* @since 1.46496*/6497public void setAsciiStream(String parameterName, java.io.InputStream x, int length)6498throws SQLException{6499throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6500}650165026503/**6504* Sets the designated parameter to the given input stream, which will have6505* the specified number of bytes.6506* When a very large binary value is input to a {@code LONGVARBINARY}6507* parameter, it may be more practical to send it via a6508* {@code java.io.InputStream} object. The data will be read from the stream6509* as needed until end-of-file is reached.6510*6511* <P><B>Note:</B> This stream object can either be a standard6512* Java stream object or your own subclass that implements the6513* standard interface.6514*6515* @param parameterName the name of the parameter6516* @param x the java input stream which contains the binary parameter value6517* @param length the number of bytes in the stream6518* @exception SQLException if a database access error occurs or6519* this method is called on a closed {@code CallableStatement}6520* @exception SQLFeatureNotSupportedException if the JDBC driver does not support6521* this method6522* @since 1.46523*/6524public void setBinaryStream(String parameterName, java.io.InputStream x,6525int length) throws SQLException{6526throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6527}65286529/**6530* Sets the designated parameter to the given {@code Reader}6531* object, which is the given number of characters long.6532* When a very large UNICODE value is input to a {@code LONGVARCHAR}6533* parameter, it may be more practical to send it via a6534* {@code java.io.Reader} object. The data will be read from the stream6535* as needed until end-of-file is reached. The JDBC driver will6536* do any necessary conversion from UNICODE to the database char format.6537*6538* <P><B>Note:</B> This stream object can either be a standard6539* Java stream object or your own subclass that implements the6540* standard interface.6541*6542* @param parameterName the name of the parameter6543* @param reader the {@code java.io.Reader} object that6544* contains the UNICODE data used as the designated parameter6545* @param length the number of characters in the stream6546* @exception SQLException if a database access error occurs or6547* this method is called on a closed {@code CallableStatement}6548* @exception SQLFeatureNotSupportedException if the JDBC driver does not support6549* this method6550* @since 1.46551*/6552public void setCharacterStream(String parameterName,6553java.io.Reader reader,6554int length) throws SQLException{6555throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6556}65576558/**6559* Sets the designated parameter to the given input stream.6560* When a very large ASCII value is input to a {@code LONGVARCHAR}6561* parameter, it may be more practical to send it via a6562* {@code java.io.InputStream}. Data will be read from the stream6563* as needed until end-of-file is reached. The JDBC driver will6564* do any necessary conversion from ASCII to the database char format.6565*6566* <P><B>Note:</B> This stream object can either be a standard6567* Java stream object or your own subclass that implements the6568* standard interface.6569* <P><B>Note:</B> Consult your JDBC driver documentation to determine if6570* it might be more efficient to use a version of6571* {@code setAsciiStream} which takes a length parameter.6572*6573* @param parameterName the name of the parameter6574* @param x the Java input stream that contains the ASCII parameter value6575* @exception SQLException if a database access error occurs or6576* this method is called on a closed {@code CallableStatement}6577* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method6578* @since 1.66579*/6580public void setAsciiStream(String parameterName, java.io.InputStream x)6581throws SQLException{6582throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6583}658465856586/**6587* Sets the designated parameter to the given input stream.6588* When a very large binary value is input to a {@code LONGVARBINARY}6589* parameter, it may be more practical to send it via a6590* {@code java.io.InputStream} object. The data will be read from the6591* stream as needed until end-of-file is reached.6592*6593* <P><B>Note:</B> This stream object can either be a standard6594* Java stream object or your own subclass that implements the6595* standard interface.6596* <P><B>Note:</B> Consult your JDBC driver documentation to determine if6597* it might be more efficient to use a version of6598* {@code setBinaryStream} which takes a length parameter.6599*6600* @param parameterName the name of the parameter6601* @param x the java input stream which contains the binary parameter value6602* @exception SQLException if a database access error occurs or6603* this method is called on a closed {@code CallableStatement}6604* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method6605* @since 1.66606*/6607public void setBinaryStream(String parameterName, java.io.InputStream x)6608throws SQLException{6609throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6610}66116612/**6613* Sets the designated parameter to the given {@code Reader}6614* object.6615* When a very large UNICODE value is input to a {@code LONGVARCHAR}6616* parameter, it may be more practical to send it via a6617* {@code java.io.Reader} object. The data will be read from the stream6618* as needed until end-of-file is reached. The JDBC driver will6619* do any necessary conversion from UNICODE to the database char format.6620*6621* <P><B>Note:</B> This stream object can either be a standard6622* Java stream object or your own subclass that implements the6623* standard interface.6624* <P><B>Note:</B> Consult your JDBC driver documentation to determine if6625* it might be more efficient to use a version of6626* {@code setCharacterStream} which takes a length parameter.6627*6628* @param parameterName the name of the parameter6629* @param reader the {@code java.io.Reader} object that contains the6630* Unicode data6631* @exception SQLException if a database access error occurs or6632* this method is called on a closed {@code CallableStatement}6633* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method6634* @since 1.66635*/6636public void setCharacterStream(String parameterName,6637java.io.Reader reader) throws SQLException{6638throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6639}66406641/**6642* Sets the designated parameter to the given6643* {@code java.math.BigDecimal} value.6644* The driver converts this to an SQL {@code NUMERIC} value when6645* it sends it to the database.6646*6647* @param parameterName the name of the parameter6648* @param x the parameter value6649* @exception SQLException if a database access error occurs or6650* this method is called on a closed {@code CallableStatement}6651* @exception SQLFeatureNotSupportedException if the JDBC driver does not support6652* this method6653* @see #getBigDecimal6654* @since 1.46655*/6656public void setBigDecimal(String parameterName, BigDecimal x) throws SQLException{6657throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6658}66596660/**6661* Sets the designated parameter to the given Java {@code String} value.6662* The driver converts this6663* to an SQL {@code VARCHAR} or {@code LONGVARCHAR} value6664* (depending on the argument's6665* size relative to the driver's limits on {@code VARCHAR} values)6666* when it sends it to the database.6667*6668* @param parameterName the name of the parameter6669* @param x the parameter value6670* @exception SQLException if a database access error occurs or6671* this method is called on a closed {@code CallableStatement}6672* @exception SQLFeatureNotSupportedException if the JDBC driver does not support6673* this method6674* @see #getString6675* @since 1.46676*/6677public void setString(String parameterName, String x) throws SQLException{6678throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6679}6680668166826683/**6684* Sets the designated parameter to the given Java array of bytes.6685* The driver converts this to an SQL {@code VARBINARY} or6686* {@code LONGVARBINARY} (depending on the argument's size relative6687* to the driver's limits on {@code VARBINARY} values) when it sends6688* it to the database.6689*6690* @param parameterName the name of the parameter6691* @param x the parameter value6692* @exception SQLException if a database access error occurs or6693* this method is called on a closed {@code CallableStatement}6694* @exception SQLFeatureNotSupportedException if the JDBC driver does not support6695* this method6696* @see #getBytes6697* @since 1.46698*/6699public void setBytes(String parameterName, byte x[]) throws SQLException{6700throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6701}67026703/**6704* Sets the designated parameter to the given {@code java.sql.Timestamp} value.6705* The driver6706* converts this to an SQL {@code TIMESTAMP} value when it sends it to the6707* database.6708*6709* @param parameterName the name of the parameter6710* @param x the parameter value6711* @exception SQLException if a database access error occurs or6712* this method is called on a closed {@code CallableStatement}6713* @exception SQLFeatureNotSupportedException if the JDBC driver does not support6714* this method6715* @see #getTimestamp6716* @since 1.46717*/6718public void setTimestamp(String parameterName, java.sql.Timestamp x)6719throws SQLException{6720throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6721}67226723/**6724* Sets the designated parameter to SQL {@code NULL}.6725*6726* <P><B>Note:</B> You must specify the parameter's SQL type.6727*6728* @param parameterName the name of the parameter6729* @param sqlType the SQL type code defined in {@code java.sql.Types}6730* @exception SQLException if a database access error occurs or6731* this method is called on a closed {@code CallableStatement}6732* @exception SQLFeatureNotSupportedException if the JDBC driver does not support6733* this method6734* @since 1.46735*/6736public void setNull(String parameterName, int sqlType) throws SQLException {6737throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6738}67396740/**6741* Sets the designated parameter to SQL {@code NULL}.6742* This version of the method {@code setNull} should6743* be used for user-defined types and REF type parameters. Examples6744* of user-defined types include: STRUCT, DISTINCT, JAVA_OBJECT, and6745* named array types.6746*6747* <P><B>Note:</B> To be portable, applications must give the6748* SQL type code and the fully-qualified SQL type name when specifying6749* a NULL user-defined or REF parameter. In the case of a user-defined type6750* the name is the type name of the parameter itself. For a REF6751* parameter, the name is the type name of the referenced type. If6752* a JDBC driver does not need the type code or type name information,6753* it may ignore it.6754*6755* Although it is intended for user-defined and Ref parameters,6756* this method may be used to set a null parameter of any JDBC type.6757* If the parameter does not have a user-defined or REF type, the given6758* typeName is ignored.6759*6760*6761* @param parameterName the name of the parameter6762* @param sqlType a value from {@code java.sql.Types}6763* @param typeName the fully-qualified name of an SQL user-defined type;6764* ignored if the parameter is not a user-defined type or6765* SQL {@code REF} value6766* @exception SQLException if a database access error occurs or6767* this method is called on a closed {@code CallableStatement}6768* @exception SQLFeatureNotSupportedException if the JDBC driver does not support6769* this method6770* @since 1.46771*/6772public void setNull (String parameterName, int sqlType, String typeName)6773throws SQLException{6774throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6775}67766777/**6778* Sets the designated parameter to the given Java {@code boolean} value.6779* The driver converts this6780* to an SQL {@code BIT} or {@code BOOLEAN} value when it sends it to the database.6781*6782* @param parameterName the name of the parameter6783* @param x the parameter value6784* @exception SQLException if a database access error occurs or6785* this method is called on a closed {@code CallableStatement}6786* @see #getBoolean6787* @exception SQLFeatureNotSupportedException if the JDBC driver does not support6788* this method6789* @since 1.46790*/6791public void setBoolean(String parameterName, boolean x) throws SQLException{6792throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6793}6794679567966797/**6798* Sets the designated parameter to the given Java {@code byte} value.6799* The driver converts this6800* to an SQL {@code TINYINT} value when it sends it to the database.6801*6802* @param parameterName the name of the parameter6803* @param x the parameter value6804* @exception SQLException if a database access error occurs or6805* this method is called on a closed {@code CallableStatement}6806* @exception SQLFeatureNotSupportedException if the JDBC driver does not support6807* this method6808* @see #getByte6809* @since 1.46810*/6811public void setByte(String parameterName, byte x) throws SQLException{6812throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6813}681468156816/**6817* Sets the designated parameter to the given Java {@code short} value.6818* The driver converts this6819* to an SQL {@code SMALLINT} value when it sends it to the database.6820*6821* @param parameterName the name of the parameter6822* @param x the parameter value6823* @exception SQLException if a database access error occurs or6824* this method is called on a closed {@code CallableStatement}6825* @exception SQLFeatureNotSupportedException if the JDBC driver does not support6826* this method6827* @see #getShort6828* @since 1.46829*/6830public void setShort(String parameterName, short x) throws SQLException{6831throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6832}683368346835/**6836* Sets the designated parameter to the given Java {@code int} value.6837* The driver converts this6838* to an SQL {@code INTEGER} value when it sends it to the database.6839*6840* @param parameterName the name of the parameter6841* @param x the parameter value6842* @exception SQLException if a database access error occurs or6843* this method is called on a closed {@code CallableStatement}6844* @exception SQLFeatureNotSupportedException if the JDBC driver does not support6845* this method6846* @see #getInt6847* @since 1.46848*/6849public void setInt(String parameterName, int x) throws SQLException{6850throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6851}68526853/**6854* Sets the designated parameter to the given Java {@code long} value.6855* The driver converts this6856* to an SQL {@code BIGINT} value when it sends it to the database.6857*6858* @param parameterName the name of the parameter6859* @param x the parameter value6860* @exception SQLException if a database access error occurs or6861* this method is called on a closed {@code CallableStatement}6862* @exception SQLFeatureNotSupportedException if the JDBC driver does not support6863* this method6864* @see #getLong6865* @since 1.46866*/6867public void setLong(String parameterName, long x) throws SQLException{6868throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6869}687068716872/**6873* Sets the designated parameter to the given Java {@code float} value.6874* The driver converts this6875* to an SQL {@code FLOAT} value when it sends it to the database.6876*6877* @param parameterName the name of the parameter6878* @param x the parameter value6879* @exception SQLException if a database access error occurs or6880* this method is called on a closed {@code CallableStatement}6881* @exception SQLFeatureNotSupportedException if the JDBC driver does not support6882* this method6883* @see #getFloat6884* @since 1.46885*/6886public void setFloat(String parameterName, float x) throws SQLException{6887throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6888}68896890/**6891* Sets the designated parameter to the given Java {@code double} value.6892* The driver converts this6893* to an SQL {@code DOUBLE} value when it sends it to the database.6894*6895* @param parameterName the name of the parameter6896* @param x the parameter value6897* @exception SQLException if a database access error occurs or6898* this method is called on a closed {@code CallableStatement}6899* @exception SQLFeatureNotSupportedException if the JDBC driver does not support6900* this method6901* @see #getDouble6902* @since 1.46903*/6904public void setDouble(String parameterName, double x) throws SQLException{6905throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());6906}69076908/**6909* This method re populates the resBundle6910* during the deserialization process6911*/6912private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {6913// Default state initialization happens here6914ois.defaultReadObject();6915// Initialization of transient Res Bundle happens here .6916try {6917resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();6918} catch(IOException ioe) {}69196920}69216922static final long serialVersionUID = -3591946023893483003L;69236924//------------------------- JDBC 4.1 -----------------------------------69256926public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {6927throw new SQLFeatureNotSupportedException("Not supported yet.");6928}69296930public <T> T getObject(String columnLabel, Class<T> type) throws SQLException {6931throw new SQLFeatureNotSupportedException("Not supported yet.");6932}6933}693469356936