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 TypeMethodDescriptionvoid
close()
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 aPersistedObject
to a map of (field,value) pairs to a single primitive value.boolean
next()
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 methodnext
makes the first row the current row; the second call makes the second row the current row, and so on.- Returns:
true
if the new current row is valid;false
if there are no more rows.- Throws:
Exception
-
get
Retrieves the current row, which depending on the query executed could be anything from aPersistedObject
to 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-