com.ibm.mashups.enabler.strategy
Interface TreeLoadAheadStrategy
- All Superinterfaces:
- Strategy
public TreeLoadAheadStrategy
- extends Strategy
Interface that defines a load ahead strategy for loading elements wihin a tree hierarchy. When applied to a tree model it will load the given number of elements at a time from the backend.
Example; A TreeLoadAheadStrategy with parentLevel = 2 and childrenLevel = 2 will
- load the parent as well as all the parents of the parent when calling getParent on a given node and
- load the children as well as all the children of the child when calling getChildren on a given node.
Constructor Summary |
constructor(int parentLevel,
int childrenLevel)
|
Method Summary |
int |
getChildrenLevel()
Returns the number of children levels in the hierarchy to load ahead |
int |
getParentLevel()
Returns the number of parent levels in the hierarchy to load ahead |
constructor
public constructor(int parentLevel,
int childrenLevel)
- Parameters:
parentLevel
-
number of parent levels to be loaded ahead from the backend. must not be null
or less than one.childrenLevel
-
number of children levels to be loaded ahead from the backend. must not be null
or less than one.
getChildrenLevel
int getChildrenLevel()
-
Returns the number of children levels in the hierarchy to load ahead
- Returns:
-
number of children levels to load ahead
getParentLevel
int getParentLevel()
-
Returns the number of parent levels in the hierarchy to load ahead
- Returns:
-
number of parent levels to load ahead
Copyright IBM Corp. 2010 All Rights Reserved.