org.springframework.data.repository.config

## 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 `RepositoryConfigurationSource`s.

Author:
  Oliver Gierke, Thomas Darimont, Peter Rietzler, Jens Schauder

### Field Summary

Fields
`protected static String` `DEFAULT_REPOSITORY_IMPL_POSTFIX`

### Constructor Summary

Constructors
Constructor and Description
`RepositoryConfigurationSourceSupport(Environment environment, ClassLoader classLoader, BeanDefinitionRegistry registry, BeanNameGenerator generator)` Creates a new `RepositoryConfigurationSourceSupport` with the given environment.

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `generateBeanName(BeanDefinition beanDefinition)` Returns a name for the beanDefinition.
`Streamable<BeanDefinition>` `getCandidates(ResourceLoader loader)` Returns the source `BeanDefinition`s of the repository interfaces to create repository instances for.
`Streamable<TypeFilter>` `getExcludeFilters()` Return the `TypeFilter`s to define which types to exclude when scanning for repositories.
`protected Iterable<TypeFilter>` `getIncludeFilters()` Return the `TypeFilter`s to define which types to include when scanning for repositories.
`boolean` `shouldConsiderNestedRepositories()` Returns whether we should consider nested repositories, i.e. repository interface definitions nested in other classes.
`ImplementationDetectionConfiguration` `toImplementationDetectionConfiguration(MetadataReaderFactory factory)` Returns the `ImplementationDetectionConfiguration` to be used to scan for custom implementations of the repository instances to be created from this `RepositoryConfigurationSource`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.springframework.data.repository.config.RepositoryConfigurationSource

`getAttribute, getAttribute, getBasePackages, getBootstrapMode, getNamedQueryLocation, getQueryLookupStrategyKey, getRepositoryBaseClassName, getRepositoryFactoryBeanClassName, getRepositoryImplementationPostfix, getRequiredAttribute, getResourceDescription, getSource, usesExplicitFilters`

### Field Detail

#### DEFAULT_REPOSITORY_IMPL_POSTFIX

    protected static final String DEFAULT_REPOSITORY_IMPL_POSTFIX

See Also:
  Constant Field Values

### Constructor Detail

#### RepositoryConfigurationSourceSupport

    public RepositoryConfigurationSourceSupport(Environment environment,
                                                ClassLoader classLoader,
                                                BeanDefinitionRegistry registry,
                                                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 Detail

#### getCandidates

    public Streamable<BeanDefinition> getCandidates(ResourceLoader loader)

Description copied from interface: `RepositoryConfigurationSource`
Returns the source `BeanDefinition`s of the repository interfaces to create repository instances for.

Specified by:
  `getCandidates` in interface `RepositoryConfigurationSource`
Returns:

#### getExcludeFilters

    public Streamable<TypeFilter> getExcludeFilters()

Return the `TypeFilter`s 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(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<TypeFilter> getIncludeFilters()

Return the `TypeFilter`s 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(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.