org.eobjects.metamodel.data
Class RowPublisherDataSet

java.lang.Object
  extended by org.eobjects.metamodel.util.BaseObject
      extended by org.eobjects.metamodel.data.AbstractDataSet
          extended by org.eobjects.metamodel.data.RowPublisherDataSet
All Implemented Interfaces:
Closeable, Iterable<Row>, DataSet

public final class RowPublisherDataSet
extends AbstractDataSet

Abstract DataSet implementation for use in scenarios where a pull-oriented style of reading data is not supported. This implementation instead allows a publshing action to publish rows to the dataset in a blocking manner, and thereby to adapt without having to load all rows into memory.

Author:
Kasper Sørensen

Constructor Summary
RowPublisherDataSet(SelectItem[] selectItems, int maxRows, Action<RowPublisher> publishAction)
           
 
Method Summary
 void close()
          Closes the DataSet and any resources it may be holding.
protected  void finalize()
           
 int getMaxRows()
           
 Row getRow()
           
 boolean next()
          Moves forward to the next row.
 
Methods inherited from class org.eobjects.metamodel.data.AbstractDataSet
decorateIdentity, getHeader, getSelectItems, indexOf, iterator, toObjectArrays, toRows, toString, toTableModel
 
Methods inherited from class org.eobjects.metamodel.util.BaseObject
classEquals, equals, hashCode
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RowPublisherDataSet

public RowPublisherDataSet(SelectItem[] selectItems,
                           int maxRows,
                           Action<RowPublisher> publishAction)
Method Detail

getMaxRows

public int getMaxRows()

close

public void close()
Description copied from class: AbstractDataSet
Closes the DataSet and any resources it may be holding.

Specified by:
close in interface Closeable
Specified by:
close in interface DataSet
Overrides:
close in class AbstractDataSet

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable

next

public boolean next()
Description copied from interface: DataSet
Moves forward to the next row.

Returns:
true if there is a next row or false if not.

getRow

public Row getRow()
Returns:
the current row.


Copyright © 2007-2013. All Rights Reserved.