Module org.neo4j.cypherdsl.core
Package org.neo4j.cypherdsl.core
Interface ExposesRelationships<T extends RelationshipPattern & ExposesPatternLengthAccessors<?>>
- Type Parameters:
T
- The type of the resultingRelationshipPattern
.
- All Known Subinterfaces:
Node
,Relationship
,RelationshipPattern
- All Known Implementing Classes:
NodeBase
,RelationshipBase
,RelationshipChain
@API(status=STABLE,
since="1.0")
public interface ExposesRelationships<T extends RelationshipPattern & ExposesPatternLengthAccessors<?>>
A marker interface for things that expose methods to create new relationships to other elements.
- Since:
- 1.0
- Author:
- Michael J. Simons
-
Method Summary
Modifier and TypeMethodDescriptionrelationshipBetween
(Node other, String... types) Starts building an undirected relationship between thisnode
and theother
.relationshipFrom
(Node other, String... types) Starts building an incoming relationship starting at theother
node
.relationshipTo
(Node other, String... types) Starts building an outgoing relationship to theother
node
.default T
relationshipWith
(Node other, Relationship.Direction direction, String... types) A convenience method for creating relationships between nodes avoiding going through the fluent API by allowing to pass in the type directly.
-
Method Details
-
relationshipTo
Starts building an outgoing relationship to theother
node
.- Parameters:
other
- The other end of the outgoing relationshiptypes
- The types to match- Returns:
- An ongoing relationship definition, that can be used to specify the type
-
relationshipFrom
Starts building an incoming relationship starting at theother
node
.- Parameters:
other
- The source of the incoming relationshiptypes
- The types to match- Returns:
- An ongoing relationship definition, that can be used to specify the type
-
relationshipBetween
Starts building an undirected relationship between thisnode
and theother
.- Parameters:
other
- The other end of the relationshiptypes
- The types to match- Returns:
- An ongoing relationship definition, that can be used to specify the type
-
relationshipWith
A convenience method for creating relationships between nodes avoiding going through the fluent API by allowing to pass in the type directly.- Parameters:
other
- The other end of the relationshipdirection
- The direction of the relationship, seen fromthis
nodetypes
- The type of the relationship to create or the types to match- Returns:
- An ongoing relationship definition, that can be used to specify details of the relationship
- Since:
- 2023.5.0
-