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 newConfigurableTypeInformationMapper
for 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 actualTypeInformation
to be used for the given alias.
-
Constructor Details
-
ConfigurableTypeInformationMapper
Creates a newConfigurableTypeInformationMapper
for the given type map.- Parameters:
sourceTypeMap
- must not be null.
-
-
Method Details
-
createAliasFor
Description copied from interface:TypeInformationMapper
Returns the alias to be used for the givenTypeInformation
.- Specified by:
createAliasFor
in interfaceTypeInformationMapper
- Parameters:
type
- must not be null.- Returns:
-
resolveTypeFrom
Description copied from interface:TypeInformationMapper
Returns the actualTypeInformation
to be used for the given alias.- Specified by:
resolveTypeFrom
in interfaceTypeInformationMapper
- Parameters:
alias
- must not be null.- Returns:
-