Module spring.data.jdbc
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
ConstructorsConstructorDescriptionJdbcRepositoryFactoryBean(Class<? extends T> repositoryInterface) Creates a newJdbcRepositoryFactoryBeanfor the given repository interface. -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected RepositoryFactorySupportCreates the actualRepositoryFactorySupportinstance.voidvoidsetBeanFactory(BeanFactory beanFactory) voidsetConverter(JdbcConverter converter) voidsetDataAccessStrategy(DataAccessStrategy dataAccessStrategy) voidsetDialect(org.springframework.data.relational.core.dialect.Dialect dialect) voidsetJdbcOperations(NamedParameterJdbcOperations operations) voidsetMappingContext(org.springframework.data.relational.core.mapping.RelationalMappingContext mappingContext) voidsetQueryMappingConfiguration(QueryMappingConfiguration queryMappingConfiguration) Methods inherited from class org.springframework.data.repository.core.support.TransactionalRepositoryFactoryBeanSupport
createRepositoryFactory, setEnableDefaultTransactions, setTransactionManagerMethods 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 newJdbcRepositoryFactoryBeanfor the given repository interface.- Parameters:
repositoryInterface- must not be null.
-
-
Method Details
-
setApplicationEventPublisher
- Specified by:
setApplicationEventPublisherin interfaceApplicationEventPublisherAware- Overrides:
setApplicationEventPublisherin classRepositoryFactoryBeanSupport<T extends Repository<S,ID>, S, ID extends Serializable>
-
doCreateRepositoryFactory
Creates the actualRepositoryFactorySupportinstance.- Specified by:
doCreateRepositoryFactoryin classTransactionalRepositoryFactoryBeanSupport<T extends Repository<S,ID>, S, ID extends Serializable>
-
setMappingContext
public void setMappingContext(org.springframework.data.relational.core.mapping.RelationalMappingContext mappingContext) -
setDialect
public void setDialect(org.springframework.data.relational.core.dialect.Dialect dialect) -
setDataAccessStrategy
- Parameters:
dataAccessStrategy- can be null.
-
setQueryMappingConfiguration
@Autowired(required=false) public void setQueryMappingConfiguration(QueryMappingConfiguration queryMappingConfiguration) - Parameters:
queryMappingConfiguration- can be null.afterPropertiesSet()defaults toQueryMappingConfiguration.EMPTYif null.
-
setJdbcOperations
-
setConverter
-
setBeanFactory
- Specified by:
setBeanFactoryin interfaceBeanFactoryAware- Overrides:
setBeanFactoryin classTransactionalRepositoryFactoryBeanSupport<T extends Repository<S,ID>, S, ID extends Serializable>
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceInitializingBean- Overrides:
afterPropertiesSetin classRepositoryFactoryBeanSupport<T extends Repository<S,ID>, S, ID extends Serializable>
-