Class ParameterBindingContext
java.lang.Object
org.springframework.data.mongodb.util.json.ParameterBindingContext
Reusable context for binding parameters to a placeholder or a SpEL expression within a JSON structure.
To be used along with
To be used along with
ParameterBindingDocumentCodec.decode(String, ParameterBindingContext)
.- Since:
- 2.2
- Author:
- Christoph Strobl, Mark Paluch
-
Constructor Summary
ConstructorDescriptionParameterBindingContext
(ValueProvider valueProvider, SpELExpressionEvaluator expressionEvaluator) ParameterBindingContext
(ValueProvider valueProvider, ExpressionParser expressionParser, Supplier<EvaluationContext> evaluationContext) ParameterBindingContext
(ValueProvider valueProvider, SpelExpressionParser expressionParser, EvaluationContext evaluationContext) -
Method Summary
Modifier and TypeMethodDescriptionbindableValueForIndex
(int index) evaluateExpression
(String expressionString) evaluateExpression
(String expressionString, Map<String, Object> variables) static ParameterBindingContext
forExpressions
(ValueProvider valueProvider, ExpressionParser expressionParser, Function<ExpressionDependencies, EvaluationContext> contextFunction) Create a newParameterBindingContext
that is capable of expression parsing and can provide aEvaluationContext
based onExpressionDependencies
.
-
Constructor Details
-
ParameterBindingContext
public ParameterBindingContext(ValueProvider valueProvider, SpelExpressionParser expressionParser, EvaluationContext evaluationContext) - Parameters:
valueProvider
-expressionParser
-evaluationContext
-
-
ParameterBindingContext
public ParameterBindingContext(ValueProvider valueProvider, ExpressionParser expressionParser, Supplier<EvaluationContext> evaluationContext) -
ParameterBindingContext
public ParameterBindingContext(ValueProvider valueProvider, SpELExpressionEvaluator expressionEvaluator) - Parameters:
valueProvider
-expressionEvaluator
-- Since:
- 3.1
-
-
Method Details
-
forExpressions
public static ParameterBindingContext forExpressions(ValueProvider valueProvider, ExpressionParser expressionParser, Function<ExpressionDependencies, EvaluationContext> contextFunction) Create a newParameterBindingContext
that is capable of expression parsing and can provide aEvaluationContext
based onExpressionDependencies
.- Parameters:
valueProvider
-expressionParser
-contextFunction
-- Returns:
- Since:
- 3.1
-
bindableValueForIndex
-
evaluateExpression
-
evaluateExpression
-
getValueProvider
-