public class ObjectArgumentFactory extends Object implements ArgumentFactory
ObjectArgument.| Modifier and Type | Method and Description |
|---|---|
Optional<Argument> |
build(Type expectedType,
Object value,
ConfigRegistry config)
Returns an
Argument for the given value if the factory supports it; empty otherwise. |
static ArgumentFactory |
create(Class<?> type)
Match the given type and bind as an object without SQL type information.
|
static ArgumentFactory |
create(Class<?> type,
Integer sqlType)
Match the given type and bind as an object with the given SQL type information
|
public Optional<Argument> build(Type expectedType, Object value, ConfigRegistry config)
ArgumentFactoryArgument for the given value if the factory supports it; empty otherwise.build in interface ArgumentFactoryexpectedType - 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 create(Class<?> type)
type - the Java type to matchpublic static ArgumentFactory create(Class<?> type, Integer sqlType)
type - the Java type to matchsqlType - the SQL type to bindTypesCopyright © 2019. All rights reserved.