public class IterableDataModel<E>
extends javax.faces.model.DataModel<E>
DataModel
that wraps an Iterable
.
This can be used to encapsulate nearly every collection type, including Collection
derived types such as
List
and Set
. As such this specific DataModel can be used instead of more specific DataModels like
ListDataModel
and JSF 2.2's CollectionDataModel.
Constructor and Description |
---|
IterableDataModel(java.lang.Iterable<E> iterable) |
Modifier and Type | Method and Description |
---|---|
int |
getRowCount() |
E |
getRowData() |
int |
getRowIndex() |
java.lang.Object |
getWrappedData() |
boolean |
isRowAvailable() |
void |
setRowIndex(int rowIndex) |
void |
setWrappedData(java.lang.Object data) |
public IterableDataModel(java.lang.Iterable<E> iterable)
public boolean isRowAvailable()
isRowAvailable
in class javax.faces.model.DataModel<E>
public int getRowCount()
getRowCount
in class javax.faces.model.DataModel<E>
public int getRowIndex()
getRowIndex
in class javax.faces.model.DataModel<E>
public void setRowIndex(int rowIndex)
setRowIndex
in class javax.faces.model.DataModel<E>
public java.lang.Object getWrappedData()
getWrappedData
in class javax.faces.model.DataModel<E>
public void setWrappedData(java.lang.Object data)
setWrappedData
in class javax.faces.model.DataModel<E>