| com.sun.rave.faces.data.CachedRowSetDataModel
All known Subclasses: com.sun.jsfcl.data.CachedRowSetDataModel,
CachedRowSetDataModel | public class CachedRowSetDataModel extends DataModel (Code) | | CachedRowSetDataModel is a convenience implementation of
DataModel that wraps a CachedRowSet of Java objects.
Note that the specified CachedRowSet MUST
be scrollable. In addition, if input components (that will be updating
model values) reference this object in value binding expressions, the
specified CachedRowSet MUST be updatable.
|
Method Summary | |
public CachedRowSet | getCachedRowSet() Return the CachedRowSet we are connected with,
if any; otherwise, return null . | public int | getRowCount() | public Object | getRowData() If row data is available, return a Map representing
the values of the columns for the row specified by rowIndex ,
keyed by the corresponding column names. | public int | getRowIndex() | public Object | getWrappedData() | public boolean | isRowAvailable() Return true if there is wrappedData
available, and the result of calling absolute() on the
underlying CachedRowSet , passing the current value of
rowIndex plus one (to account for the fact that
CachedRowSet uses one-relative indexing), returns
true . | public void | setCachedRowSet(CachedRowSet rowSet) Set the CachedRowSet we are connected with,
or pass null to disconnect. | public void | setRowIndex(int rowIndex) | public void | setWrappedData(Object data) |
CachedRowSetDataModel | public CachedRowSetDataModel(CachedRowSet cachedRowSet)(Code) | | Construct a new
CachedRowSetDataModel wrapping the specified
CachedRowSet .
Parameters: cachedRowSet - CachedRowSet to be wrapped (if any) |
getCachedRowSet | public CachedRowSet getCachedRowSet()(Code) | | Return the CachedRowSet we are connected with,
if any; otherwise, return null . This is a
type=safe alias for getWrappedData() .
|
getRowCount | public int getRowCount()(Code) | | Return -1, since CachedRowSet does not provide a
standard way to determine the number of available rows without
scrolling through the entire CachedRowSet , and this can
be very expensive if the number of rows is large.
exception: FacesException - if an error occurs getting the row count |
getRowData | public Object getRowData()(Code) | | If row data is available, return a Map representing
the values of the columns for the row specified by rowIndex ,
keyed by the corresponding column names. If no wrapped data is
available, return null .
If a non-null Map is returned, its behavior
must correspond to the contract for a mutable Map as
described in the JavaDocs for AbstractMap , with the
following exceptions and specialized behavior:
- The
Map , and any supporting objects it returns,
must perform all column name comparisons in a
case-insensitive manner. This case-insensitivity must be
implemented using a case-insensitive Comparator ,
such as
String.CASE_INSENSITIVE_ORDER .
- The following methods must throw
UnsupportedOperationException : clear() ,
remove() .
- The
entrySet() method must return a Set
that has the following behavior:
- Throw
UnsupportedOperationException for any attempt
to add or remove entries from the Set , either
directly or indirectly through an Iterator
returned by the Set .
- Updates to the
value of an entry in this
set must write through to the corresponding
column value in the underlying CachedRowSet .
- The
keySet() method must return a Set
that throws UnsupportedOperationException on any
attempt to add or remove keys, either directly or through an
Iterator returned by the Set .
- The
put() method must throw
IllegalArgumentException if a key value for which
containsKey() returns false is
specified. However, if a key already present in the Map
is specified, the specified value must write through to the
corresponding column value in the underlying CachedRowSet .
- The
values() method must return a
Collection that throws
UnsupportedOperationException on any attempt to add
or remove values, either directly or through an Iterator
returned by the Collection .
exception: FacesException - if an error occurs getting the row data exception: IllegalArgumentException - if now row data is availableat the currently specified row index |
getRowIndex | public int getRowIndex()(Code) | | exception: FacesException - |
isRowAvailable | public boolean isRowAvailable()(Code) | | Return true if there is wrappedData
available, and the result of calling absolute() on the
underlying CachedRowSet , passing the current value of
rowIndex plus one (to account for the fact that
CachedRowSet uses one-relative indexing), returns
true . Otherwise, return false .
exception: FacesException - if an error occurs getting the row availability |
setCachedRowSet | public void setCachedRowSet(CachedRowSet rowSet)(Code) | | Set the CachedRowSet we are connected with,
or pass null to disconnect. This is a
type-safe alias for setWrappedData() .
Parameters: rowSet - The CachedRowSet we are connected to,or null to disconnect |
|
|