Class CachingValueExpressionDelegate
java.lang.Object
org.springframework.data.repository.query.ValueExpressionDelegate
org.springframework.data.repository.query.CachingValueExpressionDelegate
- All Implemented Interfaces:
ValueExpressionParser
Caching variant of
ValueExpressionDelegate
.- Since:
- 3.4
- Author:
- Mark Paluch
-
Constructor Summary
ConstructorDescriptionCachingValueExpressionDelegate
(QueryMethodValueEvaluationContextAccessor providerFactory, ValueExpressionParser valueExpressionParser) Creates a newCachingValueExpressionDelegate
givenQueryMethodValueEvaluationContextAccessor
andValueExpressionParser
.Creates a newCachingValueExpressionDelegate
givenValueExpressionDelegate
. -
Method Summary
Modifier and TypeMethodDescriptionParses the expression string and return an Expression object you can use for repeated evaluation.Methods inherited from class org.springframework.data.repository.query.ValueExpressionDelegate
create, createValueContextProvider, getEvaluationContextAccessor
-
Constructor Details
-
CachingValueExpressionDelegate
Creates a newCachingValueExpressionDelegate
givenValueExpressionDelegate
.- Parameters:
delegate
- must not be null.
-
CachingValueExpressionDelegate
public CachingValueExpressionDelegate(QueryMethodValueEvaluationContextAccessor providerFactory, ValueExpressionParser valueExpressionParser) Creates a newCachingValueExpressionDelegate
givenQueryMethodValueEvaluationContextAccessor
andValueExpressionParser
.- Parameters:
providerFactory
- the factory to create value evaluation context providers, must not benull
.valueExpressionParser
- the parser to parse expression strings into value expressions, must not benull
.
-
-
Method Details
-
getValueExpressionParser
- Overrides:
getValueExpressionParser
in classValueExpressionDelegate
-
parse
Description copied from interface:ValueExpressionParser
Parses the expression string and return an Expression object you can use for repeated evaluation.Some examples:
#{3 + 4} #{name.firstName} ${key.one} #{name.lastName}-${key.one}
- Specified by:
parse
in interfaceValueExpressionParser
- Overrides:
parse
in classValueExpressionDelegate
- Parameters:
expressionString
- the raw expression string to parse.- Returns:
- an evaluator for the parsed expression.
- Throws:
ParseException
- an exception occurred during parsing.
-