Top Description Fields Constructors Methods
org.eclipse.persistence.internal.jpa

public Class EntityGraphImpl<X>

extends AttributeNodeImpl<X>
implements EntityGraph<X>, Subgraph<X>
Class Inheritance
All Implemented Interfaces
jakarta.persistence.Subgraph, jakarta.persistence.EntityGraph
Imports
java.util.ArrayList, .HashMap, .List, .Map, jakarta.persistence.AttributeNode, .EntityGraph, .Subgraph, jakarta.persistence.metamodel.Attribute, .PluralAttribute, org.eclipse.persistence.descriptors.ClassDescriptor, org.eclipse.persistence.internal.core.helper.CoreClassConstants, org.eclipse.persistence.internal.helper.ClassConstants, org.eclipse.persistence.internal.localization.ExceptionLocalization, org.eclipse.persistence.internal.queries.AttributeItem, .MappedKeyMapContainerPolicy, org.eclipse.persistence.mappings.DatabaseMapping, org.eclipse.persistence.queries.AttributeGroup

Concrete JPA EntityGraph class. For this implementation the EntityGraphImpl wraps the EclipseLink AttributeGroup type.

Field Summary

Modifier and TypeField and Description
protected AttributeGroup
protected Map<String, AttributeNodeImpl<X>>
protected Class<X>
protected transient ClassDescriptor
protected transient boolean
Inherited from org.eclipse.persistence.internal.jpa.AttributeNodeImpl:
currentAttributekeySubgraphssubgraphs

Constructor Summary

AccessConstructor and Description
protected
public
protected
EntityGraphImpl(AttributeGroup group, ClassDescriptor descriptor, String attribute)

Method Summary

Modifier and TypeMethod and Description
protected void
public void
addAttributeNodes(String...
name of the attribute
attributeNames
)

Implements jakarta.persistence.EntityGraph.addAttributeNodes, jakarta.persistence.Subgraph.addAttributeNodes.

Add one or more attribute nodes to the entity graph.
public void
addAttributeNodes(Attribute<X, ?>...
attribute
attribute
)

Implements jakarta.persistence.EntityGraph.addAttributeNodes, jakarta.persistence.Subgraph.addAttributeNodes.

Add one or more attribute nodes to the entity graph.
public <T> Subgraph<T>
addKeySubgraph(Attribute<X, T>
attribute
attribute
)

Implements jakarta.persistence.EntityGraph.addKeySubgraph, jakarta.persistence.Subgraph.addKeySubgraph.

Add a node to the graph that corresponds to a map key that is a managed type.
public <T> Subgraph<? extends T>
addKeySubgraph(Attribute<X, T>
attribute
attribute
,
Class<? extends T>
entity subclass
type
)

Implements jakarta.persistence.EntityGraph.addKeySubgraph, jakarta.persistence.Subgraph.addKeySubgraph.

Add a node to the graph that corresponds to a map key that is a managed type with inheritance.
public <X> Subgraph<X>
addKeySubgraph(String
name of the attribute
attributeName
)

Implements jakarta.persistence.EntityGraph.addKeySubgraph, jakarta.persistence.Subgraph.addKeySubgraph.

Add a node to the graph that corresponds to a map key that is a managed type.
public <X> Subgraph<X>
addKeySubgraph(String
name of the attribute
attributeName
,
Class<X>
entity subclass
type
)

Implements jakarta.persistence.EntityGraph.addKeySubgraph, jakarta.persistence.Subgraph.addKeySubgraph.

Add a node to the graph that corresponds to a map key that is a managed type with inheritance.
public <T> Subgraph<? extends T>
addSubclassSubgraph(Class<? extends T>
entity subclass
type
)

Implements jakarta.persistence.EntityGraph.addSubclassSubgraph.

Add additional attributes to this entity graph that correspond to attributes of subclasses of this EntityGraph's entity type.
public <T> Subgraph<T>
addSubgraph(Attribute<X, T>
attribute
attribute
)

Implements jakarta.persistence.EntityGraph.addSubgraph, jakarta.persistence.Subgraph.addSubgraph.

Add a node to the graph that corresponds to a managed type.
public <T> Subgraph<? extends T>
addSubgraph(Attribute<X, T>
attribute
attribute
,
Class<? extends T>
entity subclass
type
)

Implements jakarta.persistence.EntityGraph.addSubgraph, jakarta.persistence.Subgraph.addSubgraph.

Add a node to the graph that corresponds to a managed type with inheritance.
public <X> Subgraph<X>
addSubgraph(String
name of the attribute
attributeName
)

Implements jakarta.persistence.EntityGraph.addSubgraph, jakarta.persistence.Subgraph.addSubgraph.

Add a node to the graph that corresponds to a managed type.
public <X> Subgraph<X>
addSubgraph(String
name of the attribute
attributeName
,
Class<X>
entity subclass
type
)

Implements jakarta.persistence.EntityGraph.addSubgraph, jakarta.persistence.Subgraph.addSubgraph.

