Interface AttributeNode<J>
- Type Parameters:
J- The type of the attribute
- All Superinterfaces:
AttributeNode<J>, GraphNode<J>
- All Known Subinterfaces:
AttributeNodeImplementor<J,E, K>
Represents a fetched attribute in an
entity graph.
An AttributeNode representing an attribute whose type is a managed type or collection
of some managed type may have an associated value subgraph, which is represented by
an instance of SubGraph.
- For a singular attribute, the value type is the type of the attribute.
- For a plural attribute, the value type is the collection element type.
Or, if the represented attribute is a Map, the AttributeNode maye have an
associated key subgraph, similarly represented by a SubGraph.
Not every attribute node has a subgraph.
Extends the JPA-defined AttributeNode with additional operations.
- API Note:
- Historically, this interface declared operations with incorrect generic types, leading to unsound code. This was in Hibernate 7, with possible breakage to older code.
-
Method Summary
Modifier and TypeMethodDescriptionThePersistentAttributerepresented by this node.All key subgraphs rooted at this node.All key subgraphs rooted at this node.All value subgraphs rooted at this node.All value subgraphs rooted at this node.booleanWhether this attribute was removed.SubGraph<?> Deprecated.This operation is not properly type safe.<S> SubGraph<S> makeKeySubGraph(Class<S> subtype) Deprecated.This operation is not properly type safe.SubGraph<?> Deprecated.This operation is not properly type safe.<S> SubGraph<S> makeSubGraph(Class<S> subtype) Deprecated.This operation is not properly type safe.Methods inherited from interface AttributeNode
getAttributeName
-
Method Details
-
getAttributeDescriptor
PersistentAttribute<?,J> getAttributeDescriptor()ThePersistentAttributerepresented by this node. -
isRemoved
boolean isRemoved()Whether this attribute was removed. Per the Jakarta Persistence specification, such nodes should actually suppress inclusion of the attribute mapped for eager fetching when the graph is used as a load graph. -
getSubGraphs
-
getKeySubGraphs
-
getSubgraphs
All value subgraphs rooted at this node.Includes treated subgraphs.
- Specified by:
getSubgraphsin interfaceAttributeNode<J>- See Also:
- API Note:
- This operation is declared with raw types by JPA
-
getKeySubgraphs
All key subgraphs rooted at this node.Includes treated subgraphs.
- Specified by:
getKeySubgraphsin interfaceAttributeNode<J>- See Also:
- API Note:
- This operation is declared with raw types by JPA
-
makeSubGraph
-
makeKeySubGraph
-
makeSubGraph
Deprecated.This operation is not properly type safe. Note thatgraph.addAttributeNode(att).makeSubGraph(cl)is a synonym forgraph.addTreatedSubgraph(att,cl).Create and return a new valueSubGraphrooted at this node, with the given type, which may be a subtype of the value type, or return an existing suchSubGraphif there is one.If the given type is a proper subtype of the value type, the result is a treated subgraph.
- Parameters:
subtype- The type or treated type of the value type- See Also:
-
makeKeySubGraph
Deprecated.This operation is not properly type safe. Note thatgraph.addAttributeNode(att).makeKeySubGraph(cl)is a synonym forgraph.addTreatedMapKeySubgraph(att,cl).Create and return a new valueSubGraphrooted at this node, with the given type, which may be a subtype of the key type, or return an existing suchSubGraphif there is one.If the given type is a proper subtype of the key type, the result is a treated subgraph.
- Parameters:
subtype- The type or treated type of the key type- See Also:
-