Annotation Interface Query


@Retention(RUNTIME) @Target({METHOD,ANNOTATION_TYPE}) @Documented @API(status=STABLE, since="6.0") public @interface Query
Annotation to provide Cypher statements that will be used for executing the method. The Cypher statement may contain named parameters as supported by the >Neo4j Java Driver. Those parameters will get bound to the arguments of the annotated method.
Since:
6.0
Author:
Michael J. Simons
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
     
    The Cypher statement for counting the total number of expected results.
    boolean
     
    boolean
     
    The custom Cypher query to get executed and mapped back, if any return type is defined.
  • Element Details

    • value

      String value
      The custom Cypher query to get executed and mapped back, if any return type is defined.
      Default:
      ""
    • countQuery

      String countQuery
      The Cypher statement for counting the total number of expected results. Only needed for methods returning pages or slices based on custom queries.
      Default:
      ""
    • count

      boolean count
      Returns:
      whether the query defined should be executed as count projection.
      Default:
      false
    • exists

      boolean exists
      Returns:
      whether the query defined should be executed as exists projection.
      Default:
      false
    • delete

      boolean delete
      Returns:
      whether the query defined should be used to delete nodes or relationships.
      Default:
      false