Package org.hibernate.graph.spi
Interface GraphImplementor<J>
-
- All Superinterfaces:
Graph<J>
,GraphNode<J>
,GraphNodeImplementor<J>
- All Known Subinterfaces:
RootGraphImplementor<J>
,SubGraphImplementor<J>
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(java.lang.String attributeName)
Add an AttributeNode (with no associated SubGraphNodes) to this container by attribute namedefault <AJ> AttributeNodeImplementor<AJ>
addAttributeNode(Attribute<? extends J,AJ> attribute)
Add an AttributeNode (with no associated SubGraphNode) to this container by Attribute referenceAttributeNodeImplementor<?>
addAttributeNode(AttributeNodeImplementor<?> makeCopy)
<AJ> AttributeNodeImplementor<AJ>
addAttributeNode(PersistentAttributeDescriptor<? extends J,AJ> attribute)
default <AJ> SubGraphImplementor<AJ>
addKeySubGraph(java.lang.String attributeName)
default <AJ> SubGraphImplementor<AJ>
addKeySubGraph(java.lang.String attributeName, java.lang.Class<AJ> subtype)
default <AJ> SubGraphImplementor<AJ>
addKeySubGraph(Attribute<? extends J,AJ> attribute)
default <AJ> SubGraphImplementor<? extends AJ>
addKeySubGraph(Attribute<? extends J,AJ> attribute, java.lang.Class<? extends AJ> subType)
default <AJ> SubGraphImplementor<AJ>
addKeySubGraph(PersistentAttributeDescriptor<? extends J,AJ> attribute)
default <AJ> SubGraphImplementor<? extends AJ>
addKeySubGraph(PersistentAttributeDescriptor<? extends J,AJ> attribute, java.lang.Class<? extends AJ> subType)
default <AJ> SubGraphImplementor<AJ>
addSubGraph(java.lang.String attributeName)
Create a (mutable) SubGraphNode associated with the named AttributeNode.default <AJ> SubGraphImplementor<AJ>
addSubGraph(java.lang.String attributeName, java.lang.Class<AJ> subType)
default <AJ> SubGraphImplementor<AJ>
addSubGraph(Attribute<? extends J,AJ> attribute)
Create a (mutable) SubGraphNode associated with the AttributeNode for the given Attribute.default <AJ> SubGraph<? extends AJ>
addSubGraph(Attribute<? extends J,AJ> attribute, java.lang.Class<? extends AJ> type)
default <AJ> SubGraphImplementor<AJ>
addSubGraph(PersistentAttributeDescriptor<? extends J,AJ> attribute)
default <AJ> SubGraphImplementor<AJ>
addSubGraph(PersistentAttributeDescriptor<? extends J,AJ> attribute, java.lang.Class<AJ> subType)
boolean
appliesTo(java.lang.Class<? super J> javaType)
boolean
appliesTo(ManagedTypeDescriptor<? super J> managedType)
<AJ> AttributeNodeImplementor<AJ>
findAttributeNode(java.lang.String attributeName)
Find an already existing AttributeNode by attributeName within this containerdefault <AJ> AttributeNodeImplementor<AJ>
findAttributeNode(Attribute<? extends J,AJ> attribute)
Find an already existing AttributeNode by corresponding attribute reference, within this container<AJ> AttributeNodeImplementor<AJ>
findAttributeNode(PersistentAttributeDescriptor<? extends J,AJ> attribute)
default <AJ> AttributeNodeImplementor<AJ>
findOrCreateAttributeNode(java.lang.String name)
<AJ> AttributeNodeImplementor<AJ>
findOrCreateAttributeNode(PersistentAttributeDescriptor<? extends J,AJ> attribute)
java.util.List<AttributeNodeImplementor<?>>
getAttributeNodeImplementors()
default java.util.List<AttributeNode<?>>
getAttributeNodeList()
Get a list of all existing AttributeNodes within this containerManagedTypeDescriptor<J>
getGraphedType()
Graphs apply only to ManagedTypes.GraphImplementor<J>
makeCopy(boolean mutable)
RootGraphImplementor<J>
makeRootGraph(java.lang.String name, boolean mutable)
Create a named (if passed `name` != null) root Graph.SubGraphImplementor<J>
makeSubGraph(boolean mutable)
Create a (mutable/immutable) SubGraph based on this Graphvoid
merge(GraphImplementor<J>... others)
SessionFactoryImplementor
sessionFactory()
default void
visitAttributeNodes(java.util.function.Consumer<AttributeNodeImplementor<?>> consumer)
-
Methods inherited from interface org.hibernate.graph.Graph
getGraphAttributeNodes
-
-
-
-
Method Detail
-
appliesTo
boolean appliesTo(ManagedTypeDescriptor<? super J> managedType)
-
appliesTo
boolean appliesTo(java.lang.Class<? super J> javaType)
-
merge
void merge(GraphImplementor<J>... others)
-
sessionFactory
SessionFactoryImplementor sessionFactory()
-
getGraphedType
ManagedTypeDescriptor<J> getGraphedType()
Description copied from interface:Graph
Graphs apply only to ManagedTypes. Returns the ManagedType being graphed here.- Specified by:
getGraphedType
in interfaceGraph<J>
-
makeRootGraph
RootGraphImplementor<J> makeRootGraph(java.lang.String name, boolean mutable) throws CannotBecomeEntityGraphException
Description copied from interface:Graph
Create a named (if passed `name` != null) root Graph. The `mutable` parameter controls whether the created Graph is mutable.- Specified by:
makeRootGraph
in interfaceGraph<J>
- Throws:
CannotBecomeEntityGraphException
- For named attributes that are not entity valued
-
makeSubGraph
SubGraphImplementor<J> makeSubGraph(boolean mutable)
Description copied from interface:Graph
Create a (mutable/immutable) SubGraph based on this Graph- Specified by:
makeSubGraph
in interfaceGraph<J>
-
makeCopy
GraphImplementor<J> makeCopy(boolean mutable)
-
visitAttributeNodes
default void visitAttributeNodes(java.util.function.Consumer<AttributeNodeImplementor<?>> consumer)
-
addAttributeNode
AttributeNodeImplementor<?> addAttributeNode(AttributeNodeImplementor<?> makeCopy)
-
getAttributeNodeImplementors
java.util.List<AttributeNodeImplementor<?>> getAttributeNodeImplementors()
-
getAttributeNodeList
default java.util.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(java.lang.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(PersistentAttributeDescriptor<? extends J,AJ> attribute)
-
findAttributeNode
default <AJ> AttributeNodeImplementor<AJ> findAttributeNode(Attribute<? 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(java.lang.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(PersistentAttributeDescriptor<? extends J,AJ> attribute) throws CannotContainSubGraphException
- Throws:
CannotContainSubGraphException
-
addAttributeNode
default <AJ> AttributeNodeImplementor<AJ> addAttributeNode(Attribute<? 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(java.lang.String name)
-
findOrCreateAttributeNode
<AJ> AttributeNodeImplementor<AJ> findOrCreateAttributeNode(PersistentAttributeDescriptor<? extends J,AJ> attribute)
-
addSubGraph
default <AJ> SubGraphImplementor<AJ> addSubGraph(java.lang.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(java.lang.String attributeName, java.lang.Class<AJ> subType) throws CannotContainSubGraphException
- Specified by:
addSubGraph
in interfaceGraph<J>
- Throws:
CannotContainSubGraphException
-
addSubGraph
default <AJ> SubGraphImplementor<AJ> addSubGraph(PersistentAttributeDescriptor<? extends J,AJ> attribute) throws CannotContainSubGraphException
- Throws:
CannotContainSubGraphException
-
addSubGraph
default <AJ> SubGraphImplementor<AJ> addSubGraph(PersistentAttributeDescriptor<? extends J,AJ> attribute, java.lang.Class<AJ> subType) throws CannotContainSubGraphException
- Throws:
CannotContainSubGraphException
-
addSubGraph
default <AJ> SubGraphImplementor<AJ> addSubGraph(Attribute<? 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> SubGraph<? extends AJ> addSubGraph(Attribute<? extends J,AJ> attribute, java.lang.Class<? extends AJ> type) throws CannotContainSubGraphException
- Specified by:
addSubGraph
in interfaceGraph<J>
- Throws:
CannotContainSubGraphException
-
addKeySubGraph
default <AJ> SubGraphImplementor<AJ> addKeySubGraph(java.lang.String attributeName)
- Specified by:
addKeySubGraph
in interfaceGraph<J>
-
addKeySubGraph
default <AJ> SubGraphImplementor<AJ> addKeySubGraph(java.lang.String attributeName, java.lang.Class<AJ> subtype)
- Specified by:
addKeySubGraph
in interfaceGraph<J>
-
addKeySubGraph
default <AJ> SubGraphImplementor<AJ> addKeySubGraph(PersistentAttributeDescriptor<? extends J,AJ> attribute)
-
addKeySubGraph
default <AJ> SubGraphImplementor<AJ> addKeySubGraph(Attribute<? extends J,AJ> attribute)
- Specified by:
addKeySubGraph
in interfaceGraph<J>
-
addKeySubGraph
default <AJ> SubGraphImplementor<? extends AJ> addKeySubGraph(PersistentAttributeDescriptor<? extends J,AJ> attribute, java.lang.Class<? extends AJ> subType) throws CannotContainSubGraphException
- Throws:
CannotContainSubGraphException
-
addKeySubGraph
default <AJ> SubGraphImplementor<? extends AJ> addKeySubGraph(Attribute<? extends J,AJ> attribute, java.lang.Class<? extends AJ> subType) throws CannotContainSubGraphException
- Specified by:
addKeySubGraph
in interfaceGraph<J>
- Throws:
CannotContainSubGraphException
-
-