T
- domain typeR
- result typepublic static class QueryByExampleDataFetcher.Builder<T,R> extends Object
DataFetcher
. Note that builder
instances are immutable and return a new instance of the builder
when calling configuration methods.Modifier and Type | Method and Description |
---|---|
DataFetcher<Iterable<R>> |
many()
Build a
DataFetcher to fetch many object instances. |
<P> QueryByExampleDataFetcher.Builder<T,P> |
projectAs(Class<P> projectionType)
Project results returned from the
QueryByExampleExecutor
into the target projectionType . |
DataFetcher<R> |
single()
Build a
DataFetcher to fetch single object instances. |
QueryByExampleDataFetcher.Builder<T,R> |
sortBy(org.springframework.data.domain.Sort sort)
Apply a
Sort order. |
public <P> QueryByExampleDataFetcher.Builder<T,P> projectAs(Class<P> projectionType)
QueryByExampleExecutor
into the target projectionType
. Projection types can be
either interfaces with property getters to expose or regular classes
outside the entity type hierarchy for DTO projections.projectionType
- projection typeQueryByExampleDataFetcher.Builder
instance with all previously
configured options and projectionType
appliedpublic QueryByExampleDataFetcher.Builder<T,R> sortBy(org.springframework.data.domain.Sort sort)
Sort
order.sort
- the default sort orderQueryByExampleDataFetcher.Builder
instance with all previously configured
options and Sort
appliedpublic DataFetcher<R> single()
DataFetcher
to fetch single object instances.public DataFetcher<Iterable<R>> many()
DataFetcher
to fetch many object instances.