Defines a framework that allows applications to use a manual decision tree to decide what should be done when a synchronization conflict occurs. Although it is not mandatory for applications to resolve synchronization conflicts manually, this framework provides the means to delegate to the application when conflicts arise.

Note that a conflict is a situation where the RowSet object's original values for a row do not match the values in the data source, which indicates that the data source row has been modified since the last synchronization. Note also that a RowSet object's original values are the values it had just prior to the the last synchronization, which are not necessarily its initial values.

Description of a SyncResolver Object

A SyncResolver object is a specialized RowSet object that implements the SyncResolver interface. It may operate as either a connected RowSet object (an implementation of the JdbcRowSet interface) or a connected RowSet object (an implementation of the CachedRowSet interface or one of its subinterfaces). For information on the subinterfaces, see the javax.sql.rowset package description. The reference implementation for SyncResolver implements the CachedRowSet interface, but other implementations may choose to implement the JdbcRowSet interface to satisfy particular needs.

After an application has attempted to synchronize a RowSet object with the data source (by calling the CachedRowSet method acceptChanges), and one or more conflicts have been found, a rowset's SyncProvider object creates an instance of SyncResolver. This new SyncResolver object has the same number of rows and columns as the RowSet object that was attempting the synchronization. The SyncResolver object contains the values from the data source that caused the conflict(s) and null for all other values. In addition, it contains information about each conflict.

Getting and Using a SyncResolver Object

When the method acceptChanges encounters conflicts, the SyncProvider object creates a SyncProviderException object and sets it with the new SyncResolver object. The method acceptChanges will throw this exception, which the application can then catch and use to retrieve the SyncResolver object it contains. The following code snippet uses the SyncProviderException method getSyncResolver to get the SyncResolver object resolver.
     } catch (SyncProviderException spe) {
         SyncResolver resolver = spe.getSyncResolver();
     ...
     }
 

With resolver in hand, an application can use it to get the information it contains about the conflict or conflicts. A SyncResolver object such as resolver keeps track of the conflicts for each row in which there is a conflict. It also places a lock on the table or tables affected by the rowset's command so that no more conflicts can occur while the current conflicts are being resolved.

The following kinds of information can be obtained from a SyncResolver object:

  • What operation was being attempted when a conflict occurred
    The SyncProvider interface defines four constants describing states that may occur. Three constants describe the type of operation (update, delete, or insert) that a RowSet object was attempting to perform when a conflict was discovered, and the fourth indicates that there is no conflict. These constants are the possible return values when a SyncResolver object calls the method getStatus.
         int operation = resolver.getStatus();
     

  • The value in the data source that caused a conflict
    A conflict exists when a value that a RowSet object has changed and is attempting to write to the data source has also been changed in the data source since the last synchronization. An application can call the SyncResolver method getConflictValue to retrieve the value in the data source that is the cause of the conflict because the values in a SyncResolver object are the conflict values from the data source.
         java.lang.Object conflictValue = resolver.getConflictValue(2);
     
    Note that the column in resolver can be designated by the column number, as is done in the preceding line of code, or by the column name.

    With the information retrieved from the methods getStatus and getConflictValue, the application may make a determination as to which value should be persisted in the data source. The application then calls the SyncResolver method setResolvedValue, which sets the value to be persisted in the RowSet object and also in the data source.

         resolver.setResolvedValue("DEPT", 8390426);
     
    In the preceding line of code, the column name designates the column in the RowSet object that is to be set with the given value. The column number can also be used to designate the column.

    An application calls the method setResolvedValue after it has resolved all of the conflicts in the current conflict row and repeats this process for each conflict row in the SyncResolver object.

    Navigating a SyncResolver Object

    Because a SyncResolver object is a RowSet object, an application can use all of the RowSet methods for moving the cursor to navigate a SyncResolver object. For example, an application can use the RowSet method next to get to each row and then call the SyncResolver method getStatus to see if the row contains a conflict. In a row with one or more conflicts, the application can iterate through the columns to find any non-null values, which will be the values from the data source that are in conflict.

    To make it easier to navigate a SyncResolver object, especially when there are large numbers of rows with no conflicts, the SyncResolver interface defines the methods nextConflict and previousConflict, which move only to rows that contain at least one conflict value. Then an application can call the SyncResolver method getConflictValue, supplying it with the column number, to get the conflict value itself. The code fragment in the next section gives an example.

    Code Example

    The following code fragment demonstrates how a disconnected RowSet object crs might attempt to synchronize itself with the underlying data source and then resolve the conflicts. In the try block, crs calls the method acceptChanges, passing it the Connection object con. If there are no conflicts, the changes in crs are simply written to the data source. However, if there is a conflict, the method acceptChanges throws a SyncProviderException object, and the catch block takes effect. In this example, which illustrates one of the many ways a SyncResolver object can be used, the SyncResolver method nextConflict is used in a while loop. The loop will end when nextConflict returns false, which will occur when there are no more conflict rows in the SyncResolver object resolver. In This particular code fragment, resolver looks for rows that have update conflicts (rows with the status SyncResolver.UPDATE_ROW_CONFLICT), and the rest of this code fragment executes only for rows where conflicts occurred because crs was attempting an update.

    After the cursor for resolver has moved to the next conflict row that has an update conflict, the method getRow indicates the number of the current row, and the cursor for the CachedRowSet object crs is moved to the comparable row in crs. By iterating through the columns of that row in both resolver and crs, the conflicting values can be retrieved and compared to decide which one should be persisted. In this code fragment, the value in crs is the one set as the resolved value, which means that it will be used to overwrite the conflict value in the data source.

         try {
    
             crs.acceptChanges(con);
    
         } catch (SyncProviderException spe) {
    
             SyncResolver resolver = spe.getSyncResolver();
    
             Object crsValue;  // value in the RowSet object 
             Object resolverValue:  // value in the SyncResolver object
             Object resolvedValue:  // value to be persisted
    
             while(resolver.nextConflict())  {
                 if(resolver.getStatus() == SyncResolver.UPDATE_ROW_CONFLICT)  {
                     int row = resolver.getRow();
                     crs.absolute(row);
    
                     int colCount = crs.getMetaData().getColumnCount();
                     for(int j = 1; j <= colCount; j++) {
                         if (resolver.getConflictValue(j) != null)  {
                             crsValue = crs.getObject(j);
                             resolverValue = resolver.getConflictValue(j);
                             . . . 
                             // compare crsValue and resolverValue to determine
                             // which should be the resolved value (the value to persist)
                             resolvedValue = crsValue;
    
                             resolver.setResolvedValue(j, resolvedValue);
                          } 
                      } 
                  }
              }
          }
     
    @author
    Jonathan Bruce
  • Indicates that a conflict occurred while the RowSet object was attempting to delete a row in the data source. The values in the data source row to be updated differ from the RowSet object's original values for that row, which means that the row in the data source has been updated or deleted since the last synchronization.
    Indicates that a conflict occurred while the RowSet object was attempting to insert a row into the data source. This means that a row with the same primary key as the row to be inserted has been inserted into the data source since the last synchronization.
    Indicates that no conflict occured while the RowSet object was attempting to update, delete or insert a row in the data source. The values in the SyncResolver will contain null values only as an indication that no information in pertitent to the conflict resolution in this row.
    Indicates that a conflict occurred while the RowSet object was attempting to update a row in the data source. The values in the data source row to be updated differ from the RowSet object's original values for that row, which means that the row in the data source has been updated or deleted since the last synchronization.
    Registers the given listener so that it will be notified of events that occur on this RowSet object.
    Parameters
    listenera component that has implemented the RowSetListener interface and wants to be notified when events occur on this RowSet object
    Clears the parameters set for this RowSet object's command.

    In general, parameter values remain in force for repeated use of a RowSet object. Setting a parameter value automatically clears its previous value. However, in some cases it is useful to immediately release the resources used by the current parameter values, which can be done by calling the method clearParameters.

    Throws
    SQLExceptionif a database access error occurs
    Fills this RowSet object with data.

    The execute method may use the following properties to create a connection for reading data: url, data source name, user name, password, transaction isolation, and type map. The execute method may use the following properties to create a statement to execute a command: command, read only, maximum field size, maximum rows, escape processing, and query timeout.

    If the required properties have not been set, an exception is thrown. If this method is successful, the current contents of the rowset are discarded and the rowset's metadata is also (re)set. If there are outstanding updates, they are ignored.

    If this RowSet object does not maintain a continuous connection with its source of data, it may use a reader (a RowSetReader object) to fill itself with data. In this case, a reader will have been registered with this RowSet object, and the method execute will call on the reader's readData method as part of its implementation.

    Throws
    SQLExceptionif a database access error occurs or any of the properties necessary for making a connection and creating a statement have not been set
    Retrieves this RowSet object's command property. The command property contains a command string, which must be an SQL query, that can be executed to fill the rowset with data. The default value is null.
    Return
    the command string; may be null
    See Also
    Retrieves the value in the designated column in the current row of this SyncResolver object, which is the value in the data source that caused a conflict.
    Parameters
    indexan int designating the column in this row of this SyncResolver object from which to retrieve the value causing a conflict
    Return
    the value of the designated column in the current row of this SyncResolver object
    Throws
    SQLExceptionif a database access error occurs
    Retrieves the value in the designated column in the current row of this SyncResolver object, which is the value in the data source that caused a conflict.
    Parameters
    columnNamea String object designating the column in this row of this SyncResolver object from which to retrieve the value causing a conflict
    Return
    the value of the designated column in the current row of this SyncResolver object
    Throws
    SQLExceptionif a database access error occurs
    Retrieves the logical name that identifies the data source for this RowSet object. Users should set either the url property or the data source name property. The rowset will use the property that was set more recently to get a connection.
    Return
    a data source name
    Retrieves whether escape processing is enabled for this RowSet object. If escape scanning is enabled, which is the default, the driver will do escape substitution before sending an SQL statement to the database.
    Return
    true if escape processing is enabled; false if it is disabled
    Throws
    SQLExceptionif a database access error occurs
    Retrieves the maximum number of bytes that may be returned for certain column values. This limit applies only to BINARY, VARBINARY, LONGVARBINARYBINARY, CHAR, VARCHAR, and LONGVARCHAR columns. If the limit is exceeded, the excess data is silently discarded.
    Return
    the current maximum column size limit; zero means that there is no limit
    Throws
    SQLExceptionif a database access error occurs
    Retrieves the maximum number of rows that this RowSet object can contain. If the limit is exceeded, the excess rows are silently dropped.
    Return
    the current maximum number of rows that this RowSet object can contain; zero means unlimited
    Throws
    SQLExceptionif a database access error occurs
    See Also
    Retrieves the password used to create a database connection. The password property is set at run time before calling the method execute. It is not usually part of the serialized state of a RowSet object.
    Return
    the password for making a database connection
    See Also
    Retrieves the maximum number of seconds the driver will wait for a statement to execute. If this limit is exceeded, an SQLException is thrown.
    Return
    the current query timeout limit in seconds; zero means unlimited
    Throws
    SQLExceptionif a database access error occurs
    Retrieves the conflict status of the current row of this SyncResolver, which indicates the operation the RowSet object was attempting when the conflict occurred.
    Return
    one of the following constants: SyncResolver.UPDATE_ROW_CONFLICT, SyncResolver.DELETE_ROW_CONFLICT, SyncResolver.INSERT_ROW_CONFLICT, or SyncResolver.NO_ROW_CONFLICT
    Retrieves the transaction isolation level set for this RowSet object.
    Return
    the transaction isolation level; one of Connection.TRANSACTION_READ_UNCOMMITTED, Connection.TRANSACTION_READ_COMMITTED, Connection.TRANSACTION_REPEATABLE_READ, or Connection.TRANSACTION_SERIALIZABLE
    Retrieves the Map object associated with this RowSet object, which specifies the custom mapping of SQL user-defined types, if any. The default is for the type map to be empty.
    Return
    a java.util.Map object containing the names of SQL user-defined types and the Java classes to which they are to be mapped
    Throws
    SQLExceptionif a database access error occurs
    See Also
    Retrieves the url property this RowSet object will use to create a connection if it uses the DriverManager instead of a DataSource object to establish the connection. The default value is null.
    Return
    a string url
    Throws
    SQLExceptionif a database access error occurs
    See Also
    Retrieves the username used to create a database connection for this RowSet object. The username property is set at run time before calling the method execute. It is not usually part of the serialized state of a RowSet object.
    Return
    the username property
    See Also
    Retrieves whether this RowSet object is read-only. If updates are possible, the default is for a rowset to be updatable.

    Attempts to update a read-only rowset will result in an SQLException being thrown.

    Return
    true if this RowSet object is read-only; false if it is updatable
    See Also
    Moves the cursor down from its current position to the next row that contains a conflict value. A SyncResolver object's cursor is initially positioned before the first conflict row; the first call to the method nextConflict makes the first conflict row the current row; the second call makes the second conflict row the current row, and so on.

    A call to the method nextConflict will implicitly close an input stream if one is open and will clear the SyncResolver object's warning chain.

    Return
    true if the new current row is valid; false if there are no more rows
    Throws
    SQLExceptionif a database access error occurs or the result set type is TYPE_FORWARD_ONLY
    Moves the cursor up from its current position to the previous conflict row in this SyncResolver object.

    A call to the method previousConflict will implicitly close an input stream if one is open and will clear the SyncResolver object's warning chain.

    Return
    true if the cursor is on a valid row; false if it is off the result set
    Throws
    SQLExceptionif a database access error occurs or the result set type is TYPE_FORWARD_ONLY
    Removes the specified listener from the list of components that will be notified when an event occurs on this RowSet object.
    Parameters
    listenera component that has been registered as a listener for this RowSet object
    Sets the designated parameter in this RowSet object's command with the given Array value. The driver will convert this to the ARRAY value that the Array object represents before sending it to the database.
    Parameters
    ithe first parameter is 1, the second is 2, ...
    xan object representing an SQL array
    Throws
    SQLExceptionif a database access error occurs
    Sets the designated parameter in this RowSet object's command to the given java.io.InputStream value. It may be more practical to send a very large ASCII value via a java.io.InputStream rather than as a LONGVARCHAR parameter. The driver will read the data from the stream as needed until it reaches end-of-file.

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

    Parameters
    parameterIndexthe first parameter is 1, the second is 2, ...
    xthe Java input stream that contains the ASCII parameter value
    lengththe number of bytes in the stream
    Throws
    SQLExceptionif a database access error occurs
    Sets the designated parameter in this RowSet object's command to the given java.math.BigDeciaml value. The driver converts this to an SQL NUMERIC value before sending it to the database.
    Parameters
    parameterIndexthe first parameter is 1, the second is 2, ...
    xthe parameter value
    Throws
    SQLExceptionif a database access error occurs
    Sets the designated parameter in this RowSet object's command to the given java.io.InputStream value. It may be more practical to send a very large binary value via a java.io.InputStream rather than as a LONGVARBINARY parameter. The driver will read the data from the stream as needed until it reaches end-of-file.

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

    Parameters
    parameterIndexthe first parameter is 1, the second is 2, ...
    xthe java input stream which contains the binary parameter value
    lengththe number of bytes in the stream
    Throws
    SQLExceptionif a database access error occurs
    Sets the designated parameter in this RowSet object's command with the given Blob value. The driver will convert this to the BLOB value that the Blob object represents before sending it to the database.
    Parameters
    ithe first parameter is 1, the second is 2, ...
    xan object representing a BLOB
    Throws
    SQLExceptionif a database access error occurs
    Sets the designated parameter in this RowSet object's command to the given Java boolean value. The driver converts this to an SQL BIT value before sending it to the database.
    Parameters
    parameterIndexthe first parameter is 1, the second is 2, ...
    xthe parameter value
    Throws
    SQLExceptionif a database access error occurs
    Sets the designated parameter in this RowSet object's command to the given Java byte value. The driver converts this to an SQL TINYINT value before sending it to the database.
    Parameters
    parameterIndexthe first parameter is 1, the second is 2, ...
    xthe parameter value
    Throws
    SQLExceptionif a database access error occurs
    Sets the designated parameter in this RowSet object's command to the given Java array of byte values. Before sending it to the database, 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.
    Parameters
    parameterIndexthe first parameter is 1, the second is 2, ...
    xthe parameter value
    Throws
    SQLExceptionif a database access error occurs
    Sets the designated parameter in this RowSet object's command to the given java.io.Reader value. It may be more practical to send a very large UNICODE value via a java.io.Reader rather than as a LONGVARCHAR parameter. The driver will read the data from the stream as needed until it reaches end-of-file.

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

    Parameters
    parameterIndexthe first parameter is 1, the second is 2, ...
    readerthe Reader object that contains the UNICODE data to be set
    lengththe number of characters in the stream
    Throws
    SQLExceptionif a database access error occurs
    Sets the designated parameter in this RowSet object's command with the given Clob value. The driver will convert this to the CLOB value that the Clob object represents before sending it to the database.
    Parameters
    ithe first parameter is 1, the second is 2, ...
    xan object representing a CLOB
    Throws
    SQLExceptionif a database access error occurs
    Sets this RowSet object's command property to the given SQL query. This property is optional when a rowset gets its data from a data source that does not support commands, such as a spreadsheet.
    Parameters
    cmdthe SQL query that will be used to get the data for this RowSet object; may be null
    Throws
    SQLExceptionif a database access error occurs
    See Also
    Sets the concurrency of this RowSet object to the given concurrency level. This method is used to change the concurrency level of a rowset, which is by default ResultSet.CONCUR_READ_ONLY
    Parameters
    concurrencyone of the ResultSet constants specifying a concurrency level: ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
    Throws
    SQLExceptionif a database access error occurs
    Sets the data source name property for this RowSet object to the given String.

    The value of the data source name property can be used to do a lookup of a DataSource object that has been registered with a naming service. After being retrieved, the DataSource object can be used to create a connection to the data source that it represents.

    Parameters
    namethe logical name of the data source for this RowSet object
    Throws
    SQLExceptionif a database access error occurs
    Sets the designated parameter in this RowSet object's command to the given java.sql.Date value. The driver converts this to an SQL DATE value before sending it to the database, using the default java.util.Calendar to calculate the date.
    Parameters
    parameterIndexthe first parameter is 1, the second is 2, ...
    xthe parameter value
    Throws
    SQLExceptionif a database access error occurs
    Sets the designated parameter in this RowSet object's command with the given java.sql.Date value. The driver will convert this to an SQL DATE value, using the given java.util.Calendar object to calculate the date.
    Parameters
    parameterIndexthe first parameter is 1, the second is 2, ...
    xthe parameter value
    calthe java.util.Calendar object to use for calculating the date
    Throws
    SQLExceptionif a database access error occurs
    Sets the designated parameter in this RowSet object's command to the given Java double value. The driver converts this to an SQL DOUBLE value before sending it to the database.
    Parameters
    parameterIndexthe first parameter is 1, the second is 2, ...
    xthe parameter value
    Throws
    SQLExceptionif a database access error occurs
    Sets escape processing for this RowSet object on or off. If escape scanning is on (the default), the driver will do escape substitution before sending an SQL statement to the database.
    Parameters
    enabletrue to enable escape processing; false to disable it
    Throws
    SQLExceptionif a database access error occurs
    Sets the designated parameter in this RowSet object's command to the given Java float value. The driver converts this to an SQL REAL value before sending it to the database.
    Parameters
    parameterIndexthe first parameter is 1, the second is 2, ...
    xthe parameter value
    Throws
    SQLExceptionif a database access error occurs
    Sets the designated parameter in this RowSet object's command to the given Java int value. The driver converts this to an SQL INTEGER value before sending it to the database.
    Parameters
    parameterIndexthe first parameter is 1, the second is 2, ...
    xthe parameter value
    Throws
    SQLExceptionif a database access error occurs
    Sets the designated parameter in this RowSet object's command to the given Java long value. The driver converts this to an SQL BIGINT value before sending it to the database.
    Parameters
    parameterIndexthe first parameter is 1, the second is 2, ...
    xthe parameter value
    Throws
    SQLExceptionif a database access error occurs
    Sets the maximum number of bytes that can be returned for a column value to the given number of bytes. This limit applies only to BINARY, VARBINARY, LONGVARBINARYBINARY, CHAR, VARCHAR, and LONGVARCHAR columns. If the limit is exceeded, the excess data is silently discarded. For maximum portability, use values greater than 256.
    Parameters
    maxthe new max column size limit in bytes; zero means unlimited
    Throws
    SQLExceptionif a database access error occurs
    Sets the maximum number of rows that this RowSet object can contain to the specified number. If the limit is exceeded, the excess rows are silently dropped.
    Parameters
    maxthe new maximum number of rows; zero means unlimited
    Throws
    SQLExceptionif a database access error occurs
    See Also
    Sets the designated parameter in this RowSet object's SQL command to SQL NULL.

    Note: You must specify the parameter's SQL type.

    Parameters
    parameterIndexthe first parameter is 1, the second is 2, ...
    sqlTypea SQL type code defined by java.sql.Types
    Throws
    SQLExceptionif a database access error occurs
    Sets the designated parameter in this RowSet object's SQL command to SQL NULL. This version of the method setNull should be used for SQL user-defined types (UDTs) and REF type parameters. Examples of UDTs 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 UDT or REF parameter. In the case of a UDT, 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 UDT 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 typeName parameter is ignored.

    Parameters
    paramIndexthe first parameter is 1, the second is 2, ...
    sqlTypea value from java.sql.Types
    typeNamethe fully qualified name of an SQL UDT or the type name of the SQL structured type being referenced by a REF type; ignored if the parameter is not a UDT or REF type
    Throws
    SQLExceptionif a database access error occurs
    Sets the designated parameter in this RowSet object's command with a Java Object. For integral values, the java.lang equivalent objects should be used.

    The JDBC specification provides a standard mapping from Java Object types to SQL types. The driver will convert the given Java object to its standard SQL mapping before sending it 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 SQLData, the rowset should call the method SQLData.writeSQL to write the object to an SQLOutput data stream. If the object is an instance of a class implementing the Ref, Struct, Array, Blob, or Clob interfaces, the driver uses the default mapping to the corresponding SQL type.

    An exception is thrown if there is an ambiguity, for example, if the object is of a class implementing more than one of these interfaces.

    Parameters
    parameterIndexThe first parameter is 1, the second is 2, ...
    xThe object containing the input parameter value
    Throws
    SQLExceptionif a database access error occurs
    Sets the designated parameter in this RowSet object's command with a Java Object. For integral values, the java.lang equivalent objects should be used. This method is like setObject above, but the scale used is the scale of the second parameter. Scalar values have a scale of zero. Literal values have the scale present in the literal.

    Even though it is supported, it is not recommended that this method be called with floating point input values.

    Parameters
    parameterIndexthe first parameter is 1, the second is 2, ...
    xthe object containing the input parameter value
    targetSqlTypethe SQL type (as defined in java.sql.Types) to be sent to the database
    Throws
    SQLExceptionif a database access error occurs
    Sets the designated parameter in this RowSet object's command with the given Java Object. For integral values, the java.lang equivalent objects should be used (for example, an instance of the class Integer for an int).

    The given Java object will be converted to the targetSqlType before being sent to the database.

    If the object is of a class implementing SQLData, the rowset should call the method SQLData.writeSQL to write the object to an SQLOutput data stream. If the object is an instance of a class implementing the Ref, Struct, Array, Blob, or Clob interfaces, the driver uses the default mapping to the corresponding SQL type.

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

    Parameters
    parameterIndexthe first parameter is 1, the second is 2, ...
    xthe object containing the input parameter value
    targetSqlTypethe SQL type (as defined in java.sql.Types) to be sent to the database. The scale argument may further qualify this type.
    scalefor java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types, this is the number of digits after the decimal point. For all other types, this value will be ignored.
    Throws
    SQLExceptionif a database access error occurs
    Sets the database password for this RowSet object to the given String.
    Parameters
    passwordthe password string
    Throws
    SQLExceptionif a database access error occurs
    See Also
    Sets the maximum time the driver will wait for a statement to execute to the given number of seconds. If this limit is exceeded, an SQLException is thrown.
    Parameters
    secondsthe new query timeout limit in seconds; zero means that there is no limit
    Throws
    SQLExceptionif a database access error occurs
    Sets whether this RowSet object is read-only to the given boolean.
    Parameters
    valuetrue if read-only; false if updatable
    Throws
    SQLExceptionif a database access error occurs
    See Also
    Sets the designated parameter in this RowSet object's command with the given Ref value. The driver will convert this to the appropriate REF(<structured-type>) value.
    Parameters
    ithe first parameter is 1, the second is 2, ...
    xan object representing data of an SQL REF type
    Throws
    SQLExceptionif a database access error occurs
    Sets obj as the value in column index in the current row of the RowSet object that is being synchronized. obj is set as the value in the data source internally.
    Parameters
    indexan int giving the number of the column into which to set the value to be persisted
    objan Object that is the value to be set in the RowSet object and persisted in the data source
    Throws
    SQLExceptionif a database access error occurs
    Sets obj as the value in column columnName in the current row of the RowSet object that is being synchronized. obj is set as the value in the data source internally.
    Parameters
    columnNamea String object giving the name of the column into which to set the value to be persisted
    objan Object that is the value to be set in the RowSet object and persisted in the data source
    Throws
    SQLExceptionif a database access error occurs
    Sets the designated parameter in this RowSet object's command to the given Java short value. The driver converts this to an SQL SMALLINT value before sending it to the database.
    Parameters
    parameterIndexthe first parameter is 1, the second is 2, ...
    xthe parameter value
    Throws
    SQLExceptionif a database access error occurs
    Sets the designated parameter in this RowSet object's command to the given Java String value. Before sending it to the database, 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.
    Parameters
    parameterIndexthe first parameter is 1, the second is 2, ...
    xthe parameter value
    Throws
    SQLExceptionif a database access error occurs
    Sets the designated parameter in this RowSet object's command to the given java.sql.Time value. The driver converts this to an SQL TIME value before sending it to the database, using the default java.util.Calendar to calculate it.
    Parameters
    parameterIndexthe first parameter is 1, the second is 2, ...
    xthe parameter value
    Throws
    SQLExceptionif a database access error occurs
    Sets the designated parameter in this RowSet object's command with the given java.sql.Time value. The driver will convert this to an SQL TIME value, using the given java.util.Calendar object to calculate it, before sending it to the database.
    Parameters
    parameterIndexthe first parameter is 1, the second is 2, ...
    xthe parameter value
    calthe java.util.Calendar object to use for calculating the time
    Throws
    SQLExceptionif a database access error occurs
    Sets the designated parameter in this RowSet object's command to the given java.sql.Timestamp value. The driver converts this to an SQL TIMESTAMP value before sending it to the database, using the default java.util.Calendar to calculate it.
    Parameters
    parameterIndexthe first parameter is 1, the second is 2, ...
    xthe parameter value
    Throws
    SQLExceptionif a database access error occurs
    Sets the designated parameter in this RowSet object's command with the given java.sql.Timestamp value. The driver will convert this to an SQL TIMESTAMP value, using the given java.util.Calendar object to calculate it, before sending it to the database.
    Parameters
    parameterIndexthe first parameter is 1, the second is 2, ...
    xthe parameter value
    calthe java.util.Calendar object to use for calculating the timestamp
    Throws
    SQLExceptionif a database access error occurs
    Sets the transaction isolation level for this RowSet obejct.
    Parameters
    levelthe transaction isolation level; one of Connection.TRANSACTION_READ_UNCOMMITTED, Connection.TRANSACTION_READ_COMMITTED, Connection.TRANSACTION_REPEATABLE_READ, or Connection.TRANSACTION_SERIALIZABLE
    Throws
    SQLExceptionif a database access error occurs
    Sets the type of this RowSet object to the given type. This method is used to change the type of a rowset, which is by default read-only and non-scrollable.
    Parameters
    typeone of the ResultSet constants specifying a type: ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
    Throws
    SQLExceptionif a database access error occurs
    Installs the given java.util.Map object as the default type map for this RowSet object. This type map will be used unless another type map is supplied as a method parameter.
    Parameters
    mapa java.util.Map object containing the names of SQL user-defined types and the Java classes to which they are to be mapped
    Throws
    SQLExceptionif a database access error occurs
    See Also
    Sets the URL this RowSet object will use when it uses the DriverManager to create a connection. Setting this property is optional. If a URL is used, a JDBC driver that accepts the URL must be loaded by the application before the rowset is used to connect to a database. The rowset will use the URL internally to create a database connection when reading or writing data. Either a URL or a data source name is used to create a connection, whichever was specified most recently.
    Parameters
    urla string value; may be null
    Throws
    SQLExceptionif a database access error occurs
    See Also
    Sets the username property for this RowSet object to the given String.
    Parameters
    namea user name
    Throws
    SQLExceptionif a database access error occurs
    See Also