Package org.jdbi.v3.guava.codec
Class TypeResolvingCodecFactory
java.lang.Object
org.jdbi.v3.core.codec.CodecFactory
org.jdbi.v3.guava.codec.TypeResolvingCodecFactory
- All Implemented Interfaces:
QualifiedArgumentFactory
,QualifiedArgumentFactory.Preparable
,QualifiedColumnMapperFactory
An extended
CodecFactory
which can resolve Codecs for subtypes. This allows registering e.g. a codec for Set<String>
and using any
subtype of Set
which the same type parameters (e.g. a HashSet<String<
) will find the right codec.
This is an experimental feature which relies on TypeToken
from the Guava library.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jdbi.v3.core.codec.CodecFactory
CodecFactory.Builder
Nested classes/interfaces inherited from interface org.jdbi.v3.core.argument.QualifiedArgumentFactory
QualifiedArgumentFactory.Preparable
-
Constructor Summary
ConstructorDescriptionTypeResolvingCodecFactory
(Map<QualifiedType<?>, Codec<?>> codecMap) Create a new TypeResolvingCodecFactory. -
Method Summary
Modifier and TypeMethodDescriptionstatic CodecFactory.Builder
builder()
Returns a builder for fluent API.static CodecFactory
forSingleCodec
(QualifiedType<?> type, Codec<?> codec) Methods inherited from class org.jdbi.v3.core.codec.CodecFactory
build, build, prepare, prePreparedTypes
-
Constructor Details
-
TypeResolvingCodecFactory
Create a new TypeResolvingCodecFactory.
-
-
Method Details
-
builder
Returns a builder for fluent API. -
forSingleCodec
-