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

    Modifier and Type
    Method
    Description
    void
    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 a PersistedObject to a map of (field,value) pairs to a single primitive value.
    boolean
    Moves the cursor forward one row from its current position.
  • Method Details

    • next

      boolean next() throws Exception
      Moves the cursor forward one row from its current position. A cursor is initially positioned before the first row; the first call to the method next 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

      Object get() throws Exception
      Retrieves the current row, which depending on the query executed could be anything from a PersistedObject 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 interface AutoCloseable
      Specified by:
      close in interface Closeable