javax.jdo.annotations

## Annotation Type Query

-     @Target(value=TYPE)
       @Retention(value=RUNTIME)
       @Repeatable(value=Queries.class)
      public @interface Query

  Annotation for a named query. Corresponds to the xml element "query".
  Since:
    2.1
  Version:
    3.2

- - ### Required Element Summary

    Required Elements
    Modifier and Type | Required Element and Description
    --- | ---
    `String` | `name` Name of the query (mandatory)
    `String` | `value` The query string (mandatory)

  - ### Optional Element Summary

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

- - ### Element Detail

    - #### name

          public abstract String name

      Name of the query (mandatory)
      Returns:
        the name of the query

  - - #### value

          public abstract String value

      The query string (mandatory)
      Returns:
        the query string

  - - #### language

          public abstract String language

      The query language
      Returns:
        the query language
      Default:
        "JDOQL"

  - - #### unmodifiable

          public abstract String unmodifiable

      Whether the query is unmodifiable.
      Returns:
        whether the query is unmodifiable
      Default:
        ""

  - - #### unique

          public abstract String unique

      Whether the query returns a single unique result.
      Returns:
        whether the query returns a single unique result
      Default:
        ""

  - - #### resultClass

          public abstract Class resultClass

      Result class into which to put the results.
      Returns:
        the class of the result
      Default:
        void.class

  - - #### fetchPlan

          public abstract String fetchPlan

      The name of the fetch plan used by this query
      Returns:
        the fetch plan
      Default:
        ""

  - - #### extensions

          public abstract Extension[] extensions

      Vendor extensions.
      Returns:
        the vendor extensions
      Default:
        {}

Copyright © 2005–1970 Apache Software Foundation. All rights reserved.