javax.persistence

## Annotation Type NamedSubgraph

-     @Target(value={})
      @Retention(value=RUNTIME)
      public @interface NamedSubgraph

  A `NamedSubgraph` is a member element of a `NamedEntityGraph`. The `NamedSubgraph` is only referenced from within a NamedEntityGraph and can not be referenced independently. It is referenced by its `name` from a `NamedAttributeNode` element of the `NamedEntityGraph`.
  Since:
    Java Persistence 2.1
  See Also:
    `NamedEntityGraph`, `NamedAttributeNode`

- - ### Required Element Summary

    Required Elements
    Modifier and Type | Required Element and Description
    --- | ---
    `NamedAttributeNode[]` | `attributeNodes` (Required) The list of the attributes of the class that must be included.
    `String` | `name` (Required) The name of the subgraph as referenced from a NamedAttributeNode element.

  - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element and Description
    --- | ---
    `Class` | `type` (Optional) The type represented by this subgraph.

- - ### Element Detail

    - #### name

          public abstract String name

      (Required) The name of the subgraph as referenced from a NamedAttributeNode element.

    - #### attributeNodes

          public abstract NamedAttributeNode[] attributeNodes

      (Required) The list of the attributes of the class that must be included. If the named subgraph corresponds to a subclass of the class referenced by the corresponding attribute node, then only subclass-specific attributes are listed.

    - #### type

          public abstract Class type

      (Optional) The type represented by this subgraph. The element must be specified when this subgraph is extending a definition on behalf of a subclass.
      Default:
        void.class

Copyright © 1996-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.