Package jakarta.faces.model
Class ResultSetDataModel
- java.lang.Object
- 
- jakarta.faces.model.DataModel<Map<String,Object>>
- 
- jakarta.faces.model.ResultSetDataModel
 
 
- 
- 
Constructor SummaryConstructors Constructor Description ResultSetDataModel()ResultSetDataModel(ResultSet resultSet)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetRowCount()We don't know how many rows the result set has without scrolling through the whole thing.Map<String,Object>getRowData()Get the actual data of this row wrapped into a map.intgetRowIndex()Get the current row index.ObjectgetWrappedData()Get the entire collection of data associated with this component.booleanisRowAvailable()Returns true if a call to getRowData will return a valid object.voidsetRowIndex(int rowIndex)Set the current row index.voidsetWrappedData(Object data)Set the entire list of data associated with this component.- 
Methods inherited from class jakarta.faces.model.DataModeladdDataModelListener, getDataModelListeners, iterator, removeDataModelListener
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface java.lang.IterableforEach, spliterator
 
- 
 
- 
- 
- 
Constructor Detail- 
ResultSetDataModelpublic ResultSetDataModel() 
 - 
ResultSetDataModelpublic ResultSetDataModel(ResultSet resultSet) 
 
- 
 - 
Method Detail- 
getRowCountpublic int getRowCount() We don't know how many rows the result set has without scrolling through the whole thing.- Specified by:
- getRowCountin class- DataModel<Map<String,Object>>
- Returns:
- the number of rows available.
 
 - 
getRowDatapublic Map<String,Object> getRowData() Get the actual data of this row wrapped into a map. The specification is very strict about what has to be returned from here, so check the spec before modifying anything here.- Specified by:
- getRowDatain class- DataModel<Map<String,Object>>
- Returns:
- The object associated with the current row index.
 
 - 
getRowIndexpublic int getRowIndex() Description copied from class:DataModelGet the current row index.- Specified by:
- getRowIndexin class- DataModel<Map<String,Object>>
- Returns:
- The current row index.
 
 - 
getWrappedDatapublic Object getWrappedData() Description copied from class:DataModelGet the entire collection of data associated with this component. Note that the actual type of the returned object depends upon the concrete subclass of DataModel; the object will represent an "ordered sequence of components", but may be implemented as an array, java.util.List, java.sql.ResultSet or other similar types.- Specified by:
- getWrappedDatain class- DataModel<Map<String,Object>>
- Returns:
- the wrapped object.
 
 - 
isRowAvailablepublic boolean isRowAvailable() Description copied from class:DataModelReturns true if a call to getRowData will return a valid object.- Specified by:
- isRowAvailablein class- DataModel<Map<String,Object>>
- Returns:
- true if a call to getRowData will return a valid object. false otherwise.
 
 - 
setRowIndexpublic void setRowIndex(int rowIndex) Description copied from class:DataModelSet the current row index. This affects the behaviour of the getRowData method in particular.- Specified by:
- setRowIndexin class- DataModel<Map<String,Object>>
- Parameters:
- rowIndex- The row index. It may be -1 to indicate "no row", or may be a value between 0 and getRowCount()-1.
 
 - 
setWrappedDatapublic void setWrappedData(Object data) Description copied from class:DataModelSet the entire list of data associated with this component. Note that the actual type of the provided object must match the expectations of the concrete subclass of DataModel. See getWrappedData.- Specified by:
- setWrappedDatain class- DataModel<Map<String,Object>>
- Parameters:
- data- The object to be wrapped.
 
 
- 
 
-