|
EclipseLink 2.5.0, build 'v20130507-3faac2b' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- The type of the root entity.public interface EntityGraph<T>
This type represents the root of an entity graph that will be used as a template to define the attribute nodes and boundaries of a graph of entities and entity relationships. The root must be an entity type.
The methods to add subgraphs implicitly create the corresponding attribute nodes as well; such attribute nodes should not be redundantly specified.
AttributeNode
,
Subgraph
,
NamedEntityGraph
Method Summary | ||
---|---|---|
void |
addAttributeNodes(Attribute<T,?>... attribute)
Add one or more attribute nodes to the entity graph. |
|
void |
addAttributeNodes(java.lang.String... attributeName)
Add one or more attribute nodes to the entity graph. |
|
|
addKeySubgraph(Attribute<T,X> attribute)
Add a node to the graph that corresponds to a map key that is a managed type. |
|
|
addKeySubgraph(Attribute<T,X> attribute,
java.lang.Class<? extends X> type)
Add a node to the graph that corresponds to a map key that is a managed type with inheritance. |
|
|
addKeySubgraph(java.lang.String attributeName)
Add a node to the graph that corresponds to a map key that is a managed type. |
|
|
addKeySubgraph(java.lang.String attributeName,
java.lang.Class<X> type)
Add a node to the graph that corresponds to a map key that is a managed type with inheritance. |
|
|
addSubclassSubgraph(java.lang.Class<? extends T> type)
Add additional attributes to this entity graph that correspond to attributes of subclasses of this EntityGraph's entity type. |
|
|
addSubgraph(Attribute<T,X> attribute)
Add a node to the graph that corresponds to a managed type. |
|
|
addSubgraph(Attribute<T,X> attribute,
java.lang.Class<? extends X> type)
Add a node to the graph that corresponds to a managed type with inheritance. |
|
|
addSubgraph(java.lang.String attributeName)
Add a node to the graph that corresponds to a managed type. |
|
|
addSubgraph(java.lang.String attributeName,
java.lang.Class<X> type)
Add a node to the graph that corresponds to a managed type with inheritance. |
|
java.util.List<AttributeNode<?>> |
getAttributeNodes()
Return the attribute nodes of this entity that are included in the entity graph. |
|
java.lang.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. |
Method Detail |
---|
java.lang.String getName()
NamedEntityGraph
annotation, XML descriptor element, or added by means of the
addNamedEntityGraph
method. Returns null if the
EntityGraph is not a named EntityGraph.
void addAttributeNodes(java.lang.String... attributeName)
attributeName
- name of the attribute
java.lang.IllegalArgumentException
- if the attribute is not an
attribute of this entity.
java.lang.IllegalStateException
- if the EntityGraph has been
statically definedvoid addAttributeNodes(Attribute<T,?>... attribute)
attribute
- attribute
java.lang.IllegalStateException
- if the EntityGraph has been
statically defined<X> Subgraph<X> addSubgraph(Attribute<T,X> attribute)
attribute
- attribute
java.lang.IllegalArgumentException
- if the attribute's target type
is not a managed type
java.lang.IllegalStateException
- if the EntityGraph has been
statically defined<X> Subgraph<? extends X> addSubgraph(Attribute<T,X> attribute, java.lang.Class<? extends X> type)
attribute
- attributetype
- entity subclass
java.lang.IllegalArgumentException
- if the attribute's target
type is not a managed type
java.lang.IllegalStateException
- if the EntityGraph has been
statically defined<X> Subgraph<X> addSubgraph(java.lang.String attributeName)
attributeName
- name of the attribute
java.lang.IllegalArgumentException
- if the attribute is not an
attribute of this entity.
java.lang.IllegalArgumentException
- if the attribute's target type
is not a managed type
java.lang.IllegalStateException
- if the EntityGraph has been
statically defined<X> Subgraph<X> addSubgraph(java.lang.String attributeName, java.lang.Class<X> type)
attributeName
- name of the attributetype
- entity subclass
java.lang.IllegalArgumentException
- if the attribute is not an
attribute of this managed type.
java.lang.IllegalArgumentException
- if the attribute's target type
is not a managed type
java.lang.IllegalStateException
- if this EntityGraph has been
statically defined<X> Subgraph<X> addKeySubgraph(Attribute<T,X> attribute)
attribute
- attribute
java.lang.IllegalArgumentException
- if the attribute's target type
is not an entity
java.lang.IllegalStateException
- if this EntityGraph has been
statically defined<X> Subgraph<? extends X> addKeySubgraph(Attribute<T,X> attribute, java.lang.Class<? extends X> type)
attribute
- attributetype
- entity subclass
java.lang.IllegalArgumentException
- if the attribute's target type
is not an entity
java.lang.IllegalStateException
- if this EntityGraph has been
statically defined<X> Subgraph<X> addKeySubgraph(java.lang.String attributeName)
attributeName
- name of the attribute
java.lang.IllegalArgumentException
- if the attribute is not an
attribute of this entity.
java.lang.IllegalArgumentException
- if the attribute's target type
is not an entity
java.lang.IllegalStateException
- if this EntityGraph has been
statically defined<X> Subgraph<X> addKeySubgraph(java.lang.String attributeName, java.lang.Class<X> type)
attributeName
- name of the attributetype
- entity subclass
java.lang.IllegalArgumentException
- if the attribute is not an
attribute of this entity.
java.lang.IllegalArgumentException
- if the attribute's target type
is not a managed type
java.lang.IllegalStateException
- if this EntityGraph has been
statically defined<T> Subgraph<? extends T> addSubclassSubgraph(java.lang.Class<? extends T> type)
type
- entity subclass
java.lang.IllegalArgumentException
- if the type is not an entity type
java.lang.IllegalStateException
- if the EntityGraph has been
statically definedjava.util.List<AttributeNode<?>> getAttributeNodes()
|
EclipseLink 2.5.0, build 'v20130507-3faac2b' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |