- All Superinterfaces:
ExposesPatternLengthAccessors<Relationship>,ExposesProperties<Relationship>,ExposesRelationships<RelationshipChain>,IdentifiableElement,Named,PatternElement,PropertyAccessor,PropertyContainer,RelationshipPattern,Visitable
- All Known Implementing Classes:
RelationshipBase
@API(status=STABLE,
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 ClassesModifier and TypeInterfaceDescriptionstatic final classSee RelationshipDetail.static enumWhile the direction in the schema package is centered around the node, the direction here is the direction between two nodes. -
Method Summary
Modifier and TypeMethodDescriptionThe details containing the types, properties and cardinality.getLeft()Returns the left-hand side of this relationship.Returns the quantifier of this relationship if any.getRight()Returns the right-hand side of this relationship.inverse()Creates a new relationship, inverting the direction but keeping the semantics intact ((a) --> (b)becomes(b) <-- (a)).Creates a copy of this relationship with a new symbolic name.named(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, unboundedMethods inherited from interface org.neo4j.cypherdsl.core.ExposesProperties
withProperties, withProperties, withPropertiesMethods inherited from interface org.neo4j.cypherdsl.core.ExposesRelationships
relationshipBetween, relationshipFrom, relationshipTo, relationshipWithMethods inherited from interface org.neo4j.cypherdsl.core.Named
asExpression, getRequiredSymbolicName, getSymbolicNameMethods inherited from interface org.neo4j.cypherdsl.core.PatternElement
whereMethods inherited from interface org.neo4j.cypherdsl.core.PropertyAccessor
property, property, propertyMethods inherited from interface org.neo4j.cypherdsl.core.PropertyContainer
mutate, mutate, project, project, set, setMethods inherited from interface org.neo4j.cypherdsl.core.RelationshipPattern
asCondition, quantify, quantifyRelationship
-
Method Details
-
getLeft
Node getLeft()Returns the left-hand side of this relationship.- Returns:
- the left-hand side of this relationship
-
getDetails
Relationship.Details getDetails()The details containing the types, properties and cardinality.- Returns:
- a wrapper around the details of this relationship.
-
getRight
Node getRight()Returns the right-hand side of this relationship.- Returns:
- the right-hand side of this relationship
-
getQuantifier
QuantifiedPathPattern.Quantifier getQuantifier()Returns the quantifier of this relationship if any.- Returns:
- the quantifier of this relationship if any
-
named
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
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
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
-