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
ConstructorsConstructorDescriptionQuerydslBindingsFactory(EntityPathResolver entityPathResolver) Creates a newQuerydslBindingsFactoryusing the givenEntityPathResolver. -
Method Summary
Modifier and TypeMethodDescriptioncreateBindingsFor(TypeInformation<?> domainType) Creates theQuerydslBindingsto be used using for the given domain type.createBindingsFor(TypeInformation<?> domainType, Class<? extends QuerydslBinderCustomizer<?>> customizer) Creates theQuerydslBindingsto be used using for the given domain type and a pre-definedQuerydslBinderCustomizer.Returns theEntityPathResolverused by the factory.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)
-
Constructor Details
-
QuerydslBindingsFactory
Creates a newQuerydslBindingsFactoryusing 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:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
getEntityPathResolver
Returns theEntityPathResolverused by the factory.- Returns:
- the entityPathResolver
-
createBindingsFor
Creates theQuerydslBindingsto be used using for the given domain type. AQuerydslBinderCustomizerwill 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 theQuerydslBindingsto be used using for the given domain type and a pre-definedQuerydslBinderCustomizer.- Parameters:
domainType- must not be null.customizer- theQuerydslBinderCustomizerto use, must not be null.- Returns:
- will never be null.
-