org.apache.myfaces.trinidad.model
Interface TreeLocalRowKeyIndex

All Known Implementing Classes:
BaseMenuModel, ChildPropertyMenuModel, ChildPropertyTreeModel, CoreBreadCrumbs, CoreNavigationPane, CoreNavigationTree, CorePage, CoreProcessChoiceBar, CoreTrain, CoreTree, CoreTreeTable, MenuModel, ProcessMenuModel, RowKeyPropertyTreeModel, TreeModel, TreeModelDecorator, UIXHierarchy, UIXMenuHierarchy, UIXNavigationHierarchy, UIXNavigationLevel, UIXNavigationPath, UIXNavigationTree, UIXPage, UIXProcess, UIXTree, UIXTreeTable, ViewIdPropertyMenuModel, XMLMenuModel

public interface TreeLocalRowKeyIndex

Defines a set of "local" APIs for a TreeModel. The "local" APIs allow a client to query the tree model and determine if a set of rows are locally available. "Locally available" can mean the model has the given set of rows in a local cache and can honor a fetch request efficiently (for example, without performing a SQL query).


Method Summary
 boolean areRowsLocallyAvailable(int startIndex, int rowCount, RowKeySet disclosedRowKeys)
          Check if a range of rows is locally available starting from a row index.
 boolean areRowsLocallyAvailable(int rowCount, RowKeySet disclosedRowKeys)
          Check if a range of rows is locally available starting from current position.
 boolean areRowsLocallyAvailable(Object startRowKey, int rowCount, RowKeySet disclosedRowKeys)
          Check if a range of rows is locally available starting from a row key.
 boolean isChildCollectionLocallyAvailable()
          Indicates whether data for a child model (children of the current node) is locally available.
 boolean isChildCollectionLocallyAvailable(int index)
          Indicates whether child data for the node with the given index is locally available.
 boolean isChildCollectionLocallyAvailable(Object rowKey)
          Indicates whether child data for the node with the given row key is locally available.
 

Method Detail

isChildCollectionLocallyAvailable

boolean isChildCollectionLocallyAvailable()
Indicates whether data for a child model (children of the current node) is locally available. Locally available means no data fetch is required as a result of a call to enterContainer.

Returns:
true if child data is locally available

isChildCollectionLocallyAvailable

boolean isChildCollectionLocallyAvailable(int index)
Indicates whether child data for the node with the given index is locally available.

Parameters:
index - row index to check
Returns:
true if child data is available, false otherwise

isChildCollectionLocallyAvailable

boolean isChildCollectionLocallyAvailable(Object rowKey)
Indicates whether child data for the node with the given row key is locally available.

Parameters:
rowKey - row key to check
Returns:
true if child data is available, false otherwise

areRowsLocallyAvailable

boolean areRowsLocallyAvailable(int startIndex,
                                int rowCount,
                                RowKeySet disclosedRowKeys)
Check if a range of rows is locally available starting from a row index. The range can include child nodes in any expanded nodes within the range.

Parameters:
startIndex - staring index for the range
rowCount - number of rows in the range
disclosedRowKeys - set of expanded nodes which may fall within the range to check for availability
Returns:
true if range of rows is locally available flase otherwise

areRowsLocallyAvailable

boolean areRowsLocallyAvailable(Object startRowKey,
                                int rowCount,
                                RowKeySet disclosedRowKeys)
Check if a range of rows is locally available starting from a row key. The range can include child nodes in any expanded nodes within the range.

Parameters:
startRowKey - staring row key for the range
rowCount - number of rows in the range
disclosedRowKeys - set of expanded nodes which may fall within the range to check for availability
Returns:
true if range of rows is locally available flase otherwise

areRowsLocallyAvailable

boolean areRowsLocallyAvailable(int rowCount,
                                RowKeySet disclosedRowKeys)
Check if a range of rows is locally available starting from current position. The range can include child nodes in any expanded nodes within the range.

Parameters:
rowCount - number of rows in the range
disclosedRowKeys - set of expanded nodes which may fall within the range to check for availability
Returns:
true if range of rows is locally available flase otherwise


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