|
|||||||||||
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.VirtualListDataModel
List Data Model for display lists with a very large or unknown number of rows.
Field Summary | |
private boolean |
keepRows
This flag directs the list 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 static long |
serialVersionUID
Serial Version UID |
private int |
size
The total number of elements. |
private int |
threshold
Number of overlapping rows between rowsets to reduce page filtering |
Constructor Summary | |
VirtualListDataModel()
Constructor |
|
VirtualListDataModel(int rowsetSize,
boolean keepRows)
Constructor |
Method Summary | |
int |
capacity()
Returns the current capacity of this VirtualListDataModel. |
void |
clear()
Clears the current list |
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 |
java.lang.Object |
getElementAt(int index)
Returns the (row) object for the specified index. |
java.lang.Object |
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 list. |
void |
setThreshold(int i)
Sets the threshold value. |
int |
size()
Returns the number of rows within the list. |
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.ListDataModel |
getUniqueKey |
Field Detail |
private static final long serialVersionUID
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 VirtualListDataModel()
public VirtualListDataModel(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 layerprotected int doFetchSize() throws java.lang.Exception
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 java.lang.Object getElementAt(int index)
ListDataModel
getElementAt
in interface ListDataModel
index
- A zero based index
ListDataModel.getElementAt(int)
public java.lang.Object getElementFromRowset(int index)
index
- Element index in the rowset
public int size()
ListDataModel
size
in interface ListDataModel
ListDataModel.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 |