Package org.hibernate.graph
Interface Graph<J>
-
- All Superinterfaces:
GraphNode<J>
- All Known Subinterfaces:
GraphImplementor<J>
,RootGraph<J>
,RootGraphImplementor<J>
,SubGraph<J>
,SubGraphImplementor<J>
public interface Graph<J> extends GraphNode<J>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <AJ> AttributeNode<AJ>
addAttributeNode(java.lang.String attributeName)
Add an AttributeNode (with no associated SubGraphNodes) to this container by attribute name<AJ> AttributeNode<AJ>
addAttributeNode(Attribute<? extends J,AJ> attribute)
Add an AttributeNode (with no associated SubGraphNode) to this container by Attribute reference<AJ> SubGraph<AJ>
addKeySubGraph(java.lang.String attributeName)
<AJ> SubGraph<AJ>
addKeySubGraph(java.lang.String attributeName, java.lang.Class<AJ> type)
<AJ> SubGraph<AJ>
addKeySubGraph(Attribute<? extends J,AJ> attribute)
<AJ> SubGraph<? extends AJ>
addKeySubGraph(Attribute<? extends J,AJ> attribute, java.lang.Class<? extends AJ> type)
<AJ> SubGraph<AJ>
addSubGraph(java.lang.String attributeName)
Create a (mutable) SubGraphNode associated with the named AttributeNode.<AJ> SubGraph<AJ>
addSubGraph(java.lang.String attributeName, java.lang.Class<AJ> type)
<AJ> SubGraph<AJ>
addSubGraph(Attribute<? extends J,AJ> attribute)
Create a (mutable) SubGraphNode associated with the AttributeNode for the given Attribute.<AJ> SubGraph<? extends AJ>
addSubGraph(Attribute<? extends J,AJ> attribute, java.lang.Class<? extends AJ> type)
<AJ> AttributeNode<AJ>
findAttributeNode(java.lang.String attributeName)
Find an already existing AttributeNode by attributeName within this container<AJ> AttributeNode<AJ>
findAttributeNode(Attribute<? extends J,AJ> attribute)
Find an already existing AttributeNode by corresponding attribute reference, within this containerjava.util.List<AttributeNode<?>>
getAttributeNodeList()
Get a list of all existing AttributeNodes within this containerjava.util.List<AttributeNode<?>>
getGraphAttributeNodes()
Ultimately only needed for implementingEntityGraph.getAttributeNodes()
andSubgraph.getAttributeNodes()
ManagedType<J>
getGraphedType()
Graphs apply only to ManagedTypes.Graph<J>
makeCopy(boolean mutable)
RootGraph<J>
makeRootGraph(java.lang.String name, boolean mutable)
Create a named (if passed `name` != null) root Graph.SubGraph<J>
makeSubGraph(boolean mutable)
Create a (mutable/immutable) SubGraph based on this Graph
-
-
-
Method Detail
-
getGraphedType
ManagedType<J> getGraphedType()
Graphs apply only to ManagedTypes. Returns the ManagedType being graphed here.
-
makeRootGraph
RootGraph<J> makeRootGraph(java.lang.String name, boolean mutable) throws CannotBecomeEntityGraphException
Create a named (if passed `name` != null) root Graph. The `mutable` parameter controls whether the created Graph is mutable.- Throws:
CannotBecomeEntityGraphException
- For named attributes that are not entity valued
-
makeSubGraph
SubGraph<J> makeSubGraph(boolean mutable)
Create a (mutable/immutable) SubGraph based on this Graph
-
getGraphAttributeNodes
java.util.List<AttributeNode<?>> getGraphAttributeNodes()
Ultimately only needed for implementingEntityGraph.getAttributeNodes()
andSubgraph.getAttributeNodes()
-
findAttributeNode
<AJ> AttributeNode<AJ> findAttributeNode(java.lang.String attributeName)
Find an already existing AttributeNode by attributeName within this container
-
findAttributeNode
<AJ> AttributeNode<AJ> findAttributeNode(Attribute<? extends J,AJ> attribute)
Find an already existing AttributeNode by corresponding attribute reference, within this container
-
getAttributeNodeList
java.util.List<AttributeNode<?>> getAttributeNodeList()
Get a list of all existing AttributeNodes within this container
-
addAttributeNode
<AJ> AttributeNode<AJ> addAttributeNode(java.lang.String attributeName)
Add an AttributeNode (with no associated SubGraphNodes) to this container by attribute name
-
addAttributeNode
<AJ> AttributeNode<AJ> addAttributeNode(Attribute<? extends J,AJ> attribute)
Add an AttributeNode (with no associated SubGraphNode) to this container by Attribute reference
-
addSubGraph
<AJ> SubGraph<AJ> addSubGraph(java.lang.String attributeName) throws CannotContainSubGraphException
Create a (mutable) SubGraphNode associated with the named AttributeNode. The created SubGraphNode is returned- Throws:
CannotContainSubGraphException
- ApiNote:
- If no such AttributeNode exists yet, it is created.
-
addSubGraph
<AJ> SubGraph<AJ> addSubGraph(java.lang.String attributeName, java.lang.Class<AJ> type) throws CannotContainSubGraphException
- Throws:
CannotContainSubGraphException
-
addSubGraph
<AJ> SubGraph<AJ> addSubGraph(Attribute<? extends J,AJ> attribute) throws CannotContainSubGraphException
Create a (mutable) SubGraphNode associated with the AttributeNode for the given Attribute. The created SubGraphNode is returned- Throws:
CannotContainSubGraphException
- ApiNote:
- If no such AttributeNode exists yet, it is created.
-
addSubGraph
<AJ> SubGraph<? extends AJ> addSubGraph(Attribute<? extends J,AJ> attribute, java.lang.Class<? extends AJ> type) throws CannotContainSubGraphException
- Throws:
CannotContainSubGraphException
-
addKeySubGraph
<AJ> SubGraph<AJ> addKeySubGraph(java.lang.String attributeName) throws CannotContainSubGraphException
- Throws:
CannotContainSubGraphException
-
addKeySubGraph
<AJ> SubGraph<AJ> addKeySubGraph(java.lang.String attributeName, java.lang.Class<AJ> type) throws CannotContainSubGraphException
- Throws:
CannotContainSubGraphException
-
addKeySubGraph
<AJ> SubGraph<AJ> addKeySubGraph(Attribute<? extends J,AJ> attribute) throws CannotContainSubGraphException
- Throws:
CannotContainSubGraphException
-
addKeySubGraph
<AJ> SubGraph<? extends AJ> addKeySubGraph(Attribute<? extends J,AJ> attribute, java.lang.Class<? extends AJ> type) throws CannotContainSubGraphException
- Throws:
CannotContainSubGraphException
-
-