Interface MappingRelationalConverter.ConversionContext
- All Known Implementing Classes:
MappingRelationalConverter.DefaultConversionContext
,MappingRelationalConverter.ProjectingConversionContext
- Enclosing class:
- MappingRelationalConverter
protected static interface MappingRelationalConverter.ConversionContext
Conversion context defining an interface for graph-traversal-based conversion of row documents. Entrypoint for
recursive conversion of
RowDocument
and other types.- Since:
- 3.2
-
Method Summary
Modifier and TypeMethodDescriptiondefault <S> S
convert
(Object source, TypeInformation<? extends S> typeHint) Converts a source object intotarget
.<S> S
convert
(Object source, TypeInformation<? extends S> typeHint, MappingRelationalConverter.ConversionContext context) Converts a source object intotarget
.forProperty
(String name) Obtain aMappingRelationalConverter.ConversionContext
for the given propertyname
.forProperty
(RelationalPersistentProperty property) Obtain aMappingRelationalConverter.ConversionContext
for the givenRelationalPersistentProperty
.getPath()
withPath
(ObjectPath currentPath) Create a newMappingRelationalConverter.ConversionContext
withcurrentPath
applied.
-
Method Details
-
convert
Converts a source object intotarget
.- Parameters:
source
- must not be null.typeHint
- must not be null.- Returns:
- the converted object.
-
convert
<S> S convert(Object source, TypeInformation<? extends S> typeHint, MappingRelationalConverter.ConversionContext context) Converts a source object intotarget
.- Parameters:
source
- must not be null.typeHint
- must not be null.context
- must not be null.- Returns:
- the converted object.
-
forProperty
Obtain aMappingRelationalConverter.ConversionContext
for the given propertyname
.- Parameters:
name
- must not be null.- Returns:
- the
MappingRelationalConverter.ConversionContext
to be used for conversion of the given property.
-
forProperty
default MappingRelationalConverter.ConversionContext forProperty(RelationalPersistentProperty property) Obtain aMappingRelationalConverter.ConversionContext
for the givenRelationalPersistentProperty
.- Parameters:
property
- must not be null.- Returns:
- the
MappingRelationalConverter.ConversionContext
to be used for conversion of the given property.
-
withPath
Create a newMappingRelationalConverter.ConversionContext
withcurrentPath
applied.- Parameters:
currentPath
- must not be null.- Returns:
- a new
MappingRelationalConverter.ConversionContext
withcurrentPath
applied.
-
getPath
ObjectPath getPath() -
getCustomConversions
CustomConversions getCustomConversions() -
getSourceConverter
RelationalConverter getSourceConverter()
-