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) Deprecated.ParameterBindingContext
(ValueProvider valueProvider, ValueExpressionEvaluator expressionEvaluator) ParameterBindingContext
(ValueProvider valueProvider, ExpressionParser expressionParser, Supplier<EvaluationContext> evaluationContext) ParameterBindingContext
(ValueProvider valueProvider, SpelExpressionParser expressionParser, EvaluationContext evaluationContext) Deprecated.since 4.3, useParameterBindingContext(ValueProvider, ExpressionParser, Supplier)
instead. -
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
@Deprecated(since="4.3") public ParameterBindingContext(ValueProvider valueProvider, SpelExpressionParser expressionParser, EvaluationContext evaluationContext) Deprecated.since 4.3, useParameterBindingContext(ValueProvider, ExpressionParser, Supplier)
instead.- Parameters:
valueProvider
-expressionParser
-evaluationContext
-
-
ParameterBindingContext
public ParameterBindingContext(ValueProvider valueProvider, ExpressionParser expressionParser, Supplier<EvaluationContext> evaluationContext) -
ParameterBindingContext
@Deprecated(since="4.3") public ParameterBindingContext(ValueProvider valueProvider, SpELExpressionEvaluator expressionEvaluator) Deprecated.since 4.3, useParameterBindingContext(ValueProvider, ValueExpressionEvaluator)
instead.- Parameters:
valueProvider
-expressionEvaluator
-- Since:
- 3.1
-
ParameterBindingContext
public ParameterBindingContext(ValueProvider valueProvider, ValueExpressionEvaluator expressionEvaluator) - Parameters:
valueProvider
-expressionEvaluator
-- Since:
- 4.3
-
-
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
-
ParameterBindingContext(ValueProvider, ValueExpressionEvaluator)
instead.