|
Préférences
Moteurs de recherche
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
JavaTM 2 Platform Std. Ed. v1.6.0
javax.sql.rowset
|
Field Summary | |
---|---|
static int |
CROSS_JOIN
An ANSI-style JOIN providing a cross product of two tables |
static int |
FULL_JOIN
An ANSI-style JOIN providing a a full JOIN. |
static int |
INNER_JOIN
An ANSI-style JOIN providing a inner join between two tables. |
static int |
LEFT_OUTER_JOIN
An ANSI-style JOIN providing a left outer join between two
tables. |
static int |
RIGHT_OUTER_JOIN
An ANSI-style JOIN providing a right outer join between
two tables. |
Fields inherited from interface javax.sql.rowset.WebRowSet |
---|
PUBLIC_XML_SCHEMA, SCHEMA_SYSTEM_ID |
Fields inherited from interface javax.sql.rowset.CachedRowSet |
---|
COMMIT_ON_ACCEPT_CHANGES |
Fields inherited from interface java.sql.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 |
Method Summary | |
---|---|
void |
addRowSet(Joinable rowset)
Adds the given RowSet object to this JoinRowSet
object. |
void |
addRowSet(RowSet[] rowset,
int[] columnIdx)
Adds one or more RowSet objects contained in the given
array of RowSet objects to this JoinRowSet
object and sets the match column for
each of the RowSet objects to the match columns
in the given array of column indexes. |
void |
addRowSet(RowSet[] rowset,
String[] columnName)
Adds one or more RowSet objects contained in the given
array of RowSet objects to this JoinRowSet
object and sets the match column for
each of the RowSet objects to the match columns
in the given array of column names. |
void |
addRowSet(RowSet rowset,
int columnIdx)
Adds the given RowSet object to this JoinRowSet
object and sets the designated column as the match column for
the RowSet object. |
void |
addRowSet(RowSet rowset,
String columnName)
Adds rowset to this JoinRowSet object and
sets the designated column as the match column. |
int |
getJoinType()
Returns a int describing the set SQL JOIN type
governing this JoinRowSet instance. |
String[] |
getRowSetNames()
Returns a String array containing the names of the
RowSet objects added to this JoinRowSet
object. |
Collection<?> |
getRowSets()
Returns a Collection object containing the
RowSet objects that have been added to this
JoinRowSet object. |
String |
getWhereClause()
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 of JOIN imposed
on tables contained within the JoinRowSet object instance. |
boolean |
supportsCrossJoin()
Indicates if CROSS_JOIN is supported by a JoinRowSet implementation |
boolean |
supportsFullJoin()
Indicates if FULL_JOIN is supported by a JoinRowSet implementation |
boolean |
supportsInnerJoin()
Indicates if INNER_JOIN is supported by a JoinRowSet implementation |
boolean |
supportsLeftOuterJoin()
Indicates if LEFT_OUTER_JOIN is supported by a JoinRowSet implementation |
boolean |
supportsRightOuterJoin()
Indicates if RIGHT_OUTER_JOIN is supported by a JoinRowSet implementation |
CachedRowSet |
toCachedRowSet()
Creates a new CachedRowSet object containing the
data in this JoinRowSet object, which can be saved
to a data source using the SyncProvider object for
the CachedRowSet object. |
Methods inherited from interface javax.sql.rowset.WebRowSet |
---|
readXml, readXml, writeXml, writeXml, writeXml, writeXml |
Methods inherited from interface javax.sql.rowset.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 |
Methods inherited from interface java.sql.Wrapper |
---|
isWrapperFor, unwrap |
Methods inherited from interface javax.sql.rowset.Joinable |
---|
getMatchColumnIndexes, getMatchColumnNames, setMatchColumn, setMatchColumn, setMatchColumn, setMatchColumn, unsetMatchColumn, unsetMatchColumn, unsetMatchColumn, unsetMatchColumn |
Field Detail |
---|
static final int CROSS_JOIN
JOIN
providing a cross product of two tables
static final int INNER_JOIN
JOIN
providing a inner join between two tables. Any
unmatched rows in either table of the join should be discarded.
static final int LEFT_OUTER_JOIN
JOIN
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.
static final int RIGHT_OUTER_JOIN
JOIN
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.
static final int FULL_JOIN
JOIN
providing a a full JOIN. Specifies that all
rows from either table be returned regardless of matching
records on the other table.
Method Detail |
---|
void addRowSet(Joinable rowset) throws SQLException
RowSet
object to this JoinRowSet
object. If the RowSet
object
is the first to be added to this JoinRowSet
object, it forms the basis of the JOIN
relationship to be
established.
This method should be used only when the given RowSet
object already has a match column that was set with the Joinable
method setMatchColumn
.
Note: A Joinable
object is any RowSet
object
that has implemented the Joinable
interface.
rowset
- the RowSet
object that is to be added to this
JoinRowSet
object; it must implement the
Joinable
interface and have a match column set
SQLException
- if (1) an empty rowset is added to the to this
JoinRowSet
object, (2) a match column has not been
set for rowset, or (3) rowset
violates the active JOIN
Joinable.setMatchColumn(int)
void addRowSet(RowSet rowset, int columnIdx) throws SQLException
RowSet
object to this JoinRowSet
object and sets the designated column as the match column for
the RowSet
object. If the RowSet
object
is the first to be added to this JoinRowSet
object, it forms the basis of the JOIN
relationship to be
established.
This method should be used when RowSet does not already have a match column set.
rowset
- the RowSet
object that is to be added to this
JoinRowSet
object; it may implement the
Joinable
interfacecolumnIdx
- an int
that identifies the column to become the
match column
SQLException
- if (1) rowset is an empty rowset or
(2) rowset violates the active JOIN
Joinable.unsetMatchColumn(int)
void addRowSet(RowSet rowset, String columnName) throws SQLException
JoinRowSet
object and
sets the designated column as the match column. If rowset
is the first to be added to this JoinRowSet
object, it forms the basis for the JOIN
relationship to be
established.
This method should be used when the given RowSet
object
does not already have a match column.
rowset
- the RowSet
object that is to be added to this
JoinRowSet
object; it may implement the
Joinable
interfacecolumnName
- the String
object giving the name of the
column to be set as the match column
SQLException
- if (1) rowset is an empty rowset or
(2) the match column for rowset does not satisfy the
conditions of the JOIN
void addRowSet(RowSet[] rowset, int[] columnIdx) throws SQLException
RowSet
objects contained in the given
array of RowSet
objects to this JoinRowSet
object and sets the match column for
each of the RowSet
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 first
RowSet
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 this JoinRowSet
object forms the basis for the JOIN
relationship.
This method should be used when the given RowSet
object
does not already have a match column.
rowset
- an array of one or more RowSet
objects
to be added to the JOIN
; it may implement the
Joinable
interfacecolumnIdx
- an array of int
values indicating the index(es)
of the columns to be set as the match columns for the RowSet
objects in rowset
SQLException
- if (1) an empty rowset is added to this
JoinRowSet
object, (2) a match column is not set
for a RowSet
object in rowset, or (3)
a RowSet
object being added violates the active
JOIN
void addRowSet(RowSet[] rowset, String[] columnName) throws SQLException
RowSet
objects contained in the given
array of RowSet
objects to this JoinRowSet
object and sets the match column for
each of the RowSet
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 first
RowSet
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 this JoinRowSet
object forms the basis for the JOIN
relationship.
This method should be used when the given RowSet
object(s)
does not already have a match column.
rowset
- an array of one or more RowSet
objects
to be added to the JOIN
; it may implement the
Joinable
interfacecolumnName
- an array of String
values indicating the
names of the columns to be set as the match columns for the
RowSet
objects in rowset
SQLException
- if (1) an empty rowset is added to this
JoinRowSet
object, (2) a match column is not set
for a RowSet
object in rowset, or (3)
a RowSet
object being added violates the active
JOIN
Collection<?> getRowSets() throws SQLException
Collection
object containing the
RowSet
objects that have been added to this
JoinRowSet
object.
This should return the 'n' number of RowSet contained
within the JOIN
and maintain any updates that have occured while in
this union.
Collection
object consisting of the
RowSet
objects added to this JoinRowSet
object
SQLException
- if an error occurs generating the
Collection
object to be returnedString[] getRowSetNames() throws SQLException
String
array containing the names of the
RowSet
objects added to this JoinRowSet
object.
String
array of the names of the
RowSet
objects in this JoinRowSet
object
SQLException
- if an error occurs retrieving the names of
the RowSet
objectsCachedRowSet.setTableName(java.lang.String)
CachedRowSet toCachedRowSet() throws SQLException
CachedRowSet
object containing the
data in this JoinRowSet
object, which can be saved
to a data source using the SyncProvider
object for
the CachedRowSet
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.
SQLException
- if an error occurs assembling the CachedRowSet
objectRowSet
,
CachedRowSet
,
SyncProvider
boolean supportsCrossJoin()
boolean supportsInnerJoin()
boolean supportsLeftOuterJoin()
boolean supportsRightOuterJoin()
boolean supportsFullJoin()
void setJoinType(int joinType) throws SQLException
JOIN
imposed
on tables contained within the JoinRowSet object instance.
Implementations should throw a SQLException if they do
not support a given JOIN
type.
joinType
- the standard JoinRowSet.XXX static field definition
of a SQL JOIN
to re-configure a JoinRowSet instance on
the fly.
SQLException
- if an unsupported JOIN
type is setgetJoinType()
String getWhereClause() throws SQLException
JOIN
by supplying a SQL
strings description of JOIN
or provide a textual
description to assist applications using a JoinRowSet
SQLException
- if an error occurs in generating a representation
of the WHERE clause.int getJoinType() throws SQLException
int
describing the set SQL JOIN
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
or
FULL_JOIN
.
JOIN
. JoinRowSet.INNER_JOIN
is returned as the default JOIN
type is no type has been
explicitly set.
SQLException
- if an error occurs determining the SQL JOIN
type supported by the JoinRowSet instance.setJoinType(int)