@Retention(value=RUNTIME) @Target(value={ANNOTATION_TYPE,FIELD}) @Inherited @Documented @API(status=STABLE, since="6.0") public @interface ConvertWith
Neo4jPersistentPropertyConverter and if needed, a custom factory to create that converter or the annotation
can be used to build custom meta-annotated annotations like @org.springframework.data.neo4j.core.support.DateLong.
Custom conversions are applied to both attributes of entities and parameters of repository methods that map to those attributes (which does apply to all derived queries and queries by example but not to string based queries).
Converters that have a default constructor don't need a dedicated factory. A dedicated factory will be provided with either this annotation and its values or with the meta annotated annotation, including all configuration available.
In case converterRef() is set to a non null and non-empty value, the mapping context
will try to lookup a bean under the given name of type Neo4jPersistentPropertyConverter in the application context.
If no such bean is found an exception will be thrown. This attribute has precedence over converter().
| Modifier and Type | Optional Element and Description |
|---|---|
Class<? extends Neo4jPersistentPropertyConverter<?>> |
converter |
Class<? extends Neo4jPersistentPropertyConverterFactory> |
converterFactory |
String |
converterRef |
public abstract Class<? extends Neo4jPersistentPropertyConverter<?>> converter
public abstract Class<? extends Neo4jPersistentPropertyConverterFactory> converterFactory
converter(), for all the scenarios in which constructing a converter is more effort than a constructor call.public abstract String converterRef
Neo4jPersistentPropertyConverter.Copyright © 2019–2022 Neo4j, Neo4j Sweden AB. All rights reserved.