public class MappingCosmosConverter extends Object implements org.springframework.data.convert.EntityConverter<CosmosPersistentEntity<?>,CosmosPersistentProperty,Object,com.azure.data.cosmos.CosmosItemProperties>, org.springframework.context.ApplicationContextAware
| Modifier and Type | Field and Description |
|---|---|
private org.springframework.context.ApplicationContext |
applicationContext |
protected org.springframework.core.convert.support.GenericConversionService |
conversionService |
protected org.springframework.data.mapping.context.MappingContext<? extends CosmosPersistentEntity<?>,CosmosPersistentProperty> |
mappingContext |
private com.fasterxml.jackson.databind.ObjectMapper |
objectMapper |
| Constructor and Description |
|---|
MappingCosmosConverter(org.springframework.data.mapping.context.MappingContext<? extends CosmosPersistentEntity<?>,CosmosPersistentProperty> mappingContext,
com.fasterxml.jackson.databind.ObjectMapper objectMapper) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.context.ApplicationContext |
getApplicationContext() |
org.springframework.core.convert.ConversionService |
getConversionService() |
org.springframework.data.mapping.context.MappingContext<? extends CosmosPersistentEntity<?>,CosmosPersistentProperty> |
getMappingContext() |
private org.springframework.data.mapping.model.ConvertingPropertyAccessor |
getPropertyAccessor(Object entity) |
<R> R |
read(Class<R> type,
com.azure.data.cosmos.CosmosItemProperties cosmosItemProperties) |
private <R> R |
readInternal(CosmosPersistentEntity<?> entity,
Class<R> type,
com.azure.data.cosmos.CosmosItemProperties cosmosItemProperties) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
static Object |
toCosmosDbValue(Object fromPropertyValue)
Convert a property value to the value stored in CosmosDB
|
void |
write(Object sourceEntity,
com.azure.data.cosmos.CosmosItemProperties document)
Deprecated.
|
com.azure.data.cosmos.CosmosItemProperties |
writeCosmosItemProperties(Object sourceEntity) |
protected final org.springframework.data.mapping.context.MappingContext<? extends CosmosPersistentEntity<?>,CosmosPersistentProperty> mappingContext
protected org.springframework.core.convert.support.GenericConversionService conversionService
private org.springframework.context.ApplicationContext applicationContext
private com.fasterxml.jackson.databind.ObjectMapper objectMapper
public MappingCosmosConverter(org.springframework.data.mapping.context.MappingContext<? extends CosmosPersistentEntity<?>,CosmosPersistentProperty> mappingContext, @Qualifier(value="cosmosdbObjectMapper") com.fasterxml.jackson.databind.ObjectMapper objectMapper)
public <R> R read(Class<R> type, com.azure.data.cosmos.CosmosItemProperties cosmosItemProperties)
read in interface org.springframework.data.convert.EntityReader<Object,com.azure.data.cosmos.CosmosItemProperties>private <R> R readInternal(CosmosPersistentEntity<?> entity, Class<R> type, com.azure.data.cosmos.CosmosItemProperties cosmosItemProperties)
@Deprecated public void write(Object sourceEntity, com.azure.data.cosmos.CosmosItemProperties document)
write in interface org.springframework.data.convert.EntityWriter<Object,com.azure.data.cosmos.CosmosItemProperties>public com.azure.data.cosmos.CosmosItemProperties writeCosmosItemProperties(Object sourceEntity)
public org.springframework.context.ApplicationContext getApplicationContext()
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
setApplicationContext in interface org.springframework.context.ApplicationContextAwarepublic org.springframework.core.convert.ConversionService getConversionService()
getConversionService in interface org.springframework.data.convert.EntityConverter<CosmosPersistentEntity<?>,CosmosPersistentProperty,Object,com.azure.data.cosmos.CosmosItemProperties>public org.springframework.data.mapping.context.MappingContext<? extends CosmosPersistentEntity<?>,CosmosPersistentProperty> getMappingContext()
getMappingContext in interface org.springframework.data.convert.EntityConverter<CosmosPersistentEntity<?>,CosmosPersistentProperty,Object,com.azure.data.cosmos.CosmosItemProperties>private org.springframework.data.mapping.model.ConvertingPropertyAccessor getPropertyAccessor(Object entity)
Copyright © 2020 Microsoft. All rights reserved.