public class DefaultTypeMappingContext extends Object implements TypeMappingContext
This is the default type mapping context that is also capable of registering the default mappings for the interfaces provided through Spring Data.
| Constructor and Description |
|---|
DefaultTypeMappingContext()
Instantiates the context and registers all the default converters
|
DefaultTypeMappingContext(boolean registerDefaults)
Instantiates the context
|
DefaultTypeMappingContext(TypeMappingContext parent) |
| Modifier and Type | Method and Description |
|---|---|
List<Class<?>> |
getImplementations(Class<?> repositoryType)
Given a repository type returns all concrete classes that could be used for that repository's mappings
|
List<TypeMapping<?>> |
getMappings(Class<?> repositoryType)
Given a repository type, will look up all possible mappings and creates
mapping objects
from those |
void |
register(Class<?> repositoryType,
Class<?> implementation)
Registers a mapping that should be honored for all repositories that are a subtype of the
provided repository type.
|
public DefaultTypeMappingContext()
public DefaultTypeMappingContext(boolean registerDefaults)
registerDefaults - whether or not the default mappings should be registered.public DefaultTypeMappingContext(TypeMappingContext parent)
public void register(Class<?> repositoryType, Class<?> implementation)
TypeMappingContextObject
all repositories will inherit this mapping.register in interface TypeMappingContextrepositoryType - the repository (super) typeimplementation - the implementation typepublic List<Class<?>> getImplementations(Class<?> repositoryType)
TypeMappingContextgetImplementations in interface TypeMappingContextrepositoryType - the repository typepublic List<TypeMapping<?>> getMappings(Class<?> repositoryType)
TypeMappingContextmapping objects
from thosegetMappings in interface TypeMappingContextrepositoryType - the repository typeCopyright © 2014–2016. All rights reserved.