Class LcEntityReader
- java.lang.Object
-
- net.lecousin.reactive.data.relational.mapping.LcEntityReader
-
public class LcEntityReader extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLcEntityReader.PropertiesSourceParameterValueProvider
-
Constructor Summary
Constructors Constructor Description LcEntityReader(EntityCache cache, LcMappingR2dbcConverter converter)LcEntityReader(EntityCache cache, org.springframework.data.convert.CustomConversions conversions, LcReactiveDataRelationalClient client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EntityCachegetCache()protected <T> TgetOrCreateInstance(org.springframework.data.relational.core.mapping.RelationalPersistentEntity<T> entityType, PropertiesSource source)protected <T> TgetOrCreateInstance(org.springframework.data.relational.core.mapping.RelationalPersistentEntity<T> entityType, PropertiesSource source, Object id)protected ObjectgetPotentiallyConvertedSimpleRead(Object value, Class<?> target)Checks whether we have a custom conversion for the given simple object.<T> Tread(Class<T> type, PropertiesSource source)<T> Tread(org.springframework.data.relational.core.mapping.RelationalPersistentEntity<T> entityType, PropertiesSource source)protected <T> TreadEntityProperty(org.springframework.data.relational.core.mapping.RelationalPersistentProperty property, Object parentInstance, PropertiesSource source)protected <T> TreadForeignKeyEntity(org.springframework.data.relational.core.mapping.RelationalPersistentProperty property, Object parentInstance, org.springframework.data.relational.core.mapping.RelationalPersistentEntity<T> entityType, PropertiesSource source)protected ObjectreadProperty(org.springframework.data.relational.core.mapping.RelationalPersistentProperty property, PropertiesSource source, Object instance)ObjectreadValue(Object value, org.springframework.data.util.TypeInformation<?> type)
-
-
-
Constructor Detail
-
LcEntityReader
public LcEntityReader(@Nullable EntityCache cache, @Nullable org.springframework.data.convert.CustomConversions conversions, LcReactiveDataRelationalClient client)
-
LcEntityReader
public LcEntityReader(@Nullable EntityCache cache, LcMappingR2dbcConverter converter)
-
-
Method Detail
-
getCache
public EntityCache getCache()
-
read
public <T> T read(Class<T> type, PropertiesSource source)
-
read
public <T> T read(org.springframework.data.relational.core.mapping.RelationalPersistentEntity<T> entityType, PropertiesSource source)
-
readProperty
protected Object readProperty(org.springframework.data.relational.core.mapping.RelationalPersistentProperty property, PropertiesSource source, Object instance)
-
readValue
public Object readValue(@Nullable Object value, org.springframework.data.util.TypeInformation<?> type)
-
getPotentiallyConvertedSimpleRead
@Nullable protected Object getPotentiallyConvertedSimpleRead(@Nullable Object value, @Nullable Class<?> target)
Checks whether we have a custom conversion for the given simple object. Converts the given value if so, appliesEnumhandling or returns the value as is.- Parameters:
value-target- must not be null.- Returns:
-
readEntityProperty
protected <T> T readEntityProperty(org.springframework.data.relational.core.mapping.RelationalPersistentProperty property, Object parentInstance, PropertiesSource source)
-
readForeignKeyEntity
protected <T> T readForeignKeyEntity(org.springframework.data.relational.core.mapping.RelationalPersistentProperty property, Object parentInstance, org.springframework.data.relational.core.mapping.RelationalPersistentEntity<T> entityType, PropertiesSource source)
-
getOrCreateInstance
protected <T> T getOrCreateInstance(org.springframework.data.relational.core.mapping.RelationalPersistentEntity<T> entityType, PropertiesSource source)
-
getOrCreateInstance
protected <T> T getOrCreateInstance(org.springframework.data.relational.core.mapping.RelationalPersistentEntity<T> entityType, PropertiesSource source, Object id)
-
-