Class IdentitySupport
java.lang.Object
org.springframework.data.neo4j.core.mapping.IdentitySupport
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 Summary
Modifier and TypeMethodDescriptionstatic String
getElementId
(org.neo4j.driver.types.Entity entity) static String
getElementId
(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.static Long
getInternalId
(org.neo4j.driver.types.MapAccessor row) Deprecated.static String
getPrefixedElementId
(org.neo4j.driver.types.MapAccessor queryResult, String seed) mapperForRelatedIdValues
(Neo4jPersistentProperty idProperty)
-
Method Details
-
getElementId
- Parameters:
entity
- The entity container as received from the server.- Returns:
- The internal id
-
getElementId
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
-
mapperForRelatedIdValues
public static Function<org.neo4j.driver.types.MapAccessor,Object> mapperForRelatedIdValues(@Nullable Neo4jPersistentProperty idProperty)
-