Interface Cursor

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
AbstractCursor, ArrayIteratorCursor, IteratorCursor, ListIteratorCursor, MapIteratorCursor, PositionedCursor, RecordIteratorCursor

public interface Cursor extends AutoCloseable
Interface to an iteration that is similar to, and can easily support, a JDBC ResultSet, but is simpler to implement.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Accessor of a column value.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes this cursor and releases resources.
    createAccessors(List<ColumnMetaData> types, Calendar localCalendar, ArrayImpl.Factory factory)
    Creates a list of accessors, one per column.
    boolean
    Moves to the next row.
    boolean
    Returns whether the last value returned was null.
  • Method Details

    • createAccessors

      List<Cursor.Accessor> createAccessors(List<ColumnMetaData> types, Calendar localCalendar, ArrayImpl.Factory factory)
      Creates a list of accessors, one per column.
      Parameters:
      types - List of column types, per Types.
      localCalendar - Calendar in local time zone
      factory - Factory that creates sub-ResultSets when needed
      Returns:
      List of column accessors
    • next

      boolean next() throws SQLException
      Moves to the next row.
      Returns:
      Whether moved
      Throws:
      SQLException - on database error
    • close

      void close()
      Closes this cursor and releases resources.
      Specified by:
      close in interface AutoCloseable
    • wasNull

      boolean wasNull() throws SQLException
      Returns whether the last value returned was null.
      Throws:
      SQLException - on database error