Package org.neo4j.cypherdsl.core
Interface Relationship
-
- All Superinterfaces:
ExposesPatternLengthAccessors<Relationship>,ExposesProperties<Relationship>,ExposesRelationships<RelationshipChain>,IdentifiableElement,Named,PatternElement,PropertyContainer,RelationshipPattern,Visitable
- All Known Implementing Classes:
RelationshipBase
@API(status=EXPERIMENTAL, since="1.0") public interface Relationship extends RelationshipPattern, PropertyContainer, ExposesProperties<Relationship>, ExposesPatternLengthAccessors<Relationship>See RelationshipPattern.- Since:
- 1.0
- Author:
- Michael J. Simons, Philipp Tölle
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classRelationship.DetailsSee RelationshipDetail.static classRelationship.DirectionWhile the direction in the schema package is centered around the node, the direction here is the direction between two nodes.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull Relationship.DetailsgetDetails()The details contains the types, properties and cardinality.NodegetLeft()@NotNull NodegetRight()@NotNull Relationshipinverse()Creates a new relationship, inverting the direction but keeping the semantics intact ((a) --> (b)becomes(b) <-- (a)).@NotNull Relationshipnamed(String newSymbolicName)Creates a copy of this relationship with a new symbolic name.@NotNull Relationshipnamed(SymbolicName newSymbolicName)Creates a copy of this relationship with a new symbolic name.-
Methods inherited from interface org.neo4j.cypherdsl.core.ExposesPatternLengthAccessors
length, max, min, unbounded
-
Methods inherited from interface org.neo4j.cypherdsl.core.ExposesProperties
withProperties, withProperties, withProperties
-
Methods inherited from interface org.neo4j.cypherdsl.core.ExposesRelationships
relationshipBetween, relationshipFrom, relationshipTo
-
Methods inherited from interface org.neo4j.cypherdsl.core.Named
asExpression, getRequiredSymbolicName, getSymbolicName
-
Methods inherited from interface org.neo4j.cypherdsl.core.PropertyContainer
mutate, mutate, project, project, property, property, property
-
Methods inherited from interface org.neo4j.cypherdsl.core.RelationshipPattern
asCondition
-
-
-
-
Method Detail
-
getLeft
Node getLeft()
-
getDetails
@NotNull @Contract(pure=true) @NotNull Relationship.Details getDetails()
The details contains the types, properties and cardinality.- Returns:
- A wrapper around the details of this relationship.
-
getRight
@NotNull @Contract(pure=true) @NotNull Node getRight()
-
named
@NotNull @Contract(pure=true) @NotNull Relationship named(String newSymbolicName)
Creates a copy of this relationship with a new symbolic name.- Specified by:
namedin interfaceRelationshipPattern- Parameters:
newSymbolicName- the new symbolic name.- Returns:
- The new relationship.
-
named
@NotNull @Contract(pure=true) @NotNull Relationship named(SymbolicName newSymbolicName)
Creates a copy of this relationship with a new symbolic name.- Specified by:
namedin interfaceRelationshipPattern- Parameters:
newSymbolicName- the new symbolic name.- Returns:
- The new relationship.
-
inverse
@NotNull @Contract(pure=true) @NotNull Relationship inverse()
Creates a new relationship, inverting the direction but keeping the semantics intact ((a) --> (b)becomes(b) <-- (a)). A symbolic name will be removed from this relationship if any, as the it wouldn't be the same pattern to match against.- Returns:
- the new relationship
-
-