CosmosMappingContext Class

  • java.lang.Object
    • org.springframework.data.mapping.context.AbstractMappingContext
      • com.azure.spring.data.cosmos.core.mapping.CosmosMappingContext

public class CosmosMappingContext
extends org.springframework.data.mapping.context.AbstractMappingContext<BasicCosmosPersistentEntity<?>,CosmosPersistentProperty>

Class to build mapping metadata and thus create instances of BasicCosmosPersistentEntity<T> and CosmosPersistentProperty.

Constructor Summary

Constructor Description
CosmosMappingContext()

Construct a CosmosMappingContext instance, with the CosmosSimpleTypes as simple type holder.

Method Summary

Modifier and Type Method and Description
protected BasicCosmosPersistentEntity<T> createPersistentEntity(TypeInformation<T> typeInformation)
CosmosPersistentProperty createPersistentProperty(Property property, BasicCosmosPersistentEntity<?> owner, SimpleTypeHolder simpleTypeHolder)
void setApplicationContext(ApplicationContext applicationContext)

Methods inherited from java.lang.Object

Methods inherited from org.springframework.data.mapping.context.AbstractMappingContext

org.springframework.data.mapping.context.AbstractMappingContext.<T>createPersistentEntity org.springframework.data.mapping.context.AbstractMappingContext.<T>doFindPersistentPropertyPaths(java.lang.Class<T>,java.util.function.Predicate< org.springframework.data.mapping.context.AbstractMappingContext.<T>findPersistentPropertyPaths(java.lang.Class<T>,java.util.function.Predicate< org.springframework.data.mapping.context.AbstractMappingContext.addPersistentEntity(java.lang.Class< org.springframework.data.mapping.context.AbstractMappingContext.addPersistentEntity(org.springframework.data.util.TypeInformation< org.springframework.data.mapping.context.AbstractMappingContext.afterPropertiesSet org.springframework.data.mapping.context.AbstractMappingContext.createPersistentProperty org.springframework.data.mapping.context.AbstractMappingContext.getManagedTypes org.springframework.data.mapping.context.AbstractMappingContext.getPersistentEntities org.springframework.data.mapping.context.AbstractMappingContext.getPersistentEntity org.springframework.data.mapping.context.AbstractMappingContext.getPersistentEntity(java.lang.Class< org.springframework.data.mapping.context.AbstractMappingContext.getPersistentEntity(org.springframework.data.util.TypeInformation< org.springframework.data.mapping.context.AbstractMappingContext.getPersistentPropertyPath(java.lang.String,java.lang.Class< org.springframework.data.mapping.context.AbstractMappingContext.getPersistentPropertyPath(java.lang.String,org.springframework.data.util.TypeInformation< org.springframework.data.mapping.context.AbstractMappingContext.getPersistentPropertyPath org.springframework.data.mapping.context.AbstractMappingContext.hasPersistentEntityFor(java.lang.Class< org.springframework.data.mapping.context.AbstractMappingContext.initialize org.springframework.data.mapping.context.AbstractMappingContext.setApplicationContext org.springframework.data.mapping.context.AbstractMappingContext.setApplicationEventPublisher org.springframework.data.mapping.context.AbstractMappingContext.setBeanFactory org.springframework.data.mapping.context.AbstractMappingContext.setEnvironment org.springframework.data.mapping.context.AbstractMappingContext.setInitialEntitySet(java.util.Set< org.springframework.data.mapping.context.AbstractMappingContext.setManagedTypes org.springframework.data.mapping.context.AbstractMappingContext.setSimpleTypeHolder org.springframework.data.mapping.context.AbstractMappingContext.setStrict org.springframework.data.mapping.context.AbstractMappingContext.shouldCreatePersistentEntityFor(org.springframework.data.util.TypeInformation< org.springframework.data.mapping.context.AbstractMappingContext.shouldCreateProperties(org.springframework.data.util.TypeInformation<

Constructor Details

CosmosMappingContext

public CosmosMappingContext()

Construct a CosmosMappingContext instance, with the CosmosSimpleTypes as simple type holder.

Method Details

createPersistentEntity

protected BasicCosmosPersistentEntity createPersistentEntity(TypeInformation typeInformation)

Overrides:

CosmosMappingContext.createPersistentEntity(TypeInformation<T> typeInformation)

Parameters:

typeInformation

createPersistentProperty

public CosmosPersistentProperty createPersistentProperty(Property property, BasicCosmosPersistentEntity owner, SimpleTypeHolder simpleTypeHolder)

Overrides:

CosmosMappingContext.createPersistentProperty(Property property, BasicCosmosPersistentEntity<?> owner, SimpleTypeHolder simpleTypeHolder)

Parameters:

property
owner
simpleTypeHolder

setApplicationContext

public void setApplicationContext(ApplicationContext applicationContext)

Overrides:

CosmosMappingContext.setApplicationContext(ApplicationContext applicationContext)

Parameters:

applicationContext

Applies to