Annotation Type Query


  • @Retention(RUNTIME)
    @Target(METHOD)
    @Documented
    @Inherited
    public @interface Query
    Defines the query string such as SQL, JPA-QL, Cypher etc that should be executed.
    Since:
    1.0
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.String value  
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String countQuery  
      boolean nativeQuery  
      boolean readOnly  
    • Element Detail

      • value

        java.lang.String value
        Returns:
        The raw query string.
      • countQuery

        java.lang.String countQuery
        Returns:
        The count query used for queries that return a Page
        Default:
        ""
      • nativeQuery

        boolean nativeQuery
        Returns:
        Whether the query is a native query
        Default:
        false
      • readOnly

        boolean readOnly
        Returns:
        Whether the transactional handling should by default be read-only
        Default:
        true