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 StringgetElementId(org.neo4j.driver.types.Entity entity) Retrieves the element id of an entity.static @Nullable StringgetElementId(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 @Nullable LonggetInternalId(org.neo4j.driver.types.MapAccessor row) Deprecated.static @Nullable StringgetPrefixedElementId(org.neo4j.driver.types.MapAccessor queryResult, @Nullable String seed) mapperForRelatedIdValues(@Nullable Neo4jPersistentProperty idProperty)
-
Method Details
-
getElementId
Retrieves the element id of an entity.- 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
Deprecated. -
getPrefixedElementId
-
mapperForRelatedIdValues
public static Function<org.neo4j.driver.types.MapAccessor, Object> mapperForRelatedIdValues(@Nullable Neo4jPersistentProperty idProperty)
-