Class ParameterBinding
java.lang.Object
org.springframework.data.cassandra.repository.query.ParameterBinding
A generic parameter binding with name or position information.
- Since:
- 4.0
- Author:
- Mark Paluch
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceIdentifies a binding parameter by name, position or both.static final recordValue object capturing the expression of which a binding parameter originates.static final recordValue object capturing the method invocation parameter reference.static interfaceValue type hierarchy to describe where a binding parameter comes from, either method call or an expression.static final recordValue object capturing the expression of which a binding parameter originates. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedParameterBinding(ParameterBinding.BindingIdentifier identifier, ParameterBinding.ParameterOrigin origin) Creates a newParameterBindingfor the parameter with the given identifier and origin. -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic ParameterBindingexpression(ValueExpression expression) Creates a new expressionParameterBindingfor the anonymous parameter.@Nullable StringgetName()inthashCode()static ParameterBindingindexed(int position) Creates a newParameterBindingfor the indexed parameter using the bindable method invocation parameter as origin.static ParameterBindingCreates a newParameterBindingfor the named parameter using the bindable method invocation parameter as origin.static ParameterBindingnamed(String name, ParameterBinding.ParameterOrigin origin) Creates a newParameterBindingfor the named parameter with the given name and origin.static ParameterBindingCreates a newParameterBindingfor the parameter with the given name and origin.@Nullable ObjectprepareValue(@Nullable Object value) Prepare a value before binding it to the query.toString()
-
Constructor Details
-
ParameterBinding
protected ParameterBinding(ParameterBinding.BindingIdentifier identifier, ParameterBinding.ParameterOrigin origin) Creates a newParameterBindingfor the parameter with the given identifier and origin.- Parameters:
identifier- of the parameter, must not be null.origin- the origin of the parameter (expression or method argument)
-
-
Method Details
-
of
Creates a newParameterBindingfor the parameter with the given name and origin.- Parameters:
parameter-- Returns:
-
named
Creates a newParameterBindingfor the named parameter with the given name and origin.- Parameters:
name-origin-- Returns:
-
named
Creates a newParameterBindingfor the named parameter using the bindable method invocation parameter as origin.- Parameters:
name-- Returns:
-
indexed
Creates a newParameterBindingfor the indexed parameter using the bindable method invocation parameter as origin.- Parameters:
position-- Returns:
-
expression
Creates a new expressionParameterBindingfor the anonymous parameter.- Parameters:
expression-- Returns:
-
getIdentifier
-
getOrigin
-
getName
- Returns:
- the name if available or null.
-
prepareValue
-
equals
-
hashCode
-
toString
-