Annotation Interface CountQuery


@Retention(RUNTIME) @Target({METHOD,ANNOTATION_TYPE}) @Documented @Query(count=true) public @interface CountQuery
Annotation to declare finder count queries directly on repository methods. Both attributes allow using a placeholder notation of ?0, ?1 and so on.
Since:
1.10
Author:
Fırat KÜÇÜK, Oliver Gierke
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Takes a MongoDB JSON string to define the actual query to be executed.
  • Element Details

    • value

      @AliasFor(annotation=Query.class) String value
      Takes a MongoDB JSON string to define the actual query to be executed. This one will take precedence over the method name then. Alias for Query.value().
      Returns:
      an empty String by default.
      Default:
      ""