Package org.neo4j.cypherdsl.core
Class Conditions
- java.lang.Object
-
- org.neo4j.cypherdsl.core.Conditions
-
@API(status=STABLE, since="1.0") public final class Conditions extends ObjectBuilder for various conditions.- Since:
- 1.0
- Author:
- Michael J. Simons, Gerrit Meier, Aakash Sorathiya
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ConditionhasLabelsOrType(SymbolicName symbolicName, String... labelsOrTypes)static ConditionisFalse()static ConditionisTrue()static @NotNull ConditionnoCondition()Creates a placeholder condition which is not rendered in the final statement but is useful while chaining conditions together.static @NotNull Conditionnot(@NotNull Condition condition)Negates 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 Detail
-
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
@NotNull @Contract(pure=true) public static @NotNull Condition 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
public static Condition isTrue()
- Returns:
- a condition that is always true.
-
isFalse
public static Condition isFalse()
- Returns:
- a condition that is always false.
-
hasLabelsOrType
public static Condition hasLabelsOrType(SymbolicName symbolicName, String... labelsOrTypes)
- 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
-
-