java.lang.Objectorg.objectweb.telosys.common.TelosysObject
org.objectweb.telosys.common.vo.GenericVOList
Generic abstract class to build Value Objects List
Constructor Summary | |
protected |
GenericVOList(java.lang.Class eltClass)
|
Method Summary | |
protected void |
addElement(java.lang.Object newElement)
Appends the given element to the end of the list |
void |
clear()
Removes all of the elements from this list |
protected java.lang.Object |
getElement(int index)
|
java.lang.Class |
getElementType()
Returns the type (class) of the elements stored in the list |
protected java.lang.Object |
getFirstElement()
|
java.util.List |
getList()
Returns the encapsulated List object |
protected java.lang.Object |
getNextElement()
|
java.lang.Object |
getSelectedElement()
Returns the current selected element (or null if no element selected) |
int |
getSelectedIndex()
Returns the current selected index (or -1 if no selection) |
java.lang.String |
getSortField()
Returns the field name used as current sort criteria |
protected void |
insertElement(int index,
java.lang.Object newElement)
|
boolean |
isEmpty()
Returns 'true' if this list contains no elements |
boolean |
isSelected(int iIndex)
Returns true if the given index is the current selected index |
boolean |
isSortedBy(java.lang.String sFieldName)
Returns true if the list is currently sorted by the given field |
boolean |
isSortedInAscendingOrder()
Returns true if the list is currently sorted in ascending order |
boolean |
isSortedInDescendingOrder()
Returns true if the list is currently sorted in descending order |
java.util.Iterator |
iterator()
Returns an iterator over the elements in this list in proper sequence |
java.util.ListIterator |
listIterator()
Returns a list iterator of the elements in this list (in proper sequence) |
protected java.lang.Object |
removeElement(int index)
|
protected boolean |
removeElement(java.lang.Object element)
|
protected java.lang.Object |
replaceElement(int index,
java.lang.Object newElement)
|
boolean |
replaceSelectedElement(java.lang.Object newElement)
Replaces the current selected element if any |
int |
select(int iNewSelectedIndex)
Select the given index |
int |
size()
Returns the number of elements in this list. |
void |
sort(java.lang.String sFieldName)
Sort the list using the given field as criteria (case sensitive) in ascending order |
void |
sort(java.lang.String sFieldName,
java.lang.String sOrder)
Sort the list using the given field as criteria (case sensitive) and the specified order ( ascending or descending ) |
void |
sortIgnoreCase(java.lang.String sFieldName)
Sort the list using the given field as criteria ( ignoring case ) in ascending order |
void |
sortIgnoreCase(java.lang.String sFieldName,
java.lang.String sOrder)
Sort the list using the given field as criteria ( ignoring case ) and the specified order ( ascending or descending ) |
java.lang.String |
toString()
|
int |
unselect()
Set the list in a state where there's no selected element (no selected index) |
Methods inherited from class org.objectweb.telosys.common.TelosysObject |
error, error, error, getFlagTrace, info, setFlagTrace, trace, warn |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
protected GenericVOList(java.lang.Class eltClass)
Method Detail |
protected void addElement(java.lang.Object newElement)
newElement
- protected void insertElement(int index, java.lang.Object newElement)
protected java.lang.Object replaceElement(int index, java.lang.Object newElement)
protected boolean removeElement(java.lang.Object element)
protected java.lang.Object removeElement(int index)
protected java.lang.Object getElement(int index)
protected java.lang.Object getFirstElement()
protected java.lang.Object getNextElement()
public java.lang.Class getElementType()
public java.util.List getList()
public java.util.Iterator iterator()
public java.util.ListIterator listIterator()
public int size()
public boolean isEmpty()
public void clear()
public int select(int iNewSelectedIndex)
iNewSelectedIndex
-
public int unselect()
public int getSelectedIndex()
public boolean isSelected(int iIndex)
iIndex
-
public java.lang.Object getSelectedElement()
public boolean replaceSelectedElement(java.lang.Object newElement)
newElement
-
public java.lang.String getSortField()
public boolean isSortedBy(java.lang.String sFieldName)
sFieldName
-
public boolean isSortedInAscendingOrder()
public boolean isSortedInDescendingOrder()
public void sort(java.lang.String sFieldName)
sFieldName
- :
the name of the field to comparepublic void sort(java.lang.String sFieldName, java.lang.String sOrder)
sFieldName
- :
the name of the field to comparesOrder
- :
'ASC' = ascending order , 'DESC' = descending orderpublic void sortIgnoreCase(java.lang.String sFieldName)
sFieldName
- :
the name of the field to comparepublic void sortIgnoreCase(java.lang.String sFieldName, java.lang.String sOrder)
sFieldName
- :
the name of the field to comparesOrder
- :
'ASC' = ascending order , 'DESC' = descending orderpublic java.lang.String toString()