Class DefaultRepositoryConfiguration<T extends RepositoryConfigurationSource>
java.lang.Object
org.springframework.data.repository.config.DefaultRepositoryConfiguration<T>
- All Implemented Interfaces:
RepositoryConfiguration<T>
public class DefaultRepositoryConfiguration<T extends RepositoryConfigurationSource>
extends Object
implements RepositoryConfiguration<T>
Default implementation of
RepositoryConfiguration
.- Author:
- Oliver Gierke, Jens Schauder, Mark Paluch, Johannes Englmeier
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDefaultRepositoryConfiguration
(T configurationSource, BeanDefinition definition, RepositoryConfigurationExtension extension) -
Method Summary
Modifier and TypeMethodDescriptionReturns the base packages that the repository was scanned under.Returns theRepositoryConfigurationSource
that backs theRepositoryConfiguration
.Returns theTypeFilter
s to be used to exclude packages from repository scanning.Returns the base packages to scan for repository implementations.Returns the custom implementation bean name to be used.Returns the location of the file containing Spring Data named queries.Returns the key to resolve aQueryLookupStrategy
from eventually.Returns the name of the repository base class to be used or null if the store specific defaults shall be applied.Returns the bean name of the repository to be used.Returns the name of the repository factory bean class to be used.Returns the interface name of the repository.Returns a human readable description of the repository interface declaration for error reporting purposes.Returns the source of theRepositoryConfiguration
.boolean
Returns whether to initialize the repository proxy lazily.boolean
Returns whether the repository is the primary one for its type.Returns theImplementationDetectionConfiguration
to be used for this repository.Returns theImplementationLookupConfiguration
for the givenMetadataReaderFactory
.
-
Field Details
-
DEFAULT_REPOSITORY_IMPLEMENTATION_POSTFIX
- See Also:
-
DEFAULT_QUERY_LOOKUP_STRATEGY
-
-
Constructor Details
-
DefaultRepositoryConfiguration
public DefaultRepositoryConfiguration(T configurationSource, BeanDefinition definition, RepositoryConfigurationExtension extension)
-
-
Method Details
-
getBeanId
-
getQueryLookupStrategyKey
Description copied from interface:RepositoryConfiguration
Returns the key to resolve aQueryLookupStrategy
from eventually.- Specified by:
getQueryLookupStrategyKey
in interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>
- Returns:
- See Also:
-
getBasePackages
Description copied from interface:RepositoryConfiguration
Returns the base packages that the repository was scanned under.- Specified by:
getBasePackages
in interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>
- Returns:
-
getImplementationBasePackages
Description copied from interface:RepositoryConfiguration
Returns the base packages to scan for repository implementations.- Specified by:
getImplementationBasePackages
in interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>
- Returns:
-
getRepositoryInterface
Description copied from interface:RepositoryConfiguration
Returns the interface name of the repository.- Specified by:
getRepositoryInterface
in interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>
- Returns:
-
getConfigSource
-
getNamedQueriesLocation
Description copied from interface:RepositoryConfiguration
Returns the location of the file containing Spring Data named queries.- Specified by:
getNamedQueriesLocation
in interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>
- Returns:
-
getImplementationClassName
-
getImplementationBeanName
Description copied from interface:RepositoryConfiguration
Returns the custom implementation bean name to be used.- Specified by:
getImplementationBeanName
in interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>
- Returns:
-
getSource
Description copied from interface:RepositoryConfiguration
Returns the source of theRepositoryConfiguration
.- Specified by:
getSource
in interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>
- Returns:
-
getConfigurationSource
Description copied from interface:RepositoryConfiguration
Returns theRepositoryConfigurationSource
that backs theRepositoryConfiguration
.- Specified by:
getConfigurationSource
in interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>
- Returns:
-
getRepositoryBaseClassName
Description copied from interface:RepositoryConfiguration
Returns the name of the repository base class to be used or null if the store specific defaults shall be applied.- Specified by:
getRepositoryBaseClassName
in interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>
- Returns:
-
getRepositoryFactoryBeanClassName
Description copied from interface:RepositoryConfiguration
Returns the name of the repository factory bean class to be used.- Specified by:
getRepositoryFactoryBeanClassName
in interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>
- Returns:
-
getRepositoryBeanName
Description copied from interface:RepositoryConfiguration
Returns the bean name of the repository to be used.- Specified by:
getRepositoryBeanName
in interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>
- Returns:
-
isLazyInit
public boolean isLazyInit()Description copied from interface:RepositoryConfiguration
Returns whether to initialize the repository proxy lazily.- Specified by:
isLazyInit
in interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>
- Returns:
-
isPrimary
public boolean isPrimary()Description copied from interface:RepositoryConfiguration
Returns whether the repository is the primary one for its type.- Specified by:
isPrimary
in interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>
- Returns:
- true whether the repository is the primary one for its type.
-
getExcludeFilters
Description copied from interface:RepositoryConfiguration
Returns theTypeFilter
s to be used to exclude packages from repository scanning.- Specified by:
getExcludeFilters
in interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>
- Returns:
-
toImplementationDetectionConfiguration
public ImplementationDetectionConfiguration toImplementationDetectionConfiguration(MetadataReaderFactory factory) Description copied from interface:RepositoryConfiguration
Returns theImplementationDetectionConfiguration
to be used for this repository.- Specified by:
toImplementationDetectionConfiguration
in interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>
- Parameters:
factory
- must not be null.- Returns:
- will never be null.
-
toLookupConfiguration
Description copied from interface:RepositoryConfiguration
Returns theImplementationLookupConfiguration
for the givenMetadataReaderFactory
.- Specified by:
toLookupConfiguration
in interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>
- Parameters:
factory
- must not be null.- Returns:
- will never be null.
-
getResourceDescription
Description copied from interface:RepositoryConfiguration
Returns a human readable description of the repository interface declaration for error reporting purposes.- Specified by:
getResourceDescription
in interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>
- Returns:
- can be null.
-