public class MappingR2dbcConverter extends org.springframework.data.relational.core.conversion.BasicRelationalConverter implements R2dbcConverter
| Constructor and Description |
|---|
MappingR2dbcConverter(MappingContext<? extends org.springframework.data.relational.core.mapping.RelationalPersistentEntity<?>,? extends org.springframework.data.relational.core.mapping.RelationalPersistentProperty> context)
Creates a new
MappingR2dbcConverter given MappingContext. |
MappingR2dbcConverter(MappingContext<? extends org.springframework.data.relational.core.mapping.RelationalPersistentEntity<?>,? extends org.springframework.data.relational.core.mapping.RelationalPersistentProperty> context,
CustomConversions conversions)
|
| Modifier and Type | Method and Description |
|---|---|
protected List<Object> |
createCollection(Collection<?> collection,
org.springframework.data.relational.core.mapping.RelationalPersistentProperty property)
Writes the given
Collection using the given RelationalPersistentProperty information. |
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. |
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 row) |
<R> R |
read(Class<R> type,
Row row,
RowMetadata metadata)
Reads the given source into the given type.
|
Object |
readValue(Object value,
TypeInformation<?> type) |
void |
write(Object source,
OutboundRow sink) |
createInstance, createTypeDescriptor, getConversions, getConversionService, getEntityInstantiators, getMappingContext, getPropertyAccessor, writeValueclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConversionService, getMappingContextpublic MappingR2dbcConverter(MappingContext<? extends org.springframework.data.relational.core.mapping.RelationalPersistentEntity<?>,? extends org.springframework.data.relational.core.mapping.RelationalPersistentProperty> context)
MappingR2dbcConverter given MappingContext.context - must not be null.public MappingR2dbcConverter(MappingContext<? extends org.springframework.data.relational.core.mapping.RelationalPersistentEntity<?>,? extends org.springframework.data.relational.core.mapping.RelationalPersistentProperty> context, CustomConversions conversions)
context - must not be null.public <R> R read(Class<R> type, Row row)
read in interface EntityReader<Object,Row>public <R> R read(Class<R> type, Row row, @Nullable RowMetadata metadata)
R2dbcConverterread in interface R2dbcConvertertype - they type to convert the given source to.row - the source to create an object of the given type from.metadata - the RowMetadata.public Object readValue(@Nullable Object value, TypeInformation<?> type)
readValue in interface org.springframework.data.relational.core.conversion.RelationalConverterreadValue in class org.springframework.data.relational.core.conversion.BasicRelationalConverterpublic void write(Object source, OutboundRow sink)
write in interface EntityWriter<Object,OutboundRow>protected List<Object> createCollection(Collection<?> collection, org.springframework.data.relational.core.mapping.RelationalPersistentProperty property)
Collection using the given RelationalPersistentProperty information.collection - must not be null.property - must not be null.public Object getArrayValue(org.springframework.data.relational.core.dialect.ArrayColumns arrayColumns, org.springframework.data.relational.core.mapping.RelationalPersistentProperty property, Object value)
R2dbcConvertervalue into an array representation according to ArrayColumns.getArrayValue in interface R2dbcConverterarrayColumns - dialect-specific array handling configuration.public Class<?> getTargetType(Class<?> valueType)
R2dbcConvertergetTargetType in interface R2dbcConvertervalueType - must not be null.public boolean isSimpleType(Class<?> type)
R2dbcConvertertype is a simple type. Simple types are database primitives or types with a custom
mapping strategy.isSimpleType in interface R2dbcConvertertype - the type to inspect, must not be null.SimpleTypeHolderpublic <T> BiFunction<Row,RowMetadata,T> populateIdIfNecessary(T object)
populateIdIfNecessary in interface R2dbcConverterobject - must not be null.Copyright © 2018–2022 Pivotal Software, Inc.. All rights reserved.