Files
spring-data-neo4j/etc
Michael Simons b2ee6cad2b DATAGRAPH-1390 - Provide attribute specific conversions.
This introduces the idea of a `Neo4jPersistentPropertyConverter`, a `Neo4jPersistentPropertyConverterFactory` and an annotation `@ConvertWith`.

The annotation can be applied to fields and other annotations.
It is used to indicate that a given `Neo4jPersistentProperty` needs a custom conversion for reads and writes and overwrides all existing converters.

The annotation allows to specifiy the converter through `converter()` and an optional factory.
The default `Neo4jPersistentPropertyConverterFactory` will just try to instantiate the given converter class.
More sophisticated solutions need dedicated factories.

To make the factories work possible, the whole persistent property is passed as a construction parameter, so that the `@ConvertWith` annotation
or any other meta-annotated annotations can be retrieved.

In the progress of implementing this, the `Neo4jEntityConverter` has been stripped of its duties to convert single values.
Instead, a `Neo4jConversionService` has been introduced that orchestrates the underlying spring service and possible overrides.

The conversion will applied at all places where a persistent property can be deduced, either from the model or from parameters targeting the properties.
It will not be applied to parameters of string based queries or SpEL.
2020-09-29 10:06:43 +02:00
..