com.taursys.model
Interface ListValueHolder

All Superinterfaces:
java.util.Collection, CollectionValueHolder, java.util.List, ValueHolder
All Known Implementing Classes:
AbstractListValueHolder, VOListValueHolder

public interface ListValueHolder
extends CollectionValueHolder, java.util.List

ListValueHolder is ...

Version:
1.0
Author:
Marty Phelan

Method Summary
 void addListSelectionListener(javax.swing.event.ListSelectionListener l)
          Add a listener to the list that's notified each time a change to the selection occurs.
 void first()
          Makes the last object in the List available.
 int getPosition()
          Gets the current position in the list.
 java.lang.Object getPropertyValue(java.lang.String propertyName, int row)
          Returns the value of the given property in the valueObject of the given row.
 java.lang.Object[] getPropertyValues(java.lang.String[] propertyNames, int index)
          Get the values for the given properties in the valueObject at the given index.
 int getRowCount()
          Gets the current number of rows in the list.
 boolean hasAny()
          Indicates if the List has any Objects.
 boolean hasPrior()
          Indicates whether there is a prior Object in the List.
 int indexOf(java.lang.String[] propertyNames, java.lang.Object[] values)
          Search through the items in the list for a match based on comparing the given properties/values.
 void last()
          Makes the last object in the List available.
 void moveTo(int row)
          Makes the given row number the current available object.
 void prior()
          Makes the prior object in the List available.
 void removeListSelectionListener(javax.swing.event.ListSelectionListener l)
          Remove a listener from the list that's notified each time a change to the selection occurs.
 
Methods inherited from interface com.taursys.model.CollectionValueHolder
add, addAll, clear, contains, containsAll, equals, getObject, hashCode, hasNext, isEmpty, iterator, next, remove, removeAll, reset, retainAll, setObject, size, toArray, toArray
 
Methods inherited from interface com.taursys.model.ValueHolder
addChangeListener, getAlias, getJavaDataType, getPropertyValue, getPropertyValues, removeChangeListener, setPropertyValue, setPropertyValues
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Method Detail

getPropertyValue

public java.lang.Object getPropertyValue(java.lang.String propertyName,
                                         int row)
                                  throws ModelException
Returns the value of the given property in the valueObject of the given row. Does not change the current position of the list.

Throws:
ModelException

getPropertyValues

public java.lang.Object[] getPropertyValues(java.lang.String[] propertyNames,
                                            int index)
                                     throws ModelException
Get the values for the given properties in the valueObject at the given index.

Throws:
ModelException

indexOf

public int indexOf(java.lang.String[] propertyNames,
                   java.lang.Object[] values)
            throws ModelException
Search through the items in the list for a match based on comparing the given properties/values.

Parameters:
propertyNames - which properties to compare for a match
values - the values to match
Returns:
the first item in the list which matches the criteria else -1
Throws:
ModelException

hasPrior

public boolean hasPrior()
Indicates whether there is a prior Object in the List.


hasAny

public boolean hasAny()
Indicates if the List has any Objects.


moveTo

public void moveTo(int row)
Makes the given row number the current available object. You should first invoke getRowCount to ensure that you are not requesting a row out of range.


getPosition

public int getPosition()
Gets the current position in the list. Returns -1 if position invalid.


getRowCount

public int getRowCount()
Gets the current number of rows in the list.


first

public void first()
Makes the last object in the List available. You should first invoke the hasAny to ensure that there is an object in the List. If the list is empty, the current object will be null.


prior

public void prior()
Makes the prior object in the List available. You should first invoke the hasPrior to ensure that there is a prior object in the List.


last

public void last()
Makes the last object in the List available. You should first invoke the hasAny to ensure that there is an object in the List. If the list is empty, the current object will be null.


removeListSelectionListener

public void removeListSelectionListener(javax.swing.event.ListSelectionListener l)
Remove a listener from the list that's notified each time a change to the selection occurs.

Parameters:
l - the ListSelectionListener
See Also:
addListSelectionListener(javax.swing.event.ListSelectionListener)

addListSelectionListener

public void addListSelectionListener(javax.swing.event.ListSelectionListener l)
Add a listener to the list that's notified each time a change to the selection occurs.

Parameters:
l - the ListSelectionListener
See Also:
removeListSelectionListener(javax.swing.event.ListSelectionListener)


Copyright © 2007 Martin T Phelan. All Rights Reserved.