Home » Mojarra-2.0.1 » javax » faces » model » [javadoc | source]
javax.faces.model
public class: ResultDataModel [javadoc | source]
java.lang.Object
   javax.faces.model.DataModel<String, Object>
      javax.faces.model.ResultDataModel

All Implemented Interfaces:
    Iterable

ResultDataModel is a convenience implementation of DataModel that wraps a JSTL Result object, typically representing the results of executing an SQL query via JSTL tags.

Constructor:
 public ResultDataModel() 
 public ResultDataModel(Result result) 
    Parameters:
    result - Result to be wrapped (if any)
Method from javax.faces.model.ResultDataModel Summary:
getRowCount,   getRowData,   getRowIndex,   getWrappedData,   isRowAvailable,   setRowIndex,   setWrappedData
Methods from javax.faces.model.DataModel:
addDataModelListener,   getDataModelListeners,   getRowCount,   getRowData,   getRowIndex,   getWrappedData,   isRowAvailable,   iterator,   removeDataModelListener,   setRowIndex,   setWrappedData
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.faces.model.ResultDataModel Detail:
 public int getRowCount() 

    If there is wrappedData available, return the length of the array returned by calling getRows() on the underlying Result. If no wrappedData is available, return -1.

 public SortedMap<String, Object> getRowData() 

    If row data is available, return the SortedMap array element at the index specified by rowIndex of the array returned by calling getRows() on the underlying Result. If no wrapped data is available, return null.

    Note that, if a non-null Map is returned by this method, it will contain the values of the columns for the current row, keyed by column name. Column name comparisons must be performed in a case-insensitive manner.

 public int getRowIndex() 
 public Object getWrappedData() 
 public boolean isRowAvailable() 

    Return true if there is wrappedData available, and the current value of rowIndex is greater than or equal to zero, and less than the length of the array returned by calling getRows() on the underlying Result. Otherwise, return false.

 public  void setRowIndex(int rowIndex) 
 public  void setWrappedData(Object data)