Java Doc for BaseRowSet.java in  » 6.0-JDK-Core » sql » javax » sql » rowset » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » sql » javax.sql.rowset 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.sql.rowset.BaseRowSet

BaseRowSet
abstract public class BaseRowSet implements Serializable,Cloneable(Code)
An abstract class providing a RowSet object with its basic functionality. The basic functions include having properties and sending event notifications, which all JavaBeansTM components must implement.

1.0 Overview

The BaseRowSet class provides the core functionality for all RowSet implementations, and all standard implementations may use this class in combination with one or more RowSet interfaces in order to provide a standard vendor-specific implementation. To clarify, all implementations must implement at least one of the RowSet interfaces (JdbcRowSet, CachedRowSet, JoinRowSet, FilteredRowSet, or WebRowSet). This means that any implementation that extends the BaseRowSet class must also implement one of the RowSet interfaces.

The BaseRowSet class provides the following:

  • Properties
    • Fields for storing current properties
    • Methods for getting and setting properties

  • Event notification

  • A complete set of setter methods for setting the parameters in a RowSet object's command

  • Streams
    • Fields for storing stream instances
    • Constants for indicating the type of a stream

2.0 Setting Properties

All rowsets maintain a set of properties, which will usually be set using a tool. The number and kinds of properties a rowset has will vary, depending on what the RowSet implementation does and how it gets its data. For example, rowsets that get their data from a ResultSet object need to set the properties that are required for making a database connection. If a RowSet object uses the DriverManager facility to make a connection, it needs to set a property for the JDBC URL that identifies the appropriate driver, and it needs to set the properties that give the user name and password. If, on the other hand, the rowset uses a DataSource object to make the connection, which is the preferred method, it does not need to set the property for the JDBC URL. Instead, it needs to set the property for the logical name of the data source along with the properties for the user name and password.

NOTE: In order to use a DataSource object for making a connection, the DataSource object must have been registered with a naming service that uses the Java Naming and Directory InterfaceTM (JNDI) API. This registration is usually done by a person acting in the capacity of a system administrator.

3.0 Setting the Command and Its Parameters

When a rowset gets its data from a relational database, it executes a command (a query) that produces a ResultSet object. This query is the command that is set for the RowSet object's command property. The rowset populates itself with data by reading the data from the ResultSet object into itself. If the query contains placeholders for values to be set, the BaseRowSet setter methods are used to set these values. All setter methods allow these values to be set to null if required.

The following code fragment illustrates how the CachedRowSetTM object crs might have its command property set. Note that if a tool is used to set properties, this is the code that the tool would use.

 crs.setCommand("SELECT FIRST_NAME, LAST_NAME, ADDRESS FROM CUSTOMERS" +
 "WHERE CREDIT_LIMIT > ? AND REGION = ?");
 

In this example, the values for CREDIT_LIMIT and REGION are placeholder parameters, which are indicated with a question mark (?). The first question mark is placeholder parameter number 1, the second question mark is placeholder parameter number 2, and so on. Any placeholder parameters must be set with values before the query can be executed. To set these placeholder parameters, the BaseRowSet class provides a set of setter methods, similar to those provided by the PreparedStatement interface, for setting values of each data type. A RowSet object stores the parameter values internally, and its execute method uses them internally to set values for the placeholder parameters before it sends the command to the DBMS to be executed.

The following code fragment demonstrates setting the two parameters in the query from the previous example.

 crs.setInt(1, 5000);
 crs.setString(2, "West");
 
If the execute method is called at this point, the query sent to the DBMS will be:
 "SELECT FIRST_NAME, LAST_NAME, ADDRESS FROM CUSTOMERS" +
 "WHERE CREDIT_LIMIT > 5000 AND REGION = 'West'"
 
NOTE: Setting Array, Clob, Blob and Ref objects as a command parameter, stores these values as SerialArray, SerialClob, SerialBlob and SerialRef objects respectively.

4.0 Handling of Parameters Behind the Scenes

NOTE: The BaseRowSet class provides two kinds of setter methods, those that set properties and those that set placeholder parameters. The setter methods discussed in this section are those that set placeholder parameters.

The placeholder parameters set with the BaseRowSet setter methods are stored as objects in an internal Hashtable object. Primitives are stored as their Object type. For example, byte is stored as Byte object, and int is stored as an Integer object. When the method execute is called, the values in the Hashtable object are substituted for the appropriate placeholder parameters in the command. A call to the method getParams returns the values stored in the Hashtable object as an array of Object instances. An element in this array may be a simple Object instance or an array (which is a type of Object). The particular setter method used determines whether an element in this array is an Object or an array.

The majority of methods for setting placeholder parameters take two parameters, with the first parameter indicating which placeholder parameter is to be set, and the second parameter giving the value to be set. Methods such as getInt, getString, getBoolean, and getLong fall into this category. After these methods have been called, a call to the method getParams will return an array with the values that have been set. Each element in the array is an Object instance representing the values that have been set. The order of these values in the array is determined by the int (the first parameter) passed to the setter method. The values in the array are the values (the second parameter) passed to the setter method. In other words, the first element in the array is the value to be set for the first placeholder parameter in the RowSet object's command. The second element is the value to be set for the second placeholder parameter, and so on.

Several setter methods send the driver and DBMS information beyond the value to be set. When the method getParams is called after one of these setter methods has been used, the elements in the array will themselves be arrays to accommodate the additional information. In this category, the method setNull is a special case because one version takes only two parameters (setNull(int parameterIndex, int SqlType)). Nevertheless, it requires an array to contain the information that will be passed to the driver and DBMS. The first element in this array is the value to be set, which is null, and the second element is the int supplied for sqlType, which indicates the type of SQL value that is being set to null. This information is needed by some DBMSs and is therefore required in order to ensure that applications are portable. The other version is intended to be used when the value to be set to null is a user-defined type. It takes three parameters (setNull(int parameterIndex, int sqlType, String typeName)) and also requires an array to contain the information to be passed to the driver and DBMS. The first two elements in this array are the same as for the first version of setNull. The third element, typeName, gives the SQL name of the user-defined type. As is true with the other setter methods, the number of the placeholder parameter to be set is indicated by an element's position in the array returned by getParams. So, for example, if the parameter supplied to setNull is 2, the second element in the array returned by getParams will be an array of two or three elements.

Some methods, such as setObject and setDate have versions that take more than two parameters, with the extra parameters giving information to the driver or the DBMS. For example, the methods setDate, setTime, and setTimestamp can take a Calendar object as their third parameter. If the DBMS does not store time zone information, the drivern uses the Calendar object to construct the Date, Time, or Timestamp object being set. As is true with other methods that provide additional information, the element in the array returned by getParams is an array instead of a simple Object instance.

The methods setAsciiStream, setBinaryStream, setCharacterStream, and setUnicodeStream (which is deprecated, so applications should use getCharacterStream instead) take three parameters, so for them, the element in the array returned by getParams is also an array. What is different about these setter methods is that in addition to the information provided by parameters, the array contains one of the BaseRowSet constants indicating the type of stream being set.

NOTE: The method getParams is called internally by RowSet implementations extending this class; it is not normally called by an application programmer directly.

5.0 Event Notification

The BaseRowSet class provides the event notification mechanism for rowsets. It contains the field listeners, methods for adding and removing listeners, and methods for notifying listeners of changes.

A listener is an object that has implemented the RowSetListener interface. If it has been added to a RowSet object's list of listeners, it will be notified when an event occurs on that RowSet object. Each listener's implementation of the RowSetListener methods defines what that object will do when it is notified that an event has occurred.

There are three possible events for a RowSet object:

  1. the cursor moves
  2. an individual row is changed (updated, deleted, or inserted)
  3. the contents of the entire RowSet object are changed

The BaseRowSet method used for the notification indicates the type of event that has occurred. For example, the method notifyRowChanged indicates that a row has been updated, deleted, or inserted. Each of the notification methods creates a RowSetEvent object, which is supplied to the listener in order to identify the RowSet object on which the event occurred. What the listener does with this information, which may be nothing, depends on how it was implemented.

6.0 Default Behavior

A default BaseRowSet object is initialized with many starting values. The following is true of a default RowSet instance that extends the BaseRowSet class:
  • Has a scrollable cursor and does not show changes made by others.
  • Is updatable.
  • Does not show rows that have been deleted.
  • Has no time limit for how long a driver may take to execute the RowSet object's command.
  • Has no limit for the number of rows it may contain.
  • Has no limit for the number of bytes a column may contain. NOTE: This limit applies only to columns that hold values of the following types: BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR.
  • Will not see uncommitted data (make "dirty" reads).
  • Has escape processing turned on.
  • Has its connection's type map set to null.
  • Has an empty Vector object for storing the values set for the placeholder parameters in the RowSet object's command.

If other values are desired, an application must set the property values explicitly. For example, the following line of code sets the maximum number of rows for the CachedRowSet object crs to 500.

 crs.setMaxRows(500);
 
Methods implemented in extensions of this BaseRowSet class must throw an SQLException object for any violation of the defined assertions. Also, if the extending class overrides and reimplements any BaseRowSet method and encounters connectivity or underlying data source issues, that method may in addition throw an SQLException object for that reason.


Field Summary
final public static  intASCII_STREAM_PARAM
     A constant indicating to a RowSetReaderImpl object that a given parameter is an ASCII stream.
final public static  intBINARY_STREAM_PARAM
     A constant indicating to a RowSetReaderImpl object that a given parameter is a binary stream.
final public static  intUNICODE_STREAM_PARAM
     A constant indicating to a RowSetReaderImpl object that a given parameter is a Unicode stream.
protected  java.io.InputStreamasciiStream
     The InputStream object that will be returned by the method getAsciiStream, which is specified in the ResultSet interface.
protected  java.io.InputStreambinaryStream
     The InputStream object that will be returned by the method getBinaryStream, which is specified in the ResultSet interface.
protected  java.io.ReadercharStream
     The Reader object that will be returned by the method getCharacterStream, which is specified in the ResultSet interface.
final static  longserialVersionUID
    
protected  java.io.InputStreamunicodeStream
     The InputStream object that will be returned by the method getUnicodeStream, which is specified in the ResultSet interface.

Constructor Summary
public  BaseRowSet()
     Constructs a new BaseRowSet object initialized with a default Vector object for its listeners field.

Method Summary
public  voidaddRowSetListener(RowSetListener listener)
     The listener will be notified whenever an event occurs on this RowSet object.

A listener might, for example, be a table or graph that needs to be updated in order to accurately reflect the current state of the RowSet object.

Note: if the RowSetListener object is null, this method silently discards the null value and does not add a null reference to the set of listeners.

public  voidclearParameters()
     Clears all of the current parameter values in this RowSet object's internal representation of the parameters to be set in this RowSet object's command when it is executed.

In general, parameter values remain in force for repeated use in this RowSet object's command.

public  StringgetCommand()
     Retrieves the SQL query that is the command for this RowSet object.
public  intgetConcurrency()
     Returns the concurrency for this RowSet object.
public  StringgetDataSourceName()
     Returns the logical name that when supplied to a naming service that uses the Java Naming and Directory Interface (JNDI) API, will retrieve a javax.sql.DataSource object.
public  booleangetEscapeProcessing()
     Ascertains whether escape processing is enabled for this RowSet object.
public  intgetFetchDirection()
     Retrieves this RowSet object's current setting for the fetch direction.
public  intgetFetchSize()
     Returns the fetch size for this RowSet object.
public  intgetMaxFieldSize()
     Retrieves the maximum number of bytes that can be used for a column value in this RowSet object. This limit applies only to columns that hold values of the following types: BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR.
public  intgetMaxRows()
     Retrieves the maximum number of rows that this RowSet object may contain.
public  Object[]getParams()
     Retrieves an array containing the parameter values (both Objects and primitives) that have been set for this RowSet object's command and throws an SQLException object if all parameters have not been set.
public  StringgetPassword()
     Returns the password used to create a database connection for this RowSet object.
public  intgetQueryTimeout()
     Retrieves the maximum number of seconds the driver will wait for a query to execute.
public  booleangetShowDeleted()
     Retrieves a boolean indicating whether rows marked for deletion appear in the set of current rows.
public  intgetTransactionIsolation()
     Returns the transaction isolation property for this RowSet object's connection.
public  intgetType()
     Returns the type of this RowSet object.
public  java.util.Map<String, Class<?>>getTypeMap()
     Retrieves the type map associated with the Connection object for this RowSet object.

Drivers that support the JDBC 3.0 API will create Connection objects with an associated type map.

public  StringgetUrl()
     Retrieves the JDBC URL that this RowSet object's javax.sql.Reader object uses to make a connection with a relational database using a JDBC technology-enabled driver.
public  StringgetUsername()
     Returns the user name used to create a database connection.
protected  voidinitParams()
     Performs the necessary internal configurations and initializations to allow any JDBC RowSet implementation to start using the standard facilities provided by a BaseRowSet instance.
public  booleanisReadOnly()
     Returns a boolean indicating whether this RowSet object is read-only. Any attempts to update a read-only RowSet object will result in an SQLException being thrown.
protected  voidnotifyCursorMoved()
     Notifies all of the listeners registered with this RowSet object that its cursor has moved.
protected  voidnotifyRowChanged()
     Notifies all of the listeners registered with this RowSet object that one of its rows has changed.

When an application calls a method that changes a row, such as the CachedRowSet methods insertRow, updateRow, or deleteRow, that method calls notifyRowChanged internally.

protected  voidnotifyRowSetChanged()
     Notifies all of the listeners registered with this RowSet object that its entire contents have changed.

When an application calls methods that change the entire contents of the RowSet object, such as the CachedRowSet methods execute, populate, restoreOriginal, or release, that method calls notifyRowSetChanged internally (either directly or indirectly).

public  voidremoveRowSetListener(RowSetListener listener)
     Removes the designated object from this RowSet object's list of listeners.
public  voidsetArray(int parameterIndex, Array array)
     Sets the designated parameter to an Array object in the Java programming language.
public  voidsetAsciiStream(int parameterIndex, java.io.InputStream x, int length)
     Sets the designated parameter to the given java.io.InputStream object, which will have the specified number of bytes. The contents of the stream will be read and sent to the database.
public  voidsetAsciiStream(int parameterIndex, java.io.InputStream x)
     Sets the designated parameter in this RowSet object's command to the given input stream. When a very large ASCII value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.InputStream.
public  voidsetAsciiStream(String parameterName, java.io.InputStream x, int length)
     Sets the designated parameter to the given input stream, which will have the specified number of bytes. When a very large ASCII value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.InputStream.
public  voidsetAsciiStream(String parameterName, java.io.InputStream x)
     Sets the designated parameter to the given input stream. When a very large ASCII value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.InputStream.
public  voidsetBigDecimal(int parameterIndex, java.math.BigDecimal x)
     Sets the designated parameter to the given java.lang.BigDecimal value.
public  voidsetBigDecimal(String parameterName, BigDecimal x)
     Sets the designated parameter to the given java.math.BigDecimal value.
public  voidsetBinaryStream(int parameterIndex, java.io.InputStream x, int length)
     Sets the designated parameter to the given java.io.InputStream object, which will have the specified number of bytes. The contents of the stream will be read and sent to the database.
public  voidsetBinaryStream(int parameterIndex, java.io.InputStream x)
     Sets the designated parameter in this RowSet object's command to the given input stream. When a very large binary value is input to a LONGVARBINARY parameter, it may be more practical to send it via a java.io.InputStream object.
public  voidsetBinaryStream(String parameterName, java.io.InputStream x, int length)
     Sets the designated parameter to the given input stream, which will have the specified number of bytes. When a very large binary value is input to a LONGVARBINARY parameter, it may be more practical to send it via a java.io.InputStream object.
public  voidsetBinaryStream(String parameterName, java.io.InputStream x)
     Sets the designated parameter to the given input stream. When a very large binary value is input to a LONGVARBINARY parameter, it may be more practical to send it via a java.io.InputStream object.
public  voidsetBlob(int parameterIndex, Blob x)
     Sets the designated parameter to the given Blob object in the Java programming language.
public  voidsetBlob(int parameterIndex, InputStream inputStream, long length)
     Sets the designated parameter to a InputStream object.
public  voidsetBlob(int parameterIndex, InputStream inputStream)
     Sets the designated parameter to a InputStream object. This method differs from the setBinaryStream (int, InputStream) method because it informs the driver that the parameter value should be sent to the server as a BLOB.
