Package org.neo4j.cypherdsl.core
Interface Relationship
-
- All Superinterfaces:
ExposesProperties<Relationship>
,ExposesRelationships<RelationshipChain>
,Named
,PatternElement
,PropertyContainer
,RelationshipPattern
,Visitable
- All Known Implementing Classes:
RelationshipBase
@API(status=EXPERIMENTAL, since="1.0") public interface Relationship extends RelationshipPattern, PropertyContainer, ExposesProperties<Relationship>
See RelationshipPattern.- Since:
- 1.0
- Author:
- Michael J. Simons, Philipp Tölle
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Relationship.Details
See RelationshipDetail.static class
Relationship.Direction
While 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 Relationship.Details
getDetails()
The details contains the types, properties and cardinality.Node
getLeft()
Node
getRight()
Relationship
inverse()
Creates a new relationship, inverting the direction but keeping the semantics intact ((a) --> (b)
becomes(b) <-- (a)
).Relationship
length(java.lang.Integer minimum, java.lang.Integer maximum)
Creates a new relationship with a new lengthRelationship
max(java.lang.Integer maximum)
Creates a new relationship with a new maximum lengthRelationship
min(java.lang.Integer minimum)
Creates a new relationship with a new minimum lengthRelationship
named(java.lang.String newSymbolicName)
Creates a copy of this relationship with a new symbolic name.Relationship
named(SymbolicName newSymbolicName)
Creates a copy of this relationship with a new symbolic name.Relationship
unbounded()
Creates a new relationship with an unbound length minimum length-
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
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
Relationship.Details getDetails()
The details contains the types, properties and cardinality.- Returns:
- A wrapper around the details of this relationship.
-
getRight
Node getRight()
-
named
Relationship named(java.lang.String newSymbolicName)
Creates a copy of this relationship with a new symbolic name.- Specified by:
named
in interfaceRelationshipPattern
- Parameters:
newSymbolicName
- the new symbolic name.- Returns:
- The new relationship.
-
named
Relationship named(SymbolicName newSymbolicName)
Creates a copy of this relationship with a new symbolic name.- Parameters:
newSymbolicName
- the new symbolic name.- Returns:
- The new relationship.
-
unbounded
Relationship unbounded()
Creates a new relationship with an unbound length minimum length- Returns:
- the new relationship
- Since:
- 1.1.1
-
min
Relationship min(java.lang.Integer minimum)
Creates a new relationship with a new minimum length- Parameters:
minimum
- the new minimum- Returns:
- the new relationship
-
max
Relationship max(java.lang.Integer maximum)
Creates a new relationship with a new maximum length- Parameters:
maximum
- the new maximum- Returns:
- the new relationship
-
length
Relationship length(java.lang.Integer minimum, java.lang.Integer maximum)
Creates a new relationship with a new length- Parameters:
minimum
- the new minimummaximum
- the new maximum- 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
-
-