|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.faces.model.DataModel
org.apache.myfaces.trinidad.model.CollectionModel
org.apache.myfaces.trinidad.model.SortableModel
public class SortableModel
Creates a CollectionModel that is sortable. All properties that implement java.lang.Comparable are deemed sortable.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.myfaces.trinidad.model.LocalRowKeyIndex |
|---|
LocalRowKeyIndex.Confidence, LocalRowKeyIndex.LocalCachingStrategy |
| Constructor Summary | |
|---|---|
SortableModel()
No arg constructor for use as a managed-bean. |
|
SortableModel(Object model)
Create a new SortableModel from the given instance. |
|
| Method Summary | |
|---|---|
void |
addDataModelListener(DataModelListener listener)
|
DataModelListener[] |
getDataModelListeners()
|
int |
getRowCount()
Gets the number of values in this collection |
Object |
getRowData()
Gets the current value identified by the current index or rowKey. |
int |
getRowIndex()
Gets the index of the current value. |
Object |
getRowKey()
Gets the row key of the current row |
List<SortCriterion> |
getSortCriteria()
Gets the criteria that this collection is sorted by. |
Object |
getWrappedData()
|
boolean |
isRowAvailable()
Checks to make sure a value exists for the current index or rowKey. |
boolean |
isSortable(String property)
Checks to see if the underlying collection is sortable by the given property. |
void |
removeDataModelListener(DataModelListener listener)
|
void |
setRowIndex(int rowIndex)
Sets up a value at a particular index to be the current value. |
void |
setRowKey(Object key)
Finds the row with the matching key and makes it current |
void |
setSortCriteria(List<SortCriterion> criteria)
Sorts this collection by the given criteria. |
void |
setWrappedData(Object data)
Sets the underlying data being managed by this instance. |
String |
toString()
|
| Methods inherited from class org.apache.myfaces.trinidad.model.CollectionModel |
|---|
addRowKeyChangeListener, areRowsAvailable, areRowsAvailable, areRowsAvailable, areRowsLocallyAvailable, areRowsLocallyAvailable, areRowsLocallyAvailable, clearCachedRow, clearCachedRow, clearCachedRows, clearCachedRows, clearLocalCache, fireRowKeyChange, getCachingStrategy, getEstimatedRowCount, getEstimatedRowCountConfidence, getRowData, getRowData, isRowAvailable, isRowAvailable, isRowLocallyAvailable, isRowLocallyAvailable, removeRowKeyChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SortableModel(Object model)
model - This will be converted into a DataModelsetWrappedData(java.lang.Object)public SortableModel()
| Method Detail |
|---|
public Object getRowData()
RowKeyIndex
getRowData in interface RowKeyIndexgetRowData in class DataModelRowKeyIndex.getRowKey(),
RowKeyIndex.getRowIndex()public Object getWrappedData()
getWrappedData in class DataModelpublic boolean isRowAvailable()
RowKeyIndexRowKeyIndex.getRowCount()).
isRowAvailable in interface RowKeyIndexisRowAvailable in class DataModelRowKeyIndex.getRowKey(),
RowKeyIndex.getRowIndex()public void setWrappedData(Object data)
setWrappedData in class DataModeldata - This Object will be converted into a
DataModel.ModelUtils.toDataModel(java.lang.Object)public int getRowCount()
RowKeyIndex
getRowCount in interface RowKeyIndexgetRowCount in class DataModelpublic void setRowIndex(int rowIndex)
RowKeyIndex
setRowIndex in interface RowKeyIndexsetRowIndex in class DataModelrowIndex - the zero-based index of the value to make current.
Use -1 to clear the current valuepublic int getRowIndex()
RowKeyIndex
getRowIndex in interface RowKeyIndexgetRowIndex in class DataModelpublic Object getRowKey()
getRowKey in interface RowKeyIndexgetRowKey in class CollectionModelCollectionModel.setRowKey(java.lang.Object)public void setRowKey(Object key)
setRowKey in interface RowKeyIndexsetRowKey in class CollectionModelkey - the rowKey, previously obtained from CollectionModel.getRowKey().public void addDataModelListener(DataModelListener listener)
addDataModelListener in class DataModelpublic DataModelListener[] getDataModelListeners()
getDataModelListeners in class DataModelpublic void removeDataModelListener(DataModelListener listener)
removeDataModelListener in class DataModelpublic boolean isSortable(String property)
isSortable in class CollectionModelproperty - The name of the property to sort the underlying collection by.
public List<SortCriterion> getSortCriteria()
CollectionModel
getSortCriteria in class CollectionModelSortCriterionpublic void setSortCriteria(List<SortCriterion> criteria)
CollectionModel
setSortCriteria in class CollectionModelcriteria - Each element in this List must be of type SortCriterion.
The empty list may be used to cancel any sort order. null should be treated
the same as an empty list.SortCriterionpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||