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
|
boolean |
isEmpty() |
String |
toString() |
public void addPositional(int position, Argument argument)
position
- binding positionargument
- the argument to bindpublic void addNamed(String name, Argument argument)
name
- bound argument nameargument
- the argument to bindpublic void addNamedArgumentFinder(NamedArgumentFinder args)
args
- the argument finder to bindpublic 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 void clear()
public boolean isEmpty()
Copyright © 2018. All rights reserved.