Class GraphImpl<J>
- All Implemented Interfaces:
Graph<J>,Graph<J>,GraphNode<J>,GraphImplementor<J>,GraphNodeImplementor<J>
- Direct Known Subclasses:
RootGraphImpl,SubGraphImpl
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedGraphImpl(GraphImplementor<J> graph, boolean mutable) GraphImpl(ManagedDomainType<J> managedType, boolean mutable) protectedGraphImpl(ManagedDomainType<J> managedType, GraphImplementor<J> graph, boolean mutable) -
Method Summary
Modifier and TypeMethodDescription<Y> AttributeNodeImplementor<Y, ?, ?> addAttributeNode(Attribute<? super J, Y> attribute) Add anAttributeNoderepresenting the givenAttributeto this node of the graph without creating any associatedSubGraph.<AJ> AttributeNodeImplementor<AJ, ?, ?> addAttributeNode(String attributeName) <AJ> AttributeNodeImplementor<AJ, ?, ?> addAttributeNode(PersistentAttribute<? super J, AJ> attribute) final voidaddAttributeNodes(Attribute<? super J, ?>... attributes) voidaddAttributeNodes(String... attributeNames) <E> SubGraphImplementor<E> addElementSubgraph(PluralAttribute<? super J, ?, E> attribute) <X> SubGraphImplementor<X> addElementSubgraph(String attributeName) Create and return a new (mutable)SubGraphassociated with the element of the namedPluralAttribute, or return an existing suchSubGraphif there is one.<X> SubGraphImplementor<X> addElementSubgraph(String attributeName, Class<X> type) Create and return a new (mutable)SubGraphassociated with the element of the namedPluralAttribute, and with the given type, which may be a subtype of the element type, or return an existing suchSubGraphif there is one.<X> SubGraphImplementor<X> addKeySubgraph(String attributeName) <X> SubGraphImplementor<X> addKeySubgraph(String attributeName, Class<X> type) <AJ> SubGraphImplementor<AJ> addKeySubGraph(String attributeName) <AJ> SubGraphImplementor<AJ> addKeySubGraph(String attributeName, Class<AJ> subtype) <AJ> SubGraphImplementor<AJ> addKeySubGraph(MapPersistentAttribute<? super J, ? super AJ, ?> attribute, Class<AJ> subtype) <K> SubGraphImplementor<K> addMapKeySubgraph(MapAttribute<? super J, K, ?> attribute) <X> SubGraphImplementor<X> addSubgraph(Attribute<? super J, X> attribute) <X> SubGraphImplementor<X> addSubgraph(String attributeName) <X> SubGraphImplementor<X> addSubgraph(String attributeName, Class<X> type) <AJ> SubGraphImplementor<AJ> addSubGraph(String attributeName) <AJ> SubGraphImplementor<AJ> addSubGraph(String attributeName, Class<AJ> subtype) <AJ> SubGraphImplementor<AJ> addSubGraph(PersistentAttribute<? super J, ? super AJ> attribute, Class<AJ> subtype) Create and return a new (mutable)SubGraphassociated with the givenPersistentAttribute, and with the given type, which may be a subtype of the attribute type, or return an existing suchSubGraphif there is one.<AJ> SubGraphImplementor<AJ> addSubGraph(PersistentAttribute<? super J, AJ> attribute) <AJ> SubGraph<AJ> addTreatedElementSubgraph(PluralAttribute<? super J, ?, ? super AJ> attribute, ManagedType<AJ> type) <E> SubGraphImplementor<E> addTreatedElementSubgraph(PluralAttribute<? super J, ?, ? super E> attribute, Class<E> type) <AJ> SubGraphImplementor<AJ> addTreatedMapKeySubgraph(MapAttribute<? super J, ? super AJ, ?> attribute, ManagedType<AJ> type) <K> SubGraphImplementor<K> addTreatedMapKeySubgraph(MapAttribute<? super J, ? super K, ?> attribute, Class<K> type) <AJ> SubGraphImplementor<AJ> addTreatedSubgraph(Attribute<? super J, ? super AJ> attribute, ManagedType<AJ> type) <Y> SubGraphImplementor<Y> addTreatedSubgraph(Attribute<? super J, ? super Y> attribute, Class<Y> type) <S extends J>
SubGraphImplementor<S> addTreatedSubgraph(ManagedType<S> type) <S extends J>
SubGraphImplementor<S> addTreatedSubgraph(Class<S> type) <AJ> AttributeNodeImplementor<AJ, ?, ?> findAttributeNode(String attributeName) Find an existingAttributeNodeby name within this container.<AJ> AttributeNodeImplementor<AJ, ?, ?> findAttributeNode(PersistentAttribute<? super J, AJ> attribute) Find an existingAttributeNodeby corresponding attribute reference, within this container.<AJ> AttributeNodeImplementor<AJ, ?, ?> findOrCreateAttributeNode(String attributeName) <AJ> AttributeNodeImplementor<AJ, ?, ?> findOrCreateAttributeNode(PersistentAttribute<? super J, AJ> attribute) <Y> AttributeNodeImplementor<Y, ?, ?> getAttributeNode(Attribute<? super J, Y> attribute) Find an existingAttributeNodeby corresponding attribute reference, within this container.<Y> AttributeNodeImplementor<Y, ?, ?> getAttributeNode(String attributeName) Find an existingAttributeNodeby name within this container.List<AttributeNodeImplementor<?, ?, ?>> All nodes belonging to this container.List<AttributeNode<?>> final ManagedDomainType<J> The managed type of the node.Map<PersistentAttribute<? super J, ?>, AttributeNodeImplementor<?, ?, ?>> getNodes()Map<Class<? extends J>, SubGraphImplementor<? extends J>> makeRootGraph(String name, boolean mutable) Deprecated, for removal: This API element is subject to removal in a future version.voidmerge(GraphImplementor<J> graph) voidmergeInternal(GraphImplementor<J> graph) voidremoveAttributeNode(Attribute<? super J, ?> attribute) voidremoveAttributeNode(String attributeName) voidtoString()Methods inherited from class org.hibernate.graph.internal.AbstractGraphNode
isMutable, verifyMutabilityMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.hibernate.graph.Graph
addKeySubgraph, addKeySubgraph, addPluralSubgraph, addSubgraphMethods inherited from interface org.hibernate.graph.spi.GraphImplementor
hasAttributeNode, hasAttributeNode, makeCopy, makeSubGraphMethods inherited from interface org.hibernate.graph.spi.GraphNodeImplementor
makeCopy
-
Constructor Details
-
GraphImpl
-
GraphImpl
-
GraphImpl
-
-
Method Details
-
getGraphedType
Description copied from interface:GraphThe managed type of the node.- Specified by:
getGraphedTypein interfaceGraph<J>- Returns:
- the
ManagedTypebeing graphed here.
-
makeRootGraph
@Deprecated(forRemoval=true) public RootGraphImplementor<J> makeRootGraph(String name, boolean mutable) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:GraphCreate a named root graph representing this node.- Specified by:
makeRootGraphin interfaceGraph<J>- Specified by:
makeRootGraphin interfaceGraphImplementor<J>- Parameters:
mutable- controls whether the resulting graph is mutable
-
merge
- Specified by:
mergein interfaceGraphImplementor<J>
-
mergeInternal
- Specified by:
mergeInternalin interfaceGraphImplementor<J>
-
getAttributeNodeList
Description copied from interface:GraphAll nodes belonging to this container.- Specified by:
getAttributeNodeListin interfaceGraph<J>- Specified by:
getAttributeNodeListin interfaceGraphImplementor<J>- See Also:
-
findAttributeNode
Description copied from interface:GraphFind an existingAttributeNodeby name within this container.- Specified by:
findAttributeNodein interfaceGraph<J>- Specified by:
findAttributeNodein interfaceGraphImplementor<J>
-
getAttributeNode
Description copied from interface:GraphFind an existingAttributeNodeby name within this container.- Specified by:
getAttributeNodein interfaceGraph<J>- Specified by:
getAttributeNodein interfaceGraph<J>- Specified by:
getAttributeNodein interfaceGraphImplementor<J>
-
findAttributeNode
public <AJ> AttributeNodeImplementor<AJ,?, findAttributeNode?> (PersistentAttribute<? super J, AJ> attribute) Description copied from interface:GraphFind an existingAttributeNodeby corresponding attribute reference, within this container.- Specified by:
findAttributeNodein interfaceGraph<J>- Specified by:
findAttributeNodein interfaceGraphImplementor<J>
-
getAttributeNode
Description copied from interface:GraphFind an existingAttributeNodeby corresponding attribute reference, within this container.- Specified by:
getAttributeNodein interfaceGraph<J>- Specified by:
getAttributeNodein interfaceGraph<J>- Specified by:
getAttributeNodein interfaceGraphImplementor<J>
-
getAttributeNodes
- Specified by:
getAttributeNodesin interfaceGraph<J>
-
getNodes
- Specified by:
getNodesin interfaceGraphImplementor<J>
-
addAttributeNode
- Specified by:
addAttributeNodein interfaceGraph<J>
-
addAttributeNode
public <AJ> AttributeNodeImplementor<AJ,?, addAttributeNode?> (PersistentAttribute<? super J, AJ> attribute) - Specified by:
addAttributeNodein interfaceGraphImplementor<J>
-
addAttributeNode
Description copied from interface:GraphAdd anAttributeNoderepresenting the givenAttributeto this node of the graph without creating any associatedSubGraph.- Specified by:
addAttributeNodein interfaceGraph<J>- Specified by:
addAttributeNodein interfaceGraph<J>- Specified by:
addAttributeNodein interfaceGraphImplementor<J>
-
addAttributeNodes
- Specified by:
addAttributeNodesin interfaceGraph<J>
-
addAttributeNodes
- Specified by:
addAttributeNodesin interfaceGraph<J>
-
removeAttributeNode
- Specified by:
removeAttributeNodein interfaceGraph<J>
-
removeAttributeNode
- Specified by:
removeAttributeNodein interfaceGraph<J>
-
removeAttributeNodes
- Specified by:
removeAttributeNodesin interfaceGraph<J>
-
findOrCreateAttributeNode
public <AJ> AttributeNodeImplementor<AJ,?, findOrCreateAttributeNode?> (PersistentAttribute<? super J, AJ> attribute) - Specified by:
findOrCreateAttributeNodein interfaceGraphImplementor<J>
-
findOrCreateAttributeNode
- Specified by:
findOrCreateAttributeNodein interfaceGraphImplementor<J>
-
addSubgraph
Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the namedAttribute, or return an existing suchSubGraphif there is one.- Specified by:
addSubgraphin interfaceGraph<J>- Specified by:
addSubgraphin interfaceGraph<J>- Specified by:
addSubgraphin interfaceGraphImplementor<J>- Parameters:
attributeName- The name of an attribute of the represented type
-
addSubgraph
Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the namedAttribute, and with the given type, which may be a subtype of the attribute type, or return an existing suchSubGraphif there is one.If the given type is a proper subtype of the attribute type, the result is a treated subgraph.
- Specified by:
addSubgraphin interfaceGraph<J>- Specified by:
addSubgraphin interfaceGraph<J>- Specified by:
addSubgraphin interfaceGraphImplementor<J>- Parameters:
attributeName- The name of an attribute of the represented typetype- A subtype of the attribute type
-
addSubgraph
Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the givenAttributeof the represented type, or return an existing suchSubGraphif there is one.- Specified by:
addSubgraphin interfaceGraph<J>- Specified by:
addSubgraphin interfaceGraph<J>- Specified by:
addSubgraphin interfaceGraphImplementor<J>- Parameters:
attribute- An attribute of the represented type- See Also:
-
addSubGraph
Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the namedAttribute, or return an existing suchSubGraphif there is one.- Specified by:
addSubGraphin interfaceGraph<J>- Specified by:
addSubGraphin interfaceGraphImplementor<J>- Parameters:
attributeName- The name of an attribute of the represented type
-
addSubGraph
Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the namedAttribute, and with the given type, which may be a subtype of the attribute type, or return an existing suchSubGraphif there is one.If the given type is a proper subtype of the attribute type, the result is a treated subgraph.
- Specified by:
addSubGraphin interfaceGraph<J>- Specified by:
addSubGraphin interfaceGraphImplementor<J>- Parameters:
attributeName- The name of an attribute of the represented typesubtype- A subtype of the attribute type
-
addSubGraph
Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the givenAttributeof the represented type, or return an existing suchSubGraphif there is one.- Specified by:
addSubGraphin interfaceGraph<J>- Specified by:
addSubGraphin interfaceGraphImplementor<J>- Parameters:
attribute- An attribute of the represented type- See Also:
-
addSubGraph
public <AJ> SubGraphImplementor<AJ> addSubGraph(PersistentAttribute<? super J, ? super AJ> attribute, Class<AJ> subtype) Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the givenPersistentAttribute, and with the given type, which may be a subtype of the attribute type, or return an existing suchSubGraphif there is one.If the given type is a proper subtype of the attribute type, the result is a treated subgraph.
- Specified by:
addSubGraphin interfaceGraph<J>- Specified by:
addSubGraphin interfaceGraphImplementor<J>- Parameters:
attribute- An attribute of the represented typesubtype- A subtype of the attribute type- See Also:
-
addTreatedSubgraph
public <AJ> SubGraphImplementor<AJ> addTreatedSubgraph(Attribute<? super J, ? super AJ> attribute, ManagedType<AJ> type) Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the givenAttribute, and with the given type, which may be a subtype of the attribute type, or return an existing suchSubGraphif there is one.If the given type is a proper subtype of the attribute type, the result is a treated subgraph.
- Specified by:
addTreatedSubgraphin interfaceGraph<J>- Specified by:
addTreatedSubgraphin interfaceGraphImplementor<J>- Parameters:
attribute- An attribute of the represented typetype- A subtype of the attribute type
-
addElementSubgraph
Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the element of the namedPluralAttribute, or return an existing suchSubGraphif there is one.- Specified by:
addElementSubgraphin interfaceGraph<J>- Specified by:
addElementSubgraphin interfaceGraph<J>- Parameters:
attributeName- The name of a collection-valued attribute of the represented type
-
addElementSubgraph
Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the element of the namedPluralAttribute, and with the given type, which may be a subtype of the element type, or return an existing suchSubGraphif there is one.If the given type is a proper subtype of the attribute type, the result is a treated subgraph.
- Specified by:
addElementSubgraphin interfaceGraph<J>- Specified by:
addElementSubgraphin interfaceGraph<J>- Parameters:
attributeName- The name of a collection-valued attribute of the represented typetype- A subtype of the element type
-
addElementSubgraph
Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the element of the given collection, or return an existing suchSubGraphif there is one.- Specified by:
addElementSubgraphin interfaceGraph<J>- Specified by:
addElementSubgraphin interfaceGraph<J>- Parameters:
attribute- A collection-valued attribute of the represented type
-
addTreatedElementSubgraph
public <E> SubGraphImplementor<E> addTreatedElementSubgraph(PluralAttribute<? super J, ?, ? super E> attribute, Class<E> type) Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the element of the given collection, and with the given type, which may be a subtype of the element type, or return an existing suchSubGraphif there is one.If the given type is a proper subtype of the element type, the result is a treated subgraph.
- Specified by:
addTreatedElementSubgraphin interfaceGraph<J>- Specified by:
addTreatedElementSubgraphin interfaceGraph<J>- Specified by:
addTreatedElementSubgraphin interfaceGraphImplementor<J>- Parameters:
attribute- A collection-valued attribute of the represented typetype- A subtype of the element type
-
addTreatedElementSubgraph
public <AJ> SubGraph<AJ> addTreatedElementSubgraph(PluralAttribute<? super J, ?, ? super AJ> attribute, ManagedType<AJ> type) Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the element of the given collection, and with the given type, which may be a subtype of the attribute type, or return an existing suchSubGraphif there is one.If the given type is a proper subtype of the element type, the result is a treated subgraph.
- Specified by:
addTreatedElementSubgraphin interfaceGraph<J>- Specified by:
addTreatedElementSubgraphin interfaceGraphImplementor<J>- Parameters:
attribute- A collection-valued attribute of the represented typetype- A subtype of the element type
-
addKeySubgraph
Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the key of the named map or return an existing suchSubGraphif there is one.- Specified by:
addKeySubgraphin interfaceGraph<J>- Specified by:
addKeySubgraphin interfaceGraph<J>- Specified by:
addKeySubgraphin interfaceGraphImplementor<J>- Parameters:
attributeName- The name of an attribute of the represented type
-
addKeySubgraph
Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the key of the named map, and with the given type, which may be a subtype of the attribute type, or return an existing suchSubGraphif there is one.- Specified by:
addKeySubgraphin interfaceGraph<J>- Specified by:
addKeySubgraphin interfaceGraph<J>- Specified by:
addKeySubgraphin interfaceGraphImplementor<J>- Parameters:
attributeName- The name of a map-valued attribute of the represented typetype- A subtype of the key type
-
addKeySubGraph
Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the key of the named map or return an existing suchSubGraphif there is one.- Specified by:
addKeySubGraphin interfaceGraph<J>- Specified by:
addKeySubGraphin interfaceGraphImplementor<J>- Parameters:
attributeName- The name of an attribute of the represented type
-
addKeySubGraph
Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the key of the named map, and with the given type, which may be a subtype of the attribute type, or return an existing suchSubGraphif there is one.If the given type is a proper subtype of the key type, the result is a treated subgraph.
- Specified by:
addKeySubGraphin interfaceGraph<J>- Specified by:
addKeySubGraphin interfaceGraphImplementor<J>- Parameters:
attributeName- The name of a map-valued attribute of the represented typesubtype- A subtype of the key type
-
addMapKeySubgraph
Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the key of the named map, or return an existing suchSubGraphif there is one.- Specified by:
addMapKeySubgraphin interfaceGraph<J>- Specified by:
addMapKeySubgraphin interfaceGraph<J>- Parameters:
attribute- A map-valued attribute of the represented type
-
addKeySubGraph
public <AJ> SubGraphImplementor<AJ> addKeySubGraph(MapPersistentAttribute<? super J, ? super AJ, ?> attribute, Class<AJ> subtype) Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the key of the named map, and with the given type, which may be a subtype of the attribute type, or return an existing suchSubGraphif there is one.If the given type is a proper subtype of the key type, the result is a treated subgraph.
- Specified by:
addKeySubGraphin interfaceGraph<J>- Specified by:
addKeySubGraphin interfaceGraphImplementor<J>- Parameters:
attribute- A map-valued attribute of the represented typesubtype- A subtype of the key type
-
addTreatedMapKeySubgraph
public <AJ> SubGraphImplementor<AJ> addTreatedMapKeySubgraph(MapAttribute<? super J, ? super AJ, ?> attribute, ManagedType<AJ> type) Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the key of the named map, and with the given type, which may be a subtype of the attribute type, or return an existing suchSubGraphif there is one.If the given type is a proper subtype of the key type, the result is a treated subgraph.
- Specified by:
addTreatedMapKeySubgraphin interfaceGraph<J>- Specified by:
addTreatedMapKeySubgraphin interfaceGraphImplementor<J>- Parameters:
attribute- A map-valued attribute of the represented typetype- A subtype of the key type
-
addTreatedMapKeySubgraph
public <K> SubGraphImplementor<K> addTreatedMapKeySubgraph(MapAttribute<? super J, ? super K, ?> attribute, Class<K> type) Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the key of the named map, and with the given type, which may be a subtype of the attribute type, or return an existing suchSubGraphif there is one.If the given type is a proper subtype of the key type, the result is a treated subgraph.
- Specified by:
addTreatedMapKeySubgraphin interfaceGraph<J>- Specified by:
addTreatedMapKeySubgraphin interfaceGraph<J>- Specified by:
addTreatedMapKeySubgraphin interfaceGraphImplementor<J>- Parameters:
attribute- A map-valued attribute of the represented typetype- A subtype of the key type
-
addTreatedSubgraph
public <Y> SubGraphImplementor<Y> addTreatedSubgraph(Attribute<? super J, ? super Y> attribute, Class<Y> type) Description copied from interface:GraphCreate and return a new (mutable)SubGraphassociated with the givenAttribute, and with the given type, which may be a subtype of the attribute type, or return an existing suchSubGraphif there is one.If the given type is a proper subtype of the attribute type, the result is a treated subgraph.
- Specified by:
addTreatedSubgraphin interfaceGraph<J>- Specified by:
addTreatedSubgraphin interfaceGraph<J>- Specified by:
addTreatedSubgraphin interfaceGraphImplementor<J>- Parameters:
attribute- An attribute of the represented typetype- A subtype of the attribute type- See Also:
-
addTreatedSubgraph
Description copied from interface:GraphCreate and return a new (mutable)SubGraphrepresenting the given subtype of the type of this node, or return an existing suchSubGraphif there is one.- Specified by:
addTreatedSubgraphin interfaceGraph<J>- Specified by:
addTreatedSubgraphin interfaceGraphImplementor<J>
-
addTreatedSubgraph
Description copied from interface:GraphCreate and return a new (mutable)SubGraphrepresenting the given subtype of the type of this node, or return an existing suchSubGraphif there is one.- Specified by:
addTreatedSubgraphin interfaceGraph<J>- Specified by:
addTreatedSubgraphin interfaceGraphImplementor<J>- See Also:
-
getTreatedSubgraphs
- Specified by:
getTreatedSubgraphsin interfaceGraphImplementor<J>
-
toString
-