public abstract class TransactionalRepositoryFactoryBeanSupport<T extends Repository<S,ID>,S,ID> extends RepositoryFactoryBeanSupport<T,S,ID> implements BeanFactoryAware
RepositoryFactoryBeanSupport to add transactional capabilities to the repository proxy. Will
register a TransactionalRepositoryProxyPostProcessor that in turn adds a TransactionInterceptor to
the repository proxy to be created.OBJECT_TYPE_ATTRIBUTE| Modifier | Constructor and Description |
|---|---|
protected |
TransactionalRepositoryFactoryBeanSupport(Class<? extends T> repositoryInterface)
Creates a new
TransactionalRepositoryFactoryBeanSupport for the given repository interface. |
| Modifier and Type | Method and Description |
|---|---|
protected RepositoryFactorySupport |
createRepositoryFactory()
Delegates
RepositoryFactorySupport creation to doCreateRepositoryFactory() and applies the
TransactionalRepositoryProxyPostProcessor to the created instance. |
protected abstract RepositoryFactorySupport |
doCreateRepositoryFactory()
Creates the actual
RepositoryFactorySupport instance. |
void |
setBeanFactory(BeanFactory beanFactory) |
void |
setEnableDefaultTransactions(boolean enableDefaultTransactions)
Configures whether to enable the default transactions configured at the repository base implementation class.
|
void |
setTransactionManager(String transactionManager)
Setter to configure which transaction manager to be used.
|
addRepositoryFactoryCustomizer, afterPropertiesSet, createDefaultQueryMethodEvaluationContextProvider, getEntityInformation, getObject, getObjectType, getPersistentEntity, getQueryMethods, getRepositoryInformation, isSingleton, setApplicationEventPublisher, setBeanClassLoader, setCustomImplementation, setEvaluationContextProvider, setLazyInit, setMappingContext, setNamedQueries, setQueryLookupStrategyKey, setRepositoryBaseClass, setRepositoryFragmentsprotected TransactionalRepositoryFactoryBeanSupport(Class<? extends T> repositoryInterface)
TransactionalRepositoryFactoryBeanSupport for the given repository interface.repositoryInterface - must not be null.public void setTransactionManager(String transactionManager)
Transactional annotation is used. By explicitly
defining the transaction manager bean name we favour let this one be the default one chosen.transactionManager - public void setEnableDefaultTransactions(boolean enableDefaultTransactions)
enableDefaultTransactions - the enableDefaultTransactions to setprotected final RepositoryFactorySupport createRepositoryFactory()
RepositoryFactorySupport creation to doCreateRepositoryFactory() and applies the
TransactionalRepositoryProxyPostProcessor to the created instance.createRepositoryFactory in class RepositoryFactoryBeanSupport<T extends Repository<S,ID>,S,ID>#createRepositoryFactory()protected abstract RepositoryFactorySupport doCreateRepositoryFactory()
RepositoryFactorySupport instance.public void setBeanFactory(BeanFactory beanFactory)
setBeanFactory in interface BeanFactoryAwaresetBeanFactory in class RepositoryFactoryBeanSupport<T extends Repository<S,ID>,S,ID>Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.