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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultRepositoryConfiguration(T configurationSource, BeanDefinition definition, RepositoryConfigurationExtension extension) -
Method Summary
Modifier and TypeMethodDescriptionReturns the base packages that the repository was scanned under.Returns theRepositoryConfigurationSourcethat backs theRepositoryConfiguration.Returns theTypeFilters 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 aQueryLookupStrategyfrom 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.booleanReturns whether to initialize the repository proxy lazily.booleanReturns whether the repository is the primary one for its type.Returns theImplementationDetectionConfigurationto be used for this repository.Returns theImplementationLookupConfigurationfor 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:RepositoryConfigurationReturns the key to resolve aQueryLookupStrategyfrom eventually.- Specified by:
getQueryLookupStrategyKeyin interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>- Returns:
- See Also:
-
getBasePackages
Description copied from interface:RepositoryConfigurationReturns the base packages that the repository was scanned under.- Specified by:
getBasePackagesin interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>- Returns:
-
getImplementationBasePackages
Description copied from interface:RepositoryConfigurationReturns the base packages to scan for repository implementations.- Specified by:
getImplementationBasePackagesin interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>- Returns:
-
getRepositoryInterface
Description copied from interface:RepositoryConfigurationReturns the interface name of the repository.- Specified by:
getRepositoryInterfacein interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>- Returns:
-
getConfigSource
-
getNamedQueriesLocation
Description copied from interface:RepositoryConfigurationReturns the location of the file containing Spring Data named queries.- Specified by:
getNamedQueriesLocationin interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>- Returns:
-
getImplementationClassName
-
getImplementationBeanName
Description copied from interface:RepositoryConfigurationReturns the custom implementation bean name to be used.- Specified by:
getImplementationBeanNamein interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>- Returns:
-
getSource
Description copied from interface:RepositoryConfigurationReturns the source of theRepositoryConfiguration.- Specified by:
getSourcein interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>- Returns:
-
getConfigurationSource
Description copied from interface:RepositoryConfigurationReturns theRepositoryConfigurationSourcethat backs theRepositoryConfiguration.- Specified by:
getConfigurationSourcein interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>- Returns:
-
getRepositoryBaseClassName
Description copied from interface:RepositoryConfigurationReturns the name of the repository base class to be used or null if the store specific defaults shall be applied.- Specified by:
getRepositoryBaseClassNamein interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>- Returns:
-
getRepositoryFactoryBeanClassName
Description copied from interface:RepositoryConfigurationReturns the name of the repository factory bean class to be used.- Specified by:
getRepositoryFactoryBeanClassNamein interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>- Returns:
-
getRepositoryBeanName
Description copied from interface:RepositoryConfigurationReturns the bean name of the repository to be used.- Specified by:
getRepositoryBeanNamein interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>- Returns:
-
isLazyInit
public boolean isLazyInit()Description copied from interface:RepositoryConfigurationReturns whether to initialize the repository proxy lazily.- Specified by:
isLazyInitin interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>- Returns:
-
isPrimary
public boolean isPrimary()Description copied from interface:RepositoryConfigurationReturns whether the repository is the primary one for its type.- Specified by:
isPrimaryin interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>- Returns:
- true whether the repository is the primary one for its type.
-
getExcludeFilters
Description copied from interface:RepositoryConfigurationReturns theTypeFilters to be used to exclude packages from repository scanning.- Specified by:
getExcludeFiltersin interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>- Returns:
-
toImplementationDetectionConfiguration
public ImplementationDetectionConfiguration toImplementationDetectionConfiguration(MetadataReaderFactory factory) Description copied from interface:RepositoryConfigurationReturns theImplementationDetectionConfigurationto be used for this repository.- Specified by:
toImplementationDetectionConfigurationin interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>- Parameters:
factory- must not be null.- Returns:
- will never be null.
-
toLookupConfiguration
Description copied from interface:RepositoryConfigurationReturns theImplementationLookupConfigurationfor the givenMetadataReaderFactory.- Specified by:
toLookupConfigurationin interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>- Parameters:
factory- must not be null.- Returns:
- will never be null.
-
getResourceDescription
Description copied from interface:RepositoryConfigurationReturns a human readable description of the repository interface declaration for error reporting purposes.- Specified by:
getResourceDescriptionin interfaceRepositoryConfiguration<T extends RepositoryConfigurationSource>- Returns:
- can be null.
-