Add a node to the graph that corresponds to a managed type with inheritance.
protected void
public AttributeGroup

Returns:

the attributeGroup
getAttributeGroup
()

public String
getAttributeName()

Overrides org.eclipse.persistence.internal.jpa.AttributeNodeImpl.getAttributeName.

Implements jakarta.persistence.AttributeNode.getAttributeName.

Return the name of the attribute corresponding to the attribute node.
public List<AttributeNode<?>>
getAttributeNodes()

Implements jakarta.persistence.EntityGraph.getAttributeNodes, jakarta.persistence.Subgraph.getAttributeNodes.

Return the attribute nodes of this entity that are included in the entity graph.
public Class<X>
getClassType()

Implements jakarta.persistence.Subgraph.getClassType.

Return the type for which this subgraph was defined.
public String
getName()

Implements jakarta.persistence.EntityGraph.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.
Inherited from org.eclipse.persistence.internal.jpa.AttributeNodeImpl:
addKeySubgraphaddSubgraphgetKeySubgraphsgetSubgraphs

Field Detail

attributeGroupback to summary
protected AttributeGroup attributeGroup
attributeNodesback to summary
protected Map<String, AttributeNodeImpl<X>> attributeNodes
classTypeback to summary
protected Class<X> classType
descriptorback to summary
protected transient ClassDescriptor descriptor
isMutableback to summary
protected transient boolean isMutable

Constructor Detail

EntityGraphImplback to summary
protected EntityGraphImpl(AttributeGroup group, ClassDescriptor descriptor)
EntityGraphImplback to summary
public EntityGraphImpl(AttributeGroup group)
EntityGraphImplback to summary
protected EntityGraphImpl(AttributeGroup group, ClassDescriptor descriptor, String attribute)

Method Detail

addAttributeNodeImplback to summary
protected void addAttributeNodeImpl(AttributeNodeImpl<X> attributeNode)
addAttributeNodesback to summary
public void addAttributeNodes(String... attributeNames)

Implements jakarta.persistence.EntityGraph.addAttributeNodes, jakarta.persistence.Subgraph.addAttributeNodes.

Doc from jakarta.persistence.EntityGraph.addAttributeNodes.

Add one or more attribute nodes to the entity graph.

Parameters
attributeNames:String[]

name of the attribute

Annotations
@Override
addAttributeNodesback to summary
public void addAttributeNodes(Attribute<X, ?>... attribute)

Implements jakarta.persistence.EntityGraph.addAttributeNodes, jakarta.persistence.Subgraph.addAttributeNodes.

Doc from jakarta.persistence.EntityGraph.addAttributeNodes.

Add one or more attribute nodes to the entity graph.

Parameters
attribute:Attribute<X, ?>[]

attribute

Annotations
@Override
addKeySubgraphback to summary
public <T> Subgraph<T> addKeySubgraph(Attribute<X, T> attribute)

Implements jakarta.persistence.EntityGraph.addKeySubgraph, jakarta.persistence.Subgraph.addKeySubgraph.

Doc from jakarta.persistence.EntityGraph.addKeySubgraph.

Add a node to the graph that corresponds to a map key that is a managed type. This allows for construction of multi-node entity graphs that include related managed types.

Parameters
attribute:Attribute<X, T>

attribute

Returns:Subgraph<T>

subgraph for the key attribute

Annotations
@Override
addKeySubgraphback to summary
public <T> Subgraph<? extends T> addKeySubgraph(Attribute<X, T> attribute, Class<? extends T> type)

Implements jakarta.persistence.EntityGraph.addKeySubgraph, jakarta.persistence.Subgraph.addKeySubgraph.

Doc from jakarta.persistence.EntityGraph.addKeySubgraph.

Add a node to the graph that corresponds to a map key that is a managed type with inheritance. This allows for construction of multi-node entity graphs that include related managed types. Subclass subgraphs will include the specified attributes of superclass subgraphs.

Parameters
attribute:Attribute<X, T>

attribute

type:Class<? extends T>

entity subclass

Returns:Subgraph<? extends T>

subgraph for the key attribute

Annotations
@Override
addKeySubgraphback to summary
public <X> Subgraph<X> addKeySubgraph(String attributeName)

Implements jakarta.persistence.EntityGraph.addKeySubgraph, jakarta.persistence.Subgraph.addKeySubgraph.

Doc from jakarta.persistence.EntityGraph.addKeySubgraph.

Add a node to the graph that corresponds to a map key that is a managed type. This allows for construction of multi-node entity graphs that include related managed types.

Parameters
attributeName:String

name of the attribute

Returns:Subgraph<X>

subgraph for the key attribute

Annotations
@Override
addKeySubgraphback to summary
public <X> Subgraph<X> addKeySubgraph(String attributeName, Class<X> type)

Implements jakarta.persistence.EntityGraph.addKeySubgraph, jakarta.persistence.Subgraph.addKeySubgraph.

Doc from jakarta.persistence.EntityGraph.addKeySubgraph.

Add a node to the graph that corresponds to a map key that is a managed type with inheritance. This allows for construction of multi-node entity graphs that include related managed types. Subclass subgraphs will automatically include the specified attributes of superclass subgraphs

Parameters
attributeName:String

name of the attribute

type:Class<X>

entity subclass

Returns:Subgraph<X>

subgraph for the key attribute

Annotations
@Override
addSubclassSubgraphback to summary
public <T> Subgraph<? extends T> addSubclassSubgraph(Class<? extends T> type)

Implements jakarta.persistence.EntityGraph.addSubclassSubgraph.

Doc from jakarta.persistence.EntityGraph.addSubclassSubgraph.

Add additional attributes to this entity graph that correspond to attributes of subclasses of this EntityGraph's entity type. Subclass subgraphs will automatically include the specified attributes of superclass subgraphs.

Parameters
type:Class<? extends T>

entity subclass

Returns:Subgraph<? extends T>

subgraph for the subclass

Annotations
@Override
addSubgraphback to summary
public <T> Subgraph<T> addSubgraph(Attribute<X, T> attribute)

Implements jakarta.persistence.EntityGraph.addSubgraph, jakarta.persistence.Subgraph.addSubgraph.

Doc from jakarta.persistence.EntityGraph.addSubgraph.

Add a node to the graph that corresponds to a managed type. This allows for construction of multi-node entity graphs that include related managed types.

Parameters
attribute:Attribute<X, T>

attribute

Returns:Subgraph<T>

subgraph for the attribute

Annotations
@Override
addSubgraphback to summary
public <T> Subgraph<? extends T> addSubgraph(Attribute<X, T> attribute, Class<? extends T> type)

Implements jakarta.persistence.EntityGraph.addSubgraph, jakarta.persistence.Subgraph.addSubgraph.

Doc from jakarta.persistence.EntityGraph.addSubgraph.

Add a node to the graph that corresponds to a managed type with inheritance. This allows for multiple subclass subgraphs to be defined for this node of the entity graph. Subclass subgraphs will automatically include the specified attributes of superclass subgraphs.

Parameters
attribute:Attribute<X, T>

attribute

type:Class<? extends T>

entity subclass

Returns:Subgraph<? extends T>

subgraph for the attribute

Annotations
@Override
addSubgraphback to summary
public <X> Subgraph<X> addSubgraph(String attributeName)

Implements jakarta.persistence.EntityGraph.addSubgraph, jakarta.persistence.Subgraph.addSubgraph.

Doc from jakarta.persistence.EntityGraph.addSubgraph.

Add a node to the graph that corresponds to a managed type. This allows for construction of multi-node entity graphs that include related managed types.

Parameters
attributeName:String

name of the attribute

Returns:Subgraph<X>

subgraph for the attribute

Annotations
@Override
addSubgraphback to summary
public <X> Subgraph<X> addSubgraph(String attributeName, Class<X> type)

Implements jakarta.persistence.EntityGraph.addSubgraph, jakarta.persistence.Subgraph.addSubgraph.

Doc from jakarta.persistence.EntityGraph.addSubgraph.

Add a node to the graph that corresponds to a managed type with inheritance. This allows for multiple subclass subgraphs to be defined for this node of the entity graph. Subclass subgraphs will automatically include the specified attributes of superclass subgraphs.

Parameters
attributeName:String

name of the attribute

type:Class<X>

entity subclass

Returns:Subgraph<X>

subgraph for the attribute

Annotations
@Override
buildAttributeNodesback to summary
protected void buildAttributeNodes()
getAttributeGroupback to summary
public AttributeGroup getAttributeGroup()
Returns:AttributeGroup

the attributeGroup

getAttributeNameback to summary
public String getAttributeName()

Overrides org.eclipse.persistence.internal.jpa.AttributeNodeImpl.getAttributeName.

Implements jakarta.persistence.AttributeNode.getAttributeName.

Doc from jakarta.persistence.AttributeNode.getAttributeName.

Return the name of the attribute corresponding to the attribute node.

Returns:String

name of the attribute

Annotations
@Override
getAttributeNodesback to summary
public List<AttributeNode<?>> getAttributeNodes()

Implements jakarta.persistence.EntityGraph.getAttributeNodes, jakarta.persistence.Subgraph.getAttributeNodes.

Doc from jakarta.persistence.EntityGraph.getAttributeNodes.

Return the attribute nodes of this entity that are included in the entity graph.

Returns:List<AttributeNode<?>>

attribute nodes for the annotated entity type or empty list if none have been defined

Annotations
@Override
getClassTypeback to summary
public Class<X> getClassType()

Implements jakarta.persistence.Subgraph.getClassType.

Doc from jakarta.persistence.Subgraph.getClassType.

Return the type for which this subgraph was defined.

Returns:Class<X>

managed type referenced by the subgraph

Annotations
@Override
getNameback to summary
public String getName()

Implements jakarta.persistence.EntityGraph.getName.

Doc from jakarta.persistence.EntityGraph.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. Returns null if the EntityGraph is not a named EntityGraph.

Annotations
@Override