public class SqlArrayTypes extends Object implements JdbiConfig<SqlArrayTypes>
| Constructor and Description |
|---|
SqlArrayTypes() |
| Modifier and Type | Method and Description |
|---|---|
SqlArrayTypes |
createCopy()
Returns a copy of this configuration object.
|
Optional<SqlArrayType<?>> |
findFor(Type elementType)
Obtain an
SqlArrayType for the given array element type in the given context |
SqlArrayArgumentStrategy |
getArgumentStrategy() |
SqlArrayTypes |
register(Class<?> elementType,
String sqlTypeName)
Register an array element type that is supported by the JDBC vendor.
|
SqlArrayTypes |
register(SqlArrayType<?> arrayType)
Register a
SqlArrayType which will have its parameterized type inspected to determine which element type
it supports. |
SqlArrayTypes |
register(SqlArrayTypeFactory factory)
Register a
SqlArrayTypeFactory. |
SqlArrayTypes |
setArgumentStrategy(SqlArrayArgumentStrategy argumentStrategy)
Sets the strategy used when binding array-type arguments to SQL statements.
|
void |
setRegistry(ConfigRegistry registry)
The registry will inject itself into the configuration object.
|
public SqlArrayTypes createCopy()
JdbiConfigcreateCopy in interface JdbiConfig<SqlArrayTypes>public Optional<SqlArrayType<?>> findFor(Type elementType)
SqlArrayType for the given array element type in the given contextelementType - the array element type.SqlArrayType for the given element type.public SqlArrayArgumentStrategy getArgumentStrategy()
public SqlArrayTypes register(Class<?> elementType, String sqlTypeName)
elementType - the array element typesqlTypeName - the vendor-specific SQL type name for the array type. This value will be passed to
Connection.createArrayOf(String, Object[]) to create SQL arrays.public SqlArrayTypes register(SqlArrayType<?> arrayType)
SqlArrayType which will have its parameterized type inspected to determine which element type
it supports. SQL array types are used to convert array-like arguments into SQL arrays.
The parameter must be concretely parameterized; we use the type argument T to determine if it applies to
a given element type.
arrayType - the SqlArrayTypeUnsupportedOperationException - if the argument is not a concretely parameterized typepublic SqlArrayTypes register(SqlArrayTypeFactory factory)
SqlArrayTypeFactory. A factory is provided element types and, if it supports it, provides an
SqlArrayType for it.factory - the factorypublic SqlArrayTypes setArgumentStrategy(SqlArrayArgumentStrategy argumentStrategy)
argumentStrategy - the argument strategy to setpublic void setRegistry(ConfigRegistry registry)
JdbiConfigsetRegistry in interface JdbiConfig<SqlArrayTypes>registry - the registry that owns this configuration objectCopyright © 2019. All rights reserved.