Class ResultSetResultIterator<T>

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, java.util.Iterator<T>, ResultIterator<T>

    class ResultSetResultIterator<T>
    extends java.lang.Object
    implements ResultIterator<T>
    • Field Detail

      • resultSet

        private final java.sql.ResultSet resultSet
      • alreadyAdvanced

        private volatile boolean alreadyAdvanced
      • hasNext

        private volatile boolean hasNext
      • closed

        private volatile boolean closed
    • Constructor Detail

      • ResultSetResultIterator

        ResultSetResultIterator​(java.sql.ResultSet resultSet,
                                RowMapper<T> rowMapper,
                                StatementContext context)
                         throws java.sql.SQLException
        Throws:
        java.sql.SQLException
    • Method Detail

      • close

        public void close()
        Description copied from interface: ResultIterator
        Close the underlying result set.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface ResultIterator<T>
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<T>
      • next

        public T next()
        Specified by:
        next in interface java.util.Iterator<T>
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<T>
      • safeNext

        private boolean safeNext()