Class R2dbcRepositoryFactoryBean<T extends org.springframework.data.repository.Repository<S,ID>,S,ID extends Serializable>

java.lang.Object
org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport<T,S,ID>
org.springframework.data.r2dbc.repository.support.R2dbcRepositoryFactoryBean<T,S,ID>
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.FactoryBean<T>, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationEventPublisherAware, org.springframework.data.repository.core.support.RepositoryFactoryInformation<S,ID>

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 org.springframework.context.ApplicationContextAware
FactoryBean to create R2dbcRepository instances. Can be either configured with R2dbcEntityOperations or DatabaseClient with ReactiveDataAccessStrategy.
Author:
Mark Paluch, Christoph Strobl
See Also:
  • ReactiveSortingRepository
  • Field Summary

    Fields inherited from interface org.springframework.beans.factory.FactoryBean

    OBJECT_TYPE_ATTRIBUTE
  • Constructor Summary

    Constructors
    Constructor
    Description
    R2dbcRepositoryFactoryBean(Class<? extends T> repositoryInterface)
    Creates a new R2dbcRepositoryFactoryBean for the given repository interface.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    protected Optional<org.springframework.data.repository.query.QueryMethodEvaluationContextProvider>
    createDefaultQueryMethodEvaluationContextProvider(org.springframework.beans.factory.ListableBeanFactory beanFactory)
     
    protected final org.springframework.data.repository.core.support.RepositoryFactorySupport
     
    protected org.springframework.data.repository.core.support.RepositoryFactorySupport
    Creates and initializes a RepositoryFactorySupport instance.
    protected org.springframework.data.repository.core.support.RepositoryFactorySupport
    getFactoryInstance(org.springframework.r2dbc.core.DatabaseClient client, ReactiveDataAccessStrategy dataAccessStrategy)
    Creates and initializes a RepositoryFactorySupport instance.
    void
    setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
     
    void
     
    void
    setDatabaseClient(org.springframework.r2dbc.core.DatabaseClient client)
    Configures the DatabaseClient to be used.
    void
     
    protected void
    setMappingContext(org.springframework.data.mapping.context.MappingContext<?,?> mappingContext)
     

    Methods inherited from class org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport

    addRepositoryFactoryCustomizer, getEntityInformation, getObject, getObjectType, getPersistentEntity, getQueryMethods, getRepositoryInformation, isSingleton, setApplicationEventPublisher, setBeanClassLoader, setBeanFactory, setCustomImplementation, setEvaluationContextProvider, setLazyInit, setNamedQueries, setQueryLookupStrategyKey, setRepositoryBaseClass, setRepositoryFragments

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • R2dbcRepositoryFactoryBean

      public R2dbcRepositoryFactoryBean(Class<? extends T> repositoryInterface)
      Creates a new R2dbcRepositoryFactoryBean for the given repository interface.
      Parameters:
      repositoryInterface - must not be null.
  • Method Details

    • setDatabaseClient

      public void setDatabaseClient(org.springframework.r2dbc.core.DatabaseClient client)
      Configures the DatabaseClient to be used.
      Parameters:
      client - the client to set
    • setDataAccessStrategy

      public void setDataAccessStrategy(ReactiveDataAccessStrategy dataAccessStrategy)
    • setEntityOperations

      public void setEntityOperations(R2dbcEntityOperations operations)
      Parameters:
      operations -
      Since:
      1.1.3
    • setMappingContext

      protected void setMappingContext(org.springframework.data.mapping.context.MappingContext<?,?> mappingContext)
      Overrides:
      setMappingContext in class org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport<T extends org.springframework.data.repository.Repository<S,ID>,S,ID extends Serializable>
    • createRepositoryFactory

      protected final org.springframework.data.repository.core.support.RepositoryFactorySupport createRepositoryFactory()
      Specified by:
      createRepositoryFactory in class org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport<T extends org.springframework.data.repository.Repository<S,ID>,S,ID extends Serializable>
    • createDefaultQueryMethodEvaluationContextProvider

      protected Optional<org.springframework.data.repository.query.QueryMethodEvaluationContextProvider> createDefaultQueryMethodEvaluationContextProvider(org.springframework.beans.factory.ListableBeanFactory beanFactory)
      Overrides:
      createDefaultQueryMethodEvaluationContextProvider in class org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport<T extends org.springframework.data.repository.Repository<S,ID>,S,ID extends Serializable>
    • getFactoryInstance

      protected org.springframework.data.repository.core.support.RepositoryFactorySupport getFactoryInstance(org.springframework.r2dbc.core.DatabaseClient client, ReactiveDataAccessStrategy dataAccessStrategy)
      Creates and initializes a RepositoryFactorySupport instance.
      Parameters:
      client - must not be null.
      dataAccessStrategy - must not be null.
      Returns:
      new instance of RepositoryFactorySupport.
    • getFactoryInstance

      protected org.springframework.data.repository.core.support.RepositoryFactorySupport getFactoryInstance(R2dbcEntityOperations operations)
      Creates and initializes a RepositoryFactorySupport instance.
      Parameters:
      operations - must not be null.
      Returns:
      new instance of RepositoryFactorySupport.
      Since:
      1.1.3
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Overrides:
      afterPropertiesSet in class org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport<T extends org.springframework.data.repository.Repository<S,ID>,S,ID extends Serializable>