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 the Graph contract
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <AJ> AttributeNodeImplementor<AJ>
addAttributeNode(String attributeName)
Add an AttributeNode (with no associated SubGraphNodes) to this container by attribute nameAttributeNodeImplementor<?>
addAttributeNode(AttributeNodeImplementor<?> makeCopy)
<AJ> AttributeNodeImplementor<AJ>
addAttributeNode(PersistentAttribute<? extends J,AJ> attribute)
Add an AttributeNode (with no associated SubGraphNode) to this container by Attribute referencedefault <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 a (mutable) SubGraphNode associated with the named AttributeNode.default <AJ> SubGraphImplementor<AJ>
addSubGraph(String attributeName, Class<AJ> subType)
default <AJ> SubGraphImplementor<AJ>
addSubGraph(PersistentAttribute<? extends J,AJ> attribute)
Create a (mutable) SubGraphNode associated with the AttributeNode for the given Attribute.default <AJ> SubGraphImplementor<? extends AJ>
addSubGraph(PersistentAttribute<? extends J,AJ> attribute, Class<? extends AJ> subType)
boolean
appliesTo(Class<? super J> javaType)
boolean
appliesTo(ManagedDomainType<? super J> managedType)
<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 containerdefault <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 containerJpaMetamodel
jpaMetamodel()
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<J>... others)
default void
visitAttributeNodes(Consumer<AttributeNodeImplementor<?>> consumer)
-
Methods inherited from interface org.hibernate.graph.Graph
getGraphAttributeNodes, getGraphedType
-
-
-
-
Method Detail
-
appliesTo
boolean appliesTo(ManagedDomainType<? super J> managedType)
-
merge
void merge(GraphImplementor<J>... others)
-
jpaMetamodel
JpaMetamodel jpaMetamodel()
-
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 an AttributeNode (with no associated SubGraphNodes) 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 an AttributeNode (with no associated SubGraphNode) 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 a (mutable) SubGraphNode associated with the named AttributeNode. The created SubGraphNode is returned- 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 a (mutable) SubGraphNode associated with the AttributeNode for the given Attribute. The created SubGraphNode is returned- 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
-
-