Interface QueryResult<E>

  • Type Parameters:
    E - Type of the element of the query result
    All Superinterfaces:
    Collection<E>, Iterable<E>
    All Known Implementing Classes:
    AbstractQueryResult, CandidateIdsQueryResult, InMemoryQueryResult

    public interface QueryResult<E>
    extends Collection<E>
    Lazy collection results from a Query. The actual result elements are only loaded when accessed.

    The lifecycle of a QueryResult is as follows

    • Open, Connected, With Connection - the query has been run and the results returned.
    • Open, Disconnected - the query has been run, and the txn committed, and the PM closed so has its results available internally
    • Closed, Disconnected - the query has been run, txn committed, query results closed.
    • Method Detail

      • close

        void close()
        Method to close the results, making them unusable thereafter.
      • disconnect

        void disconnect()
        Method to disconnect the results from the ExecutionContext, meaning that thereafter it just behaves like a List.