public class R2dbcRepositoryFactoryBean<T extends org.springframework.data.repository.Repository<S,ID>,S,ID extends Serializable> extends org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport<T,S,ID> implements ApplicationContextAware
FactoryBean
to create
R2dbcRepository
instances. Can be either configured with
R2dbcEntityOperations
or DatabaseClient
with ReactiveDataAccessStrategy
.ReactiveSortingRepository
OBJECT_TYPE_ATTRIBUTE
Constructor and Description |
---|
R2dbcRepositoryFactoryBean(Class<? extends T> repositoryInterface)
Creates a new
R2dbcRepositoryFactoryBean for the given repository interface. |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
protected Optional<org.springframework.data.repository.query.QueryMethodEvaluationContextProvider> |
createDefaultQueryMethodEvaluationContextProvider(ListableBeanFactory beanFactory) |
protected org.springframework.data.repository.core.support.RepositoryFactorySupport |
createRepositoryFactory() |
protected org.springframework.data.repository.core.support.RepositoryFactorySupport |
getFactoryInstance(DatabaseClient client,
ReactiveDataAccessStrategy dataAccessStrategy)
Creates and initializes a
RepositoryFactorySupport instance. |
protected org.springframework.data.repository.core.support.RepositoryFactorySupport |
getFactoryInstance(R2dbcEntityOperations operations)
Creates and initializes a
RepositoryFactorySupport instance. |
void |
setApplicationContext(ApplicationContext applicationContext) |
void |
setDataAccessStrategy(ReactiveDataAccessStrategy dataAccessStrategy) |
void |
setDatabaseClient(DatabaseClient client)
Configures the
DatabaseClient to be used. |
void |
setEntityOperations(R2dbcEntityOperations operations) |
protected void |
setMappingContext(org.springframework.data.mapping.context.MappingContext<?,?> mappingContext) |
addRepositoryFactoryCustomizer, getEntityInformation, getObject, getObjectType, getPersistentEntity, getQueryMethods, getRepositoryInformation, isSingleton, setApplicationEventPublisher, setBeanClassLoader, setBeanFactory, setCustomImplementation, setEvaluationContextProvider, setLazyInit, setNamedQueries, setQueryLookupStrategyKey, setRepositoryBaseClass, setRepositoryFragments
public R2dbcRepositoryFactoryBean(Class<? extends T> repositoryInterface)
R2dbcRepositoryFactoryBean
for the given repository interface.repositoryInterface
- must not be null.public void setDatabaseClient(DatabaseClient client)
DatabaseClient
to be used.client
- the client to setpublic void setDataAccessStrategy(ReactiveDataAccessStrategy dataAccessStrategy)
public void setEntityOperations(R2dbcEntityOperations operations)
operations
- protected void setMappingContext(org.springframework.data.mapping.context.MappingContext<?,?> mappingContext)
protected final org.springframework.data.repository.core.support.RepositoryFactorySupport createRepositoryFactory()
protected Optional<org.springframework.data.repository.query.QueryMethodEvaluationContextProvider> createDefaultQueryMethodEvaluationContextProvider(ListableBeanFactory beanFactory)
protected org.springframework.data.repository.core.support.RepositoryFactorySupport getFactoryInstance(DatabaseClient client, ReactiveDataAccessStrategy dataAccessStrategy)
RepositoryFactorySupport
instance.client
- must not be null.dataAccessStrategy
- must not be null.RepositoryFactorySupport
.protected org.springframework.data.repository.core.support.RepositoryFactorySupport getFactoryInstance(R2dbcEntityOperations operations)
RepositoryFactorySupport
instance.operations
- must not be null.RepositoryFactorySupport
.public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
setApplicationContext
in interface ApplicationContextAware
BeansException
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 © 2018–2023 Pivotal Software, Inc.. All rights reserved.