Class DataResultIterator<I extends BasicData>

java.lang.Object
net.sf.basedb.core.DataResultIterator<I>
All Implemented Interfaces:
AutoCloseable, Iterator<I>, QueryResult, ResultIterator<I>

public class DataResultIterator<I extends BasicData> extends Object implements ResultIterator<I>
Return the results of a DataQuery as an iterator. This type of iterator is only used for batchable items like reporter and raw data. It is expected that the query uses the stateless Hibernate session available from DbControl.getStatelessSession(). If not, the returned objects are automatically disconnected from the Hibernate session to avoid memory problems and bypassing permission checks.
Version:
2.0
Author:
Samuel, Nicklas
See Also:
Last modified
$Date: 2012-09-14 09:28:35 +0200 (fr, 14 sep 2012) $
  • Field Details

    • data

      private final ScrollIterator<I extends BasicData> data
      The internal iterator of BasicData objects.
    • session

      private final Session session
      The Hibernate Session that was used in the query, null if a stateless session is used.
    • sc

      private final SessionControl sc
      The SessionControl
    • totalCount

      private final long totalCount
      The total number of items.
    • dataClass

      private final Class<I extends BasicData> dataClass
      The class of the data objects returned by the query (and this object).
    • itemType

      private final Item itemType
      The type of items returned by the query.
  • Constructor Details

  • Method Details