|
|||||||||||
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.KeyListDataModel
ListDataModel which holds only a Key Set in Memory. The Display Beans are loaded as needed
Field Summary | |
private int |
cache
The List implements a very simple cache mechanism to prevent unnecessary loading |
private java.lang.Object |
cacheBean
Cached row bean |
private java.util.Vector |
keySet
The Set of Keys |
private static long |
serialVersionUID
Serial Version UID |
Constructor Summary | |
KeyListDataModel()
|
Method Summary | |
void |
clear()
Clears the current keyset |
protected abstract java.util.Collection |
doFetchKeys()
Overwrite this method to load the keyset |
protected abstract java.lang.Object |
doFetchRowBean(java.lang.Object key)
Overwrite this method to load one single row bean |
protected void |
doSetup()
This method is called first to do any initialization processing |
java.lang.Object |
getElementAt(int index)
Returns the (row) object for the specified index. |
private java.lang.Object |
getRowBean(int index)
Returns the row bean for the given index |
java.lang.String |
getUniqueKey(int index)
Returns a unique key for the row which is specified by the index. |
void |
setupKeys()
Use this method to set up the keys collection explicit |
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 |
Field Detail |
private static final long serialVersionUID
private java.util.Vector keySet
private int cache
private java.lang.Object cacheBean
Constructor Detail |
public KeyListDataModel()
Method Detail |
protected void doSetup() throws java.lang.Exception
java.lang.Exception
- Will be thrown in case of
an error in the integration layerprotected abstract java.util.Collection doFetchKeys() throws java.lang.Exception
java.lang.Exception
- An error ocurred while loading the
keysetprotected abstract java.lang.Object doFetchRowBean(java.lang.Object key) throws java.lang.Exception
key
- The key
java.lang.Exception
- An error ocurred while loading the
row beanpublic void clear()
public void setupKeys() throws java.lang.Exception
java.lang.Exception
- An error ocurred while loading the
keysetprivate java.lang.Object getRowBean(int index)
index
- Element index
public java.lang.Object getElementAt(int index)
ListDataModel
getElementAt
in interface ListDataModel
index
- A zero based index
ListDataModel.getElementAt(int)
public java.lang.String getUniqueKey(int index)
ListDataModel
getUniqueKey
in interface ListDataModel
index
- A zero based index
ListDataModel.getUniqueKey(int)
public int size()
ListDataModel
size
in interface ListDataModel
ListDataModel.size()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |