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

java.lang.Object
org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport<T,S,ID>
org.springframework.data.keyvalue.repository.support.KeyValueRepositoryFactoryBean<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.ApplicationEventPublisherAware, org.springframework.data.repository.core.support.RepositoryFactoryInformation<S,ID>

public class KeyValueRepositoryFactoryBean<T extends org.springframework.data.repository.Repository<S,ID>,S,ID> extends org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport<T,S,ID>
FactoryBean to create KeyValueRepository.
Author:
Christoph Strobl, Oliver Gierke, Mark Paluch
  • Field Summary

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

    OBJECT_TYPE_ATTRIBUTE
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    void
     
    protected final org.springframework.data.repository.core.support.RepositoryFactorySupport
     
    createRepositoryFactory(KeyValueOperations operations, Class<? extends org.springframework.data.repository.query.parser.AbstractQueryCreator<?,?>> queryCreator, Class<? extends org.springframework.data.repository.query.RepositoryQuery> repositoryQueryType)
    Create the repository factory to be used to create repositories.
    void
    Configures the KeyValueOperations to be used for the repositories.
    void
    setMappingContext(org.springframework.data.mapping.context.MappingContext<?,?> mappingContext)
     
    void
    setQueryCreator(Class<? extends org.springframework.data.repository.query.parser.AbstractQueryCreator<?,?>> queryCreator)
    Configures the QueryCreatorType to be used.
    void
    setQueryType(Class<? extends org.springframework.data.repository.query.RepositoryQuery> repositoryQueryType)
    Configures the RepositoryQuery type to be created.

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

    addRepositoryFactoryCustomizer, createDefaultQueryMethodEvaluationContextProvider, 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

    • KeyValueRepositoryFactoryBean

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

    • setKeyValueOperations

      public void setKeyValueOperations(KeyValueOperations operations)
      Configures the KeyValueOperations to be used for the repositories.
      Parameters:
      operations - must not be null.
    • setMappingContext

      public 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>
    • setQueryCreator

      public void setQueryCreator(Class<? extends org.springframework.data.repository.query.parser.AbstractQueryCreator<?,?>> queryCreator)
      Configures the QueryCreatorType to be used.
      Parameters:
      queryCreator - must not be null.
    • setQueryType

      public void setQueryType(Class<? extends org.springframework.data.repository.query.RepositoryQuery> repositoryQueryType)
      Configures the RepositoryQuery type to be created.
      Parameters:
      repositoryQueryType - must not be null.
      Since:
      1.1
    • 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>
    • createRepositoryFactory

      protected KeyValueRepositoryFactory createRepositoryFactory(KeyValueOperations operations, Class<? extends org.springframework.data.repository.query.parser.AbstractQueryCreator<?,?>> queryCreator, Class<? extends org.springframework.data.repository.query.RepositoryQuery> repositoryQueryType)
      Create the repository factory to be used to create repositories.
      Parameters:
      operations - will never be null.
      queryCreator - will never be null.
      repositoryQueryType - will never be null.
      Returns:
      must not be null.
      Since:
      1.1
    • 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>