@Beta public class SetObjectArgumentFactory extends Object implements ArgumentFactory
PreparedStatement.setObject(int, Object, int) to bind values.| Modifier | Constructor and Description |
|---|---|
protected |
SetObjectArgumentFactory(Map<Class<?>,Integer> types) |
| 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. |
static ArgumentFactory |
forClasses(Map<Class<?>,Integer> types) |
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)public static ArgumentFactory forClasses(Map<Class<?>,Integer> types)
types - the Java Classes to handle with the Types they bind toArgumentFactory that handles only the given Classes.Copyright © 2019. All rights reserved.