Package org.jdbi.v3.core.argument
Class PrimitivesArgumentFactory
java.lang.Object
org.jdbi.v3.core.argument.DelegatingArgumentFactory
org.jdbi.v3.core.argument.PrimitivesArgumentFactory
- All Implemented Interfaces:
ArgumentFactory,ArgumentFactory.Preparable
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jdbi.v3.core.argument.ArgumentFactory
ArgumentFactory.Preparable -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild(Type expectedType, Object value, ConfigRegistry config) Returns anArgumentfor the given value if the factory supports it; empty otherwise.private ObjectcheckForNull(ConfigRegistry cfg, Type type, Object value) prepare(Type type, ConfigRegistry config) Methods inherited from class org.jdbi.v3.core.argument.DelegatingArgumentFactory
prePreparedTypes, register
-
Constructor Details
-
PrimitivesArgumentFactory
PrimitivesArgumentFactory()
-
-
Method Details
-
prepare
- Specified by:
preparein interfaceArgumentFactory.Preparable- Overrides:
preparein classDelegatingArgumentFactory
-
build
Description copied from interface:ArgumentFactoryReturns anArgumentfor the given value if the factory supports it; empty otherwise.- Specified by:
buildin interfaceArgumentFactory- Specified by:
buildin interfaceArgumentFactory.Preparable- Overrides:
buildin classDelegatingArgumentFactory- Parameters:
expectedType- the known type of value. Depending on the situation this may be a full generic signature e.g.ParameterizedType, aClass, or Object.class if no type information is known.value- the value to convert into anArgumentconfig- the config registry, for composition- Returns:
- an argument for the given value if this factory supports it, or
Optional.empty()otherwise. - See Also:
-
checkForNull
-