public class DatastoreMappingContext extends org.springframework.data.mapping.context.AbstractMappingContext<DatastorePersistentEntity<?>,DatastorePersistentProperty> implements org.springframework.context.ApplicationContextAware
Constructor and Description |
---|
DatastoreMappingContext() |
Modifier and Type | Method and Description |
---|---|
static void |
addDiscriminationClassConnection(Class parentClass,
Class subClass)
Registers in the DatastoreMappingContext that two classes are discriminated from the
same Datastore Kind.
|
protected <T> DatastorePersistentEntityImpl<T> |
constructPersistentEntity(org.springframework.data.util.TypeInformation<T> typeInformation) |
protected <T> DatastorePersistentEntity<?> |
createPersistentEntity(org.springframework.data.util.TypeInformation<T> typeInformation) |
protected DatastorePersistentProperty |
createPersistentProperty(org.springframework.data.mapping.model.Property property,
DatastorePersistentEntity<?> owner,
org.springframework.data.mapping.model.SimpleTypeHolder simpleTypeHolder) |
static Set<Class> |
getDiscriminationFamily(Class aClass)
Get the set of other classes that share the same underlying Datastore Kind and that are
subclasses of the given class.
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
addPersistentEntity, addPersistentEntity, afterPropertiesSet, doFindPersistentPropertyPaths, findPersistentPropertyPaths, getManagedTypes, getPersistentEntities, getPersistentEntity, getPersistentEntity, getPersistentEntity, getPersistentPropertyPath, getPersistentPropertyPath, hasPersistentEntityFor, initialize, setApplicationEventPublisher, setInitialEntitySet, setSimpleTypeHolder, setStrict, shouldCreatePersistentEntityFor
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
setApplicationContext
in class org.springframework.data.mapping.context.AbstractMappingContext<DatastorePersistentEntity<?>,DatastorePersistentProperty>
org.springframework.beans.BeansException
public static void addDiscriminationClassConnection(Class parentClass, Class subClass)
parentClass
- the superclass.subClass
- the subclass.public static Set<Class> getDiscriminationFamily(Class aClass)
aClass
- the class to look up.Set
of other classes that share the same Kind that are subclasses.
Will be null
if this class is not discriminated from a set of other classes.protected <T> DatastorePersistentEntityImpl<T> constructPersistentEntity(org.springframework.data.util.TypeInformation<T> typeInformation)
protected <T> DatastorePersistentEntity<?> createPersistentEntity(org.springframework.data.util.TypeInformation<T> typeInformation)
createPersistentEntity
in class org.springframework.data.mapping.context.AbstractMappingContext<DatastorePersistentEntity<?>,DatastorePersistentProperty>
protected DatastorePersistentProperty createPersistentProperty(org.springframework.data.mapping.model.Property property, DatastorePersistentEntity<?> owner, org.springframework.data.mapping.model.SimpleTypeHolder simpleTypeHolder)
createPersistentProperty
in class org.springframework.data.mapping.context.AbstractMappingContext<DatastorePersistentEntity<?>,DatastorePersistentProperty>
Copyright © 2020 Pivotal Software, Inc.. All rights reserved.