public class JdbcRepositoryFactoryBean<T extends org.springframework.data.repository.Repository<S,ID>,S,ID extends Serializable> extends org.springframework.data.repository.core.support.TransactionalRepositoryFactoryBeanSupport<T,S,ID> implements ApplicationEventPublisherAware
FactoryBean
interface to allow easy setup of
repository factories via Spring configuration.OBJECT_TYPE_ATTRIBUTE
Constructor and Description |
---|
JdbcRepositoryFactoryBean(Class<? extends T> repositoryInterface)
Creates a new
JdbcRepositoryFactoryBean for the given repository interface. |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
protected org.springframework.data.repository.core.support.RepositoryFactorySupport |
doCreateRepositoryFactory()
Creates the actual
RepositoryFactorySupport instance. |
void |
setApplicationEventPublisher(ApplicationEventPublisher publisher) |
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) |
createRepositoryFactory, setEnableDefaultTransactions, setTransactionManager
addRepositoryFactoryCustomizer, createDefaultQueryMethodEvaluationContextProvider, getEntityInformation, getObject, getObjectType, getPersistentEntity, getQueryMethods, getRepositoryInformation, isSingleton, setBeanClassLoader, setCustomImplementation, setEvaluationContextProvider, setLazyInit, setMappingContext, setNamedQueries, setQueryLookupStrategyKey, setRepositoryBaseClass, setRepositoryFragments
public JdbcRepositoryFactoryBean(Class<? extends T> repositoryInterface)
JdbcRepositoryFactoryBean
for the given repository interface.repositoryInterface
- must not be null.public void setApplicationEventPublisher(ApplicationEventPublisher publisher)
setApplicationEventPublisher
in interface ApplicationEventPublisherAware
setApplicationEventPublisher
in class org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport<T extends org.springframework.data.repository.Repository<S,ID>,S,ID extends Serializable>
protected org.springframework.data.repository.core.support.RepositoryFactorySupport doCreateRepositoryFactory()
RepositoryFactorySupport
instance.@Autowired public void setMappingContext(RelationalMappingContext mappingContext)
@Autowired public void setDialect(Dialect dialect)
public void setDataAccessStrategy(DataAccessStrategy dataAccessStrategy)
dataAccessStrategy
- can be null.@Autowired(required=false) public void setQueryMappingConfiguration(QueryMappingConfiguration queryMappingConfiguration)
queryMappingConfiguration
- can be null. afterPropertiesSet()
defaults to
QueryMappingConfiguration.EMPTY
if null.public void setJdbcOperations(NamedParameterJdbcOperations operations)
@Autowired public void setConverter(JdbcConverter converter)
public void setBeanFactory(BeanFactory beanFactory)
setBeanFactory
in interface BeanFactoryAware
setBeanFactory
in class org.springframework.data.repository.core.support.TransactionalRepositoryFactoryBeanSupport<T extends org.springframework.data.repository.Repository<S,ID>,S,ID extends Serializable>
public void afterPropertiesSet()
afterPropertiesSet
in interface InitializingBean
afterPropertiesSet
in class org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport<T extends org.springframework.data.repository.Repository<S,ID>,S,ID extends Serializable>
Copyright © 2017–2023 Pivotal Software, Inc.. All rights reserved.