Package org.jdbi.v3.core.statement
Class Binding
java.lang.Object
org.jdbi.v3.core.statement.Binding
Represents the arguments bound to a particular statement.
- 
Method Summary
Modifier and TypeMethodDescriptionvoidBind a named parameter for the given name.voidaddNamed(String name, Object argument, QualifiedType<?> type) Bind a named parameter for the given name.voidBind a named parameter for the given name.voidBind a named argument finder.voidaddPositional(int position, Object argument) Bind a positional parameter at the given index (0-based).voidaddPositional(int position, Object argument, QualifiedType<?> type) Bind a positional parameter at the given index (0-based).voidaddPositional(int position, Argument argument) Bind a positional parameter at the given index (0-based).voidclear()Remove all bindings from this Binding.findForName(String name, StatementContext ctx2) Deprecated.don't inspect a Binding: keep your own state!findForPosition(int position) Deprecated.don't inspect a Binding: keep your own state!getNames()Deprecated.this is expensive to compute, and it's bad practice to inspect a Binding: keep track of your own state!booleanisEmpty()Returns whether any bindings exist.toString() 
- 
Method Details
- 
addPositional
Bind a positional parameter at the given index (0-based).- Parameters:
 position- binding positionargument- the argument to bind
 - 
addNamed
Bind a named parameter for the given name.- Parameters:
 name- bound argument nameargument- the argument to bind
 - 
addPositional
Bind a positional parameter at the given index (0-based).- Parameters:
 position- binding positionargument- the argument to bind
 - 
addNamed
Bind a named parameter for the given name.- Parameters:
 name- bound argument nameargument- the argument to bind
 - 
addPositional
Bind a positional parameter at the given index (0-based).- Parameters:
 position- binding positionargument- the argument to bind
 - 
addNamed
Bind a named parameter for the given name.- Parameters:
 name- bound argument nameargument- the argument to bind
 - 
addNamedArgumentFinder
Bind a named argument finder.- Parameters:
 args- the argument finder to bind
 - 
findForName
Deprecated.don't inspect a Binding: keep your own state!Look up an argument by name.- Parameters:
 name- the key to lookup the value ofctx2- the statement context- Returns:
 - the bound Argument
 
 - 
getNames
Deprecated.this is expensive to compute, and it's bad practice to inspect a Binding: keep track of your own state!- Returns:
 - the set of known binding names
 
 - 
findForPosition
Deprecated.don't inspect a Binding: keep your own state!Look up an argument by position.- Parameters:
 position- starts at 0, not 1- Returns:
 - argument bound to that position
 
 - 
toString
 - 
clear
public void clear()Remove all bindings from this Binding. - 
isEmpty
public boolean isEmpty()Returns whether any bindings exist.- Returns:
 - True if there are no bindings.
 
 
 -