T
- domain typeR
- result typepublic static class QuerydslDataFetcher.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 |
---|---|
QuerydslDataFetcher.Builder<T,R> |
customizer(org.springframework.data.querydsl.binding.QuerydslBinderCustomizer<? extends com.querydsl.core.types.EntityPath<T>> customizer)
Apply a
QuerydslBinderCustomizer . |
DataFetcher<Iterable<R>> |
many()
Build a
DataFetcher to fetch many object instances. |
<P> QuerydslDataFetcher.Builder<T,P> |
projectAs(Class<P> projectionType)
Project results returned from the
QuerydslPredicateExecutor
into the target projectionType . |
DataFetcher<R> |
single()
Build a
DataFetcher to fetch single object instances. |
public <P> QuerydslDataFetcher.Builder<T,P> projectAs(Class<P> projectionType)
QuerydslPredicateExecutor
into the target projectionType
. Projection types can be
either interfaces declaring getters for properties to expose or
regular classes outside the entity type hierarchy for
DTO projection.projectionType
- projection typeQuerydslDataFetcher.Builder
instance with all previously
configured options and projectionType
appliedpublic QuerydslDataFetcher.Builder<T,R> customizer(org.springframework.data.querydsl.binding.QuerydslBinderCustomizer<? extends com.querydsl.core.types.EntityPath<T>> customizer)
QuerydslBinderCustomizer
.customizer
- the customizer to customize bindings for the
actual queryQuerydslDataFetcher.Builder
instance with all previously configured
options and QuerydslBinderCustomizer
appliedpublic DataFetcher<R> single()
DataFetcher
to fetch single object instances.DataFetcher
based on Querydsl to fetch one objectpublic DataFetcher<Iterable<R>> many()
DataFetcher
to fetch many object instances.DataFetcher
based on Querydsl to fetch many objects