org.nsdl.mptstore.query
Interface QueryResults

All Superinterfaces:
ClosableIterator<java.util.List<Node>>, java.util.Iterator<java.util.List<Node>>
All Known Implementing Classes:
SQLUnionQueryResults

public interface QueryResults
extends ClosableIterator<java.util.List<Node>>

An iterator representing any number of query result rows.

Author:
cwilper@cs.cornell.edu

Method Summary
 java.util.List<java.lang.String> getTargets()
          Get the column names for these query result rows.
 boolean hasNext()
          Tell whether there's another row of results.
 java.util.List<Node> next()
          Get the next row of results.
 void remove()
          Throws UnsupportedOperationException.
 
Methods inherited from interface org.nsdl.mptstore.core.ClosableIterator
close
 

Method Detail

getTargets

java.util.List<java.lang.String> getTargets()
Get the column names for these query result rows.

Returns:
the ordered list of names.

next

java.util.List<Node> next()
                          throws RuntimeQueryException
Get the next row of results.

Specified by:
next in interface java.util.Iterator<java.util.List<Node>>
Returns:
the next row.
Throws:
RuntimeQueryException - if there's an error getting the next row.

hasNext

boolean hasNext()
Tell whether there's another row of results.

Specified by:
hasNext in interface java.util.Iterator<java.util.List<Node>>
Returns:
true if there's another row, false if not.

remove

void remove()
            throws java.lang.UnsupportedOperationException
Throws UnsupportedOperationException. This operation is not supported by QueryResults implementations.

Specified by:
remove in interface java.util.Iterator<java.util.List<Node>>
Throws:
java.lang.UnsupportedOperationException - if this method is called.