Package net.pricefx.server.protocol
Interface StreamResults
- All Superinterfaces:
AutoCloseable,Closeable,Serializable
Unifying (and very limited) JDBC ResultSet like API to a forward-only cursor on a query result, either from a Hibernate or PA query.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Releases the often significant resources required to provide access to the query result set.get()Retrieves the current row, which depending on the query executed could be anything from aPersistedObjectto a map of (field,value) pairs to a single primitive value.booleannext()Moves the cursor forward one row from its current position.
-
Method Details
-
next
Moves the cursor forward one row from its current position. A cursor is initially positioned before the first row; the first call to the methodnextmakes the first row the current row; the second call makes the second row the current row, and so on.- Returns:
trueif the new current row is valid;falseif there are no more rows.- Throws:
Exception
-
get
Retrieves the current row, which depending on the query executed could be anything from aPersistedObjectto a map of (field,value) pairs to a single primitive value.- Throws:
Exception
-
close
void close()Releases the often significant resources required to provide access to the query result set. If not closed this could lead to memory leaks, and ultimately system instability or even a system crash.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-