Interface Neo4jPersistentPropertyConverter<T>

Type Parameters:
T - the type of the property to convert (the type of the actual attribute).
All Known Implementing Classes:
ConvertWith.UnsetConverter

@API(status=STABLE, since="6.0") public interface Neo4jPersistentPropertyConverter<T>
This interface represents a pair of methods capable of converting values of type T to and from values.
Since:
6.0
Author:
Michael J. Simons
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable T
    read(@Nullable org.neo4j.driver.Value source)
    Reads a property from a Neo4j value.
    org.neo4j.driver.Value
    write(@Nullable T source)
    Writes a property to a Neo4j value.
  • Method Details

    • write

      org.neo4j.driver.Value write(@Nullable T source)
      Writes a property to a Neo4j value.
      Parameters:
      source - the value to store. We might pass null, if your converter is not able to handle that, this is ok, we do handle null pointer exceptions
      Returns:
      the converted value, never null. To represent null, use Values.NULL
    • read

      @Nullable T read(@Nullable org.neo4j.driver.Value source)
      Reads a property from a Neo4j value.
      Parameters:
      source - the value to read, never null or Values.NULL
      Returns:
      the converted value, maybe null if source was equals to Values.NULL.