Class IdentitySupport

java.lang.Object
org.springframework.data.neo4j.core.mapping.IdentitySupport

@API(status=INTERNAL) public final class IdentitySupport extends Object
This class is not part of any public API and will be changed without further notice as needed. It's primary goal is to mitigate the changes in Neo4j5, which introduces the notion of an element id for both nodes and relationships while deprecating id at the same time. The identity support allows to isolate our calls deprecated API in one central place and will exist for SDN 7 only to make SDN 7 work with both Neo4j 4.4 and Neo4j 5.x.
Since:
7.0
Author:
Michael J. Simons
  • Method Details

    • getElementId

      public static String getElementId(org.neo4j.driver.types.Entity entity)
      Parameters:
      entity - The entity container as received from the server.
      Returns:
      The internal id
    • getElementId

      @Nullable public static String getElementId(@NonNull org.neo4j.driver.types.MapAccessor row)
      Retrieves an identity either from attributes inside the row or if it is an actual entity, with the dedicated accessors.
      Parameters:
      row - A query result row
      Returns:
      An internal id
    • getInternalId

      @Nullable @Deprecated public static Long getInternalId(@NonNull org.neo4j.driver.types.MapAccessor row)
      Deprecated.
    • getPrefixedElementId

      @Nullable public static String getPrefixedElementId(@NonNull org.neo4j.driver.types.MapAccessor queryResult, @Nullable String seed)
    • mapperForRelatedIdValues

      public static Function<org.neo4j.driver.types.MapAccessor,Object> mapperForRelatedIdValues(@Nullable Neo4jPersistentProperty idProperty)