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
Nested ClassesModifier and TypeClassDescriptionstatic classBase class for value objects representing a value or aNULLbinding. -
Constructor Summary
ConstructorsConstructorDescriptionBindings()Create emptyBindings.Bindings(Collection<Bindings.Binding> bindings) CreateBindingsfrom the given collection. -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(BindTarget bindTarget) Apply the bindings to aBindTarget.static Bindingsempty()Return an emptyBindingsobject.voidforEach(Consumer<? super Bindings.Binding> action) Perform the given action for each binding of thisBindingsuntil 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
CreateBindingsfrom the given collection.- Parameters:
bindings- a collection ofBindings.Bindingobjects
-
-
Method Details
-
getBindings
-
and
- Parameters:
other- the object to merge with- Returns:
- a newly merged
Bindingsobject
-
apply
Apply the bindings to aBindTarget.- Parameters:
bindTarget- the target to apply bindings to
-
forEach
Perform the given action for each binding of thisBindingsuntil 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:
forEachin interfaceIterable<Bindings.Binding>- Parameters:
action- the action to be performed for eachBindings.Binding
-
iterator
- Specified by:
iteratorin interfaceIterable<Bindings.Binding>
-
spliterator
- Specified by:
spliteratorin interfaceIterable<Bindings.Binding>
-
empty
Return an emptyBindingsobject. -
merge
- Parameters:
left- the left object to merge withright- the right object to merge with- Returns:
- a newly merged
Bindingsobject
-