Class ReactiveRepositoryFactorySupport
java.lang.Object
org.springframework.data.repository.core.support.RepositoryFactorySupport
org.springframework.data.repository.core.support.ReactiveRepositoryFactorySupport
- All Implemented Interfaces:
Aware
,BeanClassLoaderAware
,BeanFactoryAware
,EnvironmentAware
,EnvironmentCapable
Base class for repository factories to use reactive support. Centralizes the validation of the classpath setup in
case a repository uses reactive types.
- Since:
- 2.0
- Author:
- Mark Paluch, Oliver Gierke, Johannes Englmeier
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Optional<QueryLookupStrategy>
getQueryLookupStrategy
(QueryLookupStrategy.Key key, ValueExpressionDelegate valueExpressionDelegate) void
setEvaluationContextProvider
(QueryMethodEvaluationContextProvider evaluationContextProvider) Sets theQueryMethodEvaluationContextProvider
to be used to evaluate SpEL expressions in manually defined queries.protected void
validate
(RepositoryMetadata repositoryMetadata) Methods inherited from class org.springframework.data.repository.core.support.RepositoryFactorySupport
addInvocationListener, addQueryCreationListener, addRepositoryProxyPostProcessor, getEntityInformation, getEnvironment, getProjectionFactory, getProjectionFactory, getQueryLookupStrategy, getQueryMethods, getRepository, getRepository, getRepository, getRepositoryBaseClass, getRepositoryFragments, getRepositoryInformation, getRepositoryMetadata, getTargetRepository, getTargetRepositoryViaReflection, getTargetRepositoryViaReflection, instantiateClass, setBeanClassLoader, setBeanFactory, setEnvironment, setEvaluationContextProvider, setExposeMetadata, setNamedQueries, setQueryLookupStrategyKey, setRepositoryBaseClass
-
Constructor Details
-
ReactiveRepositoryFactorySupport
public ReactiveRepositoryFactorySupport()
-
-
Method Details
-
validate
- Overrides:
validate
in classRepositoryFactorySupport
-
setEvaluationContextProvider
public void setEvaluationContextProvider(QueryMethodEvaluationContextProvider evaluationContextProvider) Sets theQueryMethodEvaluationContextProvider
to be used to evaluate SpEL expressions in manually defined queries.- Overrides:
setEvaluationContextProvider
in classRepositoryFactorySupport
- Parameters:
evaluationContextProvider
- can be null, defaults toReactiveQueryMethodEvaluationContextProvider.DEFAULT
.
-
getQueryLookupStrategy
protected Optional<QueryLookupStrategy> getQueryLookupStrategy(@Nullable QueryLookupStrategy.Key key, ValueExpressionDelegate valueExpressionDelegate) Returns theQueryLookupStrategy
for the givenQueryLookupStrategy.Key
andValueExpressionDelegate
. Favor implementing this method overRepositoryFactorySupport.getQueryLookupStrategy(QueryLookupStrategy.Key, QueryMethodEvaluationContextProvider)
for extendedValueExpression
support.This method delegates to
RepositoryFactorySupport.getQueryLookupStrategy(QueryLookupStrategy.Key, QueryMethodEvaluationContextProvider)
unless overridden.- Overrides:
getQueryLookupStrategy
in classRepositoryFactorySupport
- Parameters:
key
- can be null.valueExpressionDelegate
- will never be null.- Returns:
- the
QueryLookupStrategy
to use or null if no queries should be looked up. - Since:
- 3.4
-