Package org.hibernate.graph.spi
Interface GraphImplementor<J>
-
- All Superinterfaces:
Graph<J>
,GraphNode<J>
,GraphNodeImplementor<J>
- All Known Subinterfaces:
RootGraphImplementor<J>
,SubGraphImplementor<J>
- All Known Implementing Classes:
AbstractGraph
,RootGraphImpl
,SubGraphImpl
public interface GraphImplementor<J> extends Graph<J>, GraphNodeImplementor<J>
Integration version of theGraph
contract
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <AJ> AttributeNodeImplementor<AJ>
addAttributeNode(String attributeName)
Add anAttributeNode
(with no associatedSubGraph
) to this container by attribute name.AttributeNodeImplementor<?>
addAttributeNode(AttributeNodeImplementor<?> makeCopy)
<AJ> AttributeNodeImplementor<AJ>
addAttributeNode(PersistentAttribute<? extends J,AJ> attribute)
Add anAttributeNode
(with no associatedSubGraph
) to this container by attribute reference.default <AJ> SubGraphImplementor<AJ>
addKeySubGraph(String attributeName)
default <AJ> SubGraphImplementor<AJ>
addKeySubGraph(String attributeName, Class<AJ> subtype)
default <AJ> SubGraphImplementor<AJ>
addKeySubGraph(PersistentAttribute<? extends J,AJ> attribute)
default <AJ> SubGraphImplementor<? extends AJ>
addKeySubGraph(PersistentAttribute<? extends J,AJ> attribute, Class<? extends AJ> subType)
default <AJ> SubGraphImplementor<AJ>
addSubGraph(String attributeName)
Create and return a new (mutable)SubGraph
associated with the namedAttributeNode
.default <AJ> SubGraphImplementor<AJ>
addSubGraph(String attributeName, Class<AJ> subType)
default <AJ> SubGraphImplementor<AJ>
addSubGraph(PersistentAttribute<? extends J,AJ> attribute)
Create and return a new (mutable)SubGraph
associated with theAttributeNode
for the given attribute.default <AJ> SubGraphImplementor<? extends AJ>
addSubGraph(PersistentAttribute<? extends J,AJ> attribute, Class<? extends AJ> subType)
<AJ> AttributeNodeImplementor<AJ>
findAttributeNode(String attributeName)
Find an already existing AttributeNode by attributeName within this container<AJ> AttributeNodeImplementor<AJ>
findAttributeNode(PersistentAttribute<? extends J,AJ> attribute)
Find an already existing AttributeNode by corresponding attribute reference, within this container.default <AJ> AttributeNodeImplementor<AJ>
findOrCreateAttributeNode(String name)
<AJ> AttributeNodeImplementor<AJ>
findOrCreateAttributeNode(PersistentAttribute<? extends J,AJ> attribute)
List<AttributeNodeImplementor<?>>
getAttributeNodeImplementors()
default List<AttributeNode<?>>
getAttributeNodeList()
Get a list of all existing AttributeNodes within this container.GraphImplementor<J>
makeCopy(boolean mutable)
RootGraphImplementor<J>
makeRootGraph(String name, boolean mutable)
Create a named rootGraph
if the given name is not null.SubGraphImplementor<J>
makeSubGraph(boolean mutable)
void
merge(GraphImplementor<? extends J> other)
default void
visitAttributeNodes(Consumer<AttributeNodeImplementor<?>> consumer)
-
Methods inherited from interface org.hibernate.graph.Graph
addPluralSubgraph, getGraphAttributeNodes, getGraphedType
-
-
-
-
Method Detail
-
merge
void merge(GraphImplementor<? extends J> other)
-
makeRootGraph
RootGraphImplementor<J> makeRootGraph(String name, boolean mutable) throws CannotBecomeEntityGraphException
Description copied from interface:Graph
Create a named rootGraph
if the given name is not null.- Specified by:
makeRootGraph
in interfaceGraph<J>
mutable
- controls whether the resultingGraph
is mutable- Throws:
CannotBecomeEntityGraphException
- If the named attribute is not entity-valued
-
makeSubGraph
SubGraphImplementor<J> makeSubGraph(boolean mutable)
Description copied from interface:Graph
- Specified by:
makeSubGraph
in interfaceGraph<J>
-
makeCopy
GraphImplementor<J> makeCopy(boolean mutable)
-
visitAttributeNodes
default void visitAttributeNodes(Consumer<AttributeNodeImplementor<?>> consumer)
-
addAttributeNode
AttributeNodeImplementor<?> addAttributeNode(AttributeNodeImplementor<?> makeCopy)
-
getAttributeNodeImplementors
List<AttributeNodeImplementor<?>> getAttributeNodeImplementors()
-
getAttributeNodeList
default List<AttributeNode<?>> getAttributeNodeList()
Description copied from interface:Graph
Get a list of all existing AttributeNodes within this container.- Specified by:
getAttributeNodeList
in interfaceGraph<J>
-
findAttributeNode
<AJ> AttributeNodeImplementor<AJ> findAttributeNode(String attributeName)
Description copied from interface:Graph
Find an already existing AttributeNode by attributeName within this container- Specified by:
findAttributeNode
in interfaceGraph<J>
-
findAttributeNode
<AJ> AttributeNodeImplementor<AJ> findAttributeNode(PersistentAttribute<? extends J,AJ> attribute)
Description copied from interface:Graph
Find an already existing AttributeNode by corresponding attribute reference, within this container.- Specified by:
findAttributeNode
in interfaceGraph<J>
-
addAttributeNode
<AJ> AttributeNodeImplementor<AJ> addAttributeNode(String attributeName) throws CannotContainSubGraphException
Description copied from interface:Graph
Add anAttributeNode
(with no associatedSubGraph
) to this container by attribute name.- Specified by:
addAttributeNode
in interfaceGraph<J>
- Throws:
CannotContainSubGraphException
-
addAttributeNode
<AJ> AttributeNodeImplementor<AJ> addAttributeNode(PersistentAttribute<? extends J,AJ> attribute) throws CannotContainSubGraphException
Description copied from interface:Graph
Add anAttributeNode
(with no associatedSubGraph
) to this container by attribute reference.- Specified by:
addAttributeNode
in interfaceGraph<J>
- Throws:
CannotContainSubGraphException
-
findOrCreateAttributeNode
default <AJ> AttributeNodeImplementor<AJ> findOrCreateAttributeNode(String name)
-
findOrCreateAttributeNode
<AJ> AttributeNodeImplementor<AJ> findOrCreateAttributeNode(PersistentAttribute<? extends J,AJ> attribute)
-
addSubGraph
default <AJ> SubGraphImplementor<AJ> addSubGraph(String attributeName) throws CannotContainSubGraphException
Description copied from interface:Graph
Create and return a new (mutable)SubGraph
associated with the namedAttributeNode
.- Specified by:
addSubGraph
in interfaceGraph<J>
- Throws:
CannotContainSubGraphException
-
addSubGraph
default <AJ> SubGraphImplementor<AJ> addSubGraph(String attributeName, Class<AJ> subType) throws CannotContainSubGraphException
- Specified by:
addSubGraph
in interfaceGraph<J>
- Throws:
CannotContainSubGraphException
-
addSubGraph
default <AJ> SubGraphImplementor<AJ> addSubGraph(PersistentAttribute<? extends J,AJ> attribute) throws CannotContainSubGraphException
Description copied from interface:Graph
Create and return a new (mutable)SubGraph
associated with theAttributeNode
for the given attribute.- Specified by:
addSubGraph
in interfaceGraph<J>
- Throws:
CannotContainSubGraphException
-
addSubGraph
default <AJ> SubGraphImplementor<? extends AJ> addSubGraph(PersistentAttribute<? extends J,AJ> attribute, Class<? extends AJ> subType) throws CannotContainSubGraphException
- Specified by:
addSubGraph
in interfaceGraph<J>
- Throws:
CannotContainSubGraphException
-
addKeySubGraph
default <AJ> SubGraphImplementor<AJ> addKeySubGraph(String attributeName)
- Specified by:
addKeySubGraph
in interfaceGraph<J>
-
addKeySubGraph
default <AJ> SubGraphImplementor<AJ> addKeySubGraph(String attributeName, Class<AJ> subtype)
- Specified by:
addKeySubGraph
in interfaceGraph<J>
-
addKeySubGraph
default <AJ> SubGraphImplementor<AJ> addKeySubGraph(PersistentAttribute<? extends J,AJ> attribute)
- Specified by:
addKeySubGraph
in interfaceGraph<J>
-
addKeySubGraph
default <AJ> SubGraphImplementor<? extends AJ> addKeySubGraph(PersistentAttribute<? extends J,AJ> attribute, Class<? extends AJ> subType) throws CannotContainSubGraphException
- Specified by:
addKeySubGraph
in interfaceGraph<J>
- Throws:
CannotContainSubGraphException
-
-