N - The next step if no type of hits is explicitly selected,
i.e. if SearchQueryWhereStep.where(SearchPredicate) or SearchQueryWhereStep.where(Function) is called directly
without calling selectEntity(), or selectEntityReference(), select(SearchProjection)
or a similar method.R - The type of entity references, i.e. the type of hits returned by
reference queries,
or the type of objects returned for entity reference projections.E - The type of entities, i.e. the type of hits returned by
entity queries,
or the type of objects returned for entity projections.LOS - The type of the initial step of the loading options definition DSL accessible through SearchQueryOptionsStep.loading(Consumer).PJF - The type of factory used to create projections in select(Function).PDF - The type of factory used to create predicates in SearchQueryWhereStep.where(Function).public interface SearchQuerySelectStep<N extends SearchQueryOptionsStep<?,E,LOS,?,?>,R,E,LOS,PJF extends SearchProjectionFactory<R,E>,PDF extends SearchPredicateFactory> extends SearchQueryWhereStep<N,E,PDF>
The "SELECT" clause may be omitted by setting the "WHERE" clause directly,
in which case selectEntity() will be assumed.
| Modifier and Type | Method and Description |
|---|---|
default SearchQueryWhereStep<?,E,?> |
asEntity()
Deprecated.
Use
selectEntity() instead. |
default SearchQueryWhereStep<?,R,?> |
asEntityReference()
Deprecated.
Use
selectEntityReference() instead. |
default <P> SearchQueryWhereStep<?,P,?> |
asProjection(Function<? super PJF,? extends ProjectionFinalStep<P>> projectionContributor)
Deprecated.
Use
select(Function) instead. |
default <P> SearchQueryWhereStep<?,P,?> |
asProjection(SearchProjection<P> projection)
Deprecated.
Use
select(SearchProjection) instead. |
default SearchQueryWhereStep<?,List<?>,?> |
asProjections(SearchProjection<?>... projections)
Deprecated.
Use
select(SearchProjection) instead. |
<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 PJF,? 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.
|
predicate, predicate, where, whereSearchQueryWhereStep<?,E,?> selectEntity()
The entity will be loaded directly from its original source (relational database, ...).
SearchQueryWhereStepSearchQueryWhereStep<?,R,?> selectEntityReference()
SearchQueryWhereStep<P> SearchQueryWhereStep<?,P,?> select(Function<? super PJF,? extends ProjectionFinalStep<P>> projectionContributor)
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.SearchQueryWhereStep<P> SearchQueryWhereStep<?,P,?> select(SearchProjection<P> projection)
P - The resulting type of the projection.projection - A previously-created SearchProjection object.SearchQueryWhereStepSearchQueryWhereStep<?,List<?>,?> select(SearchProjection<?>... projections)
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 select(Function)
defining a composite projection.
projections - A list of previously-created SearchProjection objects.SearchProjectionFactory.composite(SearchProjection[]),
SearchQueryWhereStep<T> T extension(SearchQueryDslExtension<T,R,E,LOS> extension)
T - The type of DSL step provided by the extension.extension - The extension to the query DSL.SearchException - If the extension cannot be applied (wrong underlying backend, ...).@Deprecated default SearchQueryWhereStep<?,E,?> asEntity()
selectEntity() instead.The entity will be loaded directly from its original source (relational database, ...).
SearchQueryWhereStep@Deprecated default SearchQueryWhereStep<?,R,?> asEntityReference()
selectEntityReference() instead.SearchQueryWhereStep@Deprecated default <P> SearchQueryWhereStep<?,P,?> asProjection(Function<? super PJF,? extends ProjectionFinalStep<P>> projectionContributor)
select(Function) instead.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.SearchQueryWhereStep@Deprecated default <P> SearchQueryWhereStep<?,P,?> asProjection(SearchProjection<P> projection)
select(SearchProjection) instead.P - The resulting type of the projection.projection - A previously-created SearchProjection object.SearchQueryWhereStep@Deprecated default SearchQueryWhereStep<?,List<?>,?> asProjections(SearchProjection<?>... projections)
select(SearchProjection) instead.
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 select(Function)
defining a composite projection.
projections - A list of previously-created SearchProjection objects.SearchProjectionFactory.composite(SearchProjection[]),
SearchQueryWhereStepCopyright © 2006-2020 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.