org.springframework.data.jdbc.repository.support

## Class JdbcRepositoryFactoryBean<T extends Repository<S,ID>,S,ID extends Serializable>

- java.lang.Object
- - org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport<T,S,ID>
  - - org.springframework.data.repository.core.support.TransactionalRepositoryFactoryBeanSupport<T,S,ID>
    - - org.springframework.data.jdbc.repository.support.JdbcRepositoryFactoryBean<T,S,ID>

All Implemented Interfaces:
  Aware, BeanClassLoaderAware, BeanFactoryAware, FactoryBean<T>, InitializingBean, ApplicationEventPublisherAware, RepositoryFactoryInformation<S,ID>

    public class JdbcRepositoryFactoryBean<T extends Repository<S,ID>,S,ID extends Serializable>
    extends TransactionalRepositoryFactoryBeanSupport<T,S,ID>
    implements ApplicationEventPublisherAware

Special adapter for Springs `FactoryBean` interface to allow easy setup of repository factories via Spring configuration.

Author:
  Jens Schauder, Greg Turnquist, Christoph Strobl, Oliver Gierke, Mark Paluch, Hebert Coelho

### Field Summary

### Fields inherited from interface org.springframework.beans.factory.FactoryBean

`OBJECT_TYPE_ATTRIBUTE`

### Constructor Summary

Constructors
`protected` `JdbcRepositoryFactoryBean(Class<? extends T> repositoryInterface)` Creates a new `JdbcRepositoryFactoryBean` for the given repository interface.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `afterPropertiesSet()`
`protected RepositoryFactorySupport` `doCreateRepositoryFactory()` Creates the actual `RepositoryFactorySupport` instance.
`void` `setApplicationEventPublisher(ApplicationEventPublisher publisher)`
`void` `setBeanFactory(BeanFactory beanFactory)`
`void` `setConverter(JdbcConverter converter)`
`void` `setDataAccessStrategy(DataAccessStrategy dataAccessStrategy)`
`protected void` `setDialect(Dialect dialect)`
`void` `setJdbcOperations(NamedParameterJdbcOperations operations)`
`protected void` `setMappingContext(RelationalMappingContext mappingContext)`
`void` `setQueryMappingConfiguration(QueryMappingConfiguration queryMappingConfiguration)`

### Methods inherited from class org.springframework.data.repository.core.support.TransactionalRepositoryFactoryBeanSupport

`createRepositoryFactory, setEnableDefaultTransactions, setTransactionManager`

### Methods inherited from class org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport

`addRepositoryFactoryCustomizer, createDefaultQueryMethodEvaluationContextProvider, getEntityInformation, getObject, getObjectType, getPersistentEntity, getQueryMethods, getRepositoryInformation, isSingleton, setBeanClassLoader, setCustomImplementation, setEvaluationContextProvider, setLazyInit, setMappingContext, setNamedQueries, setQueryLookupStrategyKey, setRepositoryBaseClass, setRepositoryFragments`

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

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

### Constructor Detail

#### JdbcRepositoryFactoryBean

    protected JdbcRepositoryFactoryBean(Class<? extends T> repositoryInterface)

Creates a new `JdbcRepositoryFactoryBean` for the given repository interface.

Parameters:
  `repositoryInterface` - must not be null.

### Method Detail

#### setApplicationEventPublisher

    public void setApplicationEventPublisher(ApplicationEventPublisher publisher)

Specified by:
  `setApplicationEventPublisher` in interface `ApplicationEventPublisherAware`
Overrides:
  `setApplicationEventPublisher` in class `RepositoryFactoryBeanSupport<T extends Repository<S,ID>,S,ID extends Serializable>`

#### doCreateRepositoryFactory

    protected RepositoryFactorySupport doCreateRepositoryFactory()

Creates the actual `RepositoryFactorySupport` instance.

Specified by:
  `doCreateRepositoryFactory` in class `TransactionalRepositoryFactoryBeanSupport<T extends Repository<S,ID>,S,ID extends Serializable>`

#### setMappingContext

    @Autowired
    protected void setMappingContext(RelationalMappingContext mappingContext)

#### setDialect

    @Autowired
    protected void setDialect(Dialect dialect)

#### setDataAccessStrategy

    public void setDataAccessStrategy(DataAccessStrategy dataAccessStrategy)

Parameters:
  `dataAccessStrategy` - can be null.

#### setQueryMappingConfiguration

    @Autowired(required=false)
    public void setQueryMappingConfiguration(QueryMappingConfiguration queryMappingConfiguration)

Parameters:
  `queryMappingConfiguration` - can be null. `afterPropertiesSet()` defaults to `QueryMappingConfiguration.EMPTY` if null.

#### setJdbcOperations

    public void setJdbcOperations(NamedParameterJdbcOperations operations)

#### setConverter

    @Autowired
    public void setConverter(JdbcConverter converter)

#### setBeanFactory

    public void setBeanFactory(BeanFactory beanFactory)

Specified by:
  `setBeanFactory` in interface `BeanFactoryAware`
Overrides:
  `setBeanFactory` in class `TransactionalRepositoryFactoryBeanSupport<T extends Repository<S,ID>,S,ID extends Serializable>`

#### afterPropertiesSet

    public void afterPropertiesSet()

Specified by:
  `afterPropertiesSet` in interface `InitializingBean`
Overrides:
  `afterPropertiesSet` in class `RepositoryFactoryBeanSupport<T extends Repository<S,ID>,S,ID extends Serializable>`