Interface ResultIterator<I>

All Superinterfaces:
AutoCloseable, Iterator<I>, QueryResult
All Known Subinterfaces:
SqlResultIterator
All Known Implementing Classes:
DataResultIterator, DynamicResultIterator, ItemResultIterator, PlotServlet.CFResultIterator, ReporterScoreResultIterator

public interface ResultIterator<I> extends QueryResult, Iterator<I>, AutoCloseable
Return the result of a query as an iterator. An iterator doesn't load the entire dataset into memory at once, it waits until the client application request the next row. This interface is useful for all types of queries and mostly for queries that might return a large number of items.

Implementors should not allow modifications to the iterator, ie. it is not allowed to call the Iterator.remove() method.

Version:
2.0
Author:
Nicklas
Last modified
$Date: 2018-12-12 15:41:10 +0100 (on, 12 dec 2018) $
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Close the iterator and immediately release all resources associated with it.
    boolean
    Check if the iterator has been closed.

    Methods inherited from interface java.util.Iterator

    forEachRemaining, hasNext, next, remove

    Methods inherited from interface net.sf.basedb.core.query.QueryResult

    getTotalCount
  • Method Details

    • close

      void close()
      Close the iterator and immediately release all resources associated with it.
      Specified by:
      close in interface AutoCloseable
    • isClosed

      boolean isClosed()
      Check if the iterator has been closed.