com.arsdigita.toolbox.ui
Class ACSObjectCollectionListModel

java.lang.Object
  extended bycom.arsdigita.toolbox.ui.ACSObjectCollectionListModel
All Implemented Interfaces:
ListModel

public class ACSObjectCollectionListModel
extends Object
implements ListModel


Field Summary
 
Fields inherited from interface com.arsdigita.bebop.list.ListModel
versionId
 
Constructor Summary
ACSObjectCollectionListModel(ACSObjectCollection collection)
           
 
Method Summary
protected  ACSObjectCollection getCollection()
           
 Object getElement()
          Get the element for the current list item.
 String getKey()
          Get the key that uniquely identifies the current list item.
 boolean next()
          Move to the next list item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ACSObjectCollectionListModel

public ACSObjectCollectionListModel(ACSObjectCollection collection)
Method Detail

getCollection

protected final ACSObjectCollection getCollection()

next

public boolean next()
Description copied from interface: ListModel
Move to the next list item. If there is no next list item, return false. The item's key and element can be accessed with calls to ListModel.getKey() and ListModel.getElement(). Initially, the list model is positioned before the first item, so that next() has to be called once before it is possible to access the item.

Specified by:
next in interface ListModel
Returns:
true if the model is positioned on a valid item after the call returns.

getElement

public Object getElement()
Description copied from interface: ListModel
Get the element for the current list item. The concrete type of the object returned is specific to each implementation of ListModel and should be documented there.

This method can only be called successfully if the previous cal to ListModel.next() returned true.

Specified by:
getElement in interface ListModel
Returns:
the element for the current list item
See Also:
ListModel.next()

getKey

public String getKey()
Description copied from interface: ListModel
Get the key that uniquely identifies the current list item. The key should be a string that uniquely identifies the list item, at least amongst all items in the list model. If the key needs to be communicated to other components, for example to display details about the list item, all components need to agree how the key identifies the underlying object. For objects stored in a database, this will usually be a suitable string representation for the primary key of the object.

This method can only be called successfully if the previous cal to ListModel.next() returned true.

Specified by:
getKey in interface ListModel
Returns:
identifies the object underlying the list item uniquely
See Also:
ListModel.next()


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC