public class Binding extends Object
| Constructor and Description |
|---|
Binding() |
| Modifier and Type | Method and Description |
|---|---|
void |
addNamed(String name,
Argument argument)
Bind a named parameter for the given name.
|
void |
addNamedArgumentFinder(NamedArgumentFinder args)
Bind a named argument finder.
|
void |
addPositional(int position,
Argument argument)
Bind a positional parameter at the given index (0-based).
|
void |
clear()
Remove all bindings from this Binding.
|
Optional<Argument> |
findForName(String name,
StatementContext ctx)
Look up an argument by name.
|
Optional<Argument> |
findForPosition(int position)
Look up an argument by position.
|
Collection<String> |
getNames() |
boolean |
isEmpty() |
String |
toString() |
public void addNamed(String name, Argument argument)
name - bound argument nameargument - the argument to bindpublic void addNamedArgumentFinder(NamedArgumentFinder args)
args - the argument finder to bindpublic void addPositional(int position,
Argument argument)
position - binding positionargument - the argument to bindpublic void clear()
public Optional<Argument> findForName(String name, StatementContext ctx)
name - the key to lookup the value ofctx - the statement contextpublic Optional<Argument> findForPosition(int position)
position - starts at 0, not 1public Collection<String> getNames()
public boolean isEmpty()
Copyright © 2019. All rights reserved.