com.rapidminer.example.table
Class DatabaseDataRowReader

java.lang.Object
  extended by com.rapidminer.example.table.DatabaseDataRowReader
All Implemented Interfaces:
DataRowReader, java.util.Iterator<DataRow>

public class DatabaseDataRowReader
extends java.lang.Object
implements DataRowReader

Unlike a FileDataRowReader that reads examples from a file, objects of this class read examples from a ResultSet, a data structure that is returned from a database query.

Author:
Simon Fischer, Ingo Mierswa ingomierswa Exp $
See Also:
DatabaseHandler, DatabaseExampleSource, KDBExampleSource

Constructor Summary
DatabaseDataRowReader(java.sql.ResultSet resultSet)
          Creates a datarow reader from a ResultSet.
 
Method Summary
 boolean hasNext()
           
 DataRow next()
           
 void remove()
          Will throw a new UnsupportedOperationException since DataRowReader does not have to implement remove.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseDataRowReader

public DatabaseDataRowReader(java.sql.ResultSet resultSet)
                      throws java.sql.SQLException
Creates a datarow reader from a ResultSet. The column meta data must be tranformed to an Attribute array.

Throws:
java.sql.SQLException
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<DataRow>

next

public DataRow next()
Specified by:
next in interface java.util.Iterator<DataRow>

remove

public void remove()
Will throw a new UnsupportedOperationException since DataRowReader does not have to implement remove.

Specified by:
remove in interface java.util.Iterator<DataRow>


Copyright © 2001-2009 by Rapid-I