T - Result entry typepublic abstract class AbstractDataResult<T> extends java.lang.Object implements ResultStreamer, java.util.Iterator<T>, Result
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<T> |
all
List of all elements.
|
protected java.util.function.Supplier<ProtocolEntity> |
completer |
protected int |
count |
protected StatementExecuteOk |
ok |
protected int |
position |
protected RowList |
rows |
protected ProtocolEntityFactory<T,XMessage> |
rowToData |
| Constructor and Description |
|---|
AbstractDataResult(RowList rows,
java.util.function.Supplier<ProtocolEntity> completer,
ProtocolEntityFactory<T,XMessage> rowToData)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
long |
count()
Return the number of items in this result.
|
java.util.List<T> |
fetchAll()
Create a list of all elements in the result forcing internal buffering.
|
void |
finishStreaming()
Finish the result streaming.
|
long |
getAffectedItemsCount()
Get the count of affected items from manipulation statements.
|
StatementExecuteOk |
getStatementExecuteOk()
Get StatementExecuteOk object finalizing the result transfer.
|
java.util.Iterator<Warning> |
getWarnings()
Get warnings generated during statement execution.
|
int |
getWarningsCount()
Get the number of warnings generated during statement execution.
|
boolean |
hasNext() |
T |
next() |
protected int position
protected int count
protected RowList rows
protected java.util.function.Supplier<ProtocolEntity> completer
protected StatementExecuteOk ok
protected ProtocolEntityFactory<T,XMessage> rowToData
protected java.util.List<T> all
null until requested via fetchAll().public AbstractDataResult(RowList rows, java.util.function.Supplier<ProtocolEntity> completer, ProtocolEntityFactory<T,XMessage> rowToData)
rows - RowList objectcompleter - Supplier for StatementExecuteOk objectrowToData - ProtocolEntityFactorypublic java.util.List<T> fetchAll()
public long count()
public boolean hasNext()
hasNext in interface java.util.Iterator<T>public StatementExecuteOk getStatementExecuteOk()
public void finishStreaming()
ResultStreamerfinishStreaming in interface ResultStreamerpublic long getAffectedItemsCount()
ResultgetAffectedItemsCount in interface Resultpublic int getWarningsCount()
ResultgetWarningsCount in interface Resultpublic java.util.Iterator<Warning> getWarnings()
ResultgetWarnings in interface Result