Class MappingNosqlConverter
java.lang.Object
com.oracle.nosql.spring.data.core.convert.MappingNosqlConverter
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
,org.springframework.data.convert.EntityConverter<NosqlPersistentEntity<?>,
,NosqlPersistentProperty, Object, FieldValue> org.springframework.data.convert.EntityReader<Object,
,FieldValue> org.springframework.data.convert.EntityWriter<Object,
FieldValue>
public class MappingNosqlConverter
extends Object
implements org.springframework.data.convert.EntityConverter<NosqlPersistentEntity<?>,NosqlPersistentProperty,Object,FieldValue>, org.springframework.context.ApplicationContextAware
-
Constructor Summary
ConstructorsConstructorDescriptionMappingNosqlConverter
(org.springframework.data.mapping.context.MappingContext<? extends NosqlPersistentEntity<?>, NosqlPersistentProperty> mappingContext) -
Method Summary
Modifier and TypeMethodDescriptionstatic RuntimeException
convert
(NoSQLException nse) <ID> MapValue
convertIdToPrimaryKey
(String idColumnName, ID id) Converts the ID id to a MapValue representing the primaryKey.convertObjToFieldValue
(Object javaObj, NosqlPersistentProperty prop, boolean isItemInCollection) <T> MapValue
convertObjToRow
(T objectToSave, boolean skipSetId) Converts an entity to the value stored in NosqlDB.org.springframework.context.ApplicationContext
org.springframework.core.convert.ConversionService
getIdProperty
(Class<E> entityClass) org.springframework.data.mapping.context.MappingContext
<? extends NosqlPersistentEntity<?>, NosqlPersistentProperty> <R> R
read
(Class<R> type, FieldValue nosqlRowValue) void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) <E,
ID> E setId
(E objectToSave, FieldValue id) static String
toNosqlSqlType
(Object fromPropertyValue) void
write
(Object sourceEntity, FieldValue document) Deprecated.
-
Constructor Details
-
MappingNosqlConverter
public MappingNosqlConverter(@NonNull org.springframework.data.mapping.context.MappingContext<? extends NosqlPersistentEntity<?>, NosqlPersistentProperty> mappingContext)
-
-
Method Details
-
getIdProperty
-
read
- Specified by:
read
in interfaceorg.springframework.data.convert.EntityReader<Object,
FieldValue>
-
write
Deprecated.- Specified by:
write
in interfaceorg.springframework.data.convert.EntityWriter<Object,
FieldValue>
-
getApplicationContext
public org.springframework.context.ApplicationContext getApplicationContext() -
setApplicationContext
public void setApplicationContext(@NonNull org.springframework.context.ApplicationContext applicationContext) - Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
-
getConversionService
@NonNull public org.springframework.core.convert.ConversionService getConversionService()- Specified by:
getConversionService
in interfaceorg.springframework.data.convert.EntityConverter<NosqlPersistentEntity<?>,
NosqlPersistentProperty, Object, FieldValue>
-
getMappingContext
@NonNull public org.springframework.data.mapping.context.MappingContext<? extends NosqlPersistentEntity<?>,NosqlPersistentProperty> getMappingContext()- Specified by:
getMappingContext
in interfaceorg.springframework.data.convert.EntityConverter<NosqlPersistentEntity<?>,
NosqlPersistentProperty, Object, FieldValue>
-
convertObjToRow
Converts an entity to the value stored in NosqlDB.- Parameters:
objectToSave
- entity to be convertedskipSetId
- for inserts id is not set, it will be generated by Nosql driver- Returns:
- the Nosql row representation to be saved into table
-
convertObjToFieldValue
@Nullable public FieldValue convertObjToFieldValue(Object javaObj, @Nullable NosqlPersistentProperty prop, boolean isItemInCollection) -
setId
-
convertIdToPrimaryKey
Converts the ID id to a MapValue representing the primaryKey. -
toNosqlSqlType
-
convert
-