Class RepositoryConfigurationSourceSupport

java.lang.Object
org.springframework.data.repository.config.RepositoryConfigurationSourceSupport
All Implemented Interfaces:
RepositoryConfigurationSource
Direct Known Subclasses:
AnnotationRepositoryConfigurationSource, XmlRepositoryConfigurationSource

public abstract class RepositoryConfigurationSourceSupport extends Object implements RepositoryConfigurationSource
Base class to implement RepositoryConfigurationSources.
Author:
Oliver Gierke, Thomas Darimont, Peter Rietzler, Jens Schauder
  • Field Details

  • Constructor Details

    • RepositoryConfigurationSourceSupport

      public RepositoryConfigurationSourceSupport(org.springframework.core.env.Environment environment, ClassLoader classLoader, org.springframework.beans.factory.support.BeanDefinitionRegistry registry, org.springframework.beans.factory.support.BeanNameGenerator generator)
      Creates a new RepositoryConfigurationSourceSupport with the given environment.
      Parameters:
      environment - must not be null.
      classLoader - must not be null.
      registry - must not be null.
  • Method Details

    • getCandidates

      public Streamable<org.springframework.beans.factory.config.BeanDefinition> getCandidates(org.springframework.core.io.ResourceLoader loader)
      Description copied from interface: RepositoryConfigurationSource
      Returns the source BeanDefinitions of the repository interfaces to create repository instances for.
      Specified by:
      getCandidates in interface RepositoryConfigurationSource
      Returns:
    • getExcludeFilters

      public Streamable<org.springframework.core.type.filter.TypeFilter> getExcludeFilters()
      Return the TypeFilters to define which types to exclude when scanning for repositories. Default implementation returns an empty collection.
      Specified by:
      getExcludeFilters in interface RepositoryConfigurationSource
      Returns:
      must not be null.
    • generateBeanName

      public String generateBeanName(org.springframework.beans.factory.config.BeanDefinition beanDefinition)
      Description copied from interface: RepositoryConfigurationSource
      Returns a name for the beanDefinition.
      Specified by:
      generateBeanName in interface RepositoryConfigurationSource
      Parameters:
      beanDefinition - must not be null.
      Returns:
    • getIncludeFilters

      protected Iterable<org.springframework.core.type.filter.TypeFilter> getIncludeFilters()
      Return the TypeFilters to define which types to include when scanning for repositories. Default implementation returns an empty collection.
      Returns:
      must not be null.
    • shouldConsiderNestedRepositories

      public boolean shouldConsiderNestedRepositories()
      Returns whether we should consider nested repositories, i.e. repository interface definitions nested in other classes.
      Returns:
      true if the container should look for nested repository interface definitions.
    • toImplementationDetectionConfiguration

      public ImplementationDetectionConfiguration toImplementationDetectionConfiguration(org.springframework.core.type.classreading.MetadataReaderFactory factory)
      Description copied from interface: RepositoryConfigurationSource
      Returns the ImplementationDetectionConfiguration to be used to scan for custom implementations of the repository instances to be created from this RepositoryConfigurationSource.
      Specified by:
      toImplementationDetectionConfiguration in interface RepositoryConfigurationSource
      Returns:
      will never be null.