Package org.datanucleus.store.query
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
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 Summary
Modifier and TypeMethodDescriptionvoid
close()
Method to close the results, making them unusable thereafter.void
Method to disconnect the results from the ExecutionContext, meaning that thereafter it just behaves like a List.Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray
-
Method Details
-
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.
-