public class EntityGraphImpl<T> extends AbstractGraphNode<T> implements EntityGraph<T>, EntityGraphImplementor<T>
| Constructor and Description |
|---|
EntityGraphImpl(String name,
EntityType<T> entityType,
SessionFactoryImplementor sessionFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttributeNodes(Attribute<T,?>... attributes)
Add one or more attribute nodes to the entity graph.
|
void |
addAttributeNodes(String... attributeNames)
Add one or more attribute nodes to the entity graph.
|
<X> SubgraphImpl<X> |
addKeySubgraph(Attribute<T,X> attribute)
Add a node to the graph that corresponds to a map key
that is a managed type.
|
<X> SubgraphImpl<? extends X> |
addKeySubgraph(Attribute<T,X> attribute,
Class<? extends X> type)
Add a node to the graph that corresponds to a map key
that is a managed type with inheritance.
|
<X> SubgraphImpl<X> |
addKeySubgraph(String attributeName)
Add a node to the graph that corresponds to a map key
that is a managed type.
|
<X> SubgraphImpl<X> |
addKeySubgraph(String attributeName,
Class<X> type)
Add a node to the graph that corresponds to a map key
that is a managed type with inheritance.
|
<X> Subgraph<? extends X> |
addSubclassSubgraph(Class<? extends X> type)
Add additional attributes to this entity graph that
correspond to attributes of subclasses of this EntityGraph's
entity type.
|
<X> SubgraphImpl<X> |
addSubgraph(Attribute<T,X> attribute)
Add a node to the graph that corresponds to a managed
type.
|
<X> SubgraphImpl<? extends X> |
addSubgraph(Attribute<T,X> attribute,
Class<? extends X> type)
Add a node to the graph that corresponds to a managed
type with inheritance.
|
<X> SubgraphImpl<X> |
addSubgraph(String attributeName)
Add a node to the graph that corresponds to a managed
type.
|
<X> SubgraphImpl<X> |
addSubgraph(String attributeName,
Class<X> type)
Add a node to the graph that corresponds to a managed
type with inheritance.
|
boolean |
appliesTo(EntityType<? super T> entityType) |
boolean |
appliesTo(String entityName) |
List<AttributeNode<?>> |
getAttributeNodes()
Return the attribute nodes of this entity that are included in
the entity graph.
|
EntityType<T> |
getEntityType() |
String |
getName()
Return the name of a named EntityGraph (an entity graph
defined by means of the
NamedEntityGraph
annotation, XML descriptor element, or added by means of the
addNamedEntityGraph method. |
EntityGraphImpl<T> |
makeImmutableCopy(String name)
Make an immutable copy of this entity graph, using the given name.
|
EntityGraphImpl<T> |
makeMutableCopy()
Make a mutable copy of this entity graph
|
protected Attribute<T,?> |
resolveAttribute(String attributeName) |
addAttribute, addAttribute, addAttributeNode, attributeImplementorNodes, attributeNodes, buildAttributeNode, containsAttribute, getFactoryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitattributeImplementorNodes, attributeNodes, containsAttributepublic EntityGraphImpl(String name, EntityType<T> entityType, SessionFactoryImplementor sessionFactory)
public EntityGraphImpl<T> makeImmutableCopy(String name)
EntityGraphImplementormakeImmutableCopy in interface EntityGraphImplementor<T>name - The name to apply to the immutable copypublic EntityGraphImpl<T> makeMutableCopy()
EntityGraphImplementormakeMutableCopy in interface EntityGraphImplementor<T>public EntityType<T> getEntityType()
public String getName()
EntityGraphNamedEntityGraph
annotation, XML descriptor element, or added by means of the
addNamedEntityGraph method. Returns null if the
EntityGraph is not a named EntityGraph.getName in interface EntityGraph<T>public void addAttributeNodes(String... attributeNames)
EntityGraphaddAttributeNodes in interface EntityGraph<T>addAttributeNodes in class AbstractGraphNode<T>attributeNames - name of the attribute@SafeVarargs public final void addAttributeNodes(Attribute<T,?>... attributes)
EntityGraphaddAttributeNodes in interface EntityGraph<T>addAttributeNodes in class AbstractGraphNode<T>attributes - attributepublic <X> SubgraphImpl<X> addSubgraph(Attribute<T,X> attribute)
EntityGraphaddSubgraph in interface EntityGraph<T>addSubgraph in class AbstractGraphNode<T>attribute - attributepublic <X> SubgraphImpl<? extends X> addSubgraph(Attribute<T,X> attribute, Class<? extends X> type)
EntityGraphaddSubgraph in interface EntityGraph<T>addSubgraph in class AbstractGraphNode<T>attribute - attributetype - entity subclasspublic <X> SubgraphImpl<X> addSubgraph(String attributeName)
EntityGraphaddSubgraph in interface EntityGraph<T>addSubgraph in class AbstractGraphNode<T>attributeName - name of the attributepublic <X> SubgraphImpl<X> addSubgraph(String attributeName, Class<X> type)
EntityGraphaddSubgraph in interface EntityGraph<T>addSubgraph in class AbstractGraphNode<T>attributeName - name of the attributetype - entity subclasspublic <X> SubgraphImpl<X> addKeySubgraph(Attribute<T,X> attribute)
EntityGraphaddKeySubgraph in interface EntityGraph<T>addKeySubgraph in class AbstractGraphNode<T>attribute - attributepublic <X> SubgraphImpl<? extends X> addKeySubgraph(Attribute<T,X> attribute, Class<? extends X> type)
EntityGraphaddKeySubgraph in interface EntityGraph<T>addKeySubgraph in class AbstractGraphNode<T>attribute - attributetype - entity subclasspublic <X> SubgraphImpl<X> addKeySubgraph(String attributeName)
EntityGraphaddKeySubgraph in interface EntityGraph<T>addKeySubgraph in class AbstractGraphNode<T>attributeName - name of the attributepublic <X> SubgraphImpl<X> addKeySubgraph(String attributeName, Class<X> type)
EntityGraphaddKeySubgraph in interface EntityGraph<T>addKeySubgraph in class AbstractGraphNode<T>attributeName - name of the attributetype - entity subclasspublic <X> Subgraph<? extends X> addSubclassSubgraph(Class<? extends X> type)
EntityGraphaddSubclassSubgraph in interface EntityGraph<T>type - entity subclasspublic List<AttributeNode<?>> getAttributeNodes()
EntityGraphgetAttributeNodes in interface EntityGraph<T>protected Attribute<T,?> resolveAttribute(String attributeName)
resolveAttribute in class AbstractGraphNode<T>public boolean appliesTo(String entityName)
appliesTo in interface EntityGraphImplementor<T>public boolean appliesTo(EntityType<? super T> entityType)
appliesTo in interface EntityGraphImplementor<T>Copyright © 2019 JBoss by Red Hat. All rights reserved.