Class Bindings
java.lang.Object
org.springframework.r2dbc.core.binding.Bindings
- All Implemented Interfaces:
Iterable<Bindings.Binding>
- Direct Known Subclasses:
MutableBindings
Value object representing value and
null
bindings
for a Statement
using BindMarkers
.
Bindings are typically immutable.- Since:
- 5.3
- Author:
- Mark Paluch
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Base class for value objects representing a value or aNULL
binding. -
Constructor Summary
ConstructorDescriptionBindings()
Create emptyBindings
.Bindings
(Collection<Bindings.Binding> bindings) CreateBindings
from the given collection. -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(BindTarget bindTarget) Apply the bindings to aBindTarget
.static Bindings
empty()
Return an emptyBindings
object.void
forEach
(Consumer<? super Bindings.Binding> action) Perform the given action for each binding of thisBindings
until all bindings have been processed or the action throws an exception.protected Map<BindMarker,
Bindings.Binding> iterator()
static Bindings
-
Constructor Details
-
Bindings
public Bindings()Create emptyBindings
. -
Bindings
CreateBindings
from the given collection.- Parameters:
bindings
- a collection ofBindings.Binding
objects
-
-
Method Details
-
getBindings
-
and
- Parameters:
other
- the object to merge with- Returns:
- a newly merged
Bindings
object
-
apply
Apply the bindings to aBindTarget
.- Parameters:
bindTarget
- the target to apply bindings to
-
forEach
Perform the given action for each binding of thisBindings
until all bindings have been processed or the action throws an exception. Actions are performed in the order of iteration (if an iteration order is specified). Exceptions thrown by the action are relayed to the- Specified by:
forEach
in interfaceIterable<Bindings.Binding>
- Parameters:
action
- the action to be performed for eachBindings.Binding
-
iterator
- Specified by:
iterator
in interfaceIterable<Bindings.Binding>
-
spliterator
- Specified by:
spliterator
in interfaceIterable<Bindings.Binding>
-
empty
Return an emptyBindings
object. -
merge
- Parameters:
left
- the left object to merge withright
- the right object to merge with- Returns:
- a newly merged
Bindings
object
-