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 theTypeInformationfrom the given source.<T> TypeInformation<? extends T>readType(S source, TypeInformation<T> defaultType) Returns theTypeInformationfrom the given source if it is a more concrete type than the given default one.voidWrites type information for the given type into the given sink.voidwriteType(TypeInformation<?> type, S dbObject) Writes type information for the givenTypeInformationinto the given sink.
-
Method Details
-
readType
Reads theTypeInformationfrom the given source.- Parameters:
source- must not be null.- Returns:
-
readType
Returns theTypeInformationfrom 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 givenTypeInformationinto the given sink.- Parameters:
type- must not be null.dbObject- must not be null.
-