org.springframework.data.querydsl.binding

## Class QuerydslBindingsFactory

- java.lang.Object
- - org.springframework.data.querydsl.binding.QuerydslBindingsFactory

All Implemented Interfaces:
  Aware, ApplicationContextAware

    public class QuerydslBindingsFactory
    extends Object
    implements ApplicationContextAware

Factory to create `QuerydslBindings` using an `EntityPathResolver`.

Since:
  1.11
Author:
  Oliver Gierke, Christoph Strobl

### Constructor Summary

Constructors
Constructor and Description
`QuerydslBindingsFactory(EntityPathResolver entityPathResolver)` Creates a new `QuerydslBindingsFactory` using the given `EntityPathResolver`.

### Method Summary

All Methods Instance Methods Concrete Methods
`QuerydslBindings` `createBindingsFor(TypeInformation<?> domainType)` Creates the `QuerydslBindings` to be used using for the given domain type.
`QuerydslBindings` `createBindingsFor(TypeInformation<?> domainType, Class<? extends QuerydslBinderCustomizer<?>> customizer)` Creates the `QuerydslBindings` to be used using for the given domain type and a pre-defined `QuerydslBinderCustomizer`.
`EntityPathResolver` `getEntityPathResolver()` Returns the `EntityPathResolver` used by the factory.
`void` `setApplicationContext(ApplicationContext applicationContext)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### QuerydslBindingsFactory

    public QuerydslBindingsFactory(EntityPathResolver entityPathResolver)

Creates a new `QuerydslBindingsFactory` using the given `EntityPathResolver`.

Parameters:
  `entityPathResolver` - must not be null.

### Method Detail

#### setApplicationContext

    public void setApplicationContext(ApplicationContext applicationContext)
                               throws BeansException

Specified by:
  `setApplicationContext` in interface `ApplicationContextAware`
Throws:
  `BeansException`

#### getEntityPathResolver

    public EntityPathResolver getEntityPathResolver()

Returns the `EntityPathResolver` used by the factory.

Returns:
  the entityPathResolver

#### createBindingsFor

    public QuerydslBindings createBindingsFor(TypeInformation<?> domainType)

Creates the `QuerydslBindings` to be used using for the given domain type. A `QuerydslBinderCustomizer` 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 the `QuerydslBindings` to be used using for the given domain type and a pre-defined `QuerydslBinderCustomizer`.

Parameters:
  `domainType` - must not be null.
  `customizer` - the `QuerydslBinderCustomizer` to use, must not be null.
Returns:
  will never be null.