org.apache.myfaces.trinidad.model
Interface RowKeyIndex

All Known Subinterfaces:
CollectionComponent
All Known Implementing Classes:
BaseMenuModel, ChildPropertyTreeModel, CollectionModel, CoreBreadCrumbs, CoreNavigationPane, CoreNavigationTree, CorePage, CoreProcessChoiceBar, CoreTable, CoreTrain, CoreTree, CoreTreeTable, MenuModel, ProcessMenuModel, SortableModel, TreeModel, UIXHierarchy, UIXMenuHierarchy, UIXNavigationHierarchy, UIXNavigationLevel, UIXNavigationPath, UIXNavigationTree, UIXPage, UIXProcess, UIXTable, UIXTree, UIXTreeTable, ViewIdPropertyMenuModel, XMLMenuModel

public interface RowKeyIndex

Identifies a collection that is indexed by rowKeys. Data is accessed by setting a rowKey, and then accessing getRowData().


Method Summary
 int getRowCount()
          Gets the number of values in this collection
 java.lang.Object getRowData()
          Gets the current value identified by the current index or rowKey.
 java.lang.Object getRowData(int rowIndex)
          Gets the row value at the given index.
 int getRowIndex()
          Gets the index of the current value.
 java.lang.Object getRowKey()
          Gets the rowKey of the current value.
 boolean isRowAvailable()
          Checks to make sure a value exists for the current index or rowKey.
 boolean isRowAvailable(int rowIndex)
          Checks to make sure a value exists for the given index.
 void setRowIndex(int rowIndex)
          Sets up a value at a particular index to be the current value.
 void setRowKey(java.lang.Object rowKey)
          Sets up a value at a particular rowKey to be the current value.
 

Method Detail

getRowCount

int getRowCount()
Gets the number of values in this collection

Returns:
-1 if the number of values is not known.

getRowIndex

int getRowIndex()
Gets the index of the current value. The current value is returned by calling {link #getRowData}

Returns:
the zero-based index of the current value, or -1 if there is no current value

setRowIndex

void setRowIndex(int rowIndex)
Sets up a value at a particular index to be the current value. The current value is returned by calling {link #getRowData}

Parameters:
rowIndex - the zero-based index of the value to make current. Use -1 to clear the current value

getRowKey

java.lang.Object getRowKey()
Gets the rowKey of the current value. The current value is returned by calling {link #getRowData}

Returns:
the rowKey of the current value, or null if there is no current value

setRowKey

void setRowKey(java.lang.Object rowKey)
Sets up a value at a particular rowKey to be the current value. The current value is returned by calling {link #getRowData}

Parameters:
rowKey - the rowKey of the value to make current. Use null to clear the current value

isRowAvailable

boolean isRowAvailable()
Checks to make sure a value exists for the current index or rowKey. This is useful if the number of values in this collection is not known (See getRowCount()).

Returns:
true if a value exists; false otherwise.
See Also:
getRowKey(), getRowIndex()

getRowData

java.lang.Object getRowData()
Gets the current value identified by the current index or rowKey.

Returns:
null if the current value has been cleared.
See Also:
getRowKey(), getRowIndex()

isRowAvailable

boolean isRowAvailable(int rowIndex)
Checks to make sure a value exists for the given index.

Parameters:
rowIndex - the index of the row to check.
Returns:
true if a value exists; false otherwise.

getRowData

java.lang.Object getRowData(int rowIndex)
Gets the row value at the given index.

Parameters:
rowIndex - the index of the row to get data from.
Returns:
null if the current value has been cleared.


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.