com.im.df.api.util
Class EntityDataIterator
java.lang.Object
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EntityDataIterator
public EntityDataIterator(DFEntity entity,
DFTermExpression query,
int chunkSize,
DFEnvironmentRO env)
- Creates a new instance of EntityDataIterator
- Parameters:
entity - The entity whose data we wantquery - 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 wantquery - 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
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 subList(List list,
int start)