Package org.springframework.data.convert
Class ConfigurableTypeInformationMapper
java.lang.Object
org.springframework.data.convert.ConfigurableTypeInformationMapper
- All Implemented Interfaces:
TypeInformationMapper
TypeInformationMapper implementation that can be either set up using a MappingContext or manually set
up Map of String aliases to types. If a MappingContext is used the Map will be build
inspecting the PersistentEntity instances for type alias information.- Author:
- Oliver Gierke, Johannes Englmeier
-
Constructor Summary
ConstructorsConstructorDescriptionConfigurableTypeInformationMapper(Map<? extends Class<?>, String> sourceTypeMap) Creates a newConfigurableTypeInformationMapperfor the given type map. -
Method Summary
Modifier and TypeMethodDescriptioncreateAliasFor(TypeInformation<?> type) Returns the alias to be used for the givenTypeInformation.resolveTypeFrom(Alias alias) Returns the actualTypeInformationto be used for the given alias.
-
Constructor Details
-
ConfigurableTypeInformationMapper
Creates a newConfigurableTypeInformationMapperfor the given type map.- Parameters:
sourceTypeMap- must not be null.
-
-
Method Details
-
createAliasFor
Description copied from interface:TypeInformationMapperReturns the alias to be used for the givenTypeInformation.- Specified by:
createAliasForin interfaceTypeInformationMapper- Parameters:
type- must not be null.- Returns:
-
resolveTypeFrom
Description copied from interface:TypeInformationMapperReturns the actualTypeInformationto be used for the given alias.- Specified by:
resolveTypeFromin interfaceTypeInformationMapper- Parameters:
alias- must not be null.- Returns:
-