public interface JdbcConverter extends RelationalConverter
JdbcConverter
is responsible for converting for values to the native relational representation and vice
versa.Modifier and Type | Method and Description |
---|---|
Class<?> |
getColumnType(RelationalPersistentProperty property)
The type to be used to store this property in the database.
|
int |
getSqlType(RelationalPersistentProperty property)
The SQL type constant used when using this property as a parameter for a SQL statement.
|
<T> T |
mapRow(PersistentPropertyPathExtension path,
ResultSet resultSet,
Identifier identifier,
Object key)
|
<T> T |
mapRow(RelationalPersistentEntity<T> entity,
ResultSet resultSet,
Object key)
|
JdbcValue |
writeJdbcValue(Object value,
Class<?> type,
int sqlType)
Convert a property value into a
JdbcValue that contains the converted value and information how to bind it
to JDBC parameters. |
createInstance, getConversionService, getMappingContext, getPropertyAccessor, readValue, writeValue
JdbcValue writeJdbcValue(@Nullable Object value, Class<?> type, int sqlType)
JdbcValue
that contains the converted value and information how to bind it
to JDBC parameters.value
- a value as it is used in the object model. May be null
.type
- TypeInformation
into which the value is to be converted. Must not be null
.sqlType
- the type constant from Types
to be used if non is specified by a converter.JdbcValue
. Guaranteed to be not null.<T> T mapRow(RelationalPersistentEntity<T> entity, ResultSet resultSet, Object key)
T
- entity
- the persistent entity type.resultSet
- the ResultSet
to read from.key
- primary key.<T> T mapRow(PersistentPropertyPathExtension path, ResultSet resultSet, Identifier identifier, Object key)
T
- path
- path to the owning property.resultSet
- the ResultSet
to read from.identifier
- entity identifier.key
- primary key.Class<?> getColumnType(RelationalPersistentProperty property)
String[][]
returns String[]
).Class
that is suitable for usage with JDBC drivers.JdbcUtil.sqlTypeFor(Class)
int getSqlType(RelationalPersistentProperty property)
null
.Types
Copyright © 2017–2020 Pivotal Software, Inc.. All rights reserved.