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
ConstructorsConstructorDescriptionCachingValueExpressionDelegate(QueryMethodValueEvaluationContextAccessor providerFactory, ValueExpressionParser valueExpressionParser) Creates a newCachingValueExpressionDelegategivenQueryMethodValueEvaluationContextAccessorandValueExpressionParser.Creates a newCachingValueExpressionDelegategivenValueExpressionDelegate. -
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 newCachingValueExpressionDelegategivenValueExpressionDelegate.- Parameters:
delegate- must not be null.
-
CachingValueExpressionDelegate
public CachingValueExpressionDelegate(QueryMethodValueEvaluationContextAccessor providerFactory, ValueExpressionParser valueExpressionParser) Creates a newCachingValueExpressionDelegategivenQueryMethodValueEvaluationContextAccessorandValueExpressionParser.- 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:
getValueExpressionParserin classValueExpressionDelegate
-
parse
Description copied from interface:ValueExpressionParserParses 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:
parsein interfaceValueExpressionParser- Overrides:
parsein classValueExpressionDelegate- Parameters:
expressionString- the raw expression string to parse.- Returns:
- an evaluator for the parsed expression.
- Throws:
ParseException- an exception occurred during parsing.
-