Last update: 2011-06-23

org.proteios.core
Class ItemResultIterator<I extends BasicItem>

java.lang.Object
  extended by org.proteios.core.ItemResultIterator<I>
All Implemented Interfaces:
Iterator<I>, QueryResult, ResultIterator<I>

public class ItemResultIterator<I extends BasicItem>
extends Object
implements ResultIterator<I>

Return the results of an ItemQuery as an iterator.

Version:
2.0
Author:
Samuel, Nicklas
See Also:
ItemQuery.iterate(DbControl)
Last modified
$Date: 2009-04-09 08:48:11 +0200 (Thu, 09 Apr 2009) $

Method Summary
 void close()
          From the ResultIterator interface ---------------------------------
 Item getItemType()
          Get the type of items contained in this list.
 int getTotalCount()
          From the QueryResult interface ---------------------------------
 boolean hasNext()
           
 boolean isClosed()
          Check if the iterator has been closed.
 I next()
           
 void remove()
          Not supported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTotalCount

public int getTotalCount()
From the QueryResult interface ---------------------------------

Specified by:
getTotalCount in interface QueryResult
Returns:
The total number of items, or -1 if not known
See Also:
Query.setReturnTotalCount(boolean)

close

public void close()
From the ResultIterator interface ---------------------------------

Specified by:
close in interface ResultIterator<I extends BasicItem>

isClosed

public boolean isClosed()
Description copied from interface: ResultIterator
Check if the iterator has been closed.

Specified by:
isClosed in interface ResultIterator<I extends BasicItem>

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<I extends BasicItem>

next

public I next()
Specified by:
next in interface Iterator<I extends BasicItem>

remove

public void remove()
Not supported.

Specified by:
remove in interface Iterator<I extends BasicItem>
Throws:
UnsupportedOperationException - Always

getItemType

public Item getItemType()
Get the type of items contained in this list.

Returns:
An Item object or null if not known

Last update: 2011-06-23