|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cc.framework.ui.model.imp.VirtualTreeGroupDataModel
Tree Group Node for Nodes with with a very large or unknown number of rows.
Field Summary | |
private boolean |
keepRows
This flag directs the node not to flush the rowset cache when a new rowset is loaded. |
private java.util.Vector |
rowset
The elements of the currently loaded rowset |
private int |
rowsetIndex
This is the index of the first row in the rowset. |
private int |
rowsetSize
This member holds the size of the rowset. |
private int |
size
The total number of elements. |
private int |
threshold
Number of overlapping rows between rowsets to reduce page filtering |
Constructor Summary | |
VirtualTreeGroupDataModel()
Constructor |
|
VirtualTreeGroupDataModel(int rowsetSize,
boolean keepRows)
Constructor |
Method Summary | |
void |
addChild(TreeNodeDataModel child)
Adds a new node to the child list Note: This method will also set the parent link of the new child node to this |
int |
capacity()
Returns the current capacity of this VirtualTreeGroupDataModel. |
void |
clear()
Clears the current node |
protected void |
clearRowset()
Removes all elements from the rowset. |
protected abstract java.util.Collection |
doFetchRowset(int startIndex,
int rowCount)
This method reads a rowset into memory |
protected int |
doFetchSize()
This method is called to fetch the actual rowset size. |
protected void |
doSetup()
This method is called first to do any initialization processing |
private void |
fetchRowset(int index)
This method is called when the next rowset is to be loaded into memory |
TreeNodeDataModel |
getChild(int index)
Returns the node for the specified index |
TreeNodeDataModel |
getElementFromRowset(int index)
Returns a Element of the rowset |
int |
getRowsetIndex()
Returns the Index of the first element in the rowset |
private int |
mapIndexToRowSet(int index)
This method maps an absolute index to a relative index in the rowset. |
void |
setRowsetSize(int i)
Sets the rowset size to the specified value. |
void |
setSize(int i)
Sets the number of total available elements in this node. |
void |
setThreshold(int i)
Sets the threshold value. |
int |
size()
Returns the number of children for this node return -2 when the node has children but the user is not allowed to open the node. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.cc.framework.ui.model.TreeNodeDataModel |
getParent, getParentKey, getUniqueKey, setParent |
Field Detail |
private boolean keepRows
private int rowsetSize
private int threshold
private int size
-1
when the correct number is unknown
private int rowsetIndex
private java.util.Vector rowset
Constructor Detail |
public VirtualTreeGroupDataModel()
public VirtualTreeGroupDataModel(int rowsetSize, boolean keepRows)
rowsetSize
- The number of records that should
be fetched at a timekeepRows
- Set to true
when all
rows should be kept in memory. Set to false
when only a number of rowsetSize
rows
should be kept in memory (default)Method Detail |
public void clear()
protected void clearRowset()
private void fetchRowset(int index) throws java.lang.Exception
index
- Start Index
java.lang.Exception
- Will be thrown in case of
an error in the integration layerprotected void doSetup() throws java.lang.Exception
java.lang.Exception
- Will be thrown in case of
an error in the integration layerpublic void addChild(TreeNodeDataModel child)
TreeGroupDataModel
Note: This method will also set the parent link of the new child
node to this
addChild
in interface TreeGroupDataModel
child
- Child nodeTreeGroupDataModel.addChild(com.cc.framework.ui.model.TreeNodeDataModel)
protected int doFetchSize() throws java.lang.Exception
-1
java.lang.Exception
- Will be thrown in case of
an error in the integration layerprotected abstract java.util.Collection doFetchRowset(int startIndex, int rowCount) throws java.lang.Exception
startIndex
- Index of the first rowrowCount
- Number of rows to read
java.lang.Exception
- Will be thrown in case of
an error in the integration layerprivate int mapIndexToRowSet(int index) throws java.lang.Exception
index
- the absolute index
-1
when the index could not
be matched
java.lang.Exception
- Will be thrown in case of
an error in the integration layerpublic TreeNodeDataModel getChild(int index)
TreeGroupDataModel
getChild
in interface TreeGroupDataModel
index
- The zero based index
TreeGroupDataModel.getChild(int)
public TreeNodeDataModel getElementFromRowset(int index)
index
- Element index in the rowset
public int size()
TreeGroupDataModel
size
in interface TreeGroupDataModel
TreeGroupDataModel.size()
public int capacity()
public void setSize(int i)
i
- Number of elements or -1
when
the number is unknownpublic int getRowsetIndex()
public void setRowsetSize(int i)
i
- new rowset sizepublic void setThreshold(int i)
i
- new threshold value
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |