Package org.jdbi.v3.core.argument
Interface ArgumentFactory
-
- All Known Subinterfaces:
ArgumentFactory.Preparable
- All Known Implementing Classes:
AbstractArgumentFactory,BitStringEnumSetArgumentFactory,BlobInputStreamArgumentFactory,BoxedArgumentFactory,BuiltInArgumentFactory,BuiltInArgumentFactory.LegacyEnumByNameArgumentFactory,CharSequenceArgumentFactory,ClobReaderArgumentFactory,DateTimeArgumentFactory,DelegatingArgumentFactory,DirectArgumentFactory,DurationArgumentFactory,EssentialsArgumentFactory,GuavaArguments.Factory,HStoreArgumentFactory,InetArgumentFactory,InternetArgumentFactory,JavaTimeArgumentFactory,JavaTimeArgumentFactory,JavaTimeZoneIdArgumentFactory,JsonArgumentFactory,JsonArgumentFactory,MacAddrArgumentFactory,NVarcharArgumentFactory,ObjectArgumentFactory,OptionalArgumentFactory,PeriodArgumentFactory,PGobjectArgumentFactory,PrimitivesArgumentFactory,SetObjectArgumentFactory,SqlArgumentFactory,SqlArrayArgumentFactory,SqlTimeArgumentFactory,TypedEnumArgumentFactory,UntypedNullArgumentFactory,URLArgumentFactory,UUIDArgumentFactory,VavrValueArgumentFactory
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ArgumentFactory
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceArgumentFactory.PreparableArgumentFactory extension interface that allows preparing arguments for efficient batch binding.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Optional<Argument>build(java.lang.reflect.Type type, java.lang.Object value, ConfigRegistry config)Returns anArgumentfor the given value if the factory supports it; empty otherwise.
-
-
-
Method Detail
-
build
java.util.Optional<Argument> build(java.lang.reflect.Type type, java.lang.Object value, ConfigRegistry config)
Returns anArgumentfor 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 anArgumentconfig- the config registry, for composition- Returns:
- an argument for the given value if this factory supports it, or
Optional.empty()otherwise. - See Also:
StatementContext.findArgumentFor(Type, Object),Arguments.findFor(Type, Object)
-
-