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 thisnodeand theother.relationshipFrom(Node other, String... types) Starts building an incoming relationship starting at theothernode.relationshipTo(Node other, String... types) Starts building an outgoing relationship to theothernode.default TrelationshipWith(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
-
relationshipFrom
-
relationshipBetween
-
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 fromthisnodetypes- 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
-