Package org.jdbi.v3.core.argument
Interface ArgumentFactory
- All Known Subinterfaces:
ArgumentFactory.Preparable
- All Known Implementing Classes:
AbstractArgumentFactory
,CharSequenceArgumentFactory
,DateTimeArgumentFactory
,DirectArgumentFactory
,DurationArgumentFactory
,HStoreArgumentFactory
,InetArgumentFactory
,JavaTimeArgumentFactory
,JavaTimeZoneIdArgumentFactory
,ObjectArgumentFactory
,PeriodArgumentFactory
,SetObjectArgumentFactory
,SqlArrayArgumentFactory
,TypedEnumArgumentFactory
,UUIDArgumentFactory
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Inspect a value with optional static type information and produce
an
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
.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
ArgumentFactory extension interface that allows preparing arguments for efficient batch binding. -
Method Summary
-
Method Details
-
build
Returns anArgument
for the given value if the factory supports it; empty otherwise.- Parameters:
type
- 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 anArgument
config
- the config registry, for composition- Returns:
- an argument for the given value if this factory supports it, or
Optional.empty()
otherwise. - See Also:
-