public abstract class AbstractDelegatingSearchQuerySelectStep<R,E,LOS> extends Object implements SearchQuerySelectStep<SearchQueryOptionsStep<?,E,LOS,?,?>,R,E,LOS,SearchProjectionFactory<R,E>,SearchPredicateFactory>
| Constructor and Description |
|---|
AbstractDelegatingSearchQuerySelectStep(SearchQuerySelectStep<?,R,E,LOS,?,?> delegate) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
extension(SearchQueryDslExtension<T,R,E,LOS> extension)
Extend the current DSL step with the given extension,
resulting in an extended step offering more query options.
|
<P> SearchQueryWhereStep<?,P,?> |
select(Function<? super SearchProjectionFactory<R,E>,? extends ProjectionFinalStep<P>> projectionContributor)
Select a given projection as a representation of the search hit for each matching document.
|
SearchQueryWhereStep<?,List<?>,?> |
select(SearchProjection<?>... projections)
Select a list of projections as a representation of the search hit for each matching document.
|
<P> SearchQueryWhereStep<?,P,?> |
select(SearchProjection<P> projection)
Select a projection as a representation of the search hit for each matching document.
|
SearchQueryWhereStep<?,E,?> |
selectEntity()
Select the entity was originally indexed
as a representation of the search hit for each matching document.
|
SearchQueryWhereStep<?,R,?> |
selectEntityReference()
Select a reference to the entity that was originally indexed
as a representation of the search hit for each matching document.
|
SearchQueryOptionsStep<?,E,LOS,?,?> |
where(Function<? super SearchPredicateFactory,? extends PredicateFinalStep> predicateContributor)
Set the predicate for this query.
|
SearchQueryOptionsStep<?,E,LOS,?,?> |
where(SearchPredicate predicate)
Set the predicate for this query.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasEntity, asEntityReference, asProjection, asProjection, asProjectionspredicate, predicatepublic AbstractDelegatingSearchQuerySelectStep(SearchQuerySelectStep<?,R,E,LOS,?,?> delegate)
public SearchQueryWhereStep<?,E,?> selectEntity()
SearchQuerySelectStepThe entity will be loaded directly from its original source (relational database, ...).
selectEntity in interface SearchQuerySelectStep<SearchQueryOptionsStep<?,E,LOS,?,?>,R,E,LOS,SearchProjectionFactory<R,E>,SearchPredicateFactory>SearchQueryWhereSteppublic SearchQueryWhereStep<?,R,?> selectEntityReference()
SearchQuerySelectStepselectEntityReference in interface SearchQuerySelectStep<SearchQueryOptionsStep<?,E,LOS,?,?>,R,E,LOS,SearchProjectionFactory<R,E>,SearchPredicateFactory>SearchQueryWhereSteppublic <P> SearchQueryWhereStep<?,P,?> select(Function<? super SearchProjectionFactory<R,E>,? extends ProjectionFinalStep<P>> projectionContributor)
SearchQuerySelectStepselect in interface SearchQuerySelectStep<SearchQueryOptionsStep<?,E,LOS,?,?>,R,E,LOS,SearchProjectionFactory<R,E>,SearchPredicateFactory>P - The resulting type of the projection.projectionContributor - A function that will use the factory passed in parameter to create a projection,
returning the final step in the projection DSL.
Should generally be a lambda expression.SearchQueryWhereSteppublic <P> SearchQueryWhereStep<?,P,?> select(SearchProjection<P> projection)
SearchQuerySelectStepselect in interface SearchQuerySelectStep<SearchQueryOptionsStep<?,E,LOS,?,?>,R,E,LOS,SearchProjectionFactory<R,E>,SearchPredicateFactory>P - The resulting type of the projection.projection - A previously-created SearchProjection object.SearchQueryWhereSteppublic SearchQueryWhereStep<?,List<?>,?> select(SearchProjection<?>... projections)
SearchQuerySelectStep
Note that using this method will force you to use casts when consuming the results,
since the returned lists are not typed (List<?> instead of List<T>).
You can replace calls to this method advantageously with calls to SearchQuerySelectStep.select(Function)
defining a composite projection.
select in interface SearchQuerySelectStep<SearchQueryOptionsStep<?,E,LOS,?,?>,R,E,LOS,SearchProjectionFactory<R,E>,SearchPredicateFactory>projections - A list of previously-created SearchProjection objects.SearchProjectionFactory.composite(SearchProjection[]),
SearchQueryWhereSteppublic SearchQueryOptionsStep<?,E,LOS,?,?> where(Function<? super SearchPredicateFactory,? extends PredicateFinalStep> predicateContributor)
SearchQueryWhereStepwhere in interface SearchQueryWhereStep<SearchQueryOptionsStep<?,E,LOS,?,?>,E,SearchPredicateFactory>predicateContributor - A function that will use the factory passed in parameter to create a predicate,
returning the final step in the predicate DSL.
Should generally be a lambda expression.public SearchQueryOptionsStep<?,E,LOS,?,?> where(SearchPredicate predicate)
SearchQueryWhereStepwhere in interface SearchQueryWhereStep<SearchQueryOptionsStep<?,E,LOS,?,?>,E,SearchPredicateFactory>predicate - A SearchPredicate object obtained from the search scope.public <T> T extension(SearchQueryDslExtension<T,R,E,LOS> extension)
SearchQuerySelectStepextension in interface SearchQuerySelectStep<SearchQueryOptionsStep<?,E,LOS,?,?>,R,E,LOS,SearchProjectionFactory<R,E>,SearchPredicateFactory>T - The type of DSL step provided by the extension.extension - The extension to the query DSL.Copyright © 2006-2020 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.