Interface JoinRowSet
- All Superinterfaces:
AutoCloseable, CachedRowSet, Joinable, ResultSet, RowSet, WebRowSet, Wrapper
JoinRowSet
interface provides a mechanism for combining related
data from different RowSet
objects into one JoinRowSet
object, which represents an SQL JOIN
.
In other words, a JoinRowSet
object acts as a
container for the data from RowSet
objects that form an SQL
JOIN
relationship.
The Joinable
interface provides the methods for setting,
retrieving, and unsetting a match column, the basis for
establishing an SQL JOIN
relationship. The match column may
alternatively be set by supplying it to the appropriate version of the
JointRowSet
method addRowSet
.
1.0 Overview
DisconnectedRowSet
objects (CachedRowSet
objects
and implementations extending the CachedRowSet
interface)
do not have a standard way to establish an SQL JOIN
between
RowSet
objects without the expensive operation of
reconnecting to the data source. The JoinRowSet
interface is specifically designed to address this need.
Any RowSet
object
can be added to a JoinRowSet
object to become
part of an SQL JOIN
relationship. This means that both connected
and disconnected RowSet
objects can be part of a JOIN
.
RowSet
objects operating in a connected environment
(JdbcRowSet
objects) are
encouraged to use the database to which they are already
connected to establish SQL JOIN
relationships between
tables directly. However, it is possible for a
JdbcRowSet
object to be added to a JoinRowSet
object
if necessary.
Any number of RowSet
objects can be added to an
instance of JoinRowSet
provided that they
can be related in an SQL JOIN
.
By definition, the SQL JOIN
statement is used to
combine the data contained in two or more relational database tables based
upon a common attribute. The Joinable
interface provides the methods
for establishing a common attribute, which is done by setting a
match column. The match column commonly coincides with
the primary key, but there is
no requirement that the match column be the same as the primary key.
By establishing and then enforcing column matches,
a JoinRowSet
object establishes JOIN
relationships
between RowSet
objects without the assistance of an available
relational database.
The type of JOIN
to be established is determined by setting
one of the JoinRowSet
constants using the method
setJoinType
. The following SQL JOIN
types can be set:
CROSS_JOIN
FULL_JOIN
INNER_JOIN
- the default if noJOIN
type has been setLEFT_OUTER_JOIN
RIGHT_OUTER_JOIN
JOIN
will automatically be an
inner join. The comments for the fields in the
JoinRowSet
interface explain these JOIN
types, which are
standard SQL JOIN
types.
2.0 Using a JoinRowSet
Object for Creating a JOIN
When a JoinRowSet
object is created, it is empty.
The first RowSet
object to be added becomes the basis for the
JOIN
relationship.
Applications must determine which column in each of the
RowSet
objects to be added to the JoinRowSet
object
should be the match column. All of the
RowSet
objects must contain a match column, and the values in
each match column must be ones that can be compared to values in the other match
columns. The columns do not have to have the same name, though they often do,
and they do not have to store the exact same data type as long as the data types
can be compared.
A match column can be set in two ways:
- By calling the
Joinable
methodsetMatchColumn
This is the only method that can set the match column before aRowSet
object is added to aJoinRowSet
object. TheRowSet
object must have implemented theJoinable
interface in order to use the methodsetMatchColumn
. Once the match column value has been set, this method can be used to reset the match column at any time. - By calling one of the versions of the
JoinRowSet
methodaddRowSet
that takes a column name or number (or an array of column names or numbers)
Four of the fiveaddRowSet
methods take a match column as a parameter. These four methods set or reset the match column at the time aRowSet
object is being added to aJoinRowSet
object.
3.0 Sample Usage
The following code fragment adds two CachedRowSet
objects to a JoinRowSet
object. Note that in this example,
no SQL JOIN
type is set, so the default JOIN
type,
which is INNER_JOIN, is established.
In the following code fragment, the table EMPLOYEES
, whose match
column is set to the first column (EMP_ID
), is added to the
JoinRowSet
object jrs. Then
the table ESSP_BONUS_PLAN
, whose match column is likewise
the EMP_ID
column, is added. When this second
table is added to jrs, only the rows in
ESSP_BONUS_PLAN
whose EMP_ID
value matches an
EMP_ID
value in the EMPLOYEES
table are added.
In this case, everyone in the bonus plan is an employee, so all of the rows
in the table ESSP_BONUS_PLAN
are added to the JoinRowSet
object. In this example, both CachedRowSet
objects being added
have implemented the Joinable
interface and can therefore call
the Joinable
method setMatchColumn
.
JoinRowSet jrs = new JoinRowSetImpl(); ResultSet rs1 = stmt.executeQuery("SELECT * FROM EMPLOYEES"); CachedRowSet empl = new CachedRowSetImpl(); empl.populate(rs1); empl.setMatchColumn(1); jrs.addRowSet(empl); ResultSet rs2 = stmt.executeQuery("SELECT * FROM ESSP_BONUS_PLAN"); CachedRowSet bonus = new CachedRowSetImpl(); bonus.populate(rs2); bonus.setMatchColumn(1); // EMP_ID is the first column jrs.addRowSet(bonus);
At this point, jrs is an inside JOIN of the two RowSet
objects
based on their EMP_ID
columns. The application can now browse the
combined data as if it were browsing one single RowSet
object.
Because jrs is itself a RowSet
object, an application can
navigate or modify it using RowSet
methods.
jrs.first(); int employeeID = jrs.getInt(1); String employeeName = jrs.getString(2);
Note that because the SQL JOIN
must be enforced when an application
adds a second or subsequent RowSet
object, there
may be an initial degradation in performance while the JOIN
is
being performed.
The following code fragment adds an additional CachedRowSet
object.
In this case, the match column (EMP_ID
) is set when the
CachedRowSet
object is added to the JoinRowSet
object.
ResultSet rs3 = stmt.executeQuery("SELECT * FROM 401K_CONTRIB"); CachedRowSet fourO1k = new CachedRowSetImpl(); four01k.populate(rs3); jrs.addRowSet(four01k, 1);
The JoinRowSet
object jrs now contains values from all three
tables. The data in each row in four01k in which the value for the
EMP_ID
column matches a value for the EMP_ID
column
in jrs has been added to jrs.
4.0 JoinRowSet
Methods
The JoinRowSet
interface supplies several methods for adding
RowSet
objects and for getting information about the
JoinRowSet
object.
- Methods for adding one or more
RowSet
objects
These methods allow an application to add oneRowSet
object at a time or to add multipleRowSet
objects at one time. In either case, the methods may specify the match column for eachRowSet
object being added. - Methods for getting information
One method retrieves theRowSet
objects in theJoinRowSet
object, and another method retrieves theRowSet
names. A third method retrieves either the SQLWHERE
clause used behind the scenes to form theJOIN
or a text description of what theWHERE
clause does. - Methods related to the type of
JOIN
One method sets theJOIN
type, and five methods find out whether theJoinRowSet
object supports a given type. - A method to make a separate copy of the
JoinRowSet
object
This method creates a copy that can be persisted to the data source.
- Since:
- 1.5
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
An ANSI-styleJOIN
providing a cross product of two tablesstatic final int
An ANSI-styleJOIN
providing a full JOIN.static final int
An ANSI-styleJOIN
providing a inner join between two tables.static final int
An ANSI-styleJOIN
providing a left outer join between two tables.static final int
An ANSI-styleJOIN
providing a right outer join between two tables.Fields declared in interface CachedRowSet
COMMIT_ON_ACCEPT_CHANGES
Modifier and TypeFieldDescriptionstatic final boolean
Deprecated.Because this field is final (it is part of an interface), its value cannot be changed.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 TypeFieldDescriptionstatic final int
The constant indicating that openResultSet
objects with this holdability will be closed when the current transaction is committed.static final int
The constant indicating the concurrency mode for aResultSet
object that may NOT be updated.static final int
The constant indicating the concurrency mode for aResultSet
object that may be updated.static final int
The constant indicating that the rows in a result set will be processed in a forward direction; first-to-last.static final int
The constant indicating that the rows in a result set will be processed in a reverse direction; last-to-first.static final int
The constant indicating that the order in which rows in a result set will be processed is unknown.static final int
The constant indicating that openResultSet
objects with this holdability will remain open when the current transaction is committed.static final int
The constant indicating the type for aResultSet
object whose cursor may move only forward.static final int
The constant indicating the type for aResultSet
object that is scrollable but generally not sensitive to changes to the data that underlies theResultSet
.static final int
The constant indicating the type for aResultSet
object that is scrollable and generally sensitive to changes to the data that underlies theResultSet
.Fields declared in interface WebRowSet
PUBLIC_XML_SCHEMA, SCHEMA_SYSTEM_ID
Modifier and TypeFieldDescriptionstatic final String
The public identifier for the XML Schema definition that defines the XML tags and their valid values for aWebRowSet
implementation.static final String
The URL for the XML Schema definition file that defines the XML tags and their valid values for aWebRowSet
implementation. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds one or moreRowSet
objects contained in the given array ofRowSet
objects to thisJoinRowSet
object and sets the match column for each of theRowSet
objects to the match columns in the given array of column indexes.void
Adds one or moreRowSet
objects contained in the given array ofRowSet
objects to thisJoinRowSet
object and sets the match column for each of theRowSet
objects to the match columns in the given array of column names.void
Adds the givenRowSet
object to thisJoinRowSet
object.void
Adds the givenRowSet
object to thisJoinRowSet
object and sets the designated column as the match column for theRowSet
object.void
Adds rowset to thisJoinRowSet
object and sets the designated column as the match column.int
Returns aint
describing the set SQLJOIN
type governing this JoinRowSet instance.String[]
Returns aString
array containing the names of theRowSet
objects added to thisJoinRowSet
object.Collection
<?> Returns aCollection
object containing theRowSet
objects that have been added to thisJoinRowSet
object.Return a SQL-like description of the WHERE clause being used in a JoinRowSet object.void
setJoinType
(int joinType) Allow the application to adjust the type ofJOIN
imposed on tables contained within the JoinRowSet object instance.boolean
Indicates if CROSS_JOIN is supported by a JoinRowSet implementationboolean
Indicates if FULL_JOIN is supported by a JoinRowSet implementationboolean
Indicates if INNER_JOIN is supported by a JoinRowSet implementationboolean
Indicates if LEFT_OUTER_JOIN is supported by a JoinRowSet implementationboolean
Indicates if RIGHT_OUTER_JOIN is supported by a JoinRowSet implementationCreates a newCachedRowSet
object containing the data in thisJoinRowSet
object, which can be saved to a data source using theSyncProvider
object for theCachedRowSet
object.Methods declared in interface CachedRowSet
acceptChanges, acceptChanges, columnUpdated, columnUpdated, commit, createCopy, createCopyNoConstraints, createCopySchema, createShared, execute, getKeyColumns, getOriginal, getOriginalRow, getPageSize, getRowSetWarnings, getShowDeleted, getSyncProvider, getTableName, nextPage, populate, populate, previousPage, release, restoreOriginal, rollback, rollback, rowSetPopulated, setKeyColumns, setMetaData, setOriginalRow, setPageSize, setShowDeleted, setSyncProvider, setTableName, size, toCollection, toCollection, toCollection, undoDelete, undoInsert, undoUpdate
Modifier and TypeMethodDescriptionvoid
Propagates row update, insert and delete changes made to thisCachedRowSet
object to the underlying data source.void
acceptChanges
(Connection con) Propagates all row update, insert and delete changes to the data source backing thisCachedRowSet
object using the specifiedConnection
object to establish a connection to the data source.boolean
columnUpdated
(int idx) Indicates whether the designated column in the current row of thisCachedRowSet
object has been updated.boolean
columnUpdated
(String columnName) Indicates whether the designated column in the current row of thisCachedRowSet
object has been updated.void
commit()
EachCachedRowSet
object'sSyncProvider
contains aConnection
object from theResultSet
or JDBC properties passed to it's constructors.Creates aRowSet
object that is a deep copy of the data in thisCachedRowSet
object.Creates aCachedRowSet
object that is a deep copy of thisCachedRowSet
object's data but is independent of it.Creates aCachedRowSet
object that is an empty copy of thisCachedRowSet
object.Returns a newRowSet
object backed by the same data as that of thisCachedRowSet
object.void
execute
(Connection conn) Populates thisCachedRowSet
object with data, using the given connection to produce the result set from which the data will be read.int[]
Returns an array containing one or more column numbers indicating the columns that form a key that uniquely identifies a row in thisCachedRowSet
object.Returns aResultSet
object containing the original value of thisCachedRowSet
object.Returns aResultSet
object containing the original value for the current row only of thisCachedRowSet
object.int
Returns the page-size for theCachedRowSet
objectRetrieves the first warning reported by calls on thisRowSet
object.boolean
Retrieves aboolean
indicating whether rows marked for deletion appear in the set of current rows.Retrieves theSyncProvider
implementation for thisCachedRowSet
object.Returns an identifier for the object (table) that was used to create thisCachedRowSet
object.boolean
nextPage()
Increments the current page of theCachedRowSet
.void
Populates thisCachedRowSet
object with data from the givenResultSet
object.void
Populates thisCachedRowSet
object with data from the givenResultSet
object.boolean
Decrements the current page of theCachedRowSet
.void
release()
Releases the current contents of thisCachedRowSet
object and sends arowSetChanged
event to all registered listeners.void
Restores thisCachedRowSet
object to its original value, that is, its value before the last set of changes.void
rollback()
EachCachedRowSet
object'sSyncProvider
contains aConnection
object from the originalResultSet
or JDBC properties passed to it.void
EachCachedRowSet
object'sSyncProvider
contains aConnection
object from the originalResultSet
or JDBC properties passed to it.void
rowSetPopulated
(RowSetEvent event, int numRows) Notifies registered listeners that a RowSet object in the given RowSetEvent object has populated a number of additional rows.void
setKeyColumns
(int[] keys) Sets thisCachedRowSet
object'skeyCols
field with the given array of column numbers, which forms a key for uniquely identifying a row in thisCachedRowSet
object.void
Sets the metadata for thisCachedRowSet
object with the givenRowSetMetaData
object.void
Sets the current row in thisCachedRowSet
object as the original row.void
setPageSize
(int size) Sets theCachedRowSet
object's page-size.void
setShowDeleted
(boolean b) Sets the propertyshowDeleted
to the givenboolean
value, which determines whether rows marked for deletion appear in the set of current rows.void
setSyncProvider
(String provider) Sets theSyncProvider
object for thisCachedRowSet
object to the one specified.void
setTableName
(String tabName) Sets the identifier for the table from which thisCachedRowSet
object was derived to the given table name.int
size()
Returns the number of rows in thisCachedRowSet
object.Collection
<?> Converts thisCachedRowSet
object to aCollection
object that contains all of thisCachedRowSet
object's data.Collection
<?> toCollection
(int column) Converts the designated column in thisCachedRowSet
object to aCollection
object.Collection
<?> toCollection
(String column) Converts the designated column in thisCachedRowSet
object to aCollection
object.void
Cancels the deletion of the current row and notifies listeners that a row has changed.void
Immediately removes the current row from thisCachedRowSet
object if the row has been inserted, and also notifies listeners that a row has changed.void
Immediately reverses the last update operation if the row has been modified.Methods declared in interface Joinable
getMatchColumnIndexes, getMatchColumnNames, setMatchColumn, setMatchColumn, setMatchColumn, setMatchColumn, unsetMatchColumn, unsetMatchColumn, unsetMatchColumn, unsetMatchColumn
Modifier and TypeMethodDescriptionint[]
Retrieves the indexes of the match columns that were set for thisRowSet
object with the methodsetMatchColumn(int[] columnIdxes)
.String[]
Retrieves the names of the match columns that were set for thisRowSet
object with the methodsetMatchColumn(String [] columnNames)
.void
setMatchColumn
(int columnIdx) Sets the designated column as the match column for thisRowSet
object.void
setMatchColumn
(int[] columnIdxes) Sets the designated columns as the match column for thisRowSet
object.void
setMatchColumn
(String columnName) Sets the designated column as the match column for thisRowSet
object.void
setMatchColumn
(String[] columnNames) Sets the designated columns as the match column for thisRowSet
object.void
unsetMatchColumn
(int columnIdx) Unsets the designated column as the match column for thisRowSet
object.void
unsetMatchColumn
(int[] columnIdxes) Unsets the designated columns as the match column for thisRowSet
object.void
unsetMatchColumn
(String columnName) Unsets the designated column as the match column for thisRowSet
object.void
unsetMatchColumn
(String[] columnName) Unsets the designated columns as the match columns for thisRowSet
object.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 TypeMethodDescriptionboolean
absolute
(int row) Moves the cursor to the given row number in thisResultSet
object.void
Moves the cursor to the end of thisResultSet
object, just after the last row.void
Moves the cursor to the front of thisResultSet
object, just before the first row.void
Cancels the updates made to the current row in thisResultSet
object.void
Clears all warnings reported on thisResultSet
object.void
close()
Releases thisResultSet
object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.void
Deletes the current row from thisResultSet
object and from the underlying database.int
findColumn
(String columnLabel) Maps the givenResultSet
column label to itsResultSet
column index.boolean
first()
Moves the cursor to the first row in thisResultSet
object.getArray
(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSet
object as anArray
object in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSet
object as anArray
object in the Java programming language.getAsciiStream
(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSet
object as a stream of ASCII characters.getAsciiStream
(String columnLabel) Retrieves the value of the designated column in the current row of thisResultSet
object as a stream of ASCII characters.getBigDecimal
(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSet
object as ajava.math.BigDecimal
with full precision.getBigDecimal
(int columnIndex, int scale) Deprecated.UsegetBigDecimal(int columnIndex)
orgetBigDecimal(String columnLabel)
getBigDecimal
(String columnLabel) Retrieves the value of the designated column in the current row of thisResultSet
object as ajava.math.BigDecimal
with full precision.getBigDecimal
(String columnLabel, int scale) Deprecated.UsegetBigDecimal(int columnIndex)
orgetBigDecimal(String columnLabel)
getBinaryStream
(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSet
object as a stream of uninterpreted bytes.getBinaryStream
(String columnLabel) Retrieves the value of the designated column in the current row of thisResultSet
object as a stream of uninterpretedbyte
s.getBlob
(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSet
object as aBlob
object in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSet
object as aBlob
object in the Java programming language.boolean
getBoolean
(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSet
object as aboolean
in the Java programming language.boolean
getBoolean
(String columnLabel) Retrieves the value of the designated column in the current row of thisResultSet
object as aboolean
in the Java programming language.byte
getByte
(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSet
object as abyte
in the Java programming language.byte
Retrieves the value of the designated column in the current row of thisResultSet
object as abyte
in the Java programming language.byte[]
getBytes
(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSet
object as abyte
array in the Java programming language.byte[]
Retrieves the value of the designated column in the current row of thisResultSet
object as abyte
array in the Java programming language.getCharacterStream
(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSet
object as ajava.io.Reader
object.getCharacterStream
(String columnLabel) Retrieves the value of the designated column in the current row of thisResultSet
object as ajava.io.Reader
object.getClob
(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSet
object as aClob
object in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSet
object as aClob
object in the Java programming language.int
Retrieves the concurrency mode of thisResultSet
object.Retrieves the name of the SQL cursor used by thisResultSet
object.getDate
(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSet
object as ajava.sql.Date
object in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSet
object as ajava.sql.Date
object in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSet
object as ajava.sql.Date
object in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSet
object as ajava.sql.Date
object in the Java programming language.double
getDouble
(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSet
object as adouble
in the Java programming language.double
Retrieves the value of the designated column in the current row of thisResultSet
object as adouble
in the Java programming language.int
Retrieves the fetch direction for thisResultSet
object.int
Retrieves the fetch size for thisResultSet
object.float
getFloat
(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSet
object as afloat
in the Java programming language.float
Retrieves the value of the designated column in the current row of thisResultSet
object as afloat
in the Java programming language.int
Retrieves the holdability of thisResultSet
objectint
getInt
(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSet
object as anint
in the Java programming language.int
Retrieves the value of the designated column in the current row of thisResultSet
object as anint
in the Java programming language.long
getLong
(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSet
object as along
in the Java programming language.long
Retrieves the value of the designated column in the current row of thisResultSet
object as along
in the Java programming language.Retrieves the number, types and properties of thisResultSet
object's columns.getNCharacterStream
(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSet
object as ajava.io.Reader
object.getNCharacterStream
(String columnLabel) Retrieves the value of the designated column in the current row of thisResultSet
object as ajava.io.Reader
object.getNClob
(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSet
object as aNClob
object in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSet
object as aNClob
object in the Java programming language.getNString
(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSet
object as aString
in the Java programming language.getNString
(String columnLabel) Retrieves the value of the designated column in the current row of thisResultSet
object as aString
in the Java programming language.getObject
(int columnIndex) Gets the value of the designated column in the current row of thisResultSet
object as anObject
in the Java programming language.<T> T
Retrieves the value of the designated column in the current row of thisResultSet
object and will convert from the SQL type of the column to the requested Java data type, if the conversion is supported.Retrieves the value of the designated column in the current row of thisResultSet
object as anObject
in the Java programming language.Gets the value of the designated column in the current row of thisResultSet
object as anObject
in the Java programming language.<T> T
Retrieves the value of the designated column in the current row of thisResultSet
object and will convert from the SQL type of the column to the requested Java data type, if the conversion is supported.Retrieves the value of the designated column in the current row of thisResultSet
object as anObject
in the Java programming language.getRef
(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSet
object as aRef
object in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSet
object as aRef
object in the Java programming language.int
getRow()
Retrieves the current row number.getRowId
(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSet
object as ajava.sql.RowId
object in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSet
object as ajava.sql.RowId
object in the Java programming language.short
getShort
(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSet
object as ashort
in the Java programming language.short
Retrieves the value of the designated column in the current row of thisResultSet
object as ashort
in the Java programming language.getSQLXML
(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSet
as ajava.sql.SQLXML
object in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSet
as ajava.sql.SQLXML
object in the Java programming language.Retrieves theStatement
object that produced thisResultSet
object.getString
(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSet
object as aString
in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSet
object as aString
in the Java programming language.getTime
(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSet
object as ajava.sql.Time
object in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSet
object as ajava.sql.Time
object in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSet
object as ajava.sql.Time
object in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSet
object as ajava.sql.Time
object in the Java programming language.getTimestamp
(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSet
object as ajava.sql.Timestamp
object in the Java programming language.getTimestamp
(int columnIndex, Calendar cal) Retrieves the value of the designated column in the current row of thisResultSet
object as ajava.sql.Timestamp
object in the Java programming language.getTimestamp
(String columnLabel) Retrieves the value of the designated column in the current row of thisResultSet
object as ajava.sql.Timestamp
object in the Java programming language.getTimestamp
(String columnLabel, Calendar cal) Retrieves the value of the designated column in the current row of thisResultSet
object as ajava.sql.Timestamp
object in the Java programming language.int
getType()
Retrieves the type of thisResultSet
object.getUnicodeStream
(int columnIndex) Deprecated.usegetCharacterStream
in place ofgetUnicodeStream
getUnicodeStream
(String columnLabel) Deprecated.usegetCharacterStream
insteadgetURL
(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSet
object as ajava.net.URL
object in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSet
object as ajava.net.URL
object in the Java programming language.Retrieves the first warning reported by calls on thisResultSet
object.void
Inserts the contents of the insert row into thisResultSet
object and into the database.boolean
Retrieves whether the cursor is after the last row in thisResultSet
object.boolean
Retrieves whether the cursor is before the first row in thisResultSet
object.boolean
isClosed()
Retrieves whether thisResultSet
object has been closed.boolean
isFirst()
Retrieves whether the cursor is on the first row of thisResultSet
object.boolean
isLast()
Retrieves whether the cursor is on the last row of thisResultSet
object.boolean
last()
Moves the cursor to the last row in thisResultSet
object.void
Moves the cursor to the remembered cursor position, usually the current row.void
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 thisResultSet
object.void
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
Retrieves whether a row has been deleted.boolean
Retrieves whether the current row has had an insertion.boolean
Retrieves whether the current row has been updated.void
setFetchDirection
(int direction) Gives a hint as to the direction in which the rows in thisResultSet
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 thisResultSet
object.void
updateArray
(int columnIndex, Array x) Updates the designated column with ajava.sql.Array
value.void
updateArray
(String columnLabel, Array x) Updates the designated column with ajava.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 ajava.math.BigDecimal
value.void
updateBigDecimal
(String columnLabel, BigDecimal x) Updates the designated column with ajava.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 ajava.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 ajava.sql.Blob
value.void
updateBoolean
(int columnIndex, boolean x) Updates the designated column with aboolean
value.void
updateBoolean
(String columnLabel, boolean x) Updates the designated column with aboolean
value.void
updateByte
(int columnIndex, byte x) Updates the designated column with abyte
value.void
updateByte
(String columnLabel, byte x) Updates the designated column with abyte
value.void
updateBytes
(int columnIndex, byte[] x) Updates the designated column with abyte
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 givenReader
object.void
updateClob
(int columnIndex, Reader reader, long length) Updates the designated column using the givenReader
object, which is the given number of characters long.void
updateClob
(int columnIndex, Clob x) Updates the designated column with ajava.sql.Clob
value.void
updateClob
(String columnLabel, Reader reader) Updates the designated column using the givenReader
object.void
updateClob
(String columnLabel, Reader reader, long length) Updates the designated column using the givenReader
object, which is the given number of characters long.void
updateClob
(String columnLabel, Clob x) Updates the designated column with ajava.sql.Clob
value.void
updateDate
(int columnIndex, Date x) Updates the designated column with ajava.sql.Date
value.void
updateDate
(String columnLabel, Date x) Updates the designated column with ajava.sql.Date
value.void
updateDouble
(int columnIndex, double x) Updates the designated column with adouble
value.void
updateDouble
(String columnLabel, double x) Updates the designated column with adouble
value.void
updateFloat
(int columnIndex, float x) Updates the designated column with afloat
value.void
updateFloat
(String columnLabel, float x) Updates the designated column with afloat
value.void
updateInt
(int columnIndex, int x) Updates the designated column with anint
value.void
Updates the designated column with anint
value.void
updateLong
(int columnIndex, long x) Updates the designated column with along
value.void
updateLong
(String columnLabel, long x) Updates the designated column with along
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 givenReader
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 givenReader
object, which is the given number of characters long.void
updateNClob
(int columnIndex, NClob nClob) Updates the designated column with ajava.sql.NClob
value.void
updateNClob
(String columnLabel, Reader reader) Updates the designated column using the givenReader
object.void
updateNClob
(String columnLabel, Reader reader, long length) Updates the designated column using the givenReader
object, which is the given number of characters long.void
updateNClob
(String columnLabel, NClob nClob) Updates the designated column with ajava.sql.NClob
value.void
updateNString
(int columnIndex, String nString) Updates the designated column with aString
value.void
updateNString
(String columnLabel, String nString) Updates the designated column with aString
value.void
updateNull
(int columnIndex) Updates the designated column with anull
value.void
updateNull
(String columnLabel) Updates the designated column with anull
value.void
updateObject
(int columnIndex, Object x) Updates the designated column with anObject
value.void
updateObject
(int columnIndex, Object x, int scaleOrLength) Updates the designated column with anObject
value.default void
updateObject
(int columnIndex, Object x, SQLType targetSqlType) Updates the designated column with anObject
value.default void
updateObject
(int columnIndex, Object x, SQLType targetSqlType, int scaleOrLength) Updates the designated column with anObject
value.void
updateObject
(String columnLabel, Object x) Updates the designated column with anObject
value.void
updateObject
(String columnLabel, Object x, int scaleOrLength) Updates the designated column with anObject
value.default void
updateObject
(String columnLabel, Object x, SQLType targetSqlType) Updates the designated column with anObject
value.default void
updateObject
(String columnLabel, Object x, SQLType targetSqlType, int scaleOrLength) Updates the designated column with anObject
value.void
Updates the designated column with ajava.sql.Ref
value.void
Updates the designated column with ajava.sql.Ref
value.void
Updates the underlying database with the new contents of the current row of thisResultSet
object.void
updateRowId
(int columnIndex, RowId x) Updates the designated column with aRowId
value.void
updateRowId
(String columnLabel, RowId x) Updates the designated column with aRowId
value.void
updateShort
(int columnIndex, short x) Updates the designated column with ashort
value.void
updateShort
(String columnLabel, short x) Updates the designated column with ashort
value.void
updateSQLXML
(int columnIndex, SQLXML xmlObject) Updates the designated column with ajava.sql.SQLXML
value.void
updateSQLXML
(String columnLabel, SQLXML xmlObject) Updates the designated column with ajava.sql.SQLXML
value.void
updateString
(int columnIndex, String x) Updates the designated column with aString
value.void
updateString
(String columnLabel, String x) Updates the designated column with aString
value.void
updateTime
(int columnIndex, Time x) Updates the designated column with ajava.sql.Time
value.void
updateTime
(String columnLabel, Time x) Updates the designated column with ajava.sql.Time
value.void
updateTimestamp
(int columnIndex, Timestamp x) Updates the designated column with ajava.sql.Timestamp
value.void
updateTimestamp
(String columnLabel, Timestamp x) Updates the designated column with ajava.sql.Timestamp
value.boolean
wasNull()
Reports whether the last column read had a value of SQLNULL
.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 TypeMethodDescriptionvoid
addRowSetListener
(RowSetListener listener) Registers the given listener so that it will be notified of events that occur on thisRowSet
object.void
Clears the parameters set for thisRowSet
object's command.void
execute()
Fills thisRowSet
object with data.Retrieves thisRowSet
object's command property.Retrieves the logical name that identifies the data source for thisRowSet
object.boolean
Retrieves whether escape processing is enabled for thisRowSet
object.int
Retrieves the maximum number of bytes that may be returned for certain column values.int
Retrieves the maximum number of rows that thisRowSet
object can contain.Retrieves the password used to create a database connection.int
Retrieves the maximum number of seconds the driver will wait for a statement to execute.int
Retrieves the transaction isolation level set for thisRowSet
object.Retrieves theMap
object associated with thisRowSet
object, which specifies the custom mapping of SQL user-defined types, if any.getUrl()
Retrieves the url property thisRowSet
object will use to create a connection if it uses theDriverManager
instead of aDataSource
object to establish the connection.Retrieves the username used to create a database connection for thisRowSet
object.boolean
Retrieves whether thisRowSet
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 thisRowSet
object.void
Sets the designated parameter in thisRowSet
object's command with the givenArray
value.void
setAsciiStream
(int parameterIndex, InputStream x) Sets the designated parameter in thisRowSet
object's command to the given input stream.void
setAsciiStream
(int parameterIndex, InputStream x, int length) Sets the designated parameter in thisRowSet
object's command to the givenjava.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 thisRowSet
object's command to the givenjava.math.BigDecimal
value.void
setBigDecimal
(String parameterName, BigDecimal x) Sets the designated parameter to the givenjava.math.BigDecimal
value.void
setBinaryStream
(int parameterIndex, InputStream x) Sets the designated parameter in thisRowSet
object's command to the given input stream.void
setBinaryStream
(int parameterIndex, InputStream x, int length) Sets the designated parameter in thisRowSet
object's command to the givenjava.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 aInputStream
object.void
setBlob
(int parameterIndex, InputStream inputStream, long length) Sets the designated parameter to aInputStream
object.void
Sets the designated parameter in thisRowSet
object's command with the givenBlob
value.void
setBlob
(String parameterName, InputStream inputStream) Sets the designated parameter to aInputStream
object.void
setBlob
(String parameterName, InputStream inputStream, long length) Sets the designated parameter to aInputStream
object.void
Sets the designated parameter to the givenjava.sql.Blob
object.void
setBoolean
(int parameterIndex, boolean x) Sets the designated parameter in thisRowSet
object's command to the given Javaboolean
value.void
setBoolean
(String parameterName, boolean x) Sets the designated parameter to the given Javaboolean
value.void
setByte
(int parameterIndex, byte x) Sets the designated parameter in thisRowSet
object's command to the given Javabyte
value.void
Sets the designated parameter to the given Javabyte
value.void
setBytes
(int parameterIndex, byte[] x) Sets the designated parameter in thisRowSet
object's command to the given Java array ofbyte
values.void
Sets the designated parameter to the given Java array of bytes.void
setCharacterStream
(int parameterIndex, Reader reader) Sets the designated parameter in thisRowSet
object's command to the givenReader
object.void
setCharacterStream
(int parameterIndex, Reader reader, int length) Sets the designated parameter in thisRowSet
object's command to the givenjava.io.Reader
value.void
setCharacterStream
(String parameterName, Reader reader) Sets the designated parameter to the givenReader
object.void
setCharacterStream
(String parameterName, Reader reader, int length) Sets the designated parameter to the givenReader
object, which is the given number of characters long.void
Sets the designated parameter to aReader
object.void
Sets the designated parameter to aReader
object.void
Sets the designated parameter in thisRowSet
object's command with the givenClob
value.void
Sets the designated parameter to aReader
object.void
Sets the designated parameter to aReader
object.void
Sets the designated parameter to the givenjava.sql.Clob
object.void
setCommand
(String cmd) Sets thisRowSet
object's command property to the given SQL query.void
setConcurrency
(int concurrency) Sets the concurrency of thisRowSet
object to the given concurrency level.void
setDataSourceName
(String name) Sets the data source name property for thisRowSet
object to the givenString
.void
Sets the designated parameter in thisRowSet
object's command to the givenjava.sql.Date
value.void
Sets the designated parameter in thisRowSet
object's command with the givenjava.sql.Date
value.void
Sets the designated parameter to the givenjava.sql.Date
value using the default time zone of the virtual machine that is running the application.void
Sets the designated parameter to the givenjava.sql.Date
value, using the givenCalendar
object.void
setDouble
(int parameterIndex, double x) Sets the designated parameter in thisRowSet
object's command to the given Javadouble
value.void
Sets the designated parameter to the given Javadouble
value.void
setEscapeProcessing
(boolean enable) Sets escape processing for thisRowSet
object on or off.void
setFloat
(int parameterIndex, float x) Sets the designated parameter in thisRowSet
object's command to the given Javafloat
value.void
Sets the designated parameter to the given Javafloat
value.void
setInt
(int parameterIndex, int x) Sets the designated parameter in thisRowSet
object's command to the given Javaint
value.void
Sets the designated parameter to the given Javaint
value.void
setLong
(int parameterIndex, long x) Sets the designated parameter in thisRowSet
object's command to the given Javalong
value.void
Sets the designated parameter to the given Javalong
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 thisRowSet
object can contain to the specified number.void
setNCharacterStream
(int parameterIndex, Reader value) Sets the designated parameter in thisRowSet
object's command to aReader
object.void
setNCharacterStream
(int parameterIndex, Reader value, long length) Sets the designated parameter to aReader
object.void
setNCharacterStream
(String parameterName, Reader value) Sets the designated parameter to aReader
object.void
setNCharacterStream
(String parameterName, Reader value, long length) Sets the designated parameter to aReader
object.void
Sets the designated parameter to aReader
object.void
Sets the designated parameter to aReader
object.void
Sets the designated parameter to ajava.sql.NClob
object.void
Sets the designated parameter to aReader
object.void
Sets the designated parameter to aReader
object.void
Sets the designated parameter to ajava.sql.NClob
object.void
setNString
(int parameterIndex, String value) Sets the designated parameter to the givenString
object.void
setNString
(String parameterName, String value) Sets the designated parameter to the givenString
object.void
setNull
(int parameterIndex, int sqlType) Sets the designated parameter in thisRowSet
object's SQL command to SQLNULL
.void
Sets the designated parameter in thisRowSet
object's SQL command to SQLNULL
.void
Sets the designated parameter to SQLNULL
.void
Sets the designated parameter to SQLNULL
.void
Sets the designated parameter in thisRowSet
object's command with a JavaObject
.void
Sets the designated parameter in thisRowSet
object's command with a JavaObject
.void
Sets the designated parameter in thisRowSet
object's command with the given JavaObject
.void
Sets the value of the designated parameter with the given object.void
Sets the value of the designated parameter with the given object.void
Sets the value of the designated parameter with the given object.void
setPassword
(String password) Sets the database password for thisRowSet
object to the givenString
.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 thisRowSet
object is read-only to the givenboolean
.void
Sets the designated parameter in thisRowSet
object's command with the givenRef
value.void
Sets the designated parameter to the givenjava.sql.RowId
object.void
Sets the designated parameter to the givenjava.sql.RowId
object.void
setShort
(int parameterIndex, short x) Sets the designated parameter in thisRowSet
object's command to the given Javashort
value.void
Sets the designated parameter to the given Javashort
value.void
Sets the designated parameter to the givenjava.sql.SQLXML
object.void
Sets the designated parameter to the givenjava.sql.SQLXML
object.void
Sets the designated parameter in thisRowSet
object's command to the given JavaString
value.void
Sets the designated parameter to the given JavaString
value.void
Sets the designated parameter in thisRowSet
object's command to the givenjava.sql.Time
value.void
Sets the designated parameter in thisRowSet
object's command with the givenjava.sql.Time
value.void
Sets the designated parameter to the givenjava.sql.Time
value.void
Sets the designated parameter to the givenjava.sql.Time
value, using the givenCalendar
object.void
setTimestamp
(int parameterIndex, Timestamp x) Sets the designated parameter in thisRowSet
object's command to the givenjava.sql.Timestamp
value.void
setTimestamp
(int parameterIndex, Timestamp x, Calendar cal) Sets the designated parameter in thisRowSet
object's command with the givenjava.sql.Timestamp
value.void
setTimestamp
(String parameterName, Timestamp x) Sets the designated parameter to the givenjava.sql.Timestamp
value.void
setTimestamp
(String parameterName, Timestamp x, Calendar cal) Sets the designated parameter to the givenjava.sql.Timestamp
value, using the givenCalendar
object.void
setTransactionIsolation
(int level) Sets the transaction isolation level for thisRowSet
object.void
setType
(int type) Sets the type of thisRowSet
object to the given type.void
setTypeMap
(Map<String, Class<?>> map) Installs the givenjava.util.Map
object as the default type map for thisRowSet
object.void
Sets the URL thisRowSet
object will use when it uses theDriverManager
to create a connection.void
Sets the designated parameter to the givenjava.net.URL
value.void
setUsername
(String name) Sets the username property for thisRowSet
object to the givenString
.Methods declared in interface WebRowSet
readXml, readXml, writeXml, writeXml, writeXml, writeXml
Modifier and TypeMethodDescriptionvoid
readXml
(InputStream iStream) Reads a stream based XML input to populate thisWebRowSet
object.void
Reads aWebRowSet
object in its XML format from the givenReader
object.void
writeXml
(OutputStream oStream) Writes the data, properties, and metadata for thisWebRowSet
object to the givenOutputStream
object in XML format.void
Writes the data, properties, and metadata for thisWebRowSet
object to the givenWriter
object in XML format.void
writeXml
(ResultSet rs, OutputStream oStream) Populates thisWebRowSet
object with the contents of the givenResultSet
object and writes its data, properties, and metadata to the givenOutputStream
object in XML format.void
Populates thisWebRowSet
object with the contents of the givenResultSet
object and writes its data, properties, and metadata to the givenWriter
object in XML format.Methods declared in interface Wrapper
isWrapperFor, unwrap
Modifier and TypeMethodDescriptionboolean
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
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
-
CROSS_JOIN
static final int CROSS_JOINAn ANSI-styleJOIN
providing a cross product of two tables- See Also:
-
INNER_JOIN
static final int INNER_JOINAn ANSI-styleJOIN
providing a inner join between two tables. Any unmatched rows in either table of the join should be discarded.- See Also:
-
LEFT_OUTER_JOIN
static final int LEFT_OUTER_JOINAn ANSI-styleJOIN
providing a left outer join between two tables. In SQL, this is described where all records should be returned from the left side of the JOIN statement.- See Also:
-
RIGHT_OUTER_JOIN
static final int RIGHT_OUTER_JOINAn ANSI-styleJOIN
providing a right outer join between two tables. In SQL, this is described where all records from the table on the right side of the JOIN statement even if the table on the left has no matching record.- See Also:
-
FULL_JOIN
static final int FULL_JOINAn ANSI-styleJOIN
providing a full JOIN. Specifies that all rows from either table be returned regardless of matching records on the other table.- See Also:
-
-
Method Details
-
addRowSet
Adds the givenRowSet
object to thisJoinRowSet
object. If theRowSet
object is the first to be added to thisJoinRowSet
object, it forms the basis of theJOIN
relationship to be established.This method should be used only when the given
RowSet
object already has a match column that was set with theJoinable
methodsetMatchColumn
.Note: A
Joinable
object is anyRowSet
object that has implemented theJoinable
interface.- Parameters:
rowset
- theRowSet
object that is to be added to thisJoinRowSet
object; it must implement theJoinable
interface and have a match column set- Throws:
SQLException
- if (1) an empty rowset is added to the to thisJoinRowSet
object, (2) a match column has not been set for rowset, or (3) rowset violates the activeJOIN
- See Also:
-
addRowSet
Adds the givenRowSet
object to thisJoinRowSet
object and sets the designated column as the match column for theRowSet
object. If theRowSet
object is the first to be added to thisJoinRowSet
object, it forms the basis of theJOIN
relationship to be established.This method should be used when RowSet does not already have a match column set.
- Parameters:
rowset
- theRowSet
object that is to be added to thisJoinRowSet
object; it may implement theJoinable
interfacecolumnIdx
- anint
that identifies the column to become the match column- Throws:
SQLException
- if (1) rowset is an empty rowset or (2) rowset violates the activeJOIN
- See Also:
-
addRowSet
Adds rowset to thisJoinRowSet
object and sets the designated column as the match column. If rowset is the first to be added to thisJoinRowSet
object, it forms the basis for theJOIN
relationship to be established.This method should be used when the given
RowSet
object does not already have a match column.- Parameters:
rowset
- theRowSet
object that is to be added to thisJoinRowSet
object; it may implement theJoinable
interfacecolumnName
- theString
object giving the name of the column to be set as the match column- Throws:
SQLException
- if (1) rowset is an empty rowset or (2) the match column for rowset does not satisfy the conditions of theJOIN
-
addRowSet
Adds one or moreRowSet
objects contained in the given array ofRowSet
objects to thisJoinRowSet
object and sets the match column for each of theRowSet
objects to the match columns in the given array of column indexes. The first element in columnIdx is set as the match column for the firstRowSet
object in rowset, the second element of columnIdx is set as the match column for the second element in rowset, and so on.The first
RowSet
object added to thisJoinRowSet
object forms the basis for theJOIN
relationship.This method should be used when the given
RowSet
object does not already have a match column.- Parameters:
rowset
- an array of one or moreRowSet
objects to be added to theJOIN
; it may implement theJoinable
interfacecolumnIdx
- an array ofint
values indicating the index(es) of the columns to be set as the match columns for theRowSet
objects in rowset- Throws:
SQLException
- if (1) an empty rowset is added to thisJoinRowSet
object, (2) a match column is not set for aRowSet
object in rowset, or (3) aRowSet
object being added violates the activeJOIN
-
addRowSet
Adds one or moreRowSet
objects contained in the given array ofRowSet
objects to thisJoinRowSet
object and sets the match column for each of theRowSet
objects to the match columns in the given array of column names. The first element in columnName is set as the match column for the firstRowSet
object in rowset, the second element of columnName is set as the match column for the second element in rowset, and so on.The first
RowSet
object added to thisJoinRowSet
object forms the basis for theJOIN
relationship.This method should be used when the given
RowSet
object(s) does not already have a match column.- Parameters:
rowset
- an array of one or moreRowSet
objects to be added to theJOIN
; it may implement theJoinable
interfacecolumnName
- an array ofString
values indicating the names of the columns to be set as the match columns for theRowSet
objects in rowset- Throws:
SQLException
- if (1) an empty rowset is added to thisJoinRowSet
object, (2) a match column is not set for aRowSet
object in rowset, or (3) aRowSet
object being added violates the activeJOIN
-
getRowSets
Returns aCollection
object containing theRowSet
objects that have been added to thisJoinRowSet
object. This should return the 'n' number of RowSet contained within theJOIN
and maintain any updates that have occurred while in this union.- Returns:
- a
Collection
object consisting of theRowSet
objects added to thisJoinRowSet
object - Throws:
SQLException
- if an error occurs generating theCollection
object to be returned
-
getRowSetNames
Returns aString
array containing the names of theRowSet
objects added to thisJoinRowSet
object.- Returns:
- a
String
array of the names of theRowSet
objects in thisJoinRowSet
object - Throws:
SQLException
- if an error occurs retrieving the names of theRowSet
objects- See Also:
-
toCachedRowSet
Creates a newCachedRowSet
object containing the data in thisJoinRowSet
object, which can be saved to a data source using theSyncProvider
object for theCachedRowSet
object.If any updates or modifications have been applied to the JoinRowSet the CachedRowSet returned by the method will not be able to persist it's changes back to the originating rows and tables in the in the datasource. The CachedRowSet instance returned should not contain modification data and it should clear all properties of it's originating SQL statement. An application should reset the SQL statement using the
RowSet.setCommand
method.In order to allow changes to be persisted back to the datasource to the originating tables, the
acceptChanges
method should be used and called on a JoinRowSet object instance. Implementations can leverage the internal data and update tracking in their implementations to interact with the SyncProvider to persist any changes.- Returns:
- a CachedRowSet containing the contents of the JoinRowSet
- Throws:
SQLException
- if an error occurs assembling the CachedRowSet object- See Also:
-
supportsCrossJoin
boolean supportsCrossJoin()Indicates if CROSS_JOIN is supported by a JoinRowSet implementation- Returns:
- true if the CROSS_JOIN is supported; false otherwise
-
supportsInnerJoin
boolean supportsInnerJoin()Indicates if INNER_JOIN is supported by a JoinRowSet implementation- Returns:
- true is the INNER_JOIN is supported; false otherwise
-
supportsLeftOuterJoin
boolean supportsLeftOuterJoin()Indicates if LEFT_OUTER_JOIN is supported by a JoinRowSet implementation- Returns:
- true is the LEFT_OUTER_JOIN is supported; false otherwise
-
supportsRightOuterJoin
boolean supportsRightOuterJoin()Indicates if RIGHT_OUTER_JOIN is supported by a JoinRowSet implementation- Returns:
- true is the RIGHT_OUTER_JOIN is supported; false otherwise
-
supportsFullJoin
boolean supportsFullJoin()Indicates if FULL_JOIN is supported by a JoinRowSet implementation- Returns:
- true is the FULL_JOIN is supported; false otherwise
-
setJoinType
Allow the application to adjust the type ofJOIN
imposed on tables contained within the JoinRowSet object instance. Implementations should throw a SQLException if they do not support a givenJOIN
type.- Parameters:
joinType
- the standard JoinRowSet.XXX static field definition of a SQLJOIN
to re-configure a JoinRowSet instance on the fly.- Throws:
SQLException
- if an unsupportedJOIN
type is set- See Also:
-
getWhereClause
Return a SQL-like description of the WHERE clause being used in a JoinRowSet object. An implementation can describe the WHERE clause of the SQLJOIN
by supplying a SQL strings description ofJOIN
or provide a textual description to assist applications using aJoinRowSet
- Returns:
- whereClause a textual or SQL description of the logical WHERE clause used in the JoinRowSet instance
- Throws:
SQLException
- if an error occurs in generating a representation of the WHERE clause.
-
getJoinType
Returns aint
describing the set SQLJOIN
type governing this JoinRowSet instance. The returned type will be one of standard JoinRowSet types:CROSS_JOIN
,INNER_JOIN
,LEFT_OUTER_JOIN
,RIGHT_OUTER_JOIN
orFULL_JOIN
.- Returns:
- joinType one of the standard JoinRowSet static field
definitions of a SQL
JOIN
.JoinRowSet.INNER_JOIN
is returned as the defaultJOIN
type is no type has been explicitly set. - Throws:
SQLException
- if an error occurs determining the SQLJOIN
type supported by the JoinRowSet instance.- See Also:
-