javax.jdo.metadata

## Interface QueryMetadata

- All Superinterfaces:
    Metadata

      public interface QueryMetadata
      extends Metadata

  Represents a named query.
  Since:
    3.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getFetchPlan()` Accessor for the name of a fetch plan to use (if any).
    `String` | `getLanguage()` Accessor for the query language.
    `String` | `getName()` Accessor for the name of the query (set on construction).
    `String` | `getQuery()` Accessor for the single-string query.
    `String` | `getResultClass()` Accessor for the result class name for the query.
    `Boolean` | `getUnique()` Accessor for whether results from the query are unique.
    `boolean` | `getUnmodifiable()` Accessor for whether the query is unmodifiable.
    `QueryMetadata` | `setFetchPlan(String fetchPlanName)` Method to set the FetchPlan to use for this named query.
    `QueryMetadata` | `setLanguage(String lang)` Method to set the language of the query.
    `QueryMetadata` | `setQuery(String query)` Method to set the single-string query.
    `QueryMetadata` | `setResultClass(String clsName)` Method to set the result class name for the query.
    `QueryMetadata` | `setUnique(boolean unique)` Method to set if the query results are unique.
    `QueryMetadata` | `setUnmodifiable()` Method to set the query as not being modifiable from now.

    - ### Methods inherited from interface javax.jdo.metadata.Metadata

      `getExtensions, getNumberOfExtensions, getParent, newExtensionMetadata`

- - ### Method Detail

    - #### getName

          String getName()

      Accessor for the name of the query (set on construction).
      Returns:
        The name

    - #### setLanguage

          QueryMetadata setLanguage(String lang)

      Method to set the language of the query.
      Parameters:
        `lang` - Query language
      Returns:
        This metadata object

    - #### getLanguage

          String getLanguage()

      Accessor for the query language.
      Returns:
        The language

    - #### setQuery

          QueryMetadata setQuery(String query)

      Method to set the single-string query.
      Parameters:
        `query` - The query
      Returns:
        This metadata object

    - #### getQuery

          String getQuery()

      Accessor for the single-string query.
      Returns:
        The query

    - #### setResultClass

          QueryMetadata setResultClass(String clsName)

      Method to set the result class name for the query.
      Parameters:
        `clsName` - Result class name
      Returns:
        This metadata object

    - #### getResultClass

          String getResultClass()

      Accessor for the result class name for the query.
      Returns:
        The result class name

    - #### setUnique

          QueryMetadata setUnique(boolean unique)

      Method to set if the query results are unique.
      Parameters:
        `unique` - Whether they are unique
      Returns:
        This metadata object

    - #### getUnique

          Boolean getUnique()

      Accessor for whether results from the query are unique.
      Returns:
        Results are unique?

    - #### setUnmodifiable

          QueryMetadata setUnmodifiable()

      Method to set the query as not being modifiable from now.
      Returns:
        This metadata object

    - #### getUnmodifiable

          boolean getUnmodifiable()

      Accessor for whether the query is unmodifiable.
      Returns:
        Can't be changed?

    - #### setFetchPlan

          QueryMetadata setFetchPlan(String fetchPlanName)

      Method to set the FetchPlan to use for this named query.
      Parameters:
        `fetchPlanName` - name of the FetchPlan
      Returns:
        This metadata object

    - #### getFetchPlan

          String getFetchPlan()

      Accessor for the name of a fetch plan to use (if any).
      Returns:
        The fetch plan name

Copyright © 2005–2022 The Apache Software Foundation. All rights reserved.