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, Chirag Tailor
-
Field Summary
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
-
Constructor Summary
ConstructorDescriptionJdbcRepositoryFactoryBean
(Class<? extends T> repositoryInterface) Creates a newJdbcRepositoryFactoryBean
for the given repository interface. -
Method Summary
Modifier and TypeMethodDescriptionvoid
protected RepositoryFactorySupport
Creates the actualRepositoryFactorySupport
instance.void
void
setBeanFactory
(BeanFactory beanFactory) void
setConverter
(JdbcConverter converter) void
setDataAccessStrategy
(DataAccessStrategy dataAccessStrategy) void
setDialect
(Dialect dialect) void
setJdbcOperations
(NamedParameterJdbcOperations operations) 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
-
Constructor Details
-
JdbcRepositoryFactoryBean
Creates a newJdbcRepositoryFactoryBean
for the given repository interface.- Parameters:
repositoryInterface
- must not be null.
-
-
Method Details
-
setApplicationEventPublisher
- Specified by:
setApplicationEventPublisher
in interfaceApplicationEventPublisherAware
- Overrides:
setApplicationEventPublisher
in classRepositoryFactoryBeanSupport<T extends Repository<S,
ID>, S, ID extends Serializable>
-
doCreateRepositoryFactory
Creates the actualRepositoryFactorySupport
instance.- Specified by:
doCreateRepositoryFactory
in classTransactionalRepositoryFactoryBeanSupport<T extends Repository<S,
ID>, S, ID extends Serializable>
-
setMappingContext
-
setDialect
-
setDataAccessStrategy
- Parameters:
dataAccessStrategy
- can be null.
-
setQueryMappingConfiguration
@Autowired(required=false) public void setQueryMappingConfiguration(QueryMappingConfiguration queryMappingConfiguration) - Parameters:
queryMappingConfiguration
- can be null.afterPropertiesSet()
defaults toQueryMappingConfiguration.EMPTY
if null.
-
setJdbcOperations
-
setConverter
-
setBeanFactory
- Specified by:
setBeanFactory
in interfaceBeanFactoryAware
- Overrides:
setBeanFactory
in classTransactionalRepositoryFactoryBeanSupport<T extends Repository<S,
ID>, S, ID extends Serializable>
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceInitializingBean
- Overrides:
afterPropertiesSet
in classRepositoryFactoryBeanSupport<T extends Repository<S,
ID>, S, ID extends Serializable>
-