Class DefaultCursor<T>

  • All Implemented Interfaces:
    Closeable, AutoCloseable, Iterable<T>, Cursor<T>

    public class DefaultCursor<T>
    extends Object
    implements Cursor<T>
    This is the default implementation of a MyBatis Cursor. This implementation is not thread safe.
    Author:
    Guillaume Darmont / guillaume@dropinocean.com
    • Method Detail

      • isOpen

        public boolean isOpen()
        Specified by:
        isOpen in interface Cursor<T>
        Returns:
        true if the cursor has started to fetch items from database.
      • isConsumed

        public boolean isConsumed()
        Specified by:
        isConsumed in interface Cursor<T>
        Returns:
        true if the cursor is fully consumed and has returned all elements matching the query.
      • getCurrentIndex

        public int getCurrentIndex()
        Description copied from interface: Cursor
        Get the current item index. The first item has the index 0.
        Specified by:
        getCurrentIndex in interface Cursor<T>
        Returns:
        -1 if the first cursor item has not been retrieved. The index of the current item retrieved.
      • fetchNextUsingRowBound

        protected T fetchNextUsingRowBound()
      • fetchNextObjectFromDatabase

        protected T fetchNextObjectFromDatabase()