public  voidsetBlob(String parameterName, InputStream inputStream, long length)
     Sets the designated parameter to a InputStream object.
public  voidsetBlob(String parameterName, Blob x)
     Sets the designated parameter to the given java.sql.Blob object.
public  voidsetBlob(String parameterName, InputStream inputStream)
     Sets the designated parameter to a InputStream object. This method differs from the setBinaryStream (int, InputStream) method because it informs the driver that the parameter value should be sent to the server as a BLOB.
public  voidsetBoolean(int parameterIndex, boolean x)
     Sets the designated parameter to the given boolean in the Java programming language.
public  voidsetBoolean(String parameterName, boolean x)
     Sets the designated parameter to the given Java boolean value.
public  voidsetByte(int parameterIndex, byte x)
     Sets the designated parameter to the given byte in the Java programming language.
public  voidsetByte(String parameterName, byte x)
     Sets the designated parameter to the given Java byte value.
public  voidsetBytes(int parameterIndex, byte x)
     Sets the designated parameter to the given array of bytes.
public  voidsetBytes(String parameterName, byte x)
     Sets the designated parameter to the given Java array of bytes.
public  voidsetCharacterStream(int parameterIndex, Reader reader, int length)
     Sets the designated parameter to the given java.io.Reader object, which will have the specified number of characters.
public  voidsetCharacterStream(int parameterIndex, java.io.Reader reader)
     Sets the designated parameter in this RowSet object's command to the given Reader object. When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.Reader object.
public  voidsetCharacterStream(String parameterName, java.io.Reader reader, int length)
     Sets the designated parameter to the given Reader object, which is the given number of characters long. When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.Reader object.
public  voidsetCharacterStream(String parameterName, java.io.Reader reader)
     Sets the designated parameter to the given Reader object. When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.Reader object.
public  voidsetClob(int parameterIndex, Clob x)
     Sets the designated parameter to the given Clob object in the Java programming language.
public  voidsetClob(int parameterIndex, Reader reader, long length)
     Sets the designated parameter to a Reader object.
public  voidsetClob(int parameterIndex, Reader reader)
     Sets the designated parameter to a Reader object. This method differs from the setCharacterStream (int, Reader) method because it informs the driver that the parameter value should be sent to the server as a CLOB.
public  voidsetClob(String parameterName, Reader reader, long length)
     Sets the designated parameter to a Reader object.
public  voidsetClob(String parameterName, Clob x)
     Sets the designated parameter to the given java.sql.Clob object.
public  voidsetClob(String parameterName, Reader reader)
     Sets the designated parameter to a Reader object. This method differs from the setCharacterStream (int, Reader) method because it informs the driver that the parameter value should be sent to the server as a CLOB.
public  voidsetCommand(String cmd)
     Sets this RowSet object's command property to the given String object and clears the parameters, if any, that were set for the previous command.

The command property may not be needed if the RowSet object gets its data from a source that does not support commands, such as a spreadsheet or other tabular file. Thus, this property is optional and may be null.

public  voidsetConcurrency(int concurrency)
     Sets the concurrency for this RowSet object to the specified concurrency.
public  voidsetDataSourceName(String name)
     Sets the DataSource name property for this RowSet object to the given logical name and sets this RowSet object's Url property to null.
public  voidsetDate(int parameterIndex, java.sql.Date x)
     Sets the designated parameter to the given java.sql.Date value.
public  voidsetDate(int parameterIndex, java.sql.Date x, Calendar cal)
     Sets the designated parameter to the given java.sql.Date object.
public  voidsetDate(String parameterName, java.sql.Date x)
     Sets the designated parameter to the given java.sql.Date value using the default time zone of the virtual machine that is running the application.
public  voidsetDate(String parameterName, java.sql.Date x, Calendar cal)
     Sets the designated parameter to the given java.sql.Date value, using the given Calendar object.
public  voidsetDouble(int parameterIndex, double x)
     Sets the designated parameter to the given double in the Java programming language.
public  voidsetDouble(String parameterName, double x)
     Sets the designated parameter to the given Java double value.
public  voidsetEscapeProcessing(boolean enable)
     Sets to the given boolean whether or not the driver will scan for escape syntax and do escape substitution before sending SQL statements to the database.
public  voidsetFetchDirection(int direction)
     Gives the driver a performance hint as to the direction in which the rows in this RowSet object will be processed.
public  voidsetFetchSize(int rows)
     Sets the fetch size for this RowSet object to the given number of rows.
public  voidsetFloat(int parameterIndex, float x)
     Sets the designated parameter to the given float in the Java programming language.
public  voidsetFloat(String parameterName, float x)
     Sets the designated parameter to the given Java float value.
public  voidsetInt(int parameterIndex, int x)
     Sets the designated parameter to an int in the Java programming language.
public  voidsetInt(String parameterName, int x)
     Sets the designated parameter to the given Java int value.
public  voidsetLong(int parameterIndex, long x)
     Sets the designated parameter to the given long in the Java programming language.
public  voidsetLong(String parameterName, long x)
     Sets the designated parameter to the given Java long value.
public  voidsetMaxFieldSize(int max)
     Sets the maximum number of bytes that can be used for a column value in this RowSet object to the given number. This limit applies only to columns that hold values of the following types: BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR.
public  voidsetMaxRows(int max)
     Sets the maximum number of rows that this RowSet object may contain to the given number.
public  voidsetNCharacterStream(int parameterIndex, Reader value)
     Sets the designated parameter in this RowSet object's command to a Reader object.
public  voidsetNCharacterStream(int parameterIndex, Reader value, long length)
     Sets the designated parameter to a Reader object.
public  voidsetNCharacterStream(String parameterName, Reader value, long length)
     Sets the designated parameter to a Reader object.
public  voidsetNCharacterStream(String parameterName, Reader value)
     Sets the designated parameter to a Reader object.
public  voidsetNClob(String parameterName, NClob value)
     Sets the designated parameter to a java.sql.NClob object.
public  voidsetNClob(String parameterName, Reader reader, long length)
     Sets the designated parameter to a Reader object.
public  voidsetNClob(String parameterName, Reader reader)
     Sets the designated parameter to a Reader object. This method differs from the setCharacterStream (int, Reader) method because it informs the driver that the parameter value should be sent to the server as a NCLOB.
public  voidsetNClob(int parameterIndex, Reader reader, long length)
     Sets the designated parameter to a Reader object.
public  voidsetNClob(int parameterIndex, NClob value)
     Sets the designated parameter to a java.sql.NClob object.
public  voidsetNClob(int parameterIndex, Reader reader)
     Sets the designated parameter to a Reader object. This method differs from the setCharacterStream (int, Reader) method because it informs the driver that the parameter value should be sent to the server as a NCLOB.
public  voidsetNString(int parameterIndex, String value)
     Sets the designated paramter to the given String object.
public  voidsetNString(String parameterName, String value)
     Sets the designated paramter to the given String object.
public  voidsetNull(int parameterIndex, int sqlType)
     Sets the designated parameter to SQL NULL. Note that the parameter's SQL type must be specified using one of the type codes defined in java.sql.Types.
public  voidsetNull(int parameterIndex, int sqlType, String typeName)
     Sets the designated parameter to SQL NULL. Although this version of the method setNull is intended for user-defined and REF parameters, this method may be used to set a null parameter for any JDBC type.
public  voidsetNull(String parameterName, int sqlType)
     Sets the designated parameter to SQL NULL.
public  voidsetNull(String parameterName, int sqlType, String typeName)
     Sets the designated parameter to SQL NULL. This version of the method setNull should be used for user-defined types and REF type parameters.
public  voidsetObject(int parameterIndex, Object x, int targetSqlType, int scale)
     Sets the designated parameter to an Object in the Java programming language.
public  voidsetObject(int parameterIndex, Object x, int targetSqlType)
     Sets the value of the designated parameter with the given Object value. This method is like setObject(int parameterIndex, Object x, int targetSqlType, int scale) except that it assumes a scale of zero.

The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called.

public  voidsetObject(int parameterIndex, Object x)
     Sets the designated parameter to an Object in the Java programming language.
public  voidsetObject(String parameterName, Object x, int targetSqlType, int scale)
     Sets the value of the designated parameter with the given object.
public  voidsetObject(String parameterName, Object x, int targetSqlType)
     Sets the value of the designated parameter with the given object.
public  voidsetObject(String parameterName, Object x)
     Sets the value of the designated parameter with the given object. The second parameter must be of type Object; therefore, the java.lang equivalent objects should be used for built-in types.

The JDBC specification specifies a standard mapping from Java Object types to SQL types.

public  voidsetPassword(String pass)
     Sets the password used to create a database connection for this RowSet object to the given String object.
public  voidsetQueryTimeout(int seconds)
     Sets to the given number the maximum number of seconds the driver will wait for a query to execute.
public  voidsetReadOnly(boolean value)
     Sets this RowSet object's readOnly property to the given boolean.
public  voidsetRef(int parameterIndex, Ref ref)
     Sets the designated parameter to the given Ref object in the Java programming language.
public  voidsetRowId(int parameterIndex, RowId x)
     Sets the designated parameter to the given java.sql.RowId object.
public  voidsetRowId(String parameterName, RowId x)
     Sets the designated parameter to the given java.sql.RowId object.
public  voidsetSQLXML(int parameterIndex, SQLXML xmlObject)
     Sets the designated parameter to the given java.sql.SQLXML object.
public  voidsetSQLXML(String parameterName, SQLXML xmlObject)
     Sets the designated parameter to the given java.sql.SQLXML object.
public  voidsetShort(int parameterIndex, short x)
     Sets the designated parameter to the given short in the Java programming language.
public  voidsetShort(String parameterName, short x)
     Sets the designated parameter to the given Java short value.
public  voidsetShowDeleted(boolean value)
     Sets the property showDeleted to the given boolean value, which determines whether rows marked for deletion appear in the set of current rows.
public  voidsetString(int parameterIndex, String x)
     Sets the designated parameter to the given String value.
public  voidsetString(String parameterName, String x)
     Sets the designated parameter to the given Java String value.
public  voidsetTime(int parameterIndex, java.sql.Time x)
     Sets the designated parameter to the given java.sql.Time value.
public  voidsetTime(int parameterIndex, java.sql.Time x, Calendar cal)
     Sets the designated parameter to the given java.sql.Time object.
public  voidsetTime(String parameterName, java.sql.Time x)
     Sets the designated parameter to the given java.sql.Time value.
public  voidsetTime(String parameterName, java.sql.Time x, Calendar cal)
     Sets the designated parameter to the given java.sql.Time value, using the given Calendar object.
public  voidsetTimestamp(int parameterIndex, java.sql.Timestamp x)
     Sets the designated parameter to the given java.sql.Timestamp value. The driver converts this to an SQL TIMESTAMP value when it sends it to the database.

The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called.

public  voidsetTimestamp(int parameterIndex, java.sql.Timestamp x, Calendar cal)
     Sets the designated parameter to the given java.sql.Timestamp object.
public  voidsetTimestamp(String parameterName, java.sql.Timestamp x)
     Sets the designated parameter to the given java.sql.Timestamp value.
public  voidsetTimestamp(String parameterName, java.sql.Timestamp x, Calendar cal)
     Sets the designated parameter to the given java.sql.Timestamp value, using the given Calendar object.
public  voidsetTransactionIsolation(int level)
     Sets the transaction isolation property for this JDBC RowSet object to the given constant.
public  voidsetType(int type)
     Sets the type for this RowSet object to the specified type.
public  voidsetTypeMap(java.util.Map<String, Class<?>> map)
     Installs the given java.util.Map object as the type map associated with the Connection object for this RowSet object.
public  voidsetURL(int parameterIndex, java.net.URL x)
     Sets the designated parameter to the given java.net.URL value.
public  voidsetUnicodeStream(int parameterIndex, java.io.InputStream x, int length)
     Sets the designated parameter to the given java.io.InputStream object, which will have the specified number of bytes.
public  voidsetUrl(String url)
     Sets the Url property for this RowSet object to the given String object and sets the dataSource name property to null.
public  voidsetUsername(String name)
     Sets the username property for this RowSet object to the given user name.

Field Detail
ASCII_STREAM_PARAM
final public static int ASCII_STREAM_PARAM(Code)
A constant indicating to a RowSetReaderImpl object that a given parameter is an ASCII stream. A RowSetReaderImpl object is provided as an extension of the SyncProvider abstract class defined in the SyncFactory static factory SPI mechanism.



BINARY_STREAM_PARAM
final public static int BINARY_STREAM_PARAM(Code)
A constant indicating to a RowSetReaderImpl object that a given parameter is a binary stream. A RowSetReaderImpl object is provided as an extension of the SyncProvider abstract class defined in the SyncFactory static factory SPI mechanism.



UNICODE_STREAM_PARAM
final public static int UNICODE_STREAM_PARAM(Code)
A constant indicating to a RowSetReaderImpl object that a given parameter is a Unicode stream. This RowSetReaderImpl object is provided as an extension of the SyncProvider abstract class defined in the SyncFactory static factory SPI mechanism.



asciiStream
protected java.io.InputStream asciiStream(Code)
The InputStream object that will be returned by the method getAsciiStream, which is specified in the ResultSet interface.



binaryStream
protected java.io.InputStream binaryStream(Code)
The InputStream object that will be returned by the method getBinaryStream, which is specified in the ResultSet interface.



charStream
protected java.io.Reader charStream(Code)
The Reader object that will be returned by the method getCharacterStream, which is specified in the ResultSet interface.



serialVersionUID
final static long serialVersionUID(Code)



unicodeStream
protected java.io.InputStream unicodeStream(Code)
The InputStream object that will be returned by the method getUnicodeStream, which is specified in the ResultSet interface.




Constructor Detail
BaseRowSet
public BaseRowSet()(Code)
Constructs a new BaseRowSet object initialized with a default Vector object for its listeners field. The other default values with which it is initialized are listed in Section 6.0 of the class comment for this class.




Method Detail
addRowSetListener
public void addRowSetListener(RowSetListener listener)(Code)
The listener will be notified whenever an event occurs on this RowSet object.

A listener might, for example, be a table or graph that needs to be updated in order to accurately reflect the current state of the RowSet object.

Note: if the RowSetListener object is null, this method silently discards the null value and does not add a null reference to the set of listeners.

Note: if the listener is already set, and the new RowSetListerner instance is added to the set of listeners already registered to receive event notifications from this RowSet.
Parameters:
  listener - an object that has implemented thejavax.sql.RowSetListener interface and wants to be notifiedof any events that occur on this RowSet object; May benull.
See Also:   BaseRowSet.removeRowSetListener




clearParameters
public void clearParameters() throws SQLException(Code)
Clears all of the current parameter values in this RowSet object's internal representation of the parameters to be set in this RowSet object's command when it is executed.

In general, parameter values remain in force for repeated use in this RowSet object's command. Setting a parameter value with the setter methods automatically clears the value of the designated parameter and replaces it with the new specified value.

This method is called internally by the setCommand method to clear all of the parameters set for the previous command.

Furthermore, this method differs from the initParams method in that it maintains the schema of the RowSet object.
throws:
  SQLException - if an error occurs clearing the parameters




getCommand
public String getCommand()(Code)
Retrieves the SQL query that is the command for this RowSet object. The command property contains the query that will be executed to populate this RowSet object.

The SQL query returned by this method is used by RowSet methods such as execute and populate, which may be implemented by any class that extends the BaseRowSet abstract class and implements one or more of the standard JSR-114 RowSet interfaces.

The command is used by the RowSet object's reader to obtain a ResultSet object. The reader then reads the data from the ResultSet object and uses it to to populate this RowSet object.

The default value for the command property is null. the String that is the value for thisRowSet object's command property;may be null
See Also:   BaseRowSet.setCommand




getConcurrency
public int getConcurrency() throws SQLException(Code)
Returns the concurrency for this RowSet object. The default is CONCUR_UPDATABLE for both connected and disconnected RowSet objects.

An application can call the method setConcurrency at any time to change a RowSet object's concurrency.

the concurrency type for this RowSetobject, which must be one of the following:ResultSet.CONCUR_READ_ONLY orResultSet.CONCUR_UPDATABLE
throws:
  SQLException - if an error occurs getting the concurrencyof this RowSet object
See Also:   BaseRowSet.setConcurrency
See Also:   BaseRowSet.isReadOnly




getDataSourceName
public String getDataSourceName()(Code)
Returns the logical name that when supplied to a naming service that uses the Java Naming and Directory Interface (JNDI) API, will retrieve a javax.sql.DataSource object. This DataSource object can be used to establish a connection to the data source that it represents.

Users should set either the url or the data source name property. The driver will use the property set most recently to establish a connection. a String object that identifies theDataSource object to be used for making a connection; if no logical name has been set, null is returned.
See Also:   BaseRowSet.setDataSourceName




getEscapeProcessing
public boolean getEscapeProcessing() throws SQLException(Code)
Ascertains whether escape processing is enabled for this RowSet object. true if escape processing is turned on; false otherwise
throws:
  SQLException - if an error occurs determining if escapeprocessing is enabled or not or if the internal escapeprocessing trigger has not been enabled



getFetchDirection
public int getFetchDirection() throws SQLException(Code)
Retrieves this RowSet object's current setting for the fetch direction. The default type is ResultSet.FETCH_FORWARD one of ResultSet.FETCH_FORWARD,ResultSet.FETCH_REVERSE, orResultSet.FETCH_UNKNOWN
throws:
  SQLException - if an error occurs in determining the current fetch direction for fetching rows
See Also:   BaseRowSet.setFetchDirection



getFetchSize
public int getFetchSize() throws SQLException(Code)
Returns the fetch size for this RowSet object. The default value is zero. the number of rows suggested as the fetch size when this RowSet object needs more rows from the database
throws:
  SQLException - if an error occurs determining the number of rows in thecurrent fetch size
See Also:   BaseRowSet.setFetchSize



getMaxFieldSize
public int getMaxFieldSize() throws SQLException(Code)
Retrieves the maximum number of bytes that can be used for a column value in this RowSet object. This limit applies only to columns that hold values of the following types: BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR. If the limit is exceeded, the excess data is silently discarded. an int indicating the current maximum column sizelimit; zero means that there is no limit
throws:
  SQLException - if an error occurs internally determining the maximum limit of the column size



getMaxRows
public int getMaxRows() throws SQLException(Code)
Retrieves the maximum number of rows that this RowSet object may contain. If this limit is exceeded, the excess rows are silently dropped. an int indicating the current maximum number ofrows; zero means that there is no limit
throws:
  SQLException - if an error occurs internally determining themaximum limit of rows that a Rowset object can contain



getParams
public Object[] getParams() throws SQLException(Code)
Retrieves an array containing the parameter values (both Objects and primitives) that have been set for this RowSet object's command and throws an SQLException object if all parameters have not been set. Before the command is sent to the DBMS to be executed, these parameters will be substituted for placeholder parameters in the PreparedStatement object that is the command for a RowSet implementation extending the BaseRowSet class.

Each element in the array that is returned is an Object instance that contains the values of the parameters supplied to a setter method. The order of the elements is determined by the value supplied for parameterIndex. If the setter method takes only the parameter index and the value to be set (possibly null), the array element will contain the value to be set (which will be expressed as an Object). If there are additional parameters, the array element will itself be an array containing the value to be set plus any additional parameter values supplied to the setter method. If the method sets a stream, the array element includes the type of stream being supplied to the method. These additional parameters are for the use of the driver or the DBMS and may or may not be used.

NOTE: Stored parameter values of types Array, Blob, Clob and Ref are returned as SerialArray, SerialBlob, SerialClob and SerialRef respectively. an array of Object instances that includes the parameter values that may be set in this RowSet object'scommand; an empty array if no parameters have been set
throws:
  SQLException - if an error occurs retrieveing the object array ofparameters of this RowSet object or if not all parameters havebeen set




getPassword
public String getPassword()(Code)
Returns the password used to create a database connection for this RowSet object. Because the password property is not serialized, it is set at run time before calling the method execute. The default value is null the String object that represents the passwordthat must be supplied to the database to create a connection
See Also:   BaseRowSet.setPassword



getQueryTimeout
public int getQueryTimeout() throws SQLException(Code)
Retrieves the maximum number of seconds the driver will wait for a query to execute. If the limit is exceeded, an SQLException is thrown. the current query timeout limit in seconds; zero means thatthere is no limit
throws:
  SQLException - if an error occurs in determining the querytime-out value



getShowDeleted
public boolean getShowDeleted() throws SQLException(Code)
Retrieves a boolean indicating whether rows marked for deletion appear in the set of current rows. The default value is false.

Note: Allowing deleted rows to remain visible complicates the behavior of some of the methods. However, most RowSet object users can simply ignore this extra detail because only sophisticated applications will likely want to take advantage of this feature. true if deleted rows are visible;false otherwise
throws:
  SQLException - if an error occurs determining if deleted rowsare visible or not
See Also:   BaseRowSet.setShowDeleted




getTransactionIsolation
public int getTransactionIsolation()(Code)
Returns the transaction isolation property for this RowSet object's connection. This property represents the transaction isolation level requested for use in transactions.

For RowSet implementations such as the CachedRowSet that operate in a disconnected environment, the SyncProvider object offers complementary locking and data integrity options. The options described below are pertinent only to connected RowSet objects (JdbcRowSet objects). one of the following constants:Connection.TRANSACTION_NONE,Connection.TRANSACTION_READ_UNCOMMITTED,Connection.TRANSACTION_READ_COMMITTED,Connection.TRANSACTION_REPEATABLE_READ, orConnection.TRANSACTION_SERIALIZABLE
See Also:   javax.sql.rowset.spi.SyncFactory
See Also:   javax.sql.rowset.spi.SyncProvider
See Also:   BaseRowSet.setTransactionIsolation




getType
public int getType() throws SQLException(Code)
Returns the type of this RowSet object. The type is initially determined by the statement that created the RowSet object. The RowSet object can call the method setType at any time to change its type. The default is TYPE_SCROLL_INSENSITIVE. the type of this JDBC RowSetobject, which must be one of the following:ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, orResultSet.TYPE_SCROLL_SENSITIVE
throws:
  SQLException - if an error occurs getting the type ofof this RowSet object
See Also:   BaseRowSet.setType



getTypeMap
public java.util.Map<String, Class<?>> getTypeMap()(Code)
Retrieves the type map associated with the Connection object for this RowSet object.

Drivers that support the JDBC 3.0 API will create Connection objects with an associated type map. This type map, which is initially empty, can contain one or more fully-qualified SQL names and Class objects indicating the class to which the named SQL value will be mapped. The type mapping specified in the connection's type map is used for custom type mapping when no other type map supersedes it.

If a type map is explicitly supplied to a method that can perform custom mapping, that type map supersedes the connection's type map. the java.util.Map object that is the type mapfor this RowSet object's connection




getUrl
public String getUrl() throws SQLException(Code)
Retrieves the JDBC URL that this RowSet object's javax.sql.Reader object uses to make a connection with a relational database using a JDBC technology-enabled driver.

The Url property will be null if the underlying data source is a non-SQL data source, such as a spreadsheet or an XML data source. a String object that contains the JDBC URLused to establish the connection for this RowSetobject; may be null (default value) if not set
throws:
  SQLException - if an error occurs retrieving the URL value
See Also:   BaseRowSet.setUrl




getUsername
public String getUsername()(Code)
Returns the user name used to create a database connection. Because it is not serialized, the username property is set at runtime before calling the method execute. the String object containing the user name thatis supplied to the data source to create a connection; may benull (default value) if not set
See Also:   BaseRowSet.setUsername



initParams
protected void initParams()(Code)
Performs the necessary internal configurations and initializations to allow any JDBC RowSet implementation to start using the standard facilities provided by a BaseRowSet instance. This method should be called after the RowSet object has been instantiated to correctly initialize all parameters. This method should never be called by an application, but is called from with a RowSet implementation extending this class.



isReadOnly
public boolean isReadOnly()(Code)
Returns a boolean indicating whether this RowSet object is read-only. Any attempts to update a read-only RowSet object will result in an SQLException being thrown. By default, rowsets are updatable if updates are possible. true if this RowSet objectcannot be updated; false otherwise
See Also:   BaseRowSet.setConcurrency
See Also:   BaseRowSet.setReadOnly



notifyCursorMoved
protected void notifyCursorMoved() throws SQLException(Code)
Notifies all of the listeners registered with this RowSet object that its cursor has moved.

When an application calls a method to move the cursor, that method moves the cursor and then calls this method internally. An application should never invoke this method directly.
throws:
  SQLException - if the class extending the BaseRowSetabstract class does not implement the RowSet interface orone of it's sub-interfaces.




notifyRowChanged
protected void notifyRowChanged() throws SQLException(Code)
Notifies all of the listeners registered with this RowSet object that one of its rows has changed.

When an application calls a method that changes a row, such as the CachedRowSet methods insertRow, updateRow, or deleteRow, that method calls notifyRowChanged internally. An application should never invoke this method directly.
throws:
  SQLException - if the class extending the BaseRowSetabstract class does not implement the RowSet interface orone of it's sub-interfaces.




notifyRowSetChanged
protected void notifyRowSetChanged() throws SQLException(Code)
Notifies all of the listeners registered with this RowSet object that its entire contents have changed.

When an application calls methods that change the entire contents of the RowSet object, such as the CachedRowSet methods execute, populate, restoreOriginal, or release, that method calls notifyRowSetChanged internally (either directly or indirectly). An application should never invoke this method directly.
throws:
  SQLException - if the class extending the BaseRowSetabstract class does not implement the RowSet interface orone of it's sub-interfaces.




removeRowSetListener
public void removeRowSetListener(RowSetListener listener)(Code)
Removes the designated object from this RowSet object's list of listeners. If the given argument is not a registered listener, this method does nothing. Note: if the RowSetListener object is null, this method silently discards the null value.
Parameters:
  listener - a RowSetListener object that is on the list of listeners for this RowSet object
See Also:   BaseRowSet.addRowSetListener



setArray
public void setArray(int parameterIndex, Array array) throws SQLException(Code)
Sets the designated parameter to an Array object in the Java programming language. The driver converts this to an SQL ARRAY value when it sends it to the database. Internally, the Array is represented as a SerialArray to ensure serializability.

The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called. Methods such as execute and populate must be provided in any class that extends this class and implements one or more of the standard JSR-114 RowSet interfaces.

Note: JdbcRowSet does not require the populate method as it is undefined in this class.

After this method has been called, a call to the method getParams will return an object array of the current command parameters, which will include the Array object set for placeholder parameter number parameterIndex. Note that because the numbering of elements in an array starts at zero, the array element that corresponds to placeholder parameter number parameterIndex is element number parameterIndex -1.
Parameters:
  parameterIndex - the ordinal number of the placeholder parameter in this RowSet object's command that is to be set. The first parameter is 1, the second is 2, and so on; must be1 or greater
Parameters:
  array - an Array object representing an SQL ARRAY value; cannot be null. The Array objectpassed to this method must return a non-null Object for all getArray() method calls. A null value will cause aSQLException to be thrown.
throws:
  SQLException - if an error occurs; the parameter index is out of bounds or the ARRAY is null
See Also:   BaseRowSet.getParams
See Also:   javax.sql.rowset.serial.SerialArray




setAsciiStream
public void setAsciiStream(int parameterIndex, java.io.InputStream x, int length) throws SQLException(Code)
Sets the designated parameter to the given java.io.InputStream object, which will have the specified number of bytes. The contents of the stream will be read and sent to the database. This method throws an SQLException object if the number of bytes read and sent to the database is not equal to length.

When a very large ASCII value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.InputStream object. A JDBC technology-enabled driver will read the data from the stream as needed until it reaches end-of-file. The driver will do any necessary conversion from ASCII to the database CHAR format.

Note: This stream object can be either a standard Java stream object or your own subclass that implements the standard interface.

The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called. Methods such as execute and populate must be provided in any class that extends this class and implements one or more of the standard JSR-114 RowSet interfaces.

Note: JdbcRowSet does not require the populate method as it is undefined in this class.

Calls made to the method getParams after setAsciiStream has been called will return an array containing the parameter values that have been set. The element in the array that represents the values set with this method will itself be an array. The first element of that array is the given java.io.InputStream object. The second element is the value set for length. The third element is an internal BaseRowSet constant specifying that the stream passed to this method is an ASCII stream. The parameter number is indicated by an element's position in the array returned by the method getParams, with the first element being the value for the first placeholder parameter, the second element being the value for the second placeholder parameter, and so on. In other words, if the input stream being set is the value for the second placeholder parameter, the array containing it will be the second element in the array returned by getParams.

Note that because the numbering of elements in an array starts at zero, the array element that corresponds to placeholder parameter number parameterIndex is element number parameterIndex -1.
Parameters:
  parameterIndex - the ordinal number of the placeholder parameter in this RowSet object's command that is to be set. The first parameter is 1, the second is 2, and so on; must be1 or greater
Parameters:
  x - the Java input stream that contains the ASCII parameter value
Parameters:
  length - the number of bytes in the stream. This is the number of bytesthe driver will send to the DBMS; lengths of 0 or less are are undefined but will cause an invalid length exception to bethrown in the underlying JDBC driver.
throws:
  SQLException - if an error occurs, the parameter index is out of bounds,or when connected to a data source, the number of bytes the driver readsand sends to the database is not equal to the number of bytes specified in length
See Also:   BaseRowSet.getParams




setAsciiStream
public void setAsciiStream(int parameterIndex, java.io.InputStream x) throws SQLException(Code)
Sets the designated parameter in this RowSet object's command to the given input stream. When a very large ASCII value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.InputStream. Data will be read from the stream as needed until end-of-file is reached. The JDBC driver will do any necessary conversion from ASCII to the database char format.

Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.

Note: Consult your JDBC driver documentation to determine if it might be more efficient to use a version of setAsciiStream which takes a length parameter.
Parameters:
  parameterIndex - the first parameter is 1, the second is 2, ...
Parameters:
  x - the Java input stream that contains the ASCII parameter value
exception:
  SQLException - if a database access error occurs orthis method is called on a closed PreparedStatement
throws:
  SQLFeatureNotSupportedException - if the JDBC driver does not support this method
since:
   1.6




setAsciiStream
public void setAsciiStream(String parameterName, java.io.InputStream x, int length) throws SQLException(Code)
Sets the designated parameter to the given input stream, which will have the specified number of bytes. When a very large ASCII value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.InputStream. Data will be read from the stream as needed until end-of-file is reached. The JDBC driver will do any necessary conversion from ASCII to the database char format.

Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
Parameters:
  parameterName - the name of the parameter
Parameters:
  x - the Java input stream that contains the ASCII parameter value
Parameters:
  length - the number of bytes in the stream
exception:
  SQLException - if a database access error occurs orthis method is called on a closed CallableStatement
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.4




setAsciiStream
public void setAsciiStream(String parameterName, java.io.InputStream x) throws SQLException(Code)
Sets the designated parameter to the given input stream. When a very large ASCII value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.InputStream. Data will be read from the stream as needed until end-of-file is reached. The JDBC driver will do any necessary conversion from ASCII to the database char format.

Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.

Note: Consult your JDBC driver documentation to determine if it might be more efficient to use a version of setAsciiStream which takes a length parameter.
Parameters:
  parameterName - the name of the parameter
Parameters:
  x - the Java input stream that contains the ASCII parameter value
exception:
  SQLException - if a database access error occurs orthis method is called on a closed CallableStatement
throws:
  SQLFeatureNotSupportedException - if the JDBC driver does not support this method
since:
   1.6




setBigDecimal
public void setBigDecimal(int parameterIndex, java.math.BigDecimal x) throws SQLException(Code)
Sets the designated parameter to the given java.lang.BigDecimal value. The driver converts this to an SQL NUMERIC value when it sends it to the database.

The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called. Methods such as execute and populate must be provided in any class that extends this class and implements one or more of the standard JSR-114 RowSet interfaces.

Note: JdbcRowSet does not require the populate method as it is undefined in this class.
Parameters:
  parameterIndex - the ordinal number of the placeholder parameter in this RowSet object's command that is to be set. The first parameter is 1, the second is 2, and so on; must be1 or greater
Parameters:
  x - the parameter value
throws:
  SQLException - if an error occurs or the parameter index is out of bounds
See Also:   BaseRowSet.getParams




setBigDecimal
public void setBigDecimal(String parameterName, BigDecimal x) throws SQLException(Code)
Sets the designated parameter to the given java.math.BigDecimal value. The driver converts this to an SQL NUMERIC value when it sends it to the database.
Parameters:
  parameterName - the name of the parameter
Parameters:
  x - the parameter value
exception:
  SQLException - if a database access error occurs orthis method is called on a closed CallableStatement
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
See Also:   BaseRowSet.getBigDecimal
since:
   1.4



setBinaryStream
public void setBinaryStream(int parameterIndex, java.io.InputStream x, int length) throws SQLException(Code)
Sets the designated parameter to the given java.io.InputStream object, which will have the specified number of bytes. The contents of the stream will be read and sent to the database. This method throws an SQLException object if the number of bytes read and sent to the database is not equal to length.

When a very large binary value is input to a LONGVARBINARY parameter, it may be more practical to send it via a java.io.InputStream object. A JDBC technology-enabled driver will read the data from the stream as needed until it reaches end-of-file.

Note: This stream object can be either a standard Java stream object or your own subclass that implements the standard interface.

The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called. Methods such as execute and populate must be provided in any class that extends this class and implements one or more of the standard JSR-114 RowSet interfaces.

NOTE: JdbcRowSet does not require the populate method as it is undefined in this class.

Calls made to the method getParams after setBinaryStream has been called will return an array containing the parameter values that have been set. In that array, the element that represents the values set with this method will itself be an array. The first element of that array is the given java.io.InputStream object. The second element is the value set for length. The third element is an internal BaseRowSet constant specifying that the stream passed to this method is a binary stream. The parameter number is indicated by an element's position in the array returned by the method getParams, with the first element being the value for the first placeholder parameter, the second element being the value for the second placeholder parameter, and so on. In other words, if the input stream being set is the value for the second placeholder parameter, the array containing it will be the second element in the array returned by getParams.

Note that because the numbering of elements in an array starts at zero, the array element that corresponds to placeholder parameter number parameterIndex is element number parameterIndex -1.
Parameters:
  parameterIndex - the ordinal number of the placeholder parameter in this RowSet object's command that is to be set. The first parameter is 1, the second is 2, and so on; must be1 or greater
Parameters:
  x - the input stream that contains the binary value to be set
Parameters:
  length - the number of bytes in the stream; lengths of 0 or less are are undefined but will cause an invalid length exception to bethrown in the underlying JDBC driver.
throws:
  SQLException - if an error occurs, the parameter index is out of bounds,or when connected to a data source, the number of bytes the driver reads and sends to the database is not equal to the number of bytes specified in length
See Also:   BaseRowSet.getParams




setBinaryStream
public void setBinaryStream(int parameterIndex, java.io.InputStream x) throws SQLException(Code)
Sets the designated parameter in this RowSet object's command to the given input stream. When a very large binary value is input to a LONGVARBINARY parameter, it may be more practical to send it via a java.io.InputStream object. The data will be read from the stream as needed until end-of-file is reached.

Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.

Note: Consult your JDBC driver documentation to determine if it might be more efficient to use a version of setBinaryStream which takes a length parameter.
Parameters:
  parameterIndex - the first parameter is 1, the second is 2, ...
Parameters:
  x - the java input stream which contains the binary parameter value
exception:
  SQLException - if a database access error occurs orthis method is called on a closed PreparedStatement
throws:
  SQLFeatureNotSupportedException - if the JDBC driver does not support this method
since:
   1.6




setBinaryStream
public void setBinaryStream(String parameterName, java.io.InputStream x, int length) throws SQLException(Code)
Sets the designated parameter to the given input stream, which will have the specified number of bytes. When a very large binary value is input to a LONGVARBINARY parameter, it may be more practical to send it via a java.io.InputStream object. The data will be read from the stream as needed until end-of-file is reached.

Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
Parameters:
  parameterName - the name of the parameter
Parameters:
  x - the java input stream which contains the binary parameter value
Parameters:
  length - the number of bytes in the stream
exception:
  SQLException - if a database access error occurs orthis method is called on a closed CallableStatement
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.4




setBinaryStream
public void setBinaryStream(String parameterName, java.io.InputStream x) throws SQLException(Code)
Sets the designated parameter to the given input stream. When a very large binary value is input to a LONGVARBINARY parameter, it may be more practical to send it via a java.io.InputStream object. The data will be read from the stream as needed until end-of-file is reached.

Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.

Note: Consult your JDBC driver documentation to determine if it might be more efficient to use a version of setBinaryStream which takes a length parameter.
Parameters:
  parameterName - the name of the parameter
Parameters:
  x - the java input stream which contains the binary parameter value
exception:
  SQLException - if a database access error occurs orthis method is called on a closed CallableStatement
throws:
  SQLFeatureNotSupportedException - if the JDBC driver does not support this method
since:
   1.6




setBlob
public void setBlob(int parameterIndex, Blob x) throws SQLException(Code)
Sets the designated parameter to the given Blob object in the Java programming language. The driver converts this to an SQL BLOB value when it sends it to the database. Internally, the Blob is represented as a SerialBlob to ensure serializability.

The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called. Methods such as execute and populate must be provided in any class that extends this class and implements one or more of the standard JSR-114 RowSet interfaces. NOTE: JdbcRowSet does not require the populate method as it is undefined in this class.

After this method has been called, a call to the method getParams will return an object array of the current command parameters, which will include the Blob object set for placeholder parameter number parameterIndex. Note that because the numbering of elements in an array starts at zero, the array element that corresponds to placeholder parameter number parameterIndex is element number parameterIndex -1.
Parameters:
  parameterIndex - the ordinal number of the placeholder parameter in this RowSet object's command that is to be set. The first parameter is 1, the second is 2, and so on; must be1 or greater
Parameters:
  x - a Blob object representing an SQLBLOB value
throws:
  SQLException - if an error occurs or theparameter index is out of bounds
See Also:   BaseRowSet.getParams
See Also:   javax.sql.rowset.serial.SerialBlob




setBlob
public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException(Code)
Sets the designated parameter to a InputStream object. The inputstream must contain the number of characters specified by length otherwise a SQLException will be generated when the PreparedStatement is executed. This method differs from the setBinaryStream (int, InputStream, int) method because it informs the driver that the parameter value should be sent to the server as a BLOB. When the setBinaryStream method is used, the driver may have to do extra work to determine whether the parameter data should be sent to the server as a LONGVARBINARY or a BLOB
Parameters:
  parameterIndex - index of the first parameter is 1,the second is 2, ...
Parameters:
  inputStream - An object that contains the data to set the parametervalue to.
Parameters:
  length - the number of bytes in the parameter data.
throws:
  SQLException - if a database access error occurs,this method is called on a closed PreparedStatement,if parameterIndex does not correspondto a parameter marker in the SQL statement, if the length specifiedis less than zero or if the number of bytes in the inputstream does not matchthe specfied length.
throws:
  SQLFeatureNotSupportedException - if the JDBC driver does not support this method
since:
   1.6



setBlob
public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException(Code)
Sets the designated parameter to a InputStream object. This method differs from the setBinaryStream (int, InputStream) method because it informs the driver that the parameter value should be sent to the server as a BLOB. When the setBinaryStream method is used, the driver may have to do extra work to determine whether the parameter data should be sent to the server as a LONGVARBINARY or a BLOB

Note: Consult your JDBC driver documentation to determine if it might be more efficient to use a version of setBlob which takes a length parameter.
Parameters:
  parameterIndex - index of the first parameter is 1,the second is 2, ...
Parameters:
  inputStream - An object that contains the data to set the parametervalue to.
throws:
  SQLException - if a database access error occurs,this method is called on a closed PreparedStatement orif parameterIndex does not correspondto a parameter marker in the SQL statement,
throws:
  SQLFeatureNotSupportedException - if the JDBC driver does not support this method
since:
   1.6




setBlob
public void setBlob(String parameterName, InputStream inputStream, long length) throws SQLException(Code)
Sets the designated parameter to a InputStream object. The inputstream must contain the number of characters specified by length, otherwise a SQLException will be generated when the CallableStatement is executed. This method differs from the setBinaryStream (int, InputStream, int) method because it informs the driver that the parameter value should be sent to the server as a BLOB. When the setBinaryStream method is used, the driver may have to do extra work to determine whether the parameter data should be sent to the server as a LONGVARBINARY or a BLOB
Parameters:
  parameterName - the name of the parameter to be setthe second is 2, ...
Parameters:
  inputStream - An object that contains the data to set the parametervalue to.
Parameters:
  length - the number of bytes in the parameter data.
throws:
  SQLException - if parameterIndex does not correspondto a parameter marker in the SQL statement, or if the length specifiedis less than zero; if the number of bytes in the inputstream does not matchthe specfied length; if a database access error occurs orthis method is called on a closed CallableStatement
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.6



setBlob
public void setBlob(String parameterName, Blob x) throws SQLException(Code)
Sets the designated parameter to the given java.sql.Blob object. The driver converts this to an SQL BLOB value when it sends it to the database.
Parameters:
  parameterName - the name of the parameter
Parameters:
  x - a Blob object that maps an SQL BLOB value
exception:
  SQLException - if a database access error occurs orthis method is called on a closed CallableStatement
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.6



setBlob
public void setBlob(String parameterName, InputStream inputStream) throws SQLException(Code)
Sets the designated parameter to a InputStream object. This method differs from the setBinaryStream (int, InputStream) method because it informs the driver that the parameter value should be sent to the server as a BLOB. When the setBinaryStream method is used, the driver may have to do extra work to determine whether the parameter data should be send to the server as a LONGVARBINARY or a BLOB

Note: Consult your JDBC driver documentation to determine if it might be more efficient to use a version of setBlob which takes a length parameter.
Parameters:
  parameterName - the name of the parameter
Parameters:
  inputStream - An object that contains the data to set the parametervalue to.
throws:
  SQLException - if a database access error occurs orthis method is called on a closed CallableStatement
throws:
  SQLFeatureNotSupportedException - if the JDBC driver does not support this method
since:
   1.6




setBoolean
public void setBoolean(int parameterIndex, boolean x) throws SQLException(Code)
Sets the designated parameter to the given boolean in the Java programming language. The driver converts this to an SQL BIT value when it sends it to the database.

The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called. Methods such as execute, populate must be provided in any class that extends this class and implements one or more of the standard JSR-114 RowSet interfaces.

NOTE: JdbcRowSet does not require the populate method as it is undefined in this class.
Parameters:
  parameterIndex - the ordinal number of the placeholder parameter in this RowSet object's command that is to be set. The first parameter is 1, the second is 2, and so on; must be1 or greater
Parameters:
  x - the parameter value
throws:
  SQLException - if an error occurs or the parameter index is out of bounds
See Also:   BaseRowSet.getParams




setBoolean
public void setBoolean(String parameterName, boolean x) throws SQLException(Code)
Sets the designated parameter to the given Java boolean value. The driver converts this to an SQL BIT or BOOLEAN value when it sends it to the database.
Parameters:
  parameterName - the name of the parameter
Parameters:
  x - the parameter value
exception:
  SQLException - if a database access error occurs orthis method is called on a closed CallableStatement
See Also:   BaseRowSet.getBoolean
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.4



setByte
public void setByte(int parameterIndex, byte x) throws SQLException(Code)
Sets the designated parameter to the given byte in the Java programming language. The driver converts this to an SQL TINYINT value when it sends it to the database.

The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called. Methods such as execute and populate must be provided in any class that extends this class and implements one or more of the standard JSR-114 RowSet interfaces.

NOTE: JdbcRowSet does not require the populate method as it is undefined in this class.
Parameters:
  parameterIndex - the ordinal number of the placeholder parameter in this RowSet object's command that is to be set. The first parameter is 1, the second is 2, and so on; must be1 or greater
Parameters:
  x - the parameter value
throws:
  SQLException - if an error occurs or the parameter index is out of bounds
See Also:   BaseRowSet.getParams




setByte
public void setByte(String parameterName, byte x) throws SQLException(Code)
Sets the designated parameter to the given Java byte value. The driver converts this to an SQL TINYINT value when it sends it to the database.
Parameters:
  parameterName - the name of the parameter
Parameters:
  x - the parameter value
exception:
  SQLException - if a database access error occurs orthis method is called on a closed CallableStatement
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
See Also:   BaseRowSet.getByte
since:
   1.4



setBytes
public void setBytes(int parameterIndex, byte x) throws SQLException(Code)
Sets the designated parameter to the given array of bytes. The driver converts this to an SQL VARBINARY or LONGVARBINARY value (depending on the argument's size relative to the driver's limits on VARBINARY values) when it sends it to the database.

The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called. Methods such as execute and populate must be provided in any class that extends this class and implements one or more of the standard JSR-114 RowSet interfaces.

NOTE: JdbcRowSet does not require the populate method as it is undefined in this class.
Parameters:
  parameterIndex - the ordinal number of the placeholder parameter in this RowSet object's command that is to be set. The first parameter is 1, the second is 2, and so on; must be1 or greater
Parameters:
  x - the parameter value
throws:
  SQLException - if an error occurs or the parameter index is out of bounds
See Also:   BaseRowSet.getParams




setBytes
public void setBytes(String parameterName, byte x) throws SQLException(Code)
Sets the designated parameter to the given Java array of bytes. The driver converts this to an SQL VARBINARY or LONGVARBINARY (depending on the argument's size relative to the driver's limits on VARBINARY values) when it sends it to the database.
Parameters:
  parameterName - the name of the parameter
Parameters:
  x - the parameter value
exception:
  SQLException - if a database access error occurs orthis method is called on a closed CallableStatement
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
See Also:   BaseRowSet.getBytes
since:
   1.4



setCharacterStream
public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException(Code)
Sets the designated parameter to the given java.io.Reader object, which will have the specified number of characters. The contents of the reader will be read and sent to the database. This method throws an SQLException if the number of bytes read and sent to the database is not equal to length.

When a very large Unicode value is input to a LONGVARCHAR parameter, it may be more practical to send it via a Reader object. A JDBC technology-enabled driver will read the data from the stream as needed until it reaches end-of-file. The driver will do any necessary conversion from Unicode to the database CHAR format. The byte format of the Unicode stream must be Java UTF-8, as defined in the Java Virtual Machine Specification.

Note: This stream object can be either a standard Java stream object or your own subclass that implements the standard interface.

The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called. Methods such as execute and populate must be provided in any class that extends this class and implements one or more of the standard JSR-114 RowSet interfaces.

NOTE: JdbcRowSet does not require the populate method as it is undefined in this class.

Calls made to the method getParams after setCharacterStream has been called will return an array containing the parameter values that have been set. In that array, the element that represents the values set with this method will itself be an array. The first element of that array is the given java.io.Reader object. The second element is the value set for length. The parameter number is indicated by an element's position in the array returned by the method getParams, with the first element being the value for the first placeholder parameter, the second element being the value for the second placeholder parameter, and so on. In other words, if the reader being set is the value for the second placeholder parameter, the array containing it will be the second element in the array returned by getParams.

Note that because the numbering of elements in an array starts at zero, the array element that corresponds to placeholder parameter number parameterIndex is element number parameterIndex -1.
Parameters:
  parameterIndex - the ordinal number of the placeholder parameter in this RowSet object's command that is to be set. The first parameter is 1, the second is 2, and so on; must be1 or greater
Parameters:
  reader - the Reader object that contains theUnicode data
Parameters:
  length - the number of characters in the stream; lengths of 0 or less are undefined but will cause an invalid length exception to be thrown in the underlying JDBC driver.
throws:
  SQLException - if an error occurs, the parameter index is out of bounds,or when connected to a data source, the number of bytes the driverreads and sends to the database is not equal to the number of bytesspecified in length
See Also:   BaseRowSet.getParams




setCharacterStream
public void setCharacterStream(int parameterIndex, java.io.Reader reader) throws SQLException(Code)
Sets the designated parameter in this RowSet object's command to the given Reader object. When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.Reader object. The data will be read from the stream as needed until end-of-file is reached. The JDBC driver will do any necessary conversion from UNICODE to the database char format.

Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.

Note: Consult your JDBC driver documentation to determine if it might be more efficient to use a version of setCharacterStream which takes a length parameter.
Parameters:
  parameterIndex - the first parameter is 1, the second is 2, ...
Parameters:
  reader - the java.io.Reader object that contains theUnicode data
exception:
  SQLException - if a database access error occurs orthis method is called on a closed PreparedStatement
throws:
  SQLFeatureNotSupportedException - if the JDBC driver does not support this method
since:
   1.6




setCharacterStream
public void setCharacterStream(String parameterName, java.io.Reader reader, int length) throws SQLException(Code)
Sets the designated parameter to the given Reader object, which is the given number of characters long. When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.Reader object. The data will be read from the stream as needed until end-of-file is reached. The JDBC driver will do any necessary conversion from UNICODE to the database char format.

Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
Parameters:
  parameterName - the name of the parameter
Parameters:
  reader - the java.io.Reader object thatcontains the UNICODE data used as the designated parameter
Parameters:
  length - the number of characters in the stream
exception:
  SQLException - if a database access error occurs orthis method is called on a closed CallableStatement
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.4




setCharacterStream
public void setCharacterStream(String parameterName, java.io.Reader reader) throws SQLException(Code)
Sets the designated parameter to the given Reader object. When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.Reader object. The data will be read from the stream as needed until end-of-file is reached. The JDBC driver will do any necessary conversion from UNICODE to the database char format.

Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.

Note: Consult your JDBC driver documentation to determine if it might be more efficient to use a version of setCharacterStream which takes a length parameter.
Parameters:
  parameterName - the name of the parameter
Parameters:
  reader - the java.io.Reader object that contains theUnicode data
exception:
  SQLException - if a database access error occurs orthis method is called on a closed CallableStatement
throws:
  SQLFeatureNotSupportedException - if the JDBC driver does not support this method
since:
   1.6




setClob
public void setClob(int parameterIndex, Clob x) throws SQLException(Code)
Sets the designated parameter to the given Clob object in the Java programming language. The driver converts this to an SQL CLOB value when it sends it to the database. Internally, the Clob is represented as a SerialClob to ensure serializability.

The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called. Methods such as execute and populate must be provided in any class that extends this class and implements one or more of the standard JSR-114 RowSet interfaces.

NOTE: JdbcRowSet does not require the populate method as it is undefined in this class.

After this method has been called, a call to the method getParams will return an object array of the current command parameters, which will include the Clob object set for placeholder parameter number parameterIndex. Note that because the numbering of elements in an array starts at zero, the array element that corresponds to placeholder parameter number parameterIndex is element number parameterIndex -1.
Parameters:
  parameterIndex - the ordinal number of the placeholder parameter in this RowSet object's command that is to be set. The first parameter is 1, the second is 2, and so on; must be1 or greater
Parameters:
  x - a Clob object representing an SQLCLOB value; cannot be null
throws:
  SQLException - if an error occurs; the parameter index is out ofbounds or the Clob is null
See Also:   BaseRowSet.getParams
See Also:   javax.sql.rowset.serial.SerialBlob
See Also:   




setClob
public void setClob(int parameterIndex, Reader reader, long length) throws SQLException(Code)
Sets the designated parameter to a Reader object. The reader must contain the number of characters specified by length otherwise a SQLException will be generated when the PreparedStatement is executed. This method differs from the setCharacterStream (int, Reader, int) method because it informs the driver that the parameter value should be sent to the server as a CLOB. When the setCharacterStream method is used, the driver may have to do extra work to determine whether the parameter data should be sent to the server as a LONGVARCHAR or a CLOB
Parameters:
  parameterIndex - index of the first parameter is 1, the second is 2, ...
Parameters:
  reader - An object that contains the data to set the parameter value to.
Parameters:
  length - the number of characters in the parameter data.
throws:
  SQLException - if a database access error occurs, this method is called ona closed PreparedStatement, if parameterIndex does not correspond to a parametermarker in the SQL statement, or if the length specified is less than zero.
throws:
  SQLFeatureNotSupportedException - if the JDBC driver does not support this method
since:
   1.6



setClob
public void setClob(int parameterIndex, Reader reader) throws SQLException(Code)
Sets the designated parameter to a Reader object. This method differs from the setCharacterStream (int, Reader) method because it informs the driver that the parameter value should be sent to the server as a CLOB. When the setCharacterStream method is used, the driver may have to do extra work to determine whether the parameter data should be sent to the server as a LONGVARCHAR or a CLOB

Note: Consult your JDBC driver documentation to determine if it might be more efficient to use a version of setClob which takes a length parameter.
Parameters:
  parameterIndex - index of the first parameter is 1, the second is 2, ...
Parameters:
  reader - An object that contains the data to set the parameter value to.
throws:
  SQLException - if a database access error occurs, this method is called ona closed PreparedStatementor if parameterIndex does not correspond to a parametermarker in the SQL statement
throws:
  SQLFeatureNotSupportedException - if the JDBC driver does not support this method
since:
   1.6




setClob
public void setClob(String parameterName, Reader reader, long length) throws SQLException(Code)
Sets the designated parameter to a Reader object. The reader must contain the number of characters specified by length otherwise a SQLException will be generated when the CallableStatement is executed. This method differs from the setCharacterStream (int, Reader, int) method because it informs the driver that the parameter value should be sent to the server as a CLOB. When the setCharacterStream method is used, the driver may have to do extra work to determine whether the parameter data should be send to the server as a LONGVARCHAR or a CLOB
Parameters:
  parameterName - the name of the parameter to be set
Parameters:
  reader - An object that contains the data to set the parameter value to.
Parameters:
  length - the number of characters in the parameter data.
throws:
  SQLException - if parameterIndex does not correspond to a parametermarker in the SQL statement; if the length specified is less than zero;a database access error occurs orthis method is called on a closed CallableStatement
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.6



setClob
public void setClob(String parameterName, Clob x) throws SQLException(Code)
Sets the designated parameter to the given java.sql.Clob object. The driver converts this to an SQL CLOB value when it sends it to the database.
Parameters:
  parameterName - the name of the parameter
Parameters:
  x - a Clob object that maps an SQL CLOB value
exception:
  SQLException - if a database access error occurs orthis method is called on a closed CallableStatement
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.6



setClob
public void setClob(String parameterName, Reader reader) throws SQLException(Code)
Sets the designated parameter to a Reader object. This method differs from the setCharacterStream (int, Reader) method because it informs the driver that the parameter value should be sent to the server as a CLOB. When the setCharacterStream method is used, the driver may have to do extra work to determine whether the parameter data should be send to the server as a LONGVARCHAR or a CLOB

Note: Consult your JDBC driver documentation to determine if it might be more efficient to use a version of setClob which takes a length parameter.
Parameters:
  parameterName - the name of the parameter
Parameters:
  reader - An object that contains the data to set the parameter value to.
throws:
  SQLException - if a database access error occurs or this method is called ona closed CallableStatement
throws:
  SQLFeatureNotSupportedException - if the JDBC driver does not support this method
since:
   1.6




setCommand
public void setCommand(String cmd) throws SQLException(Code)
Sets this RowSet object's command property to the given String object and clears the parameters, if any, that were set for the previous command.

The command property may not be needed if the RowSet object gets its data from a source that does not support commands, such as a spreadsheet or other tabular file. Thus, this property is optional and may be null.
Parameters:
  cmd - a String object containing an SQL querythat will be set as this RowSet object's command property; may be null but may not be an empty string
throws:
  SQLException - if an empty string is provided as the command value
See Also:   BaseRowSet.getCommand




setConcurrency
public void setConcurrency(int concurrency) throws SQLException(Code)
Sets the concurrency for this RowSet object to the specified concurrency. The default concurrency for any RowSet object (connected or disconnected) is ResultSet.CONCUR_UPDATABLE, but this method may be called at any time to change the concurrency.


Parameters:
  concurrency - one of the following constants:ResultSet.CONCUR_READ_ONLY orResultSet.CONCUR_UPDATABLE
throws:
  SQLException - if the parameter supplied is not one of the following constants:ResultSet.CONCUR_UPDATABLE orResultSet.CONCUR_READ_ONLY
See Also:   BaseRowSet.getConcurrency
See Also:   BaseRowSet.isReadOnly




setDataSourceName
public void setDataSourceName(String name) throws SQLException(Code)
Sets the DataSource name property for this RowSet object to the given logical name and sets this RowSet object's Url property to null. The name must have been bound to a DataSource object in a JNDI naming service so that an application can do a lookup using that name to retrieve the DataSource object bound to it. The DataSource object can then be used to establish a connection to the data source it represents.

Users should set either the Url property or the dataSourceName property. If both properties are set, the driver will use the property set most recently.
Parameters:
  name - a String object with the name that can be suppliedto a naming service based on JNDI technology to retrieve theDataSource object that can be used to get a connection;may be null but must not be an empty string
throws:
  SQLException - if an empty string is provided as the DataSourcename
See Also:   BaseRowSet.getDataSourceName




setDate
public void setDate(int parameterIndex, java.sql.Date x) throws SQLException(Code)
Sets the designated parameter to the given java.sql.Date value. The driver converts this to an SQL DATE value when it sends it to the database.

The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called. Methods such as execute and populate must be provided in any class that extends this class and implements one or more of the standard JSR-114 RowSet interfaces.

NOTE: JdbcRowSet does not require the populate method as it is undefined in this class.

Calls made to the method getParams after this version of setDate has been called will return an array with the value to be set for placeholder parameter number parameterIndex being the Date object supplied as the second parameter. Note that because the numbering of elements in an array starts at zero, the array element that corresponds to placeholder parameter number parameterIndex is parameterIndex -1.
Parameters:
  parameterIndex - the ordinal number of the placeholder parameter in this RowSet object's command that is to be set. The first parameter is 1, the second is 2, and so on; must be1 or greater
Parameters:
  x - the parameter value
throws:
  SQLException - if an error occurs or the parameter index is out of bounds
See Also:   BaseRowSet.getParams




setDate
public void setDate(int parameterIndex, java.sql.Date x, Calendar cal) throws SQLException(Code)
Sets the designated parameter to the given java.sql.Date object. When the DBMS does not store time zone information, the driver will use the given Calendar object to construct the SQL DATE value to send to the database. With a Calendar object, the driver can calculate the date taking into account a custom time zone. If no Calendar object is specified, the driver uses the time zone of the Virtual Machine that is running the application.

The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called. Methods such as execute and populate must be provided in any class that extends this class and implements one or more of the standard JSR-114 RowSet interfaces.

NOTE: JdbcRowSet does not require the populate method as it is undefined in this class.

Calls made to the method getParams after this version of setDate has been called will return an array containing the parameter values that have been set. In that array, the element that represents the values set with this method will itself be an array. The first element of that array is the given java.sql.Date object. The second element is the value set for cal. The parameter number is indicated by an element's position in the array returned by the method getParams, with the first element being the value for the first placeholder parameter, the second element being the value for the second placeholder parameter, and so on. In other words, if the date being set is the value for the second placeholder parameter, the array containing it will be the second element in the array returned by getParams.

Note that because the numbering of elements in an array starts at zero, the array element that corresponds to placeholder parameter number parameterIndex is parameterIndex -1.
Parameters:
  parameterIndex - the ordinal number of the placeholder parameter in this RowSet object's command that is to be set. The first parameter is 1, the second is 2, and so on; must be1 or greater
Parameters:
  x - a java.sql.Date object representing an SQLDATE value
Parameters:
  cal - a java.util.Calendar object to use whenwhen constructing the date
throws:
  SQLException - if an error occurs or the parameter index is out of bounds
See Also:   BaseRowSet.getParams




setDate
public void setDate(String parameterName, java.sql.Date x) throws SQLException(Code)
Sets the designated parameter to the given java.sql.Date value using the default time zone of the virtual machine that is running the application. The driver converts this to an SQL DATE value when it sends it to the database.
Parameters:
  parameterName - the name of the parameter
Parameters:
  x - the parameter value
exception:
  SQLException - if a database access error occurs orthis method is called on a closed CallableStatement
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
See Also:   BaseRowSet.getDate
since:
   1.4



setDate
public void setDate(String parameterName, java.sql.Date x, Calendar cal) throws SQLException(Code)
Sets the designated parameter to the given java.sql.Date value, using the given Calendar object. The driver uses the Calendar object to construct an SQL DATE value, which the driver then sends to the database. With a a Calendar object, the driver can calculate the date taking into account a custom timezone. If no Calendar object is specified, the driver uses the default timezone, which is that of the virtual machine running the application.
Parameters:
  parameterName - the name of the parameter
Parameters:
  x - the parameter value
Parameters:
  cal - the Calendar object the driver will useto construct the date
exception:
  SQLException - if a database access error occurs orthis method is called on a closed CallableStatement
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
See Also:   BaseRowSet.getDate
since:
   1.4



setDouble
public void setDouble(int parameterIndex, double x) throws SQLException(Code)
Sets the designated parameter to the given double in the Java programming language. The driver converts this to an SQL DOUBLE value when it sends it to the database.

The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called. Methods such as execute and populate must be provided in any class that extends this class and implements one or more of the standard JSR-114 RowSet interfaces.

NOTE: JdbcRowSet does not require the populate method as it is undefined in this class. S
Parameters:
  parameterIndex - the ordinal number of the placeholder parameter in this RowSet object's command that is to be set. The first parameter is 1, the second is 2, and so on; must be1 or greater
Parameters:
  x - the parameter value
throws:
  SQLException - if an error occurs or the parameter index is out of bounds
See Also:   BaseRowSet.getParams




setDouble
public void setDouble(String parameterName, double x) throws SQLException(Code)
Sets the designated parameter to the given Java double value. The driver converts this to an SQL DOUBLE value when it sends it to the database.
Parameters:
  parameterName - the name of the parameter
Parameters:
  x - the parameter value
exception:
  SQLException - if a database access error occurs orthis method is called on a closed CallableStatement
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
See Also:   BaseRowSet.getDouble
since:
   1.4



setEscapeProcessing
public void setEscapeProcessing(boolean enable) throws SQLException(Code)
Sets to the given boolean whether or not the driver will scan for escape syntax and do escape substitution before sending SQL statements to the database. The default is for the driver to do escape processing.

Note: Since PreparedStatement objects have usually been parsed prior to making this call, disabling escape processing for prepared statements will likely have no effect.
Parameters:
  enable - true to enable escape processing; false to disable it
throws:
  SQLException - if an error occurs setting the underlying JDBCtechnology-enabled driver to process the escape syntax




setFetchDirection
public void setFetchDirection(int direction) throws SQLException(Code)
Gives the driver a performance hint as to the direction in which the rows in this RowSet object will be processed. The driver may ignore this hint.

A RowSet object inherits the default properties of the ResultSet object from which it got its data. That ResultSet object's default fetch direction is set by the Statement object that created it.

This method applies to a RowSet object only while it is connected to a database using a JDBC driver.

A RowSet object may use this method at any time to change its setting for the fetch direction.
Parameters:
  direction - one of ResultSet.FETCH_FORWARD,ResultSet.FETCH_REVERSE, orResultSet.FETCH_UNKNOWN
throws:
  SQLException - if (1) the RowSet type is TYPE_FORWARD_ONLY and the given fetch direction is notFETCH_FORWARD or (2) the given fetch direction is notone of the following:ResultSet.FETCH_FORWARD,ResultSet.FETCH_REVERSE, orResultSet.FETCH_UNKNOWN
See Also:   BaseRowSet.getFetchDirection




setFetchSize
public void setFetchSize(int rows) throws SQLException(Code)
Sets the fetch size for this RowSet object to the given number of rows. The fetch size gives a JDBC technology-enabled driver ("JDBC driver") a hint as to the number of rows that should be fetched from the database when more rows are needed for this RowSet object. If the fetch size specified is zero, the driver ignores the value and is free to make its own best guess as to what the fetch size should be.

A RowSet object inherits the default properties of the ResultSet object from which it got its data. That ResultSet object's default fetch size is set by the Statement object that created it.

This method applies to a RowSet object only while it is connected to a database using a JDBC driver. For connected RowSet implementations such as JdbcRowSet, this method has a direct and immediate effect on the underlying JDBC driver.

A RowSet object may use this method at any time to change its setting for the fetch size.

For RowSet implementations such as CachedRowSet, which operate in a disconnected environment, the SyncProvider object being used may leverage the fetch size to poll the data source and retrieve a number of rows that do not exceed the fetch size and that may form a subset of the actual rows returned by the original query. This is an implementation variance determined by the specific SyncProvider object employed by the disconnected RowSet object.


Parameters:
  rows - the number of rows to fetch; 0 to let thedriver decide what the best fetch size is; must not be lessthan 0 or more than the maximum number of rowsallowed for this RowSet object (the number returnedby a call to the method BaseRowSet.getMaxRows)
throws:
  SQLException - if the specified fetch size is less than 0or more than the limit for the maximum number of rows
See Also:   BaseRowSet.getFetchSize




setFloat
public void setFloat(int parameterIndex, float x) throws SQLException(Code)
Sets the designated parameter to the given float in the Java programming language. The driver converts this to an SQL FLOAT value when it sends it to the database.

The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called. Methods such as execute and populate must be provided in any class that extends this class and implements one or more of the standard JSR-114 RowSet interfaces.

NOTE: JdbcRowSet does not require the populate method as it is undefined in this class.
Parameters:
  parameterIndex - the ordinal number of the placeholder parameter in this RowSet object's command that is to be set. The first parameter is 1, the second is 2, and so on; must be1 or greater
Parameters:
  x - the parameter value
throws:
  SQLException - if an error occurs or the parameter index is out of bounds
See Also:   BaseRowSet.getParams




setFloat
public void setFloat(String parameterName, float x) throws SQLException(Code)
Sets the designated parameter to the given Java float value. The driver converts this to an SQL FLOAT value when it sends it to the database.
Parameters:
  parameterName - the name of the parameter
Parameters:
  x - the parameter value
exception:
  SQLException - if a database access error occurs orthis method is called on a closed CallableStatement
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
See Also:   BaseRowSet.getFloat
since:
   1.4



setInt
public void setInt(int parameterIndex, int x) throws SQLException(Code)
Sets the designated parameter to an int in the Java programming language. The driver converts this to an SQL INTEGER value when it sends it to the database.

The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called. Methods such as execute and populate must be provided in any class that extends this class and implements one or more of the standard JSR-114 RowSet interfaces.

NOTE: JdbcRowSet does not require the populate method as it is undefined in this class.
Parameters:
  parameterIndex - the ordinal number of the placeholder parameter in this RowSet object's command that is to be set. The first parameter is 1, the second is 2, and so on; must be1 or greater
Parameters:
  x - the parameter value
throws:
  SQLException - if an error occurs or the parameter index is out of bounds
See Also:   BaseRowSet.getParams




setInt
public void setInt(String parameterName, int x) throws SQLException(Code)
Sets the designated parameter to the given Java int value. The driver converts this to an SQL INTEGER value when it sends it to the database.
Parameters:
  parameterName - the name of the parameter
Parameters:
  x - the parameter value
exception:
  SQLException - if a database access error occurs orthis method is called on a closed CallableStatement
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
See Also:   BaseRowSet.getInt
since:
   1.4



setLong
public void setLong(int parameterIndex, long x) throws SQLException(Code)
Sets the designated parameter to the given long in the Java programming language. The driver converts this to an SQL BIGINT value when it sends it to the database.

The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called. Methods such as execute and populate must be provided in any class that extends this class and implements one or more of the standard JSR-114 RowSet interfaces.

NOTE: JdbcRowSet does not require the populate method as it is undefined in this class.
Parameters:
  parameterIndex - the ordinal number of the placeholder parameter in this RowSet object's command that is to be set. The first parameter is 1, the second is 2, and so on; must be1 or greater
Parameters:
  x - the parameter value
throws:
  SQLException - if an error occurs or the parameter index is out of bounds
See Also:   BaseRowSet.getParams




setLong
public void setLong(String parameterName, long x) throws SQLException(Code)
Sets the designated parameter to the given Java long value. The driver converts this to an SQL BIGINT value when it sends it to the database.
Parameters:
  parameterName - the name of the parameter
Parameters:
  x - the parameter value
exception:
  SQLException - if a database access error occurs orthis method is called on a closed CallableStatement
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
See Also:   BaseRowSet.getLong
since:
   1.4



setMaxFieldSize
public void setMaxFieldSize(int max) throws SQLException(Code)
Sets the maximum number of bytes that can be used for a column value in this RowSet object to the given number. This limit applies only to columns that hold values of the following types: BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR. If the limit is exceeded, the excess data is silently discarded. For maximum portability, it is advisable to use values greater than 256.
Parameters:
  max - an int indicating the new maximum column size limit; zero means that there is no limit
throws:
  SQLException - if (1) an error occurs internally setting themaximum limit of the column size or (2) a size of less than 0 is set



setMaxRows
public void setMaxRows(int max) throws SQLException(Code)
Sets the maximum number of rows that this RowSet object may contain to the given number. If this limit is exceeded, the excess rows are silently dropped.
Parameters:
  max - an int indicating the current maximum number of rows; zero means that there is no limit
throws:
  SQLException - if an error occurs internally setting themaximum limit on the number of rows that a JDBC RowSet objectcan contain; or if max is less than 0; or if max is less than the fetchSize of the RowSet



setNCharacterStream
public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException(Code)
Sets the designated parameter in this RowSet object's command to a Reader object. The Reader reads the data till end-of-file is reached. The driver does the necessary conversion from Java character format to the national character set in the database.

Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.

Note: Consult your JDBC driver documentation to determine if it might be more efficient to use a version of setNCharacterStream which takes a length parameter.
Parameters:
  parameterIndex - of the first parameter is 1, the second is 2, ...
Parameters:
  value - the parameter value
throws:
  SQLException - if the driver does not support nationalcharacter sets; if the driver can detect that a data conversionerror could occur ; if a database access error occurs; orthis method is called on a closed PreparedStatement
throws:
  SQLFeatureNotSupportedException - if the JDBC driver does not support this method
since:
   1.6




setNCharacterStream
public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException(Code)
Sets the designated parameter to a Reader object. The Reader reads the data till end-of-file is reached. The driver does the necessary conversion from Java character format to the national character set in the database.
Parameters:
  parameterIndex - of the first parameter is 1, the second is 2, ...
Parameters:
  value - the parameter value
Parameters:
  length - the number of characters in the parameter data.
throws:
  SQLException - if the driver does not support nationalcharacter sets; if the driver can detect that a data conversionerror could occur ; or if a database access error occurs
since:
   1.6



setNCharacterStream
public void setNCharacterStream(String parameterName, Reader value, long length) throws SQLException(Code)
Sets the designated parameter to a Reader object. The Reader reads the data till end-of-file is reached. The driver does the necessary conversion from Java character format to the national character set in the database.
Parameters:
  parameterName - the name of the column to be set
Parameters:
  value - the parameter value
Parameters:
  length - the number of characters in the parameter data.
throws:
  SQLException - if the driver does not support nationalcharacter sets; if the driver can detect that a data conversionerror could occur; or if a database access error occurs
since:
   1.6



setNCharacterStream
public void setNCharacterStream(String parameterName, Reader value) throws SQLException(Code)
Sets the designated parameter to a Reader object. The Reader reads the data till end-of-file is reached. The driver does the necessary conversion from Java character format to the national character set in the database.

Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.

Note: Consult your JDBC driver documentation to determine if it might be more efficient to use a version of setNCharacterStream which takes a length parameter.
Parameters:
  parameterName - the name of the parameter
Parameters:
  value - the parameter value
throws:
  SQLException - if the driver does not support nationalcharacter sets; if the driver can detect that a data conversionerror could occur ; if a database access error occurs; orthis method is called on a closed CallableStatement
throws:
  SQLFeatureNotSupportedException - if the JDBC driver does not support this method
since:
   1.6




setNClob
public void setNClob(String parameterName, NClob value) throws SQLException(Code)
Sets the designated parameter to a java.sql.NClob object. The object implements the java.sql.NClob interface. This NClob object maps to a SQL NCLOB.
Parameters:
  parameterName - the name of the column to be set
Parameters:
  value - the parameter value
throws:
  SQLException - if the driver does not support nationalcharacter sets; if the driver can detect that a data conversionerror could occur; or if a database access error occurs
since:
   1.6



setNClob
public void setNClob(String parameterName, Reader reader, long length) throws SQLException(Code)
Sets the designated parameter to a Reader object. The reader must contain * the number of characters specified by length otherwise a SQLException will be generated when the CallableStatement is executed. This method differs from the setCharacterStream (int, Reader, int) method because it informs the driver that the parameter value should be sent to the server as a NCLOB. When the setCharacterStream method is used, the driver may have to do extra work to determine whether the parameter data should be send to the server as a LONGNVARCHAR or a NCLOB
Parameters:
  parameterName - the name of the parameter to be set
Parameters:
  reader - An object that contains the data to set the parameter value to.
Parameters:
  length - the number of characters in the parameter data.
throws:
  SQLException - if parameterIndex does not correspond to a parametermarker in the SQL statement; if the length specified is less than zero;if the driver does not support nationalcharacter sets; if the driver can detect that a data conversionerror could occur; if a database access error occurs orthis method is called on a closed CallableStatement
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.6



setNClob
public void setNClob(String parameterName, Reader reader) throws SQLException(Code)
Sets the designated parameter to a Reader object. This method differs from the setCharacterStream (int, Reader) method because it informs the driver that the parameter value should be sent to the server as a NCLOB. When the setCharacterStream method is used, the driver may have to do extra work to determine whether the parameter data should be send to the server as a LONGNVARCHAR or a NCLOB

Note: Consult your JDBC driver documentation to determine if it might be more efficient to use a version of setNClob which takes a length parameter.
Parameters:
  parameterName - the name of the parameter
Parameters:
  reader - An object that contains the data to set the parameter value to.
throws:
  SQLException - if the driver does not support national character sets;if the driver can detect that a data conversionerror could occur; if a database access error occurs orthis method is called on a closed CallableStatement
throws:
  SQLFeatureNotSupportedException - if the JDBC driver does not support this method
since:
   1.6




setNClob
public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException(Code)
Sets the designated parameter to a Reader object. The reader must contain the number of characters specified by length otherwise a SQLException will be generated when the PreparedStatement is executed. This method differs from the setCharacterStream (int, Reader, int) method because it informs the driver that the parameter value should be sent to the server as a NCLOB. When the setCharacterStream method is used, the driver may have to do extra work to determine whether the parameter data should be sent to the server as a LONGNVARCHAR or a NCLOB
Parameters:
  parameterIndex - index of the first parameter is 1, the second is 2, ...
Parameters:
  reader - An object that contains the data to set the parameter value to.
Parameters:
  length - the number of characters in the parameter data.
throws:
  SQLException - if parameterIndex does not correspond to a parametermarker in the SQL statement; if the length specified is less than zero;if the driver does not support national character sets;if the driver can detect that a data conversionerror could occur; if a database access error occurs orthis method is called on a closed PreparedStatement
throws:
  SQLFeatureNotSupportedException - if the JDBC driver does not support this method
since:
   1.6



setNClob
public void setNClob(int parameterIndex, NClob value) throws SQLException(Code)
Sets the designated parameter to a java.sql.NClob object. The driver converts this oa SQL NCLOB value when it sends it to the database.
Parameters:
  parameterIndex - of the first parameter is 1, the second is 2, ...
Parameters:
  value - the parameter value
throws:
  SQLException - if the driver does not support nationalcharacter sets; if the driver can detect that a data conversionerror could occur ; or if a database access error occurs
since:
   1.6



setNClob
public void setNClob(int parameterIndex, Reader reader) throws SQLException(Code)
Sets the designated parameter to a Reader object. This method differs from the setCharacterStream (int, Reader) method because it informs the driver that the parameter value should be sent to the server as a NCLOB. When the setCharacterStream method is used, the driver may have to do extra work to determine whether the parameter data should be sent to the server as a LONGNVARCHAR or a NCLOB

Note: Consult your JDBC driver documentation to determine if it might be more efficient to use a version of setNClob which takes a length parameter.
Parameters:
  parameterIndex - index of the first parameter is 1, the second is 2, ...
Parameters:
  reader - An object that contains the data to set the parameter value to.
throws:
  SQLException - if parameterIndex does not correspond to a parametermarker in the SQL statement;if the driver does not support national character sets;if the driver can detect that a data conversionerror could occur; if a database access error occurs orthis method is called on a closed PreparedStatement
throws:
  SQLFeatureNotSupportedException - if the JDBC driver does not support this method
since:
   1.6




setNString
public void setNString(int parameterIndex, String value) throws SQLException(Code)
Sets the designated paramter to the given String object. The driver converts this to a SQL NCHAR or NVARCHAR or LONGNVARCHAR value (depending on the argument's size relative to the driver's limits on NVARCHAR values) when it sends it to the database.
Parameters:
  parameterIndex - of the first parameter is 1, the second is 2, ...
Parameters:
  value - the parameter value
throws:
  SQLException - if the driver does not support nationalcharacter sets; if the driver can detect that a data conversionerror could occur ; or if a database access error occurs
since:
   1.6



setNString
public void setNString(String parameterName, String value) throws SQLException(Code)
Sets the designated paramter to the given String object. The driver converts this to a SQL NCHAR or NVARCHAR or LONGNVARCHAR
Parameters:
  parameterName - the name of the column to be set
Parameters:
  value - the parameter value
throws:
  SQLException - if the driver does not support nationalcharacter sets; if the driver can detect that a data conversionerror could occur; or if a database access error occurs
since:
   1.6



setNull
public void setNull(int parameterIndex, int sqlType) throws SQLException(Code)
Sets the designated parameter to SQL NULL. Note that the parameter's SQL type must be specified using one of the type codes defined in java.sql.Types. This SQL type is specified in the second parameter.

Note that the second parameter tells the DBMS the data type of the value being set to NULL. Some DBMSs require this information, so it is required in order to make code more portable.

The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called. Methods such as execute and populate must be provided in any class that extends this class and implements one or more of the standard JSR-114 RowSet interfaces.

NOTE: JdbcRowSet does not require the populate method as it is undefined in this class.

Calls made to the method getParams after this version of setNull has been called will return an Object array containing the parameter values that have been set. In that array, the element that represents the values set with this method will itself be an array. The first element of that array is null. The second element is the value set for sqlType. The parameter number is indicated by an element's position in the array returned by the method getParams, with the first element being the value for the first placeholder parameter, the second element being the value for the second placeholder parameter, and so on. In other words, if the second placeholder parameter is being set to null, the array containing it will be the second element in the array returned by getParams.

Note that because the numbering of elements in an array starts at zero, the array element that corresponds to placeholder parameter number parameterIndex is parameterIndex -1.
Parameters:
  parameterIndex - the ordinal number of the placeholder parameter in this RowSet object's command that is to be set. The first parameter is 1, the second is 2, and so on; must be1 or greater
Parameters:
  sqlType - an int that is one of the SQL type codesdefined in the class java.sql.Types. If a non-standard sqlType is supplied, this method will not throw a SQLException. This allows implicit support for non-standard SQL types.
throws:
  SQLException - if a database access error occurs or the givenparameter index is out of bounds
See Also:   BaseRowSet.getParams




setNull
public void setNull(int parameterIndex, int sqlType, String typeName) throws SQLException(Code)
Sets the designated parameter to SQL NULL. Although this version of the method setNull is intended for user-defined and REF parameters, this method may be used to set a null parameter for any JDBC type. The following are user-defined types: STRUCT, DISTINCT, and JAVA_OBJECT, and named array types.

Note: To be portable, applications must give the SQL type code and the fully qualified SQL type name when specifying a NULL user-defined or REF parameter. In the case of a user-defined type, the name is the type name of the parameter itself. For a REF parameter, the name is the type name of the referenced type. If a JDBC technology-enabled driver does not need the type code or type name information, it may ignore it.

If the parameter does not have a user-defined or REF type, the given typeName parameter is ignored.

The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called. Methods such as execute and populate must be provided in any class that extends this class and implements one or more of the standard JSR-114 RowSet interfaces.

NOTE: JdbcRowSet does not require the populate method as it is undefined in this class.

Calls made to the method getParams after this version of setNull has been called will return an Object array containing the parameter values that have been set. In that array, the element that represents the values set with this method will itself be an array. The first element of that array is null. The second element is the value set for sqlType, and the third element is the value set for typeName. The parameter number is indicated by an element's position in the array returned by the method getParams, with the first element being the value for the first placeholder parameter, the second element being the value for the second placeholder parameter, and so on. In other words, if the second placeholder parameter is being set to null, the array containing it will be the second element in the array returned by getParams.

Note that because the numbering of elements in an array starts at zero, the array element that corresponds to placeholder parameter number parameterIndex is parameterIndex -1.
Parameters:
  parameterIndex - the ordinal number of the placeholder parameter in this RowSet object's command that is to be set. The first parameter is 1, the second is 2, and so on; must be1 or greater
Parameters:
  sqlType - a value from java.sql.Types
Parameters:
  typeName - the fully qualified name of an SQL user-defined type,which is ignored if the parameter is not a user-definedtype or REF value
throws:
  SQLException - if an error occurs or the given parameter indexis out of bounds
See Also:   BaseRowSet.getParams




setNull
public void setNull(String parameterName, int sqlType) throws SQLException(Code)
Sets the designated parameter to SQL NULL.

Note: You must specify the parameter's SQL type.
Parameters:
  parameterName - the name of the parameter
Parameters:
  sqlType - the SQL type code defined in java.sql.Types
exception:
  SQLException - if a database access error occurs orthis method is called on a closed CallableStatement
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.4




setNull
public void setNull(String parameterName, int sqlType, String typeName) throws SQLException(Code)
Sets the designated parameter to SQL NULL. This version of the method setNull should be used for user-defined types and REF type parameters. Examples of user-defined types include: STRUCT, DISTINCT, JAVA_OBJECT, and named array types.

Note: To be portable, applications must give the SQL type code and the fully-qualified SQL type name when specifying a NULL user-defined or REF parameter. In the case of a user-defined type the name is the type name of the parameter itself. For a REF parameter, the name is the type name of the referenced type. If a JDBC driver does not need the type code or type name information, it may ignore it. Although it is intended for user-defined and Ref parameters, this method may be used to set a null parameter of any JDBC type. If the parameter does not have a user-defined or REF type, the given typeName is ignored.
Parameters:
  parameterName - the name of the parameter
Parameters:
  sqlType - a value from java.sql.Types
Parameters:
  typeName - the fully-qualified name of an SQL user-defined type;ignored if the parameter is not a user-defined type orSQL REF value
exception:
  SQLException - if a database access error occurs orthis method is called on a closed CallableStatement
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.4




setObject
public void setObject(int parameterIndex, Object x, int targetSqlType, int scale) throws SQLException(Code)
Sets the designated parameter to an Object in the Java programming language. The second parameter must be an Object type. For integral values, the java.lang equivalent objects should be used. For example, use the class Integer for an int.

The driver converts this object to the specified target SQL type before sending it to the database. If the object has a custom mapping (is of a class implementing SQLData), the driver should call the method SQLData.writeSQL to write the object to the SQL data stream. If, on the other hand, the object is of a class implementing Ref, Blob, Clob, Struct, or Array, the driver should pass it to the database as a value of the corresponding SQL type.

Note that this method may be used to pass database- specific abstract data types.

The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSetexecute is called. Methods such as execute and populate must be provided in any class that extends this class and implements one or more of the standard JSR-114 RowSet interfaces.

NOTE: JdbcRowSet does not require the populate method as it is undefined in this class.

Calls made to the method getParams after this version of setObject has been called will return an array containing the parameter values that have been set. In that array, the element that represents the values set with this method will itself be an array. The first element of that array is the given Object instance, and the second element is the value set for targetSqlType. The third element is the value set for scale, which the driver will ignore if the type of the object being set is not java.sql.Types.NUMERIC or java.sql.Types.DECIMAL. The parameter number is indicated by an element's position in the array returned by the method getParams, with the first element being the value for the first placeholder parameter, the second element being the value for the second placeholder parameter, and so on. In other words, if the object being set is the value for the second placeholder parameter, the array containing it will be the second element in the array returned by getParams.

Note that because the numbering of elements in an array starts at zero, the array element that corresponds to placeholder parameter number parameterIndex is element number parameterIndex -1.
Parameters:
  parameterIndex - the ordinal number of the placeholder parameter in this RowSet object's command that is to be set. The first parameter is 1, the second is 2, and so on; must be1 or greater
Parameters:
  x - the Object containing the input parameter value;must be an Object type
Parameters:
  targetSqlType - the SQL type (as defined in java.sql.Types)to be sent to the database. The scale argument may further qualify this type. If a non-standard targetSqlTypeis supplied, this method will not throw a SQLException.This allows implicit support for non-standard SQL types.
Parameters:
  scale - for the types java.sql.Types.DECIMAL and java.sql.Types.NUMERIC, this is the numberof digits after the decimal point. For all other types, this value will be ignored.
throws:
  SQLException - if an error occurs or the parameter index is out of bounds
See Also:   BaseRowSet.getParams




setObject
public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException(Code)
Sets the value of the designated parameter with the given Object value. This method is like setObject(int parameterIndex, Object x, int targetSqlType, int scale) except that it assumes a scale of zero.

The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called. Methods such as execute and populate must be provided in any class that extends this class and implements one or more of the standard JSR-114 RowSet interfaces.

NOTE: JdbcRowSet does not require the populate method as it is undefined in this class.

Calls made to the method getParams after this version of setObject has been called will return an array containing the parameter values that have been set. In that array, the element that represents the values set with this method will itself be an array. The first element of that array is the given Object instance. The second element is the value set for targetSqlType. The parameter number is indicated by an element's position in the array returned by the method getParams, with the first element being the value for the first placeholder parameter, the second element being the value for the second placeholder parameter, and so on. In other words, if the object being set is the value for the second placeholder parameter, the array containing it will be the second element in the array returned by getParams.

Note that because the numbering of elements in an array starts at zero, the array element that corresponds to placeholder parameter number parameterIndex is element number parameterIndex -1.
Parameters:
  parameterIndex - the ordinal number of the placeholder parameter in this RowSet object's command that is to be set. The first parameter is 1, the second is 2, and so on; must be1 or greater
Parameters:
  x - the Object containing the input parameter value;must be an Object type
Parameters:
  targetSqlType - the SQL type (as defined in java.sql.Types)to be sent to the database. If a non-standard targetSqlTypeis supplied, this method will not throw a SQLException.This allows implicit support for non-standard SQL types.
throws:
  SQLException - if an error occurs or the parameter index is out of bounds
See Also:   BaseRowSet.getParams




setObject
public void setObject(int parameterIndex, Object x) throws SQLException(Code)
Sets the designated parameter to an Object in the Java programming language. The second parameter must be an Object type. For integral values, the java.lang equivalent objects should be used. For example, use the class Integer for an int.

The JDBC specification defines a standard mapping from Java Object types to SQL types. The driver will use this standard mapping to convert the given object to its corresponding SQL type before sending it to the database. If the object has a custom mapping (is of a class implementing SQLData), the driver should call the method SQLData.writeSQL to write the object to the SQL data stream.

If, on the other hand, the object is of a class implementing Ref, Blob, Clob, Struct, or Array, the driver should pass it to the database as a value of the corresponding SQL type.

This method throws an exception if there is an ambiguity, for example, if the object is of a class implementing more than one interface.

Note that this method may be used to pass database-specific abstract data types.

The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called. Methods such as execute and populate must be provided in any class that extends this class and implements one or more of the standard JSR-114 RowSet interfaces.

NOTE: JdbcRowSet does not require the populate method as it is undefined in this class.

After this method has been called, a call to the method getParams will return an object array of the current command parameters, which will include the Object set for placeholder parameter number parameterIndex. Note that because the numbering of elements in an array starts at zero, the array element that corresponds to placeholder parameter number parameterIndex is element number parameterIndex -1.
Parameters:
  parameterIndex - the ordinal number of the placeholder parameter in this RowSet object's command that is to be set. The first parameter is 1, the second is 2, and so on; must be1 or greater
Parameters:
  x - the object containing the input parameter value
throws:
  SQLException - if an error occurs the parameter index is out of bounds, or thereis ambiguity in the implementation of theobject being set
See Also:   BaseRowSet.getParams




setObject
public void setObject(String parameterName, Object x, int targetSqlType, int scale) throws SQLException(Code)
Sets the value of the designated parameter with the given object. The second argument must be an object type; for integral values, the java.lang equivalent objects should be used.

The given Java object will be converted to the given targetSqlType before being sent to the database. If the object has a custom mapping (is of a class implementing the interface SQLData), the JDBC driver should call the method SQLData.writeSQL to write it to the SQL data stream. If, on the other hand, the object is of a class implementing Ref, Blob, Clob, NClob, Struct, java.net.URL, or Array, the driver should pass it to the database as a value of the corresponding SQL type.

Note that this method may be used to pass datatabase- specific abstract data types.
Parameters:
  parameterName - the name of the parameter
Parameters:
  x - the object containing the input parameter value
Parameters:
  targetSqlType - the SQL type (as defined in java.sql.Types) to besent to the database. The scale argument may further qualify this type.
Parameters:
  scale - for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types,this is the number of digits after the decimal point. For all othertypes, this value will be ignored.
exception:
  SQLException - if a database access error occurs orthis method is called on a closed CallableStatement
exception:
  SQLFeatureNotSupportedException - if targetSqlType isa ARRAY, BLOB, CLOB,DATALINK, JAVA_OBJECT, NCHAR,NCLOB, NVARCHAR, LONGNVARCHAR,REF, ROWID, SQLXMLor STRUCT data type and the JDBC driver does not supportthis data type
See Also:   Types
See Also:   BaseRowSet.getObject
since:
   1.4




setObject
public void setObject(String parameterName, Object x, int targetSqlType) throws SQLException(Code)
Sets the value of the designated parameter with the given object. This method is like the method setObject above, except that it assumes a scale of zero.
Parameters:
  parameterName - the name of the parameter
Parameters:
  x - the object containing the input parameter value
Parameters:
  targetSqlType - the SQL type (as defined in java.sql.Types) to besent to the database
exception:
  SQLException - if a database access error occurs orthis method is called on a closed CallableStatement
exception:
  SQLFeatureNotSupportedException - if targetSqlType isa ARRAY, BLOB, CLOB,DATALINK, JAVA_OBJECT, NCHAR,NCLOB, NVARCHAR, LONGNVARCHAR,REF, ROWID, SQLXMLor STRUCT data type and the JDBC driver does not supportthis data type
See Also:   BaseRowSet.getObject
since:
   1.4



setObject
public void setObject(String parameterName, Object x) throws SQLException(Code)
Sets the value of the designated parameter with the given object. The second parameter must be of type Object; therefore, the java.lang equivalent objects should be used for built-in types.

The JDBC specification specifies a standard mapping from Java Object types to SQL types. The given argument will be converted to the corresponding SQL type before being sent to the database.

Note that this method may be used to pass datatabase- specific abstract data types, by using a driver-specific Java type. If the object is of a class implementing the interface SQLData, the JDBC driver should call the method SQLData.writeSQL to write it to the SQL data stream. If, on the other hand, the object is of a class implementing Ref, Blob, Clob, NClob, Struct, java.net.URL, or Array, the driver should pass it to the database as a value of the corresponding SQL type.

This method throws an exception if there is an ambiguity, for example, if the object is of a class implementing more than one of the interfaces named above.
Parameters:
  parameterName - the name of the parameter
Parameters:
  x - the object containing the input parameter value
exception:
  SQLException - if a database access error occurs,this method is called on a closed CallableStatement or if the givenObject parameter is ambiguous
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
See Also:   BaseRowSet.getObject
since:
   1.4




setPassword
public void setPassword(String pass)(Code)
Sets the password used to create a database connection for this RowSet object to the given String object. Because the password property is not serialized, it is set at run time before calling the method execute.
Parameters:
  pass - the String object that represents the passwordthat is supplied to the database to create a connection. It may benull.
See Also:   BaseRowSet.getPassword



setQueryTimeout
public void setQueryTimeout(int seconds) throws SQLException(Code)
Sets to the given number the maximum number of seconds the driver will wait for a query to execute. If the limit is exceeded, an SQLException is thrown.
Parameters:
  seconds - the new query time-out limit in seconds; zero means thatthere is no limit; must not be less than zero
throws:
  SQLException - if an error occurs setting the query time-out or if the query time-out value is less than 0



setReadOnly
public void setReadOnly(boolean value)(Code)
Sets this RowSet object's readOnly property to the given boolean.
Parameters:
  value - true to indicate that this RowSet object is read-only; false to indicate that it is updatable



setRef
public void setRef(int parameterIndex, Ref ref) throws SQLException(Code)
Sets the designated parameter to the given Ref object in the Java programming language. The driver converts this to an SQL REF value when it sends it to the database. Internally, the Ref is represented as a SerialRef to ensure serializability.

The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called. Methods such as execute and populate must be provided in any class that extends this class and implements one or more of the standard JSR-114 RowSet interfaces.

NOTE: JdbcRowSet does not require the populate method as it is undefined in this class.

After this method has been called, a call to the method getParams will return an object array of the current command parameters, which will include the Ref object set for placeholder parameter number parameterIndex. Note that because the numbering of elements in an array starts at zero, the array element that corresponds to placeholder parameter number parameterIndex is element number parameterIndex -1.
Parameters:
  parameterIndex - the ordinal number of the placeholder parameter in this RowSet object's command that is to be set. The first parameter is 1, the second is 2, and so on; must be1 or greater
Parameters:
  ref - a Ref object representing an SQL REF value; cannot be null
throws:
  SQLException - if an error occurs; the parameter index is out ofbounds or the Ref object is null; orthe Ref object returns a null base typename.
See Also:   BaseRowSet.getParams
See Also:   javax.sql.rowset.serial.SerialRef




setRowId
public void setRowId(int parameterIndex, RowId x) throws SQLException(Code)
Sets the designated parameter to the given java.sql.RowId object. The driver converts this to a SQL ROWID value when it sends it to the database
Parameters:
  parameterIndex - the first parameter is 1, the second is 2, ...
Parameters:
  x - the parameter value
throws:
  SQLException - if a database access error occurs
since:
   1.6



setRowId
public void setRowId(String parameterName, RowId x) throws SQLException(Code)
Sets the designated parameter to the given java.sql.RowId object. The driver converts this to a SQL ROWID when it sends it to the database.
Parameters:
  parameterName - the name of the parameter
Parameters:
  x - the parameter value
throws:
  SQLException - if a database access error occurs
since:
   1.6



setSQLXML
public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException(Code)
Sets the designated parameter to the given java.sql.SQLXML object. The driver converts this to an SQL XML value when it sends it to the database.
Parameters:
  parameterIndex - index of the first parameter is 1, the second is 2, ...
Parameters:
  xmlObject - a SQLXML object that maps an SQL XML value
throws:
  SQLException - if a database access error occurs, this methodis called on a closed result set,the java.xml.transform.Result,Writer or OutputStream has not been closedfor the SQLXML object orif there is an error processing the XML value. The getCause methodof the exception may provide a more detailed exception, for example, if thestream does not contain valid XML.
since:
   1.6



setSQLXML
public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException(Code)
Sets the designated parameter to the given java.sql.SQLXML object. The driver converts this to an SQL XML value when it sends it to the database.
Parameters:
  parameterName - the name of the parameter
Parameters:
  xmlObject - a SQLXML object that maps an SQL XML value
throws:
  SQLException - if a database access error occurs, this methodis called on a closed result set,the java.xml.transform.Result,Writer or OutputStream has not been closedfor the SQLXML object orif there is an error processing the XML value. The getCause methodof the exception may provide a more detailed exception, for example, if thestream does not contain valid XML.
since:
   1.6



setShort
public void setShort(int parameterIndex, short x) throws SQLException(Code)
Sets the designated parameter to the given short in the Java programming language. The driver converts this to an SQL SMALLINT value when it sends it to the database.

The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called. Methods such as execute and populate must be provided in any class that extends this class and implements one or more of the standard JSR-114 RowSet interfaces.

NOTE: JdbcRowSet does not require the populate method as it is undefined in this class.


Parameters:
  parameterIndex - the ordinal number of the placeholder parameter in this RowSet object's command that is to be set. The first parameter is 1, the second is 2, and so on; must be1 or greater
Parameters:
  x - the parameter value
throws:
  SQLException - if an error occurs or the parameter index is out of bounds
See Also:   BaseRowSet.getParams




setShort
public void setShort(String parameterName, short x) throws SQLException(Code)
Sets the designated parameter to the given Java short value. The driver converts this to an SQL SMALLINT value when it sends it to the database.
Parameters:
  parameterName - the name of the parameter
Parameters:
  x - the parameter value
exception:
  SQLException - if a database access error occurs orthis method is called on a closed CallableStatement
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
See Also:   BaseRowSet.getShort
since:
   1.4



setShowDeleted
public void setShowDeleted(boolean value) throws SQLException(Code)
Sets the property showDeleted to the given boolean value, which determines whether rows marked for deletion appear in the set of current rows.
Parameters:
  value - true if deleted rows should be shown;false otherwise
throws:
  SQLException - if an error occurs setting whether deleted rows are visible or not
See Also:   BaseRowSet.getShowDeleted



setString
public void setString(int parameterIndex, String x) throws SQLException(Code)
Sets the designated parameter to the given String value. The driver converts this to an SQL VARCHAR or LONGVARCHAR value (depending on the argument's size relative to the driver's limits on VARCHAR values) when it sends it to the database.

The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called. Methods such as execute and populate must be provided in any class that extends this class and implements one or more of the standard JSR-114 RowSet interfaces.

NOTE: JdbcRowSet does not require the populate method as it is undefined in this class.


Parameters:
  parameterIndex - the ordinal number of the placeholder parameter in this RowSet object's command that is to be set. The first parameter is 1, the second is 2, and so on; must be1 or greater
Parameters:
  x - the parameter value
throws:
  SQLException - if an error occurs or the parameter index is out of bounds
See Also:   BaseRowSet.getParams




setString
public void setString(String parameterName, String x) throws SQLException(Code)
Sets the designated parameter to the given Java String value. The driver converts this to an SQL VARCHAR or LONGVARCHAR value (depending on the argument's size relative to the driver's limits on VARCHAR values) when it sends it to the database.
Parameters:
  parameterName - the name of the parameter
Parameters:
  x - the parameter value
exception:
  SQLException - if a database access error occurs orthis method is called on a closed CallableStatement
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
See Also:   BaseRowSet.getString
since:
   1.4



setTime
public void setTime(int parameterIndex, java.sql.Time x) throws SQLException(Code)
Sets the designated parameter to the given java.sql.Time value. The driver converts this to an SQL TIME value when it sends it to the database.

The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called. Methods such as execute and populate must be provided in any class that extends this class and implements one or more of the standard JSR-114 RowSet interfaces.

NOTE: JdbcRowSet does not require the populate method as it is undefined in this class.

Calls made to the method getParams after this version of the method setTime has been called will return an array of the parameters that have been set. The parameter to be set for parameter placeholder number parameterIndex will be the Time object that was set as the second parameter to this method.

Note that because the numbering of elements in an array starts at zero, the array element that corresponds to placeholder parameter number parameterIndex is parameterIndex -1.
Parameters:
  parameterIndex - the ordinal number of the placeholder parameter in this RowSet object's command that is to be set. The first parameter is 1, the second is 2, and so on; must be1 or greater
Parameters:
  x - a java.sql.Time object, which is to be set as the valuefor placeholder parameter parameterIndex
throws:
  SQLException - if an error occurs or the parameter index is out of bounds
See Also:   BaseRowSet.getParams




setTime
public void setTime(int parameterIndex, java.sql.Time x, Calendar cal) throws SQLException(Code)
Sets the designated parameter to the given java.sql.Time object. The driver converts this to an SQL TIME value when it sends it to the database.

When the DBMS does not store time zone information, the driver will use the given Calendar object to construct the SQL TIME value to send to the database. With a Calendar object, the driver can calculate the date taking into account a custom time zone. If no Calendar object is specified, the driver uses the time zone of the Virtual Machine that is running the application.

The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called. Methods such as execute and populate must be provided in any class that extends this class and implements one or more of the standard JSR-114 RowSet interfaces.

NOTE: JdbcRowSet does not require the populate method as it is undefined in this class.

Calls made to the method getParams after this version of setTime has been called will return an array containing the parameter values that have been set. In that array, the element that represents the values set with this method will itself be an array. The first element of that array is the given java.sql.Time object. The second element is the value set for cal. The parameter number is indicated by an element's position in the array returned by the method getParams, with the first element being the value for the first placeholder parameter, the second element being the value for the second placeholder parameter, and so on. In other words, if the time being set is the value for the second placeholder parameter, the array containing it will be the second element in the array returned by getParams.

Note that because the numbering of elements in an array starts at zero, the array element that corresponds to placeholder parameter number parameterIndex is parameterIndex -1.
Parameters:
  parameterIndex - the ordinal number of the placeholder parameter in this RowSet object's command that is to be set. The first parameter is 1, the second is 2, and so on; must be1 or greater
Parameters:
  x - a java.sql.Time object
Parameters:
  cal - the java.util.Calendar object the driver can use toconstruct the time
throws:
  SQLException - if an error occurs or the parameter index is out of bounds
See Also:   BaseRowSet.getParams




setTime
public void setTime(String parameterName, java.sql.Time x) throws SQLException(Code)
Sets the designated parameter to the given java.sql.Time value. The driver converts this to an SQL TIME value when it sends it to the database.
Parameters:
  parameterName - the name of the parameter
Parameters:
  x - the parameter value
exception:
  SQLException - if a database access error occurs orthis method is called on a closed CallableStatement
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
See Also:   BaseRowSet.getTime
since:
   1.4



setTime
public void setTime(String parameterName, java.sql.Time x, Calendar cal) throws SQLException(Code)
Sets the designated parameter to the given java.sql.Time value, using the given Calendar object. The driver uses the Calendar object to construct an SQL TIME value, which the driver then sends to the database. With a a Calendar object, the driver can calculate the time taking into account a custom timezone. If no Calendar object is specified, the driver uses the default timezone, which is that of the virtual machine running the application.
Parameters:
  parameterName - the name of the parameter
Parameters:
  x - the parameter value
Parameters:
  cal - the Calendar object the driver will useto construct the time
exception:
  SQLException - if a database access error occurs orthis method is called on a closed CallableStatement
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
See Also:   BaseRowSet.getTime
since:
   1.4



setTimestamp
public void setTimestamp(int parameterIndex, java.sql.Timestamp x) throws SQLException(Code)
Sets the designated parameter to the given java.sql.Timestamp value. The driver converts this to an SQL TIMESTAMP value when it sends it to the database.

The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called. Methods such as execute and populate must be provided in any class that extends this class and implements one or more of the standard JSR-114 RowSet interfaces.

NOTE: JdbcRowSet does not require the populate method as it is undefined in this class.

Calls made to the method getParams after this version of setTimestamp has been called will return an array with the value for parameter placeholder number parameterIndex being the Timestamp object that was supplied as the second parameter to this method. Note that because the numbering of elements in an array starts at zero, the array element that corresponds to placeholder parameter number parameterIndex is parameterIndex -1.
Parameters:
  parameterIndex - the ordinal number of the placeholder parameter in this RowSet object's command that is to be set. The first parameter is 1, the second is 2, and so on; must be1 or greater
Parameters:
  x - a java.sql.Timestamp object
throws:
  SQLException - if an error occurs or the parameter index is out of bounds
See Also:   BaseRowSet.getParams




setTimestamp
public void setTimestamp(int parameterIndex, java.sql.Timestamp x, Calendar cal) throws SQLException(Code)
Sets the designated parameter to the given java.sql.Timestamp object. The driver converts this to an SQL TIMESTAMP value when it sends it to the database.

When the DBMS does not store time zone information, the driver will use the given Calendar object to construct the SQL TIMESTAMP value to send to the database. With a Calendar object, the driver can calculate the timestamp taking into account a custom time zone. If no Calendar object is specified, the driver uses the time zone of the Virtual Machine that is running the application.

The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called. Methods such as execute and populate must be provided in any class that extends this class and implements one or more of the standard JSR-114 RowSet interfaces.

NOTE: JdbcRowSet does not require the populate method as it is undefined in this class.

Calls made to the method getParams after this version of setTimestamp has been called will return an array containing the parameter values that have been set. In that array, the element that represents the values set with this method will itself be an array. The first element of that array is the given java.sql.Timestamp object. The second element is the value set for cal. The parameter number is indicated by an element's position in the array returned by the method getParams, with the first element being the value for the first placeholder parameter, the second element being the value for the second placeholder parameter, and so on. In other words, if the timestamp being set is the value for the second placeholder parameter, the array containing it will be the second element in the array returned by getParams.

Note that because the numbering of elements in an array starts at zero, the array element that corresponds to placeholder parameter number parameterIndex is parameterIndex -1.
Parameters:
  parameterIndex - the ordinal number of the placeholder parameter in this RowSet object's command that is to be set. The first parameter is 1, the second is 2, and so on; must be1 or greater
Parameters:
  x - a java.sql.Timestamp object
Parameters:
  cal - the java.util.Calendar object the driver can use toconstruct the timestamp
throws:
  SQLException - if an error occurs or the parameter index is out of bounds
See Also:   BaseRowSet.getParams




setTimestamp
public void setTimestamp(String parameterName, java.sql.Timestamp x) throws SQLException(Code)
Sets the designated parameter to the given java.sql.Timestamp value. The driver converts this to an SQL TIMESTAMP value when it sends it to the database.
Parameters:
  parameterName - the name of the parameter
Parameters:
  x - the parameter value
exception:
  SQLException - if a database access error occurs orthis method is called on a closed CallableStatement
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
See Also:   BaseRowSet.getTimestamp
since:
   1.4



setTimestamp
public void setTimestamp(String parameterName, java.sql.Timestamp x, Calendar cal) throws SQLException(Code)
Sets the designated parameter to the given java.sql.Timestamp value, using the given Calendar object. The driver uses the Calendar object to construct an SQL TIMESTAMP value, which the driver then sends to the database. With a a Calendar object, the driver can calculate the timestamp taking into account a custom timezone. If no Calendar object is specified, the driver uses the default timezone, which is that of the virtual machine running the application.
Parameters:
  parameterName - the name of the parameter
Parameters:
  x - the parameter value
Parameters:
  cal - the Calendar object the driver will useto construct the timestamp
exception:
  SQLException - if a database access error occurs orthis method is called on a closed CallableStatement
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
See Also:   BaseRowSet.getTimestamp
since:
   1.4



setTransactionIsolation
public void setTransactionIsolation(int level) throws SQLException(Code)
Sets the transaction isolation property for this JDBC RowSet object to the given constant. The DBMS will use this transaction isolation level for transactions if it can.

For RowSet implementations such as the CachedRowSet that operate in a disconnected environment, the SyncProvider object being used offers complementary locking and data integrity options. The options described below are pertinent only to connected RowSet objects (JdbcRowSet objects).
Parameters:
  level - one of the following constants, listed in ascending order:Connection.TRANSACTION_NONE,Connection.TRANSACTION_READ_UNCOMMITTED,Connection.TRANSACTION_READ_COMMITTED,Connection.TRANSACTION_REPEATABLE_READ, orConnection.TRANSACTION_SERIALIZABLE
throws:
  SQLException - if the given parameter is not one of the Connection constants
See Also:   javax.sql.rowset.spi.SyncFactory
See Also:   javax.sql.rowset.spi.SyncProvider
See Also:   
See Also:   BaseRowSet.getTransactionIsolation




setType
public void setType(int type) throws SQLException(Code)
Sets the type for this RowSet object to the specified type. The default type is ResultSet.TYPE_SCROLL_INSENSITIVE.
Parameters:
  type - one of the following constants:ResultSet.TYPE_FORWARD_ONLY,ResultSet.TYPE_SCROLL_INSENSITIVE, orResultSet.TYPE_SCROLL_SENSITIVE
throws:
  SQLException - if the parameter supplied is not one of the following constants:ResultSet.TYPE_FORWARD_ONLY orResultSet.TYPE_SCROLL_INSENSITIVEResultSet.TYPE_SCROLL_SENSITIVE
See Also:   BaseRowSet.getConcurrency
See Also:   BaseRowSet.getType



setTypeMap
public void setTypeMap(java.util.Map<String, Class<?>> map)(Code)
Installs the given java.util.Map object as the type map associated with the Connection object for this RowSet object. The custom mapping indicated in this type map will be used unless a different type map is explicitly supplied to a method, in which case the type map supplied will be used.
Parameters:
  map - a java.util.Map object that contains the mapping from SQL type names for user defined types (UDT) to classes in the Java programming language. Each entry in the Mapobject consists of the fully qualified SQL name of a UDT and the Class object for the SQLData implementation of that UDT. May be null.



setURL
public void setURL(int parameterIndex, java.net.URL x) throws SQLException(Code)
Sets the designated parameter to the given java.net.URL value. The driver converts this to an SQL DATALINK value when it sends it to the database.
Parameters:
  parameterIndex - the first parameter is 1, the second is 2, ...
Parameters:
  x - the java.net.URL object to be set
exception:
  SQLException - if a database access error occurs orthis method is called on a closed PreparedStatement
throws:
  SQLFeatureNotSupportedException - if the JDBC driver does not support this method
since:
   1.4



setUnicodeStream
public void setUnicodeStream(int parameterIndex, java.io.InputStream x, int length) throws SQLException(Code)
Sets the designated parameter to the given java.io.InputStream object, which will have the specified number of bytes. The contents of the stream will be read and sent to the database. This method throws an SQLException if the number of bytes read and sent to the database is not equal to length.

When a very large Unicode value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.InputStream object. A JDBC technology-enabled driver will read the data from the stream as needed, until it reaches end-of-file. The driver will do any necessary conversion from Unicode to the database CHAR format. The byte format of the Unicode stream must be Java UTF-8, as defined in the Java Virtual Machine Specification.

Note: This stream object can be either a standard Java stream object or your own subclass that implements the standard interface.

This method is deprecated; the method getCharacterStream should be used in its place.

The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called. Calls made to the method getParams after setUnicodeStream has been called will return an array containing the parameter values that have been set. In that array, the element that represents the values set with this method will itself be an array. The first element of that array is the given java.io.InputStream object. The second element is the value set for length. The third element is an internal BaseRowSet constant specifying that the stream passed to this method is a Unicode stream. The parameter number is indicated by an element's position in the array returned by the method getParams, with the first element being the value for the first placeholder parameter, the second element being the value for the second placeholder parameter, and so on. In other words, if the input stream being set is the value for the second placeholder parameter, the array containing it will be the second element in the array returned by getParams.

Note that because the numbering of elements in an array starts at zero, the array element that corresponds to placeholder parameter number parameterIndex is element number parameterIndex -1.
Parameters:
  parameterIndex - the ordinal number of the placeholder parameter in this RowSet object's command that is to be set. The first parameter is 1, the second is 2, and so on; must be1 or greater
Parameters:
  x - the java.io.InputStream object that contains theUNICODE parameter value
Parameters:
  length - the number of bytes in the input stream
throws:
  SQLException - if an error occurs, the parameter index is out of bounds,or the number of bytes the driver reads and sends to the database isnot equal to the number of bytes specified in length
See Also:   BaseRowSet.getParams




setUrl
public void setUrl(String url) throws SQLException(Code)
Sets the Url property for this RowSet object to the given String object and sets the dataSource name property to null. The Url property is a JDBC URL that is used when the connection is created using a JDBC technology-enabled driver ("JDBC driver") and the DriverManager. The correct JDBC URL for the specific driver to be used can be found in the driver documentation. Although there are guidelines for for how a JDBC URL is formed, a driver vendor can specify any String object except one with a length of 0 (an empty string).

Setting the Url property is optional if connections are established using a DataSource object instead of the DriverManager. The driver will use either the URL property or the dataSourceName property to create a connection, whichever was specified most recently. If an application uses a JDBC URL, it must load a JDBC driver that accepts the JDBC URL before it uses the RowSet object to connect to a database. The RowSet object will use the URL internally to create a database connection in order to read or write data.
Parameters:
  url - a String object that contains the JDBC URLthat will be used to establish the connection to a database for this RowSet object; may be null but must notbe an empty string
throws:
  SQLException - if an error occurs setting the Url property or the parameter supplied is a string with a length of 0 (anempty string)
See Also:   BaseRowSet.getUrl




setUsername
public void setUsername(String name)(Code)
Sets the username property for this RowSet object to the given user name. Because it is not serialized, the username property is set at run time before calling the method execute.
Parameters:
  name - the String object containing the user name thatis supplied to the data source to create a connection. It may be null.
See Also:   BaseRowSet.getUsername



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.