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
Integration version of the
Graph contract- Author:
- Strong Liu, Steve Ebersole, Andrea Boriero
-
Method Summary
Modifier and TypeMethodDescription<AJ> AttributeNodeImplementor<AJ>addAttributeNode(String attributeName) Add anAttributeNode(with no associatedSubGraph) to this container by attribute name.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><AJ> AttributeNodeImplementor<AJ>findOrCreateAttributeNode(PersistentAttribute<? extends J, AJ> attribute) default List<AttributeNode<?>>Get a list of all existing AttributeNodes within this container.makeCopy(boolean mutable) makeRootGraph(String name, boolean mutable) Create a named rootGraphif the given name is not null.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 Details
-
merge
-
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
Description copied from interface:Graph- Specified by:
makeSubGraphin interfaceGraph<J>
-
makeCopy
-
visitAttributeNodes
-
addAttributeNode
-
getAttributeNodeImplementors
List<AttributeNodeImplementor<?>> getAttributeNodeImplementors() -
getAttributeNodeList
Description copied from interface:GraphGet a list of all existing AttributeNodes within this container.- Specified by:
getAttributeNodeListin interfaceGraph<J>
-
findAttributeNode
Description copied from interface:GraphFind an already existing AttributeNode by attributeName within this container- Specified by:
findAttributeNodein interfaceGraph<J>
-
findAttributeNode
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 CannotContainSubGraphExceptionDescription copied from interface:GraphAdd anAttributeNode(with no associatedSubGraph) to this container by attribute reference.- Specified by:
addAttributeNodein interfaceGraph<J>- Throws:
CannotContainSubGraphException
-
findOrCreateAttributeNode
-
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 CannotContainSubGraphExceptionDescription 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
- Specified by:
addKeySubGraphin interfaceGraph<J>
-
addKeySubGraph
- Specified by:
addKeySubGraphin interfaceGraph<J>
-
addKeySubGraph
- 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
-