@FunctionalInterface @Beta public interface QualifiedArgumentFactory
Argument
that binds the value to a prepared statement.
Make sure to override Object.toString() in your Argument instances if you want
to be able to log their values with an SqlLogger.
Note that null is handled specially in a few cases, and a few Jdbi features
assume you'll return an instance of NullArgument when you intend to bind null.
| Modifier and Type | Method and Description |
|---|---|
static QualifiedArgumentFactory |
adapt(ArgumentFactory factory)
Adapts an
ArgumentFactory into a QualifiedArgumentFactory. |
Optional<Argument> |
build(QualifiedType<?> type,
Object value,
ConfigRegistry config)
Returns an
Argument for the given value if the factory supports it; empty otherwise. |
static QualifiedArgumentFactory adapt(ArgumentFactory factory)
ArgumentFactory into a QualifiedArgumentFactory. The returned factory only
matches qualified types with zero qualifiers.factory - the factory to adaptOptional<Argument> build(QualifiedType<?> type, Object value, ConfigRegistry config)
Argument for the given value if the factory supports it; empty otherwise.type - the known qualified type of value. Depending on the situation this may be a full
generic signature e.g. ParameterizedType, a Class, or
Object.class if no type information is known.value - the value to convert into an Argumentconfig - the config registry, for compositionOptional.empty()
otherwise.StatementContext.findArgumentFor(QualifiedType, Object),
Arguments.findFor(QualifiedType, Object),
QualifiedTypeCopyright © 2019. All rights reserved.