public class ItemResultIterator<I extends BasicItem> extends java.lang.Object implements ResultIterator<I>
ItemQuery
as an iterator.ItemQuery.iterate(DbControl)
Modifier and Type | Field and Description |
---|---|
private ScrollIterator<? extends BasicData> |
data
The internal iterator of BasicData objects.
|
private DbControl |
dc
The DbControl tthat was used in the query.
|
private java.lang.Class<I> |
itemClass
The class of the items returned by the query (and this object).
|
private Item |
itemType
The type of items returned by the query.
|
private long |
totalCount
The total number of items.
|
Constructor and Description |
---|
ItemResultIterator(ScrollIterator<? extends BasicData> data,
DbControl dc,
java.lang.Class<I> itemClass,
long totalCount) |
Modifier and Type | Method and Description |
---|---|
void |
close()
From the ResultIterator interface
---------------------------------
|
Item |
getItemType()
Get the type of items contained in this list.
|
long |
getTotalCount()
From the QueryResult interface
---------------------------------
|
boolean |
hasNext() |
boolean |
isClosed()
Check if the iterator has been closed.
|
I |
next() |
void |
remove()
Not supported.
|
private final ScrollIterator<? extends BasicData> data
private final DbControl dc
private final java.lang.Class<I extends BasicItem> itemClass
private final long totalCount
private final Item itemType
ItemResultIterator(ScrollIterator<? extends BasicData> data, DbControl dc, java.lang.Class<I> itemClass, long totalCount)
public long getTotalCount()
getTotalCount
in interface QueryResult
Query.setReturnTotalCount(boolean)
public void close()
close
in interface java.lang.AutoCloseable
close
in interface ResultIterator<I extends BasicItem>
public boolean isClosed()
ResultIterator
isClosed
in interface ResultIterator<I extends BasicItem>
public boolean hasNext()
public void remove()