Class Predicates

java.lang.Object
org.neo4j.cypherdsl.core.Predicates

@API(status=STABLE, since="1.0") public final class Predicates extends Object
Factory methods for creating predicates.
Since:
1.0
Author:
Michael J. Simons
  • Method Details

    • exists

      @NotNull @Contract(pure=true) public static @NotNull Condition exists(Property property)
      Creates a new condition based on a function invocation for the exists() function. See exists.
      Parameters:
      property - The property to be passed to exists()
      Returns:
      A function call for exists() for one property
    • exists

      @NotNull @Contract(pure=true) public static @NotNull Condition exists(RelationshipPattern pattern)
      Creates a new condition based on a function invocation for the exists() function. See exists.
      Parameters:
      pattern - The pattern to be passed to exists()
      Returns:
      A function call for exists() for one pattern
    • exists

      public static Condition exists(Statement statement, IdentifiableElement... imports)
      Creates a new condition via an existential sub-query. The statement may or may not have a RETURN clause. It must however not contain any updates. While it would render syntactically correct Cypher, Neo4j does not support updates inside existential sub-queries.
      Parameters:
      statement - The statement to be passed to exists{}
      imports - Optional imports to be used in the statement (will be imported with WITH)
      Returns:
      An existential sub-query.
      Since:
      2023.1.0
    • all

      @NotNull @Contract(pure=true) public static @NotNull Predicates.OngoingListBasedPredicateFunction all(String variable)
      Parameters:
      variable - The variable referring to elements of a list
      Returns:
      A builder for the all() predicate function
      Since:
      1.1
      See Also:
    • all

      @NotNull @Contract(pure=true) public static @NotNull Predicates.OngoingListBasedPredicateFunction all(SymbolicName variable)
      Starts building a new condition based on a function invocation for the all() function. See exists.
      Parameters:
      variable - The variable referring to elements of a list
      Returns:
      A builder for the all() predicate function
      Since:
      1.1
    • any

      @NotNull @Contract(pure=true) public static @NotNull Predicates.OngoingListBasedPredicateFunction any(String variable)
      Parameters:
      variable - The variable referring to elements of a list
      Returns:
      A builder for the any() predicate function
      Since:
      1.1
      See Also:
    • any

      @NotNull @Contract(pure=true) public static @NotNull Predicates.OngoingListBasedPredicateFunction any(SymbolicName variable)
      Starts building a new condition based on a function invocation for the any() function. See exists.
      Parameters:
      variable - The variable referring to elements of a list
      Returns:
      A builder for the any() predicate function
      Since:
      1.1
    • none

      @NotNull @Contract(pure=true) public static @NotNull Predicates.OngoingListBasedPredicateFunction none(String variable)
      Parameters:
      variable - The variable referring to elements of a list
      Returns:
      A builder for the none() predicate function
      Since:
      1.1
      See Also:
    • none

      @NotNull @Contract(pure=true) public static @NotNull Predicates.OngoingListBasedPredicateFunction none(SymbolicName variable)
      Starts building a new condition based on a function invocation for the none() function. See exists.
      Parameters:
      variable - The variable referring to elements of a list
      Returns:
      A builder for the none() predicate function
      Since:
      1.1
    • single

      @NotNull @Contract(pure=true) public static @NotNull Predicates.OngoingListBasedPredicateFunction single(String variable)
      Parameters:
      variable - The variable referring to elements of a list
      Returns:
      A builder for the single() predicate function
      Since:
      1.1
      See Also:
    • single

      @NotNull @Contract(pure=true) public static @NotNull Predicates.OngoingListBasedPredicateFunction single(SymbolicName variable)
      Starts building a new condition based on a function invocation for the single() function. See exists.
      Parameters:
      variable - The variable referring to elements of a list
      Returns:
      A builder for the single() predicate function
      Since:
      1.1