Package org.hibernate.query.spi
Interface SelectQueryPlan<R>
- All Superinterfaces:
QueryPlan
- All Known Subinterfaces:
NativeSelectQueryPlan<T>
- All Known Implementing Classes:
AggregatedSelectQueryPlanImpl
,ConcreteSqmSelectQueryPlan
,NativeSelectQueryPlanImpl
General contract for performing execution of a query returning results. These
are the methods delegated to by the Query impls in response to
Query.list()
,
Query.uniqueResult()
, Query.uniqueResultOptional()
,
Query.getResultList()
, Query.getSingleResult()
and
Query.scroll()
.
todo (6.0) : ? - can this be re-used for handling entity and collection loads as well?
todo (6.0) : Stream/Spliterator version as well? depends on answer to ^^
short term it makes no sense to return a Stream/Spliterator for entity
or collection loads. Long term it might if/when we start to define
Session#stream(Class entityClass) style API- Since:
- 6.0
-
Method Summary
Modifier and TypeMethodDescription<T> T
executeQuery
(DomainQueryExecutionContext executionContext, ResultsConsumer<T, R> resultsConsumer) Execute the queryperformList
(DomainQueryExecutionContext executionContext) Perform (execute) the query returning a ListperformScroll
(ScrollMode scrollMode, DomainQueryExecutionContext executionContext) Perform (execute) the query returning a ScrollableResults
-
Method Details
-
executeQuery
<T> T executeQuery(DomainQueryExecutionContext executionContext, ResultsConsumer<T, R> resultsConsumer) Execute the query- Since:
- 6.4
-
performList
Perform (execute) the query returning a List -
performScroll
ScrollableResultsImplementor<R> performScroll(ScrollMode scrollMode, DomainQueryExecutionContext executionContext) Perform (execute) the query returning a ScrollableResults
-