Package net.pricefx.server.protocol
Interface StreamResults
-
- All Superinterfaces:
AutoCloseable
,Closeable
,Serializable
public interface StreamResults extends Serializable, Closeable
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Releases the often significant resources required to provide access to the query result set.Object
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 Detail
-
next
boolean 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.
-
get
Object 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.
-
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
-
-