- All Superinterfaces:
ExposesRelationships<RelationshipChain>,PatternElement,Visitable
- All Known Subinterfaces:
Relationship
- All Known Implementing Classes:
RelationshipBase,RelationshipChain
@API(status=STABLE,
since="1.0")
public interface RelationshipPattern
extends PatternElement, ExposesRelationships<RelationshipChain>
A shared, public interface for
relationships and chains of relationships.
This interface reassembles the RelationshipPattern.
This interface can be used synonymous with the concept of a Path Pattern.
- Since:
- 1.0
- Author:
- Michael J. Simons
-
Method Summary
Modifier and TypeMethodDescription@NotNull ConditionTransform this pattern into a condition.@NotNull ExposesRelationships<RelationshipChain>Turns the pattern into a named chain of relationships.@NotNull ExposesRelationships<RelationshipChain>named(SymbolicName name) Turns the pattern into a named chain of relationships.default @NotNull PatternElementquantify(QuantifiedPathPattern.Quantifier quantifier) Quantifies the pattern.default @NotNull PatternElementquantifyRelationship(QuantifiedPathPattern.Quantifier quantifier) Quantifies the relationship.Methods inherited from interface org.neo4j.cypherdsl.core.ExposesRelationships
relationshipBetween, relationshipFrom, relationshipTo, relationshipWithMethods inherited from interface org.neo4j.cypherdsl.core.PatternElement
where
-
Method Details
-
named
Turns the pattern into a named chain of relationships.- Parameters:
name- The name to be used.- Returns:
- A named relationship that can be chained with more relationship definitions.
-
named
@NotNull @CheckReturnValue @NotNull ExposesRelationships<RelationshipChain> named(SymbolicName name) Turns the pattern into a named chain of relationships.- Parameters:
name- The name to be used.- Returns:
- A named relationship that can be chained with more relationship definitions.
-
asCondition
Transform this pattern into a condition. All names of the patterns must be known upfront in the final statement, as PatternExpressions are not allowed to introduce new variables.- Returns:
- A condition based on this pattern.
- Since:
- 2021.0.0
-
quantifyRelationship
@NotNull @Contract(pure=true) default @NotNull PatternElement quantifyRelationship(@Nullable QuantifiedPathPattern.Quantifier quantifier) Quantifies the relationship.- Parameters:
quantifier- the quantifier to use- Returns:
- a quantified relationship
- Since:
- 2023.9.0
-
quantify
@NotNull @Contract(pure=true) default @NotNull PatternElement quantify(@Nullable QuantifiedPathPattern.Quantifier quantifier) Quantifies the pattern.- Parameters:
quantifier- the quantifier to use- Returns:
- a quantified path pattern
- Since:
- 2023.9.0
-