Package org.jdbi.v3.core.array
Interface SqlArrayTypeFactory
-
- All Known Implementing Classes:
EnumSqlArrayTypeFactory,InferredSqlArrayTypeFactory
- 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 SqlArrayTypeFactoryFactory interface to produceSqlArrayTypeinstances.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Optional<SqlArrayType<?>>build(java.lang.reflect.Type elementType, ConfigRegistry config)Returns anSqlArrayTypefor the givenelementTypeif this factory supports it; empty otherwise.static <T> SqlArrayTypeFactoryof(java.lang.Class<T> elementType, java.lang.String typeName, java.util.function.Function<T,?> conversion)Create a SqlArrayTypeFactory for the givenelementTypethat binds using a type name and convert function.
-
-
-
Method Detail
-
build
java.util.Optional<SqlArrayType<?>> build(java.lang.reflect.Type elementType, ConfigRegistry config)
Returns anSqlArrayTypefor the givenelementTypeif this factory supports it; empty otherwise.- Parameters:
elementType- the array element typeconfig- the config registry, for composition- Returns:
- an
SqlArrayTypefor the givenelementTypeif this factory supports it; empty otherwise. - See Also:
SqlArrayTypes.findFor(Type)
-
of
static <T> SqlArrayTypeFactory of(java.lang.Class<T> elementType, java.lang.String typeName, java.util.function.Function<T,?> conversion)
Create a SqlArrayTypeFactory for the givenelementTypethat binds using a type name and convert function.- Parameters:
elementType- the array element typetypeName- the database type name to bind asconversion- the function to convert to jdbc representation- Returns:
- the built factory
- See Also:
SqlArrayType.of(String, Function)
-
-