Class QuerydslBindingsFactory
java.lang.Object
org.springframework.data.querydsl.binding.QuerydslBindingsFactory
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
public class QuerydslBindingsFactory
extends Object
implements org.springframework.context.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
(org.springframework.context.ApplicationContext applicationContext)
-
Constructor Details
-
QuerydslBindingsFactory
Creates a newQuerydslBindingsFactory
using the givenEntityPathResolver
.- Parameters:
entityPathResolver
- must not be null.
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.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.
-