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 ElementsModifier and TypeOptional ElementDescriptionbooleanA flag if thevalue()should be used as counting query.The Cypher statement for counting the total number of expected results.booleanA flag if thevalue()should be used as deletion query.booleanA flag if thevalue()should be used as existential query.The custom Cypher query to get executed and mapped back, if any return type is defined.
-
Element Details
-
value
String valueThe custom Cypher query to get executed and mapped back, if any return type is defined.- Returns:
- a Cypher query
- Default:
""
-
countQuery
String countQueryThe Cypher statement for counting the total number of expected results. Only needed for methods returning pages or slices based on custom queries.- Returns:
- a Cypher query for counting entities
- Default:
""
-
count
boolean countA flag if thevalue()should be used as counting query.- Returns:
- whether the query defined should be executed as count projection.
- Default:
false
-
exists
boolean existsA flag if thevalue()should be used as existential query.- Returns:
- whether the query defined should be executed as exists projection.
- Default:
false
-
delete
boolean deleteA flag if thevalue()should be used as deletion query.- Returns:
- whether the query defined should be used to delete nodes or relationships.
- Default:
false
-