public class SqlArrayArgumentFactory extends Object implements ArgumentFactory
Collection to a SQL array using the
SqlArrayTypeFactory for the given type information. Note
that due to type erasure, binding Collection arguments with
SqlStatement.bind(int, Object) may
fail to determine the array component type. Provide explicit information with
SqlStatement.bindByType(int, Object, org.jdbi.v3.core.generic.GenericType).
This factory is registered by default.| Constructor and Description |
|---|
SqlArrayArgumentFactory() |
| Modifier and Type | Method and Description |
|---|---|
Optional<Argument> |
build(Type type,
Object value,
ConfigRegistry config)
Returns an
Argument for the given value if the factory supports it; empty otherwise. |
public Optional<Argument> build(Type type, Object value, ConfigRegistry config)
ArgumentFactoryArgument for the given value if the factory supports it; empty otherwise.build in interface ArgumentFactorytype - the known 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(Type, Object),
Arguments.findFor(Type, Object)Copyright © 2017. All rights reserved.