|
Spring Data Commons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.data.convert.ConfigurableTypeInformationMapper
public class ConfigurableTypeInformationMapper
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.
Constructor Summary | |
---|---|
ConfigurableTypeInformationMapper(Map<? extends Class<?>,String> sourceTypeMap)
Creates a new ConfigurableTypeMapper for the given type map. |
|
ConfigurableTypeInformationMapper(MappingContext<? extends PersistentEntity<?,?>,?> mappingContext)
Creates a ConfigurableTypeInformationMapper from the given MappingContext . |
Method Summary | |
---|---|
Object |
createAliasFor(TypeInformation<?> type)
Returns the alias to be used for the given TypeInformation . |
TypeInformation<?> |
resolveTypeFrom(Object alias)
Returns the actual TypeInformation to be used for the given alias. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConfigurableTypeInformationMapper(MappingContext<? extends PersistentEntity<?,?>,?> mappingContext)
ConfigurableTypeInformationMapper
from the given MappingContext
. Inspects all
PersistentEntity
instances for alias information and builds a Map
of aliases to types from it.
mappingContext
- public ConfigurableTypeInformationMapper(Map<? extends Class<?>,String> sourceTypeMap)
ConfigurableTypeMapper
for the given type map.
sourceTypeMap
- must not be null.Method Detail |
---|
public Object createAliasFor(TypeInformation<?> type)
TypeInformationMapper
TypeInformation
.
createAliasFor
in interface TypeInformationMapper
public TypeInformation<?> resolveTypeFrom(Object alias)
TypeInformationMapper
TypeInformation
to be used for the given alias.
resolveTypeFrom
in interface TypeInformationMapper
|
Spring Data Commons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |