public interface R2dbcConverter extends EntityReader<Object,Row>, EntityWriter<Object,OutboundRow>, org.springframework.data.relational.core.conversion.RelationalConverter
EntityReader
Modifier and Type | Method and Description |
---|---|
Object |
getArrayValue(org.springframework.data.relational.core.dialect.ArrayColumns arrayColumns,
org.springframework.data.relational.core.mapping.RelationalPersistentProperty property,
Object value)
Convert a
value into an array representation according to ArrayColumns . |
ConversionService |
getConversionService()
Returns the underlying
ConversionService used by the converter. |
MappingContext<? extends org.springframework.data.relational.core.mapping.RelationalPersistentEntity<?>,? extends org.springframework.data.relational.core.mapping.RelationalPersistentProperty> |
getMappingContext()
Returns the underlying
MappingContext used by the converter. |
Class<?> |
getTargetType(Class<?> valueType)
Return the target type for a value considering registered converters.
|
boolean |
isSimpleType(Class<?> type)
Return whether the
type is a simple type. |
<T> BiFunction<Row,RowMetadata,T> |
populateIdIfNecessary(T object)
|
<R> R |
read(Class<R> type,
Row source,
RowMetadata metadata)
Reads the given source into the given type.
|
read
write
MappingContext<? extends org.springframework.data.relational.core.mapping.RelationalPersistentEntity<?>,? extends org.springframework.data.relational.core.mapping.RelationalPersistentProperty> getMappingContext()
MappingContext
used by the converter.getMappingContext
in interface org.springframework.data.relational.core.conversion.RelationalConverter
ConversionService getConversionService()
ConversionService
used by the converter.getConversionService
in interface org.springframework.data.relational.core.conversion.RelationalConverter
Object getArrayValue(org.springframework.data.relational.core.dialect.ArrayColumns arrayColumns, org.springframework.data.relational.core.mapping.RelationalPersistentProperty property, Object value)
value
into an array representation according to ArrayColumns
.arrayColumns
- dialect-specific array handling configuration.property
- value
- Class<?> getTargetType(Class<?> valueType)
valueType
- must not be null.boolean isSimpleType(Class<?> type)
type
is a simple type. Simple types are database primitives or types with a custom
mapping strategy.valueType
- the type to inspect, must not be null.SimpleTypeHolder
<T> BiFunction<Row,RowMetadata,T> populateIdIfNecessary(T object)
object
- must not be null.<R> R read(Class<R> type, Row source, RowMetadata metadata)
type
- they type to convert the given source to.source
- the source to create an object of the given type from.metadata
- the RowMetadata
.Copyright © 2018–2020 Pivotal Software, Inc.. All rights reserved.