Interface R2dbcConverter

All Superinterfaces:
org.springframework.data.convert.EntityReader<Object,io.r2dbc.spi.Row>, org.springframework.data.convert.EntityWriter<Object,OutboundRow>, RelationalConverter
All Known Implementing Classes:
MappingR2dbcConverter

public interface R2dbcConverter extends org.springframework.data.convert.EntityReader<Object,io.r2dbc.spi.Row>, org.springframework.data.convert.EntityWriter<Object,OutboundRow>, RelationalConverter
Central R2DBC specific converter interface.
Author:
Mark Paluch
See Also:
  • EntityReader
  • Method Details

    • getMappingContext

      org.springframework.data.mapping.context.MappingContext<? extends RelationalPersistentEntity<?>,? extends RelationalPersistentProperty> getMappingContext()
      Returns the underlying MappingContext used by the converter.
      Specified by:
      getMappingContext in interface RelationalConverter
      Returns:
      never null
    • getConversionService

      org.springframework.core.convert.ConversionService getConversionService()
      Returns the underlying ConversionService used by the converter.
      Specified by:
      getConversionService in interface RelationalConverter
      Returns:
      never null.
    • getArrayValue

      Object getArrayValue(ArrayColumns arrayColumns, RelationalPersistentProperty property, Object value)
      Convert a value into an array representation according to ArrayColumns.
      Parameters:
      arrayColumns - dialect-specific array handling configuration.
      property -
      value -
      Returns:
    • getTargetType

      Class<?> getTargetType(Class<?> valueType)
      Return the target type for a value considering registered converters.
      Parameters:
      valueType - must not be null.
      Returns:
      Since:
      1.1
    • isSimpleType

      boolean isSimpleType(Class<?> type)
      Return whether the type is a simple type. Simple types are database primitives or types with a custom mapping strategy.
      Parameters:
      type - the type to inspect, must not be null.
      Returns:
      true if the type is a simple one.
      Since:
      1.2
      See Also:
      • SimpleTypeHolder
    • populateIdIfNecessary

      <T> BiFunction<io.r2dbc.spi.Row,io.r2dbc.spi.RowMetadata,T> populateIdIfNecessary(T object)
      Returns a Function that populates the id property of the object from a Row.
      Parameters:
      object - must not be null.
      Returns:
    • read

      <R> R read(Class<R> type, io.r2dbc.spi.Row source, io.r2dbc.spi.RowMetadata metadata)
      Reads the given source into the given type.
      Parameters:
      type - they type to convert the given source to.
      source - the source to create an object of the given type from.
      metadata - the RowMetadata.
      Returns: