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 theGraphcontract
-
-
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)SubGraphassociated 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)SubGraphassociated with theAttributeNodefor 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 rootGraphif the given name is not null.SubGraphImplementor<J>makeSubGraph(boolean mutable)voidmerge(GraphImplementor<? extends J> other)default voidvisitAttributeNodes(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:GraphCreate a named rootGraphif the given name is not null.- Specified by:
makeRootGraphin interfaceGraph<J>mutable- controls whether the resultingGraphis mutable- Throws:
CannotBecomeEntityGraphException- If the named attribute is not entity-valued
-
makeSubGraph
SubGraphImplementor<J> makeSubGraph(boolean mutable)
Description copied from interface:Graph- Specified by:
makeSubGraphin 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:GraphGet a list of all existing AttributeNodes within this container.- Specified by:
getAttributeNodeListin interfaceGraph<J>
-
findAttributeNode
<AJ> AttributeNodeImplementor<AJ> findAttributeNode(String attributeName)
Description copied from interface:GraphFind an already existing AttributeNode by attributeName within this container- Specified by:
findAttributeNodein interfaceGraph<J>
-
findAttributeNode
<AJ> AttributeNodeImplementor<AJ> findAttributeNode(PersistentAttribute<? extends J,AJ> attribute)
Description copied from interface:GraphFind an already existing AttributeNode by corresponding attribute reference, within this container.- Specified by:
findAttributeNodein interfaceGraph<J>
-
addAttributeNode
<AJ> AttributeNodeImplementor<AJ> addAttributeNode(String attributeName) throws CannotContainSubGraphException
Description copied from interface:GraphAdd anAttributeNode(with no associatedSubGraph) to this container by attribute name.- Specified by:
addAttributeNodein interfaceGraph<J>- Throws:
CannotContainSubGraphException
-
addAttributeNode
<AJ> AttributeNodeImplementor<AJ> addAttributeNode(PersistentAttribute<? extends J,AJ> attribute) throws CannotContainSubGraphException
Description copied from interface:GraphAdd anAttributeNode(with no associatedSubGraph) to this container by attribute reference.- Specified by:
addAttributeNodein 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:GraphCreate and return a new (mutable)SubGraphassociated with the namedAttributeNode.- Specified by:
addSubGraphin interfaceGraph<J>- Throws:
CannotContainSubGraphException
-
addSubGraph
default <AJ> SubGraphImplementor<AJ> addSubGraph(String attributeName, Class<AJ> subType) throws CannotContainSubGraphException
- Specified by:
addSubGraphin interfaceGraph<J>- Throws:
CannotContainSubGraphException
-
addSubGraph
default <AJ> SubGraphImplementor<AJ> addSubGraph(PersistentAttribute<? extends J,AJ> attribute) throws CannotContainSubGraphException
Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with theAttributeNodefor the given attribute.- Specified by:
addSubGraphin interfaceGraph<J>- Throws:
CannotContainSubGraphException
-
addSubGraph
default <AJ> SubGraphImplementor<? extends AJ> addSubGraph(PersistentAttribute<? extends J,AJ> attribute, Class<? extends AJ> subType) throws CannotContainSubGraphException
- Specified by:
addSubGraphin interfaceGraph<J>- Throws:
CannotContainSubGraphException
-
addKeySubGraph
default <AJ> SubGraphImplementor<AJ> addKeySubGraph(String attributeName)
- Specified by:
addKeySubGraphin interfaceGraph<J>
-
addKeySubGraph
default <AJ> SubGraphImplementor<AJ> addKeySubGraph(String attributeName, Class<AJ> subtype)
- Specified by:
addKeySubGraphin interfaceGraph<J>
-
addKeySubGraph
default <AJ> SubGraphImplementor<AJ> addKeySubGraph(PersistentAttribute<? extends J,AJ> attribute)
- Specified by:
addKeySubGraphin interfaceGraph<J>
-
addKeySubGraph
default <AJ> SubGraphImplementor<? extends AJ> addKeySubGraph(PersistentAttribute<? extends J,AJ> attribute, Class<? extends AJ> subType) throws CannotContainSubGraphException
- Specified by:
addKeySubGraphin interfaceGraph<J>- Throws:
CannotContainSubGraphException
-
-