|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jameleon.data.CollectionDataDriver
public class CollectionDataDriver
This DataDriver is used to iterator over a Collection of Objects.
Field Summary | |
---|---|
protected Collection |
items
|
protected Iterator |
iterator
|
protected String |
key
|
Constructor Summary | |
---|---|
CollectionDataDriver()
Creates a CollectionDataDriver You must call setKey() and setItems() in order for this DataDriver to work correctly |
|
CollectionDataDriver(String key,
Collection items)
Creates a CollectionDataDriver |
Method Summary | |
---|---|
void |
close()
Closes the handle to the data source |
Map |
getNextRow()
Gets the next row from the data source |
boolean |
hasMoreRows()
Tells whether the data source has another row |
void |
open()
Opens the handle to the data source |
void |
setItems(Collection items)
|
void |
setKey(String key)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Collection items
protected String key
protected Iterator iterator
Constructor Detail |
---|
public CollectionDataDriver()
public CollectionDataDriver(String key, Collection items)
key
- - the key to store the object in the collection asitems
- - the collection of items to iterator overMethod Detail |
---|
public void setItems(Collection items)
public void setKey(String key)
public void open() throws IOException
open
in interface DataDriver
IOException
- when the data source can not be found.public void close()
close
in interface DataDriver
public Map getNextRow()
getNextRow
in interface DataDriver
public boolean hasMoreRows()
hasMoreRows
in interface DataDriver
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |