Class TabularInputFile.BufferedRecordsIterator

  • All Implemented Interfaces:
    java.util.Iterator<org.jooq.Result<org.jooq.Record>>
    Enclosing class:
    TabularInputFile

    protected class TabularInputFile.BufferedRecordsIterator
    extends java.lang.Object
    implements java.util.Iterator<org.jooq.Result<org.jooq.Record>>
    A class to make iterating of JOOQ records buffered and easier. Grabs and returns batches of records until no records are left //TODO consider added a more generic version of this class to dbutil package //TODO see also jooq cursors // use in work related to importing a tabular file into a general database
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void forEachRemaining​(java.util.function.Consumer<? super org.jooq.Result<org.jooq.Record>> action)  
      boolean hasNext()  
      org.jooq.Result<org.jooq.Record> next()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        remove
    • Constructor Detail

      • BufferedRecordsIterator

        public BufferedRecordsIterator()
      • BufferedRecordsIterator

        public BufferedRecordsIterator​(int myBufferSize)
      • BufferedRecordsIterator

        public BufferedRecordsIterator​(long startingRowNum,
                                       int bufferSize)
    • Method Detail

      • hasNext

        public final boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<org.jooq.Result<org.jooq.Record>>
      • next

        public final org.jooq.Result<org.jooq.Record> next()
        Specified by:
        next in interface java.util.Iterator<org.jooq.Result<org.jooq.Record>>
      • forEachRemaining

        public final void forEachRemaining​(java.util.function.Consumer<? super org.jooq.Result<org.jooq.Record>> action)
        Specified by:
        forEachRemaining in interface java.util.Iterator<org.jooq.Result<org.jooq.Record>>