Module spring.data.commons
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) voidsetEvaluationContextProvider(QueryMethodEvaluationContextProvider evaluationContextProvider) Sets theQueryMethodEvaluationContextProviderto be used to evaluate SpEL expressions in manually defined queries.protected voidvalidate(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:
validatein classRepositoryFactorySupport
-
setEvaluationContextProvider
public void setEvaluationContextProvider(QueryMethodEvaluationContextProvider evaluationContextProvider) Sets theQueryMethodEvaluationContextProviderto be used to evaluate SpEL expressions in manually defined queries.- Overrides:
setEvaluationContextProviderin classRepositoryFactorySupport- Parameters:
evaluationContextProvider- can be null, defaults toReactiveQueryMethodEvaluationContextProvider.DEFAULT.
-
getQueryLookupStrategy
protected Optional<QueryLookupStrategy> getQueryLookupStrategy(@Nullable QueryLookupStrategy.Key key, ValueExpressionDelegate valueExpressionDelegate) Returns theQueryLookupStrategyfor the givenQueryLookupStrategy.KeyandValueExpressionDelegate. Favor implementing this method overRepositoryFactorySupport.getQueryLookupStrategy(QueryLookupStrategy.Key, QueryMethodEvaluationContextProvider)for extendedValueExpressionsupport.This method delegates to
RepositoryFactorySupport.getQueryLookupStrategy(QueryLookupStrategy.Key, QueryMethodEvaluationContextProvider)unless overridden.- Overrides:
getQueryLookupStrategyin classRepositoryFactorySupport- Parameters:
key- can be null.valueExpressionDelegate- will never be null.- Returns:
- the
QueryLookupStrategyto use or null if no queries should be looked up. - Since:
- 3.4
-