Class QuerydslBindingsFactory
java.lang.Object
org.springframework.data.querydsl.binding.QuerydslBindingsFactory
- All Implemented Interfaces:
Aware
,ApplicationContextAware
Factory to create
QuerydslBindings
using an EntityPathResolver
.- Since:
- 1.11
- Author:
- Oliver Gierke, Christoph Strobl, Mark Paluch
-
Constructor Summary
ConstructorDescriptionQuerydslBindingsFactory
(EntityPathResolver entityPathResolver) Creates a newQuerydslBindingsFactory
using the givenEntityPathResolver
. -
Method Summary
Modifier and TypeMethodDescriptioncreateBindingsFor
(TypeInformation<?> domainType) Creates theQuerydslBindings
to be used using for the given domain type.createBindingsFor
(TypeInformation<?> domainType, Class<? extends QuerydslBinderCustomizer<?>> customizer) Creates theQuerydslBindings
to be used using for the given domain type and a pre-definedQuerydslBinderCustomizer
.Returns theEntityPathResolver
used by the factory.void
setApplicationContext
(ApplicationContext applicationContext)
-
Constructor Details
-
QuerydslBindingsFactory
Creates a newQuerydslBindingsFactory
using the givenEntityPathResolver
.- Parameters:
entityPathResolver
- must not be null.
-
-
Method Details
-
setApplicationContext
- Specified by:
setApplicationContext
in interfaceApplicationContextAware
- Throws:
BeansException
-
getEntityPathResolver
Returns theEntityPathResolver
used by the factory.- Returns:
- the entityPathResolver
-
createBindingsFor
Creates theQuerydslBindings
to be used using for the given domain type. AQuerydslBinderCustomizer
will be auto-detected.- Parameters:
domainType
- must not be null.- Returns:
- will never be null.
-
createBindingsFor
public QuerydslBindings createBindingsFor(TypeInformation<?> domainType, Class<? extends QuerydslBinderCustomizer<?>> customizer) Creates theQuerydslBindings
to be used using for the given domain type and a pre-definedQuerydslBinderCustomizer
.- Parameters:
domainType
- must not be null.customizer
- theQuerydslBinderCustomizer
to use, must not be null.- Returns:
- will never be null.
-