Class IdDescription
java.lang.Object
org.springframework.data.neo4j.core.mapping.IdDescription
Description how to generate Ids for entities.
- Since:
- 6.0
- Author:
- Michael J. Simons
-
Method Summary
Modifier and TypeMethodDescriptionorg.neo4j.cypherdsl.core.Expression
org.neo4j.cypherdsl.core.Expression
asIdExpression
(String nodeName) Creates the right identifier expression for this node entity.static IdDescription
forAssignedIds
(org.neo4j.cypherdsl.core.SymbolicName symbolicName, String graphPropertyName) static IdDescription
forExternallyGeneratedIds
(org.neo4j.cypherdsl.core.SymbolicName symbolicName, Class<? extends IdGenerator<?>> idGeneratorClass, String idGeneratorRef, String graphPropertyName) static IdDescription
forInternallyGeneratedIds
(org.neo4j.cypherdsl.core.SymbolicName symbolicName) static IdDescription
forInternallyGeneratedIds
(org.neo4j.cypherdsl.core.SymbolicName symbolicName, boolean isDeprecated) Optional<Class<? extends IdGenerator<?>>>
An ID description has only a corresponding graph property name when it's bas on an external assigment.boolean
boolean
boolean
-
Method Details
-
forAssignedIds
public static IdDescription forAssignedIds(org.neo4j.cypherdsl.core.SymbolicName symbolicName, String graphPropertyName) -
forInternallyGeneratedIds
public static IdDescription forInternallyGeneratedIds(org.neo4j.cypherdsl.core.SymbolicName symbolicName) -
forInternallyGeneratedIds
public static IdDescription forInternallyGeneratedIds(org.neo4j.cypherdsl.core.SymbolicName symbolicName, boolean isDeprecated) -
forExternallyGeneratedIds
public static IdDescription forExternallyGeneratedIds(org.neo4j.cypherdsl.core.SymbolicName symbolicName, @Nullable Class<? extends IdGenerator<?>> idGeneratorClass, @Nullable String idGeneratorRef, String graphPropertyName) -
asIdExpression
public org.neo4j.cypherdsl.core.Expression asIdExpression() -
asIdExpression
Creates the right identifier expression for this node entity. Note: This enforces a recalculation of the name on invoke.- Parameters:
nodeName
- use this name as the symbolic name of the node in the query- Returns:
- An expression that represents the right identifier type.
-
getIdGeneratorClass
-
getIdGeneratorRef
-
isAssignedId
public boolean isAssignedId()- Returns:
- True, if the ID is assigned to the entity before the entity hits the database, either manually or through a generator.
-
isInternallyGeneratedId
public boolean isInternallyGeneratedId()- Returns:
- True, if the database generated the ID.
-
isExternallyGeneratedId
public boolean isExternallyGeneratedId()- Returns:
- True, if the ID is externally generated.
-
getOptionalGraphPropertyName
An ID description has only a corresponding graph property name when it's bas on an external assigment. An internal id has no corresponding graph property and therefore this method will return an emptyOptional
in such cases.- Returns:
- The name of an optional graph property.
-