com.im.df.api 14.12.15.0

com.im.df.api.util
Class EntityDataIterator

java.lang.Object
  extended by com.im.df.api.util.EntityDataIterator
All Implemented Interfaces:
Iterator

public class EntityDataIterator
extends Object
implements Iterator

Allows to iterate over large sets of data.

TODO P2 - this class might be removed from API


Nested Class Summary
 class EntityDataIterator.Entry
           
 
Constructor Summary
EntityDataIterator(DFEntityDataProvider edp, DFTermExpression query, int chunkSize, DFEnvironmentRO env)
          Creates a new instance of EntityDataIterator
EntityDataIterator(DFEntity entity, DFTermExpression query, int chunkSize, DFEnvironmentRO env)
          Creates a new instance of EntityDataIterator
 
Method Summary
protected  List<? extends Comparable<?>> getIds()
           
 boolean hasNext()
           
 EntityDataIterator.Entry next()
           
 void remove()
           
 int size()
           
protected  List<? extends Comparable<?>> subList(List<? extends Comparable<?>> list, int start)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityDataIterator

public EntityDataIterator(DFEntity entity,
                          DFTermExpression query,
                          int chunkSize,
                          DFEnvironmentRO env)
Creates a new instance of EntityDataIterator

Parameters:
entity - The entity whose data we want
query - A query to filter the data. Can be null.
chunkSize - The number of data items that are retrieved in one go. When all items in the chunk have been iterated through the next chunk will be retrieved.
env - The DFEnvironmentRO

EntityDataIterator

public EntityDataIterator(DFEntityDataProvider edp,
                          DFTermExpression query,
                          int chunkSize,
                          DFEnvironmentRO env)
Creates a new instance of EntityDataIterator

Parameters:
edp - The data provider for the entity whose data we want
query - A query to filter the data. Can be null.
chunkSize - The number of data items that are retrieved in one go. When all items in the chunk have been iterated through the next chunk will be retrieved.
env - The DFEnvironmentRO
Method Detail

size

public int size()

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator

next

public EntityDataIterator.Entry next()
Specified by:
next in interface Iterator

remove

public void remove()
Specified by:
remove in interface Iterator

getIds

protected List<? extends Comparable<?>> getIds()

subList

protected List<? extends Comparable<?>> subList(List<? extends Comparable<?>> list,
                                                int start)

com.im.df.api 14.12.15.0