java.lang.Object
org.neo4j.cypherdsl.core.Conditions
Builder for various conditions.
- Since:
- 1.0
- Author:
- Michael J. Simons, Gerrit Meier, Aakash Sorathiya
-
Method Summary
Modifier and TypeMethodDescriptionstatic ConditionhasLabelsOrType(SymbolicName symbolicName, String... labelsOrTypes) static ConditionisFalse()static ConditionisTrue()static Conditionmatching(RelationshipPattern relationshipPattern) static @NotNull ConditionCreates a placeholder condition which is not rendered in the final statement but is useful while chaining conditions together.static @NotNull ConditionNegates the given condition.static @NotNull Conditionnot(@NotNull RelationshipPattern pattern) Negates the given pattern element: The pattern must not matched to be included in the result.
-
Method Details
-
matching
- Parameters:
relationshipPattern- The pattern being evaluated in a condition- Returns:
- A new condition matching the given pattern
-
not
@NotNull @Contract(pure=true) public static @NotNull Condition not(@NotNull @NotNull Condition condition) Negates the given condition.- Parameters:
condition- The condition to negate. Must not be null.- Returns:
- The negated condition.
-
not
@NotNull @Contract(pure=true) public static @NotNull Condition not(@NotNull @NotNull RelationshipPattern pattern) Negates the given pattern element: The pattern must not matched to be included in the result.- Parameters:
pattern- The pattern to negate. Must not be null.- Returns:
- A condition that evaluates to true when the pattern does not match.
-
noCondition
Creates a placeholder condition which is not rendered in the final statement but is useful while chaining conditions together.- Returns:
- A placeholder condition.
-
isTrue
- Returns:
- a condition that is always true.
-
isFalse
- Returns:
- a condition that is always false.
-
hasLabelsOrType
- Parameters:
symbolicName- Reference to the entity that should be checked for labels or typeslabelsOrTypes- the list of labels or types to check for- Returns:
- A condition that checks whether a node has a set of given labels or a relationship a set of given types.
- Since:
- 2021.3.0
-