Annotation Type Query


  • @Target(TYPE)
    @Retention(RUNTIME)
    @Repeatable(Queries.class)
    public @interface Query
    Annotation for a named query. Corresponds to the xml element "query".
    Since:
    2.1
    Version:
    2.1
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.String name
      Name of the query (mandatory)
      java.lang.String value
      The query string (mandatory)
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      Extension[] extensions
      Vendor extensions.
      java.lang.String fetchPlan
      The name of the fetch plan used by this query
      java.lang.String language
      The query language
      java.lang.Class resultClass
      Result class into which to put the results.
      java.lang.String unique
      Whether the query returns a single unique result.
      java.lang.String unmodifiable
      Whether the query is unmodifiable.
    • Element Detail

      • name

        java.lang.String name
        Name of the query (mandatory)
        Returns:
        the name of the query
      • value

        java.lang.String value
        The query string (mandatory)
        Returns:
        the query string
      • language

        java.lang.String language
        The query language
        Returns:
        the query language
        Default:
        "JDOQL"
      • unmodifiable

        java.lang.String unmodifiable
        Whether the query is unmodifiable.
        Returns:
        whether the query is unmodifiable
        Default:
        ""
      • unique

        java.lang.String unique
        Whether the query returns a single unique result.
        Returns:
        whether the query returns a single unique result
        Default:
        ""
      • resultClass

        java.lang.Class resultClass
        Result class into which to put the results.
        Returns:
        the class of the result
        Default:
        void.class
      • fetchPlan

        java.lang.String fetchPlan
        The name of the fetch plan used by this query
        Returns:
        the fetch plan
        Default:
        ""
      • extensions

        Extension[] extensions
        Vendor extensions.
        Returns:
        the vendor extensions
        Default:
        {}