net.sf.jameleon.data
Interface DataDriver

All Known Implementing Classes:
CollectionDataDriver, CsvDataDriver, SqlDataDriver

public interface DataDriver

This interface is used to implement different ways to get data from a source. Some examples might be a database, an xml file or even an Excel spreadsheet (besides just using a CSV file).


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
 

Method Detail

open

void open()
          throws IOException
Opens the handle to the data source

Throws:
IOException - when the data source can not be found.

close

void close()
Closes the handle to the data source


getNextRow

Map getNextRow()
Gets the next row from the data source

Returns:
a key-value HashMap representing the data row or null if no data row is available

hasMoreRows

boolean hasMoreRows()
Tells whether the data source has another row

Returns:
true if the data source still has more rows


Copyright © 2003-2008 Christian Hargraves. All Rights Reserved.