public class ResultSetMem extends Object implements ResultSetRewindable, ResultSetPeekable
Constructor and Description |
---|
ResultSetMem() |
ResultSetMem(ResultSet... sets)
Create an in-memory result set from an array of
ResulSets.
|
ResultSetMem(ResultSet qr)
Create an in-memory result set from any ResultSet object.
|
ResultSetMem(ResultSetMem imrs2)
Create an in-memory result set from another one
|
ResultSetMem(ResultSetMem imrs2,
boolean takeCopy)
Create an in-memory result set from another one
|
Modifier and Type | Method and Description |
---|---|
Model |
getResourceModel()
Get the model that resources are created against - may be null
|
List<String> |
getResultVars()
Get the variable names for the projection
|
int |
getRowNumber()
Return the "row" number for the current iterator item
|
boolean |
hasNext()
Is there another possibility?
|
QuerySolution |
next()
Moves onto the next result possibility.
|
Binding |
nextBinding()
Move to the next binding (low level)
|
QuerySolution |
nextSolution()
Moves onto the next result possibility.
|
QuerySolution |
peek()
Peek at the next query solution
|
Binding |
peekBinding()
Peek at the next binding
|
void |
remove() |
void |
reset()
Move back to the start of the iterator for this instance of results of a query.
|
void |
rewind()
Reset this result set back to the beginning
|
int |
size()
Return the number of rows
|
public ResultSetMem(ResultSetMem imrs2)
imrs2
- The other QueryResultsMem objectpublic ResultSetMem(ResultSetMem imrs2, boolean takeCopy)
imrs2
- The other ResultSetMem objecttakeCopy
- Should we copy the rows?public ResultSetMem(ResultSet qr)
public ResultSetMem(ResultSet... sets)
sets
- the ResultSet objects to concatenate.public ResultSetMem()
public void remove() throws UnsupportedOperationException
remove
in interface Iterator<QuerySolution>
UnsupportedOperationException
- always thrown.public boolean hasNext()
hasNext
in interface ResultSet
hasNext
in interface Iterator<QuerySolution>
public QuerySolution nextSolution()
nextSolution
in interface ResultSet
public Binding nextBinding()
ResultSet
nextBinding
in interface ResultSet
public QuerySolution next()
next
in interface ResultSet
next
in interface Iterator<QuerySolution>
public void rewind()
public void reset()
ResultSetRewindable
reset
in interface ResultSetRewindable
public int getRowNumber()
getRowNumber
in interface ResultSet
public Model getResourceModel()
ResultSet
getResourceModel
in interface ResultSet
public int size()
size
in interface ResultSetRewindable
public List<String> getResultVars()
getResultVars
in interface ResultSet
public QuerySolution peek()
ResultSetPeekable
peek
in interface ResultSetPeekable
public Binding peekBinding()
ResultSetPeekable
peekBinding
in interface ResultSetPeekable
Licenced under the Apache License, Version 2.0