Package org.springframework.data.convert
Interface TypeMapper<S>
- All Known Implementing Classes:
DefaultTypeMapper
public interface TypeMapper<S>
Interface to define strategies how to store type information in a store specific sink or source.
- Author:
- Oliver Gierke
-
Method Summary
Modifier and TypeMethodDescriptionReads theTypeInformation
from the given source.<T> TypeInformation<? extends T>
readType
(S source, TypeInformation<T> defaultType) Returns theTypeInformation
from the given source if it is a more concrete type than the given default one.void
Writes type information for the given type into the given sink.void
writeType
(TypeInformation<?> type, S dbObject) Writes type information for the givenTypeInformation
into the given sink.
-
Method Details
-
readType
Reads theTypeInformation
from the given source.- Parameters:
source
- must not be null.- Returns:
-
readType
Returns theTypeInformation
from the given source if it is a more concrete type than the given default one.- Parameters:
source
- must not be null.defaultType
- must not be null.- Returns:
-
writeType
Writes type information for the given type into the given sink.- Parameters:
type
- must not be null.dbObject
- must not be null.
-
writeType
Writes type information for the givenTypeInformation
into the given sink.- Parameters:
type
- must not be null.dbObject
- must not be null.
-