Package com.attivio.client.streaming
Class StreamingRecordIteratorAbstract
- java.lang.Object
-
- com.attivio.client.streaming.StreamingRecordIteratorAbstract
-
public abstract class StreamingRecordIteratorAbstract extends java.lang.ObjectAbstract 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[]fieldNameArrayArray of field names of the recordprotected intfieldNameIndexIndex of the current field of the recordprotected java.lang.Object[]fieldValueArrayArray of values of the current fieldprotected intfieldValueIndexIndex of the current value of the current fieldprotected booleanhasMoreResultsWhether or not there are more results in the stream
-
Constructor Summary
Constructors Constructor Description StreamingRecordIteratorAbstract()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetFieldname()Get the field name of the field moved to by the last nextField call.intgetNumValues()Get the number of values in the array while accommodating the reuse of larger arrays for smaller numbers of values.protected abstract java.lang.ObjectimplFetchValue()Fetch any valueprotected abstract voidimplFirstValue()Fetch the first valueprotected java.lang.ObjectimplNextValue()protected booleanimplSimpleNextFieldOfRecord()Get the next field of the record.java.lang.ObjectnextValue()Get the next value of the current field.voidreset()Reset the field state information we are keeping about the record.
-
-
-
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
-
-
Method Detail
-
implFirstValue
protected abstract void implFirstValue() throws AttivioExceptionFetch the first value- Throws:
AttivioException
-
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 AttivioExceptionGet 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 AttivioExceptionGet 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.
-
nextValue
public final java.lang.Object nextValue() throws AttivioExceptionGet the next value of the current field.- Throws:
AttivioException
-
-