Class StreamingRecordIteratorAbstract


  • public abstract class StreamingRecordIteratorAbstract
    extends java.lang.Object
    Abstract class so that other iterators can share some of the logic.
    Author:
    dnicodemus
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String[] fieldNameArray
      Array of field names of the record
      protected int fieldNameIndex
      Index of the current field of the record
      protected java.lang.Object[] fieldValueArray
      Array of values of the current field
      protected int fieldValueIndex
      Index of the current value of the current field
      protected boolean hasMoreResults
      Whether or not there are more results in the stream
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getFieldname()
      Get the field name of the field moved to by the last nextField call.
      int getNumValues()
      Get the number of values in the array while accommodating the reuse of larger arrays for smaller numbers of values.
      protected abstract java.lang.Object implFetchValue()
      Fetch any value
      protected abstract void implFirstValue()
      Fetch the first value
      protected java.lang.Object implNextValue()  
      protected boolean implSimpleNextFieldOfRecord()
      Get the next field of the record.
      java.lang.Object nextValue()
      Get the next value of the current field.
      void reset()
      Reset the field state information we are keeping about the record.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • hasMoreResults

        protected boolean hasMoreResults
        Whether or not there are more results in the stream
      • fieldNameArray

        protected java.lang.String[] fieldNameArray
        Array of field names of the record
      • fieldNameIndex

        protected int fieldNameIndex
        Index of the current field of the record
      • fieldValueArray

        protected java.lang.Object[] fieldValueArray
        Array of values of the current field
      • fieldValueIndex

        protected int fieldValueIndex
        Index of the current value of the current field
    • Constructor Detail

      • StreamingRecordIteratorAbstract

        public StreamingRecordIteratorAbstract()
    • Method Detail

      • implFetchValue

        protected abstract java.lang.Object implFetchValue()
        Fetch any value
      • getNumValues

        public int getNumValues()
        Get the number of values in the array while accommodating the reuse of larger arrays for smaller numbers of values.
      • reset

        public final void reset()
        Reset the field state information we are keeping about the record.
      • implSimpleNextFieldOfRecord

        protected final boolean implSimpleNextFieldOfRecord()
                                                     throws AttivioException
        Get the next field of the record.
        Returns:
        true if there is a next field and false otherwise.
        Throws:
        AttivioException - When we can't read the first value
      • getFieldname

        public java.lang.String getFieldname()
                                      throws AttivioException
        Get the field name of the field moved to by the last nextField call.
        Throws:
        AttivioException
      • implNextValue

        protected final java.lang.Object implNextValue()
        Returns:
        The next value or null if there are no more values.