oracle.adf.view.faces.model
Class CollectionModel

java.lang.Object
  |
  +--javax.faces.model.DataModel
        |
        +--oracle.adf.view.faces.model.CollectionModel
Direct Known Subclasses:
SortableModel, TreeModel

public abstract class CollectionModel
extends javax.faces.model.DataModel

The data model that is used by ADF Table components. This extends the faces DataModel class and adds on support for row-keys and sorting.


Constructor Summary
CollectionModel()
           
 
Method Summary
abstract  java.lang.String getRowKey()
          Gets the row key of the current row
 java.lang.String getSortBy()
          Gets the property that this collection is sorted on.
 boolean getSortOrder()
          Gets the sort order
 boolean isSortable(java.lang.String property)
          Return true iff this collection is sortable by the given property
abstract  void setRowKey(java.lang.String key)
          Finds the row with the matching key and makes it current
 void sort(java.lang.String sortBy, boolean sortOrder)
          Sort this collection by the given property
 
Methods inherited from class javax.faces.model.DataModel
addDataModelListener, getDataModelListeners, getRowCount, getRowData, getRowIndex, getWrappedData, isRowAvailable, removeDataModelListener, setRowIndex, setWrappedData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionModel

public CollectionModel()
Method Detail

getRowKey

public abstract java.lang.String getRowKey()
Gets the row key of the current row

Returns:
this String cannot contain spaces

setRowKey

public abstract void setRowKey(java.lang.String key)
Finds the row with the matching key and makes it current

Parameters:
key - this String cannot contain spaces

isSortable

public boolean isSortable(java.lang.String property)
Return true iff this collection is sortable by the given property


getSortBy

public java.lang.String getSortBy()
Gets the property that this collection is sorted on.

Returns:
null, if not sorted

getSortOrder

public boolean getSortOrder()
Gets the sort order

Returns:
true if ascending

sort

public void sort(java.lang.String sortBy,
                 boolean sortOrder)
Sort this collection by the given property

Parameters:
sortBy - the property to sort on
sortOrder - true for ascending. false for descending


Copyright © 2003-2004 Oracle Corporation. All Rights Reserved.