|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nsdl.mptstore.query.SQLUnionQueryResults
public class SQLUnionQueryResults
RDF query results generated from a list of SQL statements. This class executes the given SQL in the order given, and provides an RDF result row for each JDBC ResultSet row.
Constructor Summary | |
---|---|
SQLUnionQueryResults(java.sql.Connection conn,
SQLProvider sqlProvider,
int fetchSize,
boolean autoReleaseConnection)
Instantiate SQLUnionQueryResults to work with the given SQL on the given connection. |
Method Summary | |
---|---|
void |
close()
Close database resources held by this object. |
void |
finalize()
In the event of garbage collection, make sure close() has occurred. |
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 class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SQLUnionQueryResults(java.sql.Connection conn, SQLProvider sqlProvider, int fetchSize, boolean autoReleaseConnection) throws QueryException
conn
- the database connection to use.sqlProvider
- provides the SQL and column names for the query.fetchSize
- the JDBC fetchSize to use for each SQL query.autoReleaseConnection
- whether to automatically close/release
the connection when the results are closed.
QueryException
- if an unexpected error occurs starting the query.Method Detail |
---|
public java.util.List<java.lang.String> getTargets()
getTargets
in interface QueryResults
public boolean hasNext()
hasNext
in interface java.util.Iterator<java.util.List<Node>>
hasNext
in interface QueryResults
public java.util.List<Node> next()
next
in interface java.util.Iterator<java.util.List<Node>>
next
in interface QueryResults
public void remove() throws java.lang.UnsupportedOperationException
UnsupportedOperationException
.
This operation is not supported by QueryResults
implementations.
remove
in interface java.util.Iterator<java.util.List<Node>>
remove
in interface QueryResults
java.lang.UnsupportedOperationException
- if this method is called.public void close()
ResultSet
and Statement
objects. In addition, if autoReleaseConnection
was
specified as true
, the database connection will also
be closed/released.
close
in interface ClosableIterator<java.util.List<Node>>
public void finalize()
finalize
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |