# Interface SyncResolver

All Superinterfaces:
  `AutoCloseable, ResultSet, RowSet, Wrapper`

public interface SyncResolver extends RowSet
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);
                         }
                     }
                 }
             }
         }

Since:
  1.5

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`DELETE_ROW_CONFLICT`
Indicates that a conflict occurred while the `RowSet` object was attempting to delete a row in the data source.
`static final int`
`INSERT_ROW_CONFLICT`
Indicates that a conflict occurred while the `RowSet` object was attempting to insert a row into the data source.
`static final int`
`NO_ROW_CONFLICT`
Indicates that no conflict occurred while the `RowSet` object was attempting to update, delete or insert a row in the data source.
`static final int`
`UPDATE_ROW_CONFLICT`
Indicates that a conflict occurred while the `RowSet` object was attempting to update a row in the data source.

### Fields declared in interface ResultSet

`CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE`
Modifier and Type
Field
Description
`static final int`
`CLOSE_CURSORS_AT_COMMIT`
The constant indicating that open `ResultSet` objects with this holdability will be closed when the current transaction is committed.
`static final int`
`CONCUR_READ_ONLY`
The constant indicating the concurrency mode for a `ResultSet` object that may NOT be updated.
`static final int`
`CONCUR_UPDATABLE`
The constant indicating the concurrency mode for a `ResultSet` object that may be updated.
`static final int`
`FETCH_FORWARD`
The constant indicating that the rows in a result set will be processed in a forward direction; first-to-last.
`static final int`
`FETCH_REVERSE`
The constant indicating that the rows in a result set will be processed in a reverse direction; last-to-first.
`static final int`
`FETCH_UNKNOWN`
The constant indicating that the order in which rows in a result set will be processed is unknown.
`static final int`
`HOLD_CURSORS_OVER_COMMIT`
The constant indicating that open `ResultSet` objects with this holdability will remain open when the current transaction is committed.
`static final int`
`TYPE_FORWARD_ONLY`
The constant indicating the type for a `ResultSet` object whose cursor may move only forward.
`static final int`
`TYPE_SCROLL_INSENSITIVE`
The constant indicating the type for a `ResultSet` object that is scrollable but generally not sensitive to changes to the data that underlies the `ResultSet`.
`static final int`
`TYPE_SCROLL_SENSITIVE`
The constant indicating the type for a `ResultSet` object that is scrollable and generally sensitive to changes to the data that underlies the `ResultSet`.

## Method Summary

Modifier and Type
Method
Description
`Object`
`getConflictValue(int index)`
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.
`Object`
`getConflictValue(String columnName)`
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.
`int`
`getStatus()`
Retrieves the conflict status of the current row of this `SyncResolver`, which indicates the operation the `RowSet` object was attempting when the conflict occurred.
`boolean`
`nextConflict()`
Moves the cursor down from its current position to the next row that contains a conflict value.
`boolean`
`previousConflict()`
Moves the cursor up from its current position to the previous conflict row in this `SyncResolver` object.
`void`
`setResolvedValue(int index, Object obj)`
Sets obj as the value in column index in the current row of the `RowSet` object that is being synchronized.
`void`
`setResolvedValue(String columnName, Object obj)`
Sets obj as the value in column columnName in the current row of the `RowSet` object that is being synchronized.

### Methods declared in interface ResultSet

`absolute, afterLast, beforeFirst, cancelRowUpdates, clearWarnings, close, deleteRow, findColumn, first, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimal, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getConcurrency, getCursorName, getDate, getDate, getDate, getDate, getDouble, getDouble, getFetchDirection, getFetchSize, getFloat, getFloat, getHoldability, getInt, getInt, getLong, getLong, getMetaData, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getObject, getObject, getObject, getRef, getRef, getRow, getRowId, getRowId, getShort, getShort, getSQLXML, getSQLXML, getStatement, getString, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertRow, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, last, moveToCurrentRow, moveToInsertRow, next, previous, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, setFetchDirection, setFetchSize, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateClob, updateClob, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateRowId, updateRowId, updateShort, updateShort, updateSQLXML, updateSQLXML, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamp, wasNull`
Modifier and Type
Method
Description
`boolean`
`absolute(int row)`
Moves the cursor to the given row number in this `ResultSet` object.
`void`
`afterLast()`
Moves the cursor to the end of this `ResultSet` object, just after the last row.
`void`
`beforeFirst()`
Moves the cursor to the front of this `ResultSet` object, just before the first row.
`void`
`cancelRowUpdates()`
Cancels the updates made to the current row in this `ResultSet` object.
`void`
`clearWarnings()`
Clears all warnings reported on this `ResultSet` object.
`void`
`close()`
Releases this `ResultSet` object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.
`void`
`deleteRow()`
Deletes the current row from this `ResultSet` object and from the underlying database.
`int`
`findColumn(String columnLabel)`
Maps the given `ResultSet` column label to its `ResultSet` column index.
`boolean`
`first()`
Moves the cursor to the first row in this `ResultSet` object.
`Array`
`getArray(int columnIndex)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as an `Array` object in the Java programming language.
`Array`
`getArray(String columnLabel)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as an `Array` object in the Java programming language.
`InputStream`
`getAsciiStream(int columnIndex)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a stream of ASCII characters.
`InputStream`
`getAsciiStream(String columnLabel)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a stream of ASCII characters.
`BigDecimal`
`getBigDecimal(int columnIndex)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `java.math.BigDecimal` with full precision.
`BigDecimal`
`getBigDecimal(int columnIndex, int scale)`
Deprecated.
Use `getBigDecimal(int columnIndex)` or `getBigDecimal(String columnLabel)`
`BigDecimal`
`getBigDecimal(String columnLabel)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `java.math.BigDecimal` with full precision.
`BigDecimal`
`getBigDecimal(String columnLabel, int scale)`
Deprecated.
Use `getBigDecimal(int columnIndex)` or `getBigDecimal(String columnLabel)`
`InputStream`
`getBinaryStream(int columnIndex)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a stream of uninterpreted bytes.
`InputStream`
`getBinaryStream(String columnLabel)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a stream of uninterpreted `byte`s.
`Blob`
`getBlob(int columnIndex)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `Blob` object in the Java programming language.
`Blob`
`getBlob(String columnLabel)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `Blob` object in the Java programming language.
`boolean`
`getBoolean(int columnIndex)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `boolean` in the Java programming language.
`boolean`
`getBoolean(String columnLabel)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `boolean` in the Java programming language.
`byte`
`getByte(int columnIndex)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `byte` in the Java programming language.
`byte`
`getByte(String columnLabel)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `byte` in the Java programming language.
`byte[]`
`getBytes(int columnIndex)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `byte` array in the Java programming language.
`byte[]`
`getBytes(String columnLabel)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `byte` array in the Java programming language.
`Reader`
`getCharacterStream(int columnIndex)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `java.io.Reader` object.
`Reader`
`getCharacterStream(String columnLabel)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `java.io.Reader` object.
`Clob`
`getClob(int columnIndex)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `Clob` object in the Java programming language.
`Clob`
`getClob(String columnLabel)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `Clob` object in the Java programming language.
`int`
`getConcurrency()`
Retrieves the concurrency mode of this `ResultSet` object.
`String`
`getCursorName()`
Retrieves the name of the SQL cursor used by this `ResultSet` object.
`Date`
`getDate(int columnIndex)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `java.sql.Date` object in the Java programming language.
`Date`
`getDate(int columnIndex, Calendar cal)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `java.sql.Date` object in the Java programming language.
`Date`
`getDate(String columnLabel)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `java.sql.Date` object in the Java programming language.
`Date`
`getDate(String columnLabel, Calendar cal)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `java.sql.Date` object in the Java programming language.
`double`
`getDouble(int columnIndex)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `double` in the Java programming language.
`double`
`getDouble(String columnLabel)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `double` in the Java programming language.
`int`
`getFetchDirection()`
Retrieves the fetch direction for this `ResultSet` object.
`int`
`getFetchSize()`
Retrieves the fetch size for this `ResultSet` object.
`float`
`getFloat(int columnIndex)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `float` in the Java programming language.
`float`
`getFloat(String columnLabel)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `float` in the Java programming language.
`int`
`getHoldability()`
Retrieves the holdability of this `ResultSet` object
`int`
`getInt(int columnIndex)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as an `int` in the Java programming language.
`int`
`getInt(String columnLabel)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as an `int` in the Java programming language.
`long`
`getLong(int columnIndex)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `long` in the Java programming language.
`long`
`getLong(String columnLabel)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `long` in the Java programming language.
`ResultSetMetaData`
`getMetaData()`
Retrieves the number, types and properties of this `ResultSet` object's columns.
`Reader`
`getNCharacterStream(int columnIndex)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `java.io.Reader` object.
`Reader`
`getNCharacterStream(String columnLabel)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `java.io.Reader` object.
`NClob`
`getNClob(int columnIndex)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `NClob` object in the Java programming language.
`NClob`
`getNClob(String columnLabel)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `NClob` object in the Java programming language.
`String`
`getNString(int columnIndex)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `String` in the Java programming language.
`String`
`getNString(String columnLabel)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `String` in the Java programming language.
`Object`
`getObject(int columnIndex)`
Gets the value of the designated column in the current row of this `ResultSet` object as an `Object` in the Java programming language.
`<T> T`
`getObject(int columnIndex, Class<T> type)`
Retrieves the value of the designated column in the current row of this `ResultSet` object and will convert from the SQL type of the column to the requested Java data type, if the conversion is supported.
`Object`
`getObject(int columnIndex, Map<String,Class<?>> map)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as an `Object` in the Java programming language.
`Object`
`getObject(String columnLabel)`
Gets the value of the designated column in the current row of this `ResultSet` object as an `Object` in the Java programming language.
`<T> T`
`getObject(String columnLabel, Class<T> type)`
Retrieves the value of the designated column in the current row of this `ResultSet` object and will convert from the SQL type of the column to the requested Java data type, if the conversion is supported.
`Object`
`getObject(String columnLabel, Map<String,Class<?>> map)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as an `Object` in the Java programming language.
`Ref`
`getRef(int columnIndex)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `Ref` object in the Java programming language.
`Ref`
`getRef(String columnLabel)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `Ref` object in the Java programming language.
`int`
`getRow()`
Retrieves the current row number.
`RowId`
`getRowId(int columnIndex)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `java.sql.RowId` object in the Java programming language.
`RowId`
`getRowId(String columnLabel)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `java.sql.RowId` object in the Java programming language.
`short`
`getShort(int columnIndex)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `short` in the Java programming language.
`short`
`getShort(String columnLabel)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `short` in the Java programming language.
`SQLXML`
`getSQLXML(int columnIndex)`
Retrieves the value of the designated column in the current row of this `ResultSet` as a `java.sql.SQLXML` object in the Java programming language.
`SQLXML`
`getSQLXML(String columnLabel)`
Retrieves the value of the designated column in the current row of this `ResultSet` as a `java.sql.SQLXML` object in the Java programming language.
`Statement`
`getStatement()`
Retrieves the `Statement` object that produced this `ResultSet` object.
`String`
`getString(int columnIndex)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `String` in the Java programming language.
`String`
`getString(String columnLabel)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `String` in the Java programming language.
`Time`
`getTime(int columnIndex)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `java.sql.Time` object in the Java programming language.
`Time`
`getTime(int columnIndex, Calendar cal)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `java.sql.Time` object in the Java programming language.
`Time`
`getTime(String columnLabel)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `java.sql.Time` object in the Java programming language.
`Time`
`getTime(String columnLabel, Calendar cal)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `java.sql.Time` object in the Java programming language.
`Timestamp`
`getTimestamp(int columnIndex)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `java.sql.Timestamp` object in the Java programming language.
`Timestamp`
`getTimestamp(int columnIndex, Calendar cal)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `java.sql.Timestamp` object in the Java programming language.
`Timestamp`
`getTimestamp(String columnLabel)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `java.sql.Timestamp` object in the Java programming language.
`Timestamp`
`getTimestamp(String columnLabel, Calendar cal)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `java.sql.Timestamp` object in the Java programming language.
`int`
`getType()`
Retrieves the type of this `ResultSet` object.
`InputStream`
`getUnicodeStream(int columnIndex)`
Deprecated.
use `getCharacterStream` in place of `getUnicodeStream`
`InputStream`
`getUnicodeStream(String columnLabel)`
Deprecated.
use `getCharacterStream` instead
`URL`
`getURL(int columnIndex)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `java.net.URL` object in the Java programming language.
`URL`
`getURL(String columnLabel)`
Retrieves the value of the designated column in the current row of this `ResultSet` object as a `java.net.URL` object in the Java programming language.
`SQLWarning`
`getWarnings()`
Retrieves the first warning reported by calls on this `ResultSet` object.
`void`
`insertRow()`
Inserts the contents of the insert row into this `ResultSet` object and into the database.
`boolean`
`isAfterLast()`
Retrieves whether the cursor is after the last row in this `ResultSet` object.
`boolean`
`isBeforeFirst()`
Retrieves whether the cursor is before the first row in this `ResultSet` object.
`boolean`
`isClosed()`
Retrieves whether this `ResultSet` object has been closed.
`boolean`
`isFirst()`
Retrieves whether the cursor is on the first row of this `ResultSet` object.
`boolean`
`isLast()`
Retrieves whether the cursor is on the last row of this `ResultSet` object.
`boolean`
`last()`
Moves the cursor to the last row in this `ResultSet` object.
`void`
`moveToCurrentRow()`
Moves the cursor to the remembered cursor position, usually the current row.
`void`
`moveToInsertRow()`
Moves the cursor to the insert row.
`boolean`
`next()`
Moves the cursor forward one row from its current position.
`boolean`
`previous()`
Moves the cursor to the previous row in this `ResultSet` object.
`void`
`refreshRow()`
Refreshes the current row with its most recent value in the database.
`boolean`
`relative(int rows)`
Moves the cursor a relative number of rows, either positive or negative.
`boolean`
`rowDeleted()`
Retrieves whether a row has been deleted.
`boolean`
`rowInserted()`
Retrieves whether the current row has had an insertion.
`boolean`
`rowUpdated()`
Retrieves whether the current row has been updated.
`void`
`setFetchDirection(int direction)`
Gives a hint as to the direction in which the rows in this `ResultSet` object will be processed.
`void`
`setFetchSize(int rows)`
Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed for this `ResultSet` object.
`void`
`updateArray(int columnIndex, Array x)`
Updates the designated column with a `java.sql.Array` value.
`void`
`updateArray(String columnLabel, Array x)`
Updates the designated column with a `java.sql.Array` value.
`void`
`updateAsciiStream(int columnIndex, InputStream x)`
Updates the designated column with an ascii stream value.
`void`
`updateAsciiStream(int columnIndex, InputStream x, int length)`
Updates the designated column with an ascii stream value, which will have the specified number of bytes.
`void`
`updateAsciiStream(int columnIndex, InputStream x, long length)`
Updates the designated column with an ascii stream value, which will have the specified number of bytes.
`void`
`updateAsciiStream(String columnLabel, InputStream x)`
Updates the designated column with an ascii stream value.
`void`
`updateAsciiStream(String columnLabel, InputStream x, int length)`
Updates the designated column with an ascii stream value, which will have the specified number of bytes.
`void`
`updateAsciiStream(String columnLabel, InputStream x, long length)`
Updates the designated column with an ascii stream value, which will have the specified number of bytes.
`void`
`updateBigDecimal(int columnIndex, BigDecimal x)`
Updates the designated column with a `java.math.BigDecimal` value.
`void`
`updateBigDecimal(String columnLabel, BigDecimal x)`
Updates the designated column with a `java.sql.BigDecimal` value.
`void`
`updateBinaryStream(int columnIndex, InputStream x)`
Updates the designated column with a binary stream value.
`void`
`updateBinaryStream(int columnIndex, InputStream x, int length)`
Updates the designated column with a binary stream value, which will have the specified number of bytes.
`void`
`updateBinaryStream(int columnIndex, InputStream x, long length)`
Updates the designated column with a binary stream value, which will have the specified number of bytes.
`void`
`updateBinaryStream(String columnLabel, InputStream x)`
Updates the designated column with a binary stream value.
`void`
`updateBinaryStream(String columnLabel, InputStream x, int length)`
Updates the designated column with a binary stream value, which will have the specified number of bytes.
`void`
`updateBinaryStream(String columnLabel, InputStream x, long length)`
Updates the designated column with a binary stream value, which will have the specified number of bytes.
`void`
`updateBlob(int columnIndex, InputStream inputStream)`
Updates the designated column using the given input stream.
`void`
`updateBlob(int columnIndex, InputStream inputStream, long length)`
Updates the designated column using the given input stream, which will have the specified number of bytes.
`void`
`updateBlob(int columnIndex, Blob x)`
Updates the designated column with a `java.sql.Blob` value.
`void`
`updateBlob(String columnLabel, InputStream inputStream)`
Updates the designated column using the given input stream.
`void`
`updateBlob(String columnLabel, InputStream inputStream, long length)`
Updates the designated column using the given input stream, which will have the specified number of bytes.
`void`
`updateBlob(String columnLabel, Blob x)`
Updates the designated column with a `java.sql.Blob` value.
`void`
`updateBoolean(int columnIndex, boolean x)`
Updates the designated column with a `boolean` value.
`void`
`updateBoolean(String columnLabel, boolean x)`
Updates the designated column with a `boolean` value.
`void`
`updateByte(int columnIndex, byte x)`
Updates the designated column with a `byte` value.
`void`
`updateByte(String columnLabel, byte x)`
Updates the designated column with a `byte` value.
`void`
`updateBytes(int columnIndex, byte[] x)`
Updates the designated column with a `byte` array value.
`void`
`updateBytes(String columnLabel, byte[] x)`
Updates the designated column with a byte array value.
`void`
`updateCharacterStream(int columnIndex, Reader x)`
Updates the designated column with a character stream value.
`void`
`updateCharacterStream(int columnIndex, Reader x, int length)`
Updates the designated column with a character stream value, which will have the specified number of bytes.
`void`
`updateCharacterStream(int columnIndex, Reader x, long length)`
Updates the designated column with a character stream value, which will have the specified number of bytes.
`void`
`updateCharacterStream(String columnLabel, Reader reader)`
Updates the designated column with a character stream value.
`void`
`updateCharacterStream(String columnLabel, Reader reader, int length)`
Updates the designated column with a character stream value, which will have the specified number of bytes.
`void`
`updateCharacterStream(String columnLabel, Reader reader, long length)`
Updates the designated column with a character stream value, which will have the specified number of bytes.
`void`
`updateClob(int columnIndex, Reader reader)`
Updates the designated column using the given `Reader` object.
`void`
`updateClob(int columnIndex, Reader reader, long length)`
Updates the designated column using the given `Reader` object, which is the given number of characters long.
`void`
`updateClob(int columnIndex, Clob x)`
Updates the designated column with a `java.sql.Clob` value.
`void`
`updateClob(String columnLabel, Reader reader)`
Updates the designated column using the given `Reader` object.
`void`
`updateClob(String columnLabel, Reader reader, long length)`
Updates the designated column using the given `Reader` object, which is the given number of characters long.
`void`
`updateClob(String columnLabel, Clob x)`
Updates the designated column with a `java.sql.Clob` value.
`void`
`updateDate(int columnIndex, Date x)`
Updates the designated column with a `java.sql.Date` value.
`void`
`updateDate(String columnLabel, Date x)`
Updates the designated column with a `java.sql.Date` value.
`void`
`updateDouble(int columnIndex, double x)`
Updates the designated column with a `double` value.
`void`
`updateDouble(String columnLabel, double x)`
Updates the designated column with a `double` value.
`void`
`updateFloat(int columnIndex, float x)`
Updates the designated column with a `float` value.
`void`
`updateFloat(String columnLabel, float x)`
Updates the designated column with a `float` value.
`void`
`updateInt(int columnIndex, int x)`
Updates the designated column with an `int` value.
`void`
`updateInt(String columnLabel, int x)`
Updates the designated column with an `int` value.
`void`
`updateLong(int columnIndex, long x)`
Updates the designated column with a `long` value.
`void`
`updateLong(String columnLabel, long x)`
Updates the designated column with a `long` value.
`void`
`updateNCharacterStream(int columnIndex, Reader x)`
Updates the designated column with a character stream value.
`void`
`updateNCharacterStream(int columnIndex, Reader x, long length)`
Updates the designated column with a character stream value, which will have the specified number of bytes.
`void`
`updateNCharacterStream(String columnLabel, Reader reader)`
Updates the designated column with a character stream value.
`void`
`updateNCharacterStream(String columnLabel, Reader reader, long length)`
Updates the designated column with a character stream value, which will have the specified number of bytes.
`void`
`updateNClob(int columnIndex, Reader reader)`
Updates the designated column using the given `Reader` The data will be read from the stream as needed until end-of-stream is reached.
`void`
`updateNClob(int columnIndex, Reader reader, long length)`
Updates the designated column using the given `Reader` object, which is the given number of characters long.
`void`
`updateNClob(int columnIndex, NClob nClob)`
Updates the designated column with a `java.sql.NClob` value.
`void`
`updateNClob(String columnLabel, Reader reader)`
Updates the designated column using the given `Reader` object.
`void`
`updateNClob(String columnLabel, Reader reader, long length)`
Updates the designated column using the given `Reader` object, which is the given number of characters long.
`void`
`updateNClob(String columnLabel, NClob nClob)`
Updates the designated column with a `java.sql.NClob` value.
`void`
`updateNString(int columnIndex, String nString)`
Updates the designated column with a `String` value.
`void`
`updateNString(String columnLabel, String nString)`
Updates the designated column with a `String` value.
`void`
`updateNull(int columnIndex)`
Updates the designated column with a `null` value.
`void`
`updateNull(String columnLabel)`
Updates the designated column with a `null` value.
`void`
`updateObject(int columnIndex, Object x)`
Updates the designated column with an `Object` value.
`void`
`updateObject(int columnIndex, Object x, int scaleOrLength)`
Updates the designated column with an `Object` value.
`default void`
`updateObject(int columnIndex, Object x, SQLType targetSqlType)`
Updates the designated column with an `Object` value.
`default void`
`updateObject(int columnIndex, Object x, SQLType targetSqlType, int scaleOrLength)`
Updates the designated column with an `Object` value.
`void`
`updateObject(String columnLabel, Object x)`
Updates the designated column with an `Object` value.
`void`
`updateObject(String columnLabel, Object x, int scaleOrLength)`
Updates the designated column with an `Object` value.
`default void`
`updateObject(String columnLabel, Object x, SQLType targetSqlType)`
Updates the designated column with an `Object` value.
`default void`
`updateObject(String columnLabel, Object x, SQLType targetSqlType, int scaleOrLength)`
Updates the designated column with an `Object` value.
`void`
`updateRef(int columnIndex, Ref x)`
Updates the designated column with a `java.sql.Ref` value.
`void`
`updateRef(String columnLabel, Ref x)`
Updates the designated column with a `java.sql.Ref` value.
`void`
`updateRow()`
Updates the underlying database with the new contents of the current row of this `ResultSet` object.
`void`
`updateRowId(int columnIndex, RowId x)`
Updates the designated column with a `RowId` value.
`void`
`updateRowId(String columnLabel, RowId x)`
Updates the designated column with a `RowId` value.
`void`
`updateShort(int columnIndex, short x)`
Updates the designated column with a `short` value.
`void`
`updateShort(String columnLabel, short x)`
Updates the designated column with a `short` value.
`void`
`updateSQLXML(int columnIndex, SQLXML xmlObject)`
Updates the designated column with a `java.sql.SQLXML` value.
`void`
`updateSQLXML(String columnLabel, SQLXML xmlObject)`
Updates the designated column with a `java.sql.SQLXML` value.
`void`
`updateString(int columnIndex, String x)`
Updates the designated column with a `String` value.
`void`
`updateString(String columnLabel, String x)`
Updates the designated column with a `String` value.
`void`
`updateTime(int columnIndex, Time x)`
Updates the designated column with a `java.sql.Time` value.
`void`
`updateTime(String columnLabel, Time x)`
Updates the designated column with a `java.sql.Time` value.
`void`
`updateTimestamp(int columnIndex, Timestamp x)`
Updates the designated column with a `java.sql.Timestamp` value.
`void`
`updateTimestamp(String columnLabel, Timestamp x)`
Updates the designated column with a `java.sql.Timestamp` value.
`boolean`
`wasNull()`
Reports whether the last column read had a value of SQL `NULL`.

### Methods declared in interface RowSet

`addRowSetListener, clearParameters, execute, getCommand, getDataSourceName, getEscapeProcessing, getMaxFieldSize, getMaxRows, getPassword, getQueryTimeout, getTransactionIsolation, getTypeMap, getUrl, getUsername, isReadOnly, removeRowSetListener, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBigDecimal, setBinaryStream, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setBlob, setBlob, setBlob, setBoolean, setBoolean, setByte, setByte, setBytes, setBytes, setCharacterStream, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setClob, setClob, setClob, setCommand, setConcurrency, setDataSourceName, setDate, setDate, setDate, setDate, setDouble, setDouble, setEscapeProcessing, setFloat, setFloat, setInt, setInt, setLong, setLong, setMaxFieldSize, setMaxRows, setNCharacterStream, setNCharacterStream, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNClob, setNClob, setNClob, setNString, setNString, setNull, setNull, setNull, setNull, setObject, setObject, setObject, setObject, setObject, setObject, setPassword, setQueryTimeout, setReadOnly, setRef, setRowId, setRowId, setShort, setShort, setSQLXML, setSQLXML, setString, setString, setTime, setTime, setTime, setTime, setTimestamp, setTimestamp, setTimestamp, setTimestamp, setTransactionIsolation, setType, setTypeMap, setUrl, setURL, setUsername`
Modifier and Type
Method
Description
`void`
`addRowSetListener(RowSetListener listener)`
Registers the given listener so that it will be notified of events that occur on this `RowSet` object.
`void`
`clearParameters()`
Clears the parameters set for this `RowSet` object's command.
`void`
`execute()`
Fills this `RowSet` object with data.
`String`
`getCommand()`
Retrieves this `RowSet` object's command property.
`String`
`getDataSourceName()`
Retrieves the logical name that identifies the data source for this `RowSet` object.
`boolean`
`getEscapeProcessing()`
Retrieves whether escape processing is enabled for this `RowSet` object.
`int`
`getMaxFieldSize()`
Retrieves the maximum number of bytes that may be returned for certain column values.
`int`
`getMaxRows()`
Retrieves the maximum number of rows that this `RowSet` object can contain.
`String`
`getPassword()`
Retrieves the password used to create a database connection.
`int`
`getQueryTimeout()`
Retrieves the maximum number of seconds the driver will wait for a statement to execute.
`int`
`getTransactionIsolation()`
Retrieves the transaction isolation level set for this `RowSet` object.
`Map<String,Class<?>>`
`getTypeMap()`
Retrieves the `Map` object associated with this `RowSet` object, which specifies the custom mapping of SQL user-defined types, if any.
`String`
`getUrl()`
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.
`String`
`getUsername()`
Retrieves the username used to create a database connection for this `RowSet` object.
`boolean`
`isReadOnly()`
Retrieves whether this `RowSet` object is read-only.
`void`
`removeRowSetListener(RowSetListener listener)`
Removes the specified listener from the list of components that will be notified when an event occurs on this `RowSet` object.
`void`
`setArray(int i, Array x)`
Sets the designated parameter in this `RowSet` object's command with the given `Array` value.
`void`
`setAsciiStream(int parameterIndex, InputStream x)`
Sets the designated parameter in this `RowSet` object's command to the given input stream.
`void`
`setAsciiStream(int parameterIndex, InputStream x, int length)`
Sets the designated parameter in this `RowSet` object's command to the given `java.io.InputStream` value.
`void`
`setAsciiStream(String parameterName, InputStream x)`
Sets the designated parameter to the given input stream.
`void`
`setAsciiStream(String parameterName, InputStream x, int length)`
Sets the designated parameter to the given input stream, which will have the specified number of bytes.
`void`
`setBigDecimal(int parameterIndex, BigDecimal x)`
Sets the designated parameter in this `RowSet` object's command to the given `java.math.BigDecimal` value.
`void`
`setBigDecimal(String parameterName, BigDecimal x)`
Sets the designated parameter to the given `java.math.BigDecimal` value.
`void`
`setBinaryStream(int parameterIndex, InputStream x)`
Sets the designated parameter in this `RowSet` object's command to the given input stream.
`void`
`setBinaryStream(int parameterIndex, InputStream x, int length)`
Sets the designated parameter in this `RowSet` object's command to the given `java.io.InputStream` value.
`void`
`setBinaryStream(String parameterName, InputStream x)`
Sets the designated parameter to the given input stream.
`void`
`setBinaryStream(String parameterName, InputStream x, int length)`
Sets the designated parameter to the given input stream, which will have the specified number of bytes.
`void`
`setBlob(int parameterIndex, InputStream inputStream)`
Sets the designated parameter to a `InputStream` object.
`void`
`setBlob(int parameterIndex, InputStream inputStream, long length)`
Sets the designated parameter to a `InputStream` object.
`void`
`setBlob(int i, Blob x)`
Sets the designated parameter in this `RowSet` object's command with the given `Blob` value.
`void`
`setBlob(String parameterName, InputStream inputStream)`
Sets the designated parameter to a `InputStream` object.
`void`
`setBlob(String parameterName, InputStream inputStream, long length)`
Sets the designated parameter to a `InputStream` object.
`void`
`setBlob(String parameterName, Blob x)`
Sets the designated parameter to the given `java.sql.Blob` object.
`void`
`setBoolean(int parameterIndex, boolean x)`
Sets the designated parameter in this `RowSet` object's command to the given Java `boolean` value.
`void`
`setBoolean(String parameterName, boolean x)`
Sets the designated parameter to the given Java `boolean` value.
`void`
`setByte(int parameterIndex, byte x)`
Sets the designated parameter in this `RowSet` object's command to the given Java `byte` value.
`void`
`setByte(String parameterName, byte x)`
Sets the designated parameter to the given Java `byte` value.
`void`
`setBytes(int parameterIndex, byte[] x)`
Sets the designated parameter in this `RowSet` object's command to the given Java array of `byte` values.
`void`
`setBytes(String parameterName, byte[] x)`
Sets the designated parameter to the given Java array of bytes.
`void`
`setCharacterStream(int parameterIndex, Reader reader)`
Sets the designated parameter in this `RowSet` object's command to the given `Reader` object.
`void`
`setCharacterStream(int parameterIndex, Reader reader, int length)`
Sets the designated parameter in this `RowSet` object's command to the given `java.io.Reader` value.
`void`
`setCharacterStream(String parameterName, Reader reader)`
Sets the designated parameter to the given `Reader` object.
`void`
`setCharacterStream(String parameterName, Reader reader, int length)`
Sets the designated parameter to the given `Reader` object, which is the given number of characters long.
`void`
`setClob(int parameterIndex, Reader reader)`
Sets the designated parameter to a `Reader` object.
`void`
`setClob(int parameterIndex, Reader reader, long length)`
Sets the designated parameter to a `Reader` object.
`void`
`setClob(int i, Clob x)`
Sets the designated parameter in this `RowSet` object's command with the given `Clob` value.
`void`
`setClob(String parameterName, Reader reader)`
Sets the designated parameter to a `Reader` object.
`void`
`setClob(String parameterName, Reader reader, long length)`
Sets the designated parameter to a `Reader` object.
`void`
`setClob(String parameterName, Clob x)`
Sets the designated parameter to the given `java.sql.Clob` object.
`void`
`setCommand(String cmd)`
Sets this `RowSet` object's command property to the given SQL query.
`void`
`setConcurrency(int concurrency)`
Sets the concurrency of this `RowSet` object to the given concurrency level.
`void`
`setDataSourceName(String name)`
Sets the data source name property for this `RowSet` object to the given `String`.
`void`
`setDate(int parameterIndex, Date x)`
Sets the designated parameter in this `RowSet` object's command to the given `java.sql.Date` value.
`void`
`setDate(int parameterIndex, Date x, Calendar cal)`
Sets the designated parameter in this `RowSet` object's command with the given `java.sql.Date` value.
`void`
`setDate(String parameterName, 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.
`void`
`setDate(String parameterName, Date x, Calendar cal)`
Sets the designated parameter to the given `java.sql.Date` value, using the given `Calendar` object.
`void`
`setDouble(int parameterIndex, double x)`
Sets the designated parameter in this `RowSet` object's command to the given Java `double` value.
`void`
`setDouble(String parameterName, double x)`
Sets the designated parameter to the given Java `double` value.
`void`
`setEscapeProcessing(boolean enable)`
Sets escape processing for this `RowSet` object on or off.
`void`
`setFloat(int parameterIndex, float x)`
Sets the designated parameter in this `RowSet` object's command to the given Java `float` value.
`void`
`setFloat(String parameterName, float x)`
Sets the designated parameter to the given Java `float` value.
`void`
`setInt(int parameterIndex, int x)`
Sets the designated parameter in this `RowSet` object's command to the given Java `int` value.
`void`
`setInt(String parameterName, int x)`
Sets the designated parameter to the given Java `int` value.
`void`
`setLong(int parameterIndex, long x)`
Sets the designated parameter in this `RowSet` object's command to the given Java `long` value.
`void`
`setLong(String parameterName, long x)`
Sets the designated parameter to the given Java `long` value.
`void`
`setMaxFieldSize(int max)`
Sets the maximum number of bytes that can be returned for a column value to the given number of bytes.
`void`
`setMaxRows(int max)`
Sets the maximum number of rows that this `RowSet` object can contain to the specified number.
`void`
`setNCharacterStream(int parameterIndex, Reader value)`
Sets the designated parameter in this `RowSet` object's command to a `Reader` object.
`void`
`setNCharacterStream(int parameterIndex, Reader value, long length)`
Sets the designated parameter to a `Reader` object.
`void`
`setNCharacterStream(String parameterName, Reader value)`
Sets the designated parameter to a `Reader` object.
`void`
`setNCharacterStream(String parameterName, Reader value, long length)`
Sets the designated parameter to a `Reader` object.
`void`
`setNClob(int parameterIndex, Reader reader)`
Sets the designated parameter to a `Reader` object.
`void`
`setNClob(int parameterIndex, Reader reader, long length)`
Sets the designated parameter to a `Reader` object.
`void`
`setNClob(int parameterIndex, NClob value)`
Sets the designated parameter to a `java.sql.NClob` object.
`void`
`setNClob(String parameterName, Reader reader)`
Sets the designated parameter to a `Reader` object.
`void`
`setNClob(String parameterName, Reader reader, long length)`
Sets the designated parameter to a `Reader` object.
`void`
`setNClob(String parameterName, NClob value)`
Sets the designated parameter to a `java.sql.NClob` object.
`void`
`setNString(int parameterIndex, String value)`
Sets the designated parameter to the given `String` object.
`void`
`setNString(String parameterName, String value)`
Sets the designated parameter to the given `String` object.
`void`
`setNull(int parameterIndex, int sqlType)`
Sets the designated parameter in this `RowSet` object's SQL command to SQL `NULL`.
`void`
`setNull(int paramIndex, int sqlType, String typeName)`
Sets the designated parameter in this `RowSet` object's SQL command to SQL `NULL`.
`void`
`setNull(String parameterName, int sqlType)`
Sets the designated parameter to SQL `NULL`.
`void`
`setNull(String parameterName, int sqlType, String typeName)`
Sets the designated parameter to SQL `NULL`.
`void`
`setObject(int parameterIndex, Object x)`
Sets the designated parameter in this `RowSet` object's command with a Java `Object`.
`void`
`setObject(int parameterIndex, Object x, int targetSqlType)`
Sets the designated parameter in this `RowSet` object's command with a Java `Object`.
`void`
`setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength)`
Sets the designated parameter in this `RowSet` object's command with the given Java `Object`.
`void`
`setObject(String parameterName, Object x)`
Sets the value of the designated parameter with the given object.
`void`
`setObject(String parameterName, Object x, int targetSqlType)`
Sets the value of the designated parameter with the given object.
`void`
`setObject(String parameterName, Object x, int targetSqlType, int scale)`
Sets the value of the designated parameter with the given object.
`void`
`setPassword(String password)`
Sets the database password for this `RowSet` object to the given `String`.
`void`
`setQueryTimeout(int seconds)`
Sets the maximum time the driver will wait for a statement to execute to the given number of seconds.
`void`
`setReadOnly(boolean value)`
Sets whether this `RowSet` object is read-only to the given `boolean`.
`void`
`setRef(int i, Ref x)`
Sets the designated parameter in this `RowSet` object's command with the given `Ref` value.
`void`
`setRowId(int parameterIndex, RowId x)`
Sets the designated parameter to the given `java.sql.RowId` object.
`void`
`setRowId(String parameterName, RowId x)`
Sets the designated parameter to the given `java.sql.RowId` object.
`void`
`setShort(int parameterIndex, short x)`
Sets the designated parameter in this `RowSet` object's command to the given Java `short` value.
`void`
`setShort(String parameterName, short x)`
Sets the designated parameter to the given Java `short` value.
`void`
`setSQLXML(int parameterIndex, SQLXML xmlObject)`
Sets the designated parameter to the given `java.sql.SQLXML` object.
`void`
`setSQLXML(String parameterName, SQLXML xmlObject)`
Sets the designated parameter to the given `java.sql.SQLXML` object.
`void`
`setString(int parameterIndex, String x)`
Sets the designated parameter in this `RowSet` object's command to the given Java `String` value.
`void`
`setString(String parameterName, String x)`
Sets the designated parameter to the given Java `String` value.
`void`
`setTime(int parameterIndex, Time x)`
Sets the designated parameter in this `RowSet` object's command to the given `java.sql.Time` value.
`void`
`setTime(int parameterIndex, Time x, Calendar cal)`
Sets the designated parameter in this `RowSet` object's command with the given `java.sql.Time` value.
`void`
`setTime(String parameterName, Time x)`
Sets the designated parameter to the given `java.sql.Time` value.
`void`
`setTime(String parameterName, Time x, Calendar cal)`
Sets the designated parameter to the given `java.sql.Time` value, using the given `Calendar` object.
`void`
`setTimestamp(int parameterIndex, Timestamp x)`
Sets the designated parameter in this `RowSet` object's command to the given `java.sql.Timestamp` value.
`void`
`setTimestamp(int parameterIndex, Timestamp x, Calendar cal)`
Sets the designated parameter in this `RowSet` object's command with the given `java.sql.Timestamp` value.
`void`
`setTimestamp(String parameterName, Timestamp x)`
Sets the designated parameter to the given `java.sql.Timestamp` value.
`void`
`setTimestamp(String parameterName, Timestamp x, Calendar cal)`
Sets the designated parameter to the given `java.sql.Timestamp` value, using the given `Calendar` object.
`void`
`setTransactionIsolation(int level)`
Sets the transaction isolation level for this `RowSet` object.
`void`
`setType(int type)`
Sets the type of this `RowSet` object to the given type.
`void`
`setTypeMap(Map<String,Class<?>> map)`
Installs the given `java.util.Map` object as the default type map for this `RowSet` object.
`void`
`setUrl(String url)`
Sets the URL this `RowSet` object will use when it uses the `DriverManager` to create a connection.
`void`
`setURL(int parameterIndex, URL x)`
Sets the designated parameter to the given `java.net.URL` value.
`void`
`setUsername(String name)`
Sets the username property for this `RowSet` object to the given `String`.

### Methods declared in interface Wrapper

`isWrapperFor, unwrap`
Modifier and Type
Method
Description
`boolean`
`isWrapperFor(Class<?> iface)`
Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does.
`<T> T`
`unwrap(Class<T> iface)`
Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy.

## Field Details

### UPDATE_ROW_CONFLICT

static final int UPDATE_ROW_CONFLICT
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.

See Also:
  - Constant Field Values

### DELETE_ROW_CONFLICT

static final int DELETE_ROW_CONFLICT
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.

See Also:
  - Constant Field Values

### INSERT_ROW_CONFLICT

static final int INSERT_ROW_CONFLICT
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.

See Also:
  - Constant Field Values

### NO_ROW_CONFLICT

static final int NO_ROW_CONFLICT
Indicates that no conflict occurred 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 pertinent to the conflict resolution in this row.

See Also:
  - Constant Field Values

## Method Details

### getStatus

int getStatus()
Retrieves the conflict status of the current row of this `SyncResolver`, which indicates the operation the `RowSet` object was attempting when the conflict occurred.

Returns:
  one of the following constants: `SyncResolver.UPDATE_ROW_CONFLICT`, `SyncResolver.DELETE_ROW_CONFLICT`, `SyncResolver.INSERT_ROW_CONFLICT`, or `SyncResolver.NO_ROW_CONFLICT`

### getConflictValue

Object getConflictValue(int index) throws SQLException
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:
  `index` - an `int` designating the column in this row of this `SyncResolver` object from which to retrieve the value causing a conflict
Returns:
  the value of the designated column in the current row of this `SyncResolver` object
Throws:
  `SQLException` - if a database access error occurs

### getConflictValue

Object getConflictValue(String columnName) throws SQLException
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:
  `columnName` - a `String` object designating the column in this row of this `SyncResolver` object from which to retrieve the value causing a conflict
Returns:
  the value of the designated column in the current row of this `SyncResolver` object
Throws:
  `SQLException` - if a database access error occurs

### setResolvedValue

void setResolvedValue(int index, Object obj) throws SQLException
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:
  `index` - an `int` giving the number of the column into which to set the value to be persisted
  `obj` - an `Object` that is the value to be set in the `RowSet` object and persisted in the data source
Throws:
  `SQLException` - if a database access error occurs

### setResolvedValue

void setResolvedValue(String columnName, Object obj) throws SQLException
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:
  `columnName` - a `String` object giving the name of the column into which to set the value to be persisted
  `obj` - an `Object` that is the value to be set in the `RowSet` object and persisted in the data source
Throws:
  `SQLException` - if a database access error occurs

### nextConflict

boolean nextConflict() throws SQLException
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.

Returns:
  `true` if the new current row is valid; `false` if there are no more rows
Throws:
  `SQLException` - if a database access error occurs or the result set type is `TYPE_FORWARD_ONLY`

### previousConflict

boolean previousConflict() throws SQLException
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.

Returns:
  `true` if the cursor is on a valid row; `false` if it is off the result set
Throws:
  `SQLException` - if a database access error occurs or the result set type is `TYPE_FORWARD_ONLY`