public class MappingNosqlConverter extends Object implements org.springframework.data.convert.EntityConverter<NosqlPersistentEntity<?>,NosqlPersistentProperty,Object,oracle.nosql.driver.values.FieldValue>, org.springframework.context.ApplicationContextAware
Constructor and Description |
---|
MappingNosqlConverter(org.springframework.data.mapping.context.MappingContext<? extends NosqlPersistentEntity<?>,NosqlPersistentProperty> mappingContext) |
Modifier and Type | Method and Description |
---|---|
static RuntimeException |
convert(oracle.nosql.driver.NoSQLException nse) |
<ID> oracle.nosql.driver.values.MapValue |
convertIdToPrimaryKey(String idColumnName,
ID id)
Converts the ID id to a MapValue representing the primaryKey.
|
oracle.nosql.driver.values.FieldValue |
convertObjToFieldValue(Object javaObj,
NosqlPersistentProperty prop,
boolean isItemInCollection) |
<T> oracle.nosql.driver.values.MapValue |
convertObjToRow(T objectToSave,
boolean skipSetId)
Converts an entity to the value stored in NosqlDB.
|
org.springframework.context.ApplicationContext |
getApplicationContext() |
org.springframework.core.convert.ConversionService |
getConversionService() |
<E> NosqlPersistentProperty |
getIdProperty(Class<E> entityClass) |
org.springframework.data.mapping.context.MappingContext<? extends NosqlPersistentEntity<?>,NosqlPersistentProperty> |
getMappingContext() |
<R> R |
read(Class<R> type,
oracle.nosql.driver.values.FieldValue nosqlRowValue) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
<E,ID> E |
setId(E objectToSave,
oracle.nosql.driver.values.FieldValue id) |
static String |
toNosqlSqlType(Object fromPropertyValue) |
void |
write(Object sourceEntity,
oracle.nosql.driver.values.FieldValue document)
Deprecated.
|
public MappingNosqlConverter(@NonNull org.springframework.data.mapping.context.MappingContext<? extends NosqlPersistentEntity<?>,NosqlPersistentProperty> mappingContext)
public <E> NosqlPersistentProperty getIdProperty(@NonNull Class<E> entityClass)
@Nullable public <R> R read(@NonNull Class<R> type, @NonNull oracle.nosql.driver.values.FieldValue nosqlRowValue)
read
in interface org.springframework.data.convert.EntityReader<Object,oracle.nosql.driver.values.FieldValue>
@Deprecated public void write(@Nullable Object sourceEntity, @Nullable oracle.nosql.driver.values.FieldValue document)
write
in interface org.springframework.data.convert.EntityWriter<Object,oracle.nosql.driver.values.FieldValue>
public org.springframework.context.ApplicationContext getApplicationContext()
public void setApplicationContext(@NonNull org.springframework.context.ApplicationContext applicationContext)
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
@NonNull public org.springframework.core.convert.ConversionService getConversionService()
getConversionService
in interface org.springframework.data.convert.EntityConverter<NosqlPersistentEntity<?>,NosqlPersistentProperty,Object,oracle.nosql.driver.values.FieldValue>
@NonNull public org.springframework.data.mapping.context.MappingContext<? extends NosqlPersistentEntity<?>,NosqlPersistentProperty> getMappingContext()
getMappingContext
in interface org.springframework.data.convert.EntityConverter<NosqlPersistentEntity<?>,NosqlPersistentProperty,Object,oracle.nosql.driver.values.FieldValue>
public <T> oracle.nosql.driver.values.MapValue convertObjToRow(T objectToSave, boolean skipSetId)
objectToSave
- entity to be convertedskipSetId
- for inserts id is not set, it will be generated by
Nosql driver@Nullable public oracle.nosql.driver.values.FieldValue convertObjToFieldValue(Object javaObj, @Nullable NosqlPersistentProperty prop, boolean isItemInCollection)
public <E,ID> E setId(E objectToSave, oracle.nosql.driver.values.FieldValue id)
public <ID> oracle.nosql.driver.values.MapValue convertIdToPrimaryKey(String idColumnName, ID id)
public static RuntimeException convert(oracle.nosql.driver.NoSQLException nse)
Copyright © 2022 Oracle Corporation. All rights reserved.