public class AnnotationRepositoryConfigurationSource extends RepositoryConfigurationSourceSupport
RepositoryConfigurationSource.DEFAULT_REPOSITORY_IMPL_POSTFIX| Constructor and Description |
|---|
AnnotationRepositoryConfigurationSource(AnnotationMetadata metadata,
Class<? extends Annotation> annotation,
ResourceLoader resourceLoader,
Environment environment,
BeanDefinitionRegistry registry)
Deprecated.
since 2.2. Prefer to use overload taking a
BeanNameGenerator additionally. |
AnnotationRepositoryConfigurationSource(AnnotationMetadata metadata,
Class<? extends Annotation> annotation,
ResourceLoader resourceLoader,
Environment environment,
BeanDefinitionRegistry registry,
BeanNameGenerator generator)
Creates a new
AnnotationRepositoryConfigurationSource from the given AnnotationMetadata and
annotation. |
| Modifier and Type | Method and Description |
|---|---|
Optional<String> |
getAttribute(String name)
Returns the value for the
String attribute with the given name. |
<T> Optional<T> |
getAttribute(String name,
Class<T> type)
Returns the value for the attribute with the given name and type.
|
AnnotationAttributes |
getAttributes()
Returns the
AnnotationAttributes of the annotation configured. |
Streamable<String> |
getBasePackages()
Returns the base packages the repository interfaces shall be found under.
|
BootstrapMode |
getBootstrapMode()
Defines the repository
BootstrapMode to be used. |
AnnotationMetadata |
getEnableAnnotationMetadata()
Returns the
AnnotationMetadata for the @Enable annotation that triggered the configuration. |
Streamable<TypeFilter> |
getExcludeFilters()
Return the
TypeFilters to define which types to exclude when scanning for repositories. |
protected Iterable<TypeFilter> |
getIncludeFilters()
Return the
TypeFilters to define which types to include when scanning for repositories. |
Optional<String> |
getNamedQueryLocation() |
Optional<Object> |
getQueryLookupStrategyKey()
Returns the
QueryLookupStrategy.Key to define how query methods shall be resolved. |
Optional<String> |
getRepositoryBaseClassName()
Returns the name of the repository base class to be used or
Optional.empty() if the store specific defaults
shall be applied. |
Optional<String> |
getRepositoryFactoryBeanClassName()
Returns the name of the repository factory bean class or
Optional.empty() if not defined in the source. |
Optional<String> |
getRepositoryImplementationPostfix()
Returns the configured postfix to be used for looking up custom implementation classes.
|
String |
getResourceDescription()
Returns a human readable description of the repository configuration source for error reporting purposes.
|
Object |
getSource()
Returns the actual source object that the configuration originated from.
|
boolean |
shouldConsiderNestedRepositories()
Returns whether we should consider nested repositories, i.e. repository interface definitions nested in other
classes.
|
boolean |
usesExplicitFilters()
Returns whether the configuration uses explicit filtering to scan for repository types.
|
generateBeanName, getCandidates, toImplementationDetectionConfigurationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetRequiredAttribute@Deprecated public AnnotationRepositoryConfigurationSource(AnnotationMetadata metadata, Class<? extends Annotation> annotation, ResourceLoader resourceLoader, Environment environment, BeanDefinitionRegistry registry)
BeanNameGenerator additionally.AnnotationRepositoryConfigurationSource from the given AnnotationMetadata and
annotation.metadata - must not be null.annotation - must not be null.resourceLoader - must not be null.environment - must not be null.registry - must not be null.public AnnotationRepositoryConfigurationSource(AnnotationMetadata metadata, Class<? extends Annotation> annotation, ResourceLoader resourceLoader, Environment environment, BeanDefinitionRegistry registry, @Nullable BeanNameGenerator generator)
AnnotationRepositoryConfigurationSource from the given AnnotationMetadata and
annotation.metadata - must not be null.annotation - must not be null.resourceLoader - must not be null.environment - must not be null.registry - must not be null.generator - can be null.public Streamable<String> getBasePackages()
RepositoryConfigurationSourcepublic Optional<Object> getQueryLookupStrategyKey()
RepositoryConfigurationSourceQueryLookupStrategy.Key to define how query methods shall be resolved.public Optional<String> getRepositoryImplementationPostfix()
RepositoryConfigurationSourceOptional.empty() in case none is configured.@Nonnull public Object getSource()
RepositoryConfigurationSourceprotected Iterable<TypeFilter> getIncludeFilters()
RepositoryConfigurationSourceSupportTypeFilters to define which types to include when scanning for repositories. Default
implementation returns an empty collection.getIncludeFilters in class RepositoryConfigurationSourceSupportpublic Streamable<TypeFilter> getExcludeFilters()
RepositoryConfigurationSourceSupportTypeFilters to define which types to exclude when scanning for repositories. Default
implementation returns an empty collection.getExcludeFilters in interface RepositoryConfigurationSourcegetExcludeFilters in class RepositoryConfigurationSourceSupportpublic Optional<String> getRepositoryFactoryBeanClassName()
RepositoryConfigurationSourceOptional.empty() if not defined in the source.public Optional<String> getRepositoryBaseClassName()
RepositoryConfigurationSourceOptional.empty() if the store specific defaults
shall be applied.public AnnotationAttributes getAttributes()
AnnotationAttributes of the annotation configured.public AnnotationMetadata getEnableAnnotationMetadata()
AnnotationMetadata for the @Enable annotation that triggered the configuration.public boolean shouldConsiderNestedRepositories()
RepositoryConfigurationSourceSupportshouldConsiderNestedRepositories in class RepositoryConfigurationSourceSupportpublic Optional<String> getAttribute(String name)
RepositoryConfigurationSourceString attribute with the given name. The name is expected to be handed in
camel-case.name - must not be null or empty.Optional.empty() if not configured or empty.public <T> Optional<T> getAttribute(String name, Class<T> type)
RepositoryConfigurationSourcename - must not be null or empty.type - the type of the attribute to look up.Optional.empty() if not configured or empty.public boolean usesExplicitFilters()
RepositoryConfigurationSourcepublic BootstrapMode getBootstrapMode()
RepositoryConfigurationSourceBootstrapMode to be used.public String getResourceDescription()
RepositoryConfigurationSourceCopyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.