Annotation Interface NamedSubgraph
Declares a subgraph as a member element
of a
NamedEntityGraph. The NamedSubgraph is only
referenceable within its containing @NamedEntityGraph
annotation and cannot be referenced independently.
A NamedSubgraph is referenced by name()
from the subgraph element
of a NamedAttributeNode annotation within the parent
NamedEntityGraph.
A NamedSubgraph is reified at runtime as an
instance of Subgraph.
- Since:
- 2.1
- See Also:
- API note:
- Alternatively, use
NamedEntityGraphto declare the subgraph, and useFetchto reference the subgraph by annotating a field of the graphed entity class.
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescription(Required) The list of the attributes of the class that must be included.(Required) The name of the subgraph as referenced from aNamedAttributeNodeelement. -
Optional Element Summary
Optional Elements
-
Element Details
-
name
String name(Required) The name of the subgraph as referenced from aNamedAttributeNodeelement. Subgraph names are scoped to the containingNamedEntityGraph, and must be unique within that graph. -
type
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
-
attributeNodes
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.
-