EclipseLink 2.5.0, build 'v20130312-9664d23' API Reference

org.eclipse.persistence.jaxb
Interface ObjectGraph<T>

Type Parameters:
T - The type of the root entity.

public interface ObjectGraph<T>

This type represents the root of an object graph that will be used as a template to define the attribute nodes and boundaries of a graph of JAXB objects and relationships. The root must be an root-level JAXB type.

See Also:
XmlNamedObjectGraph
Since:
EclipseLink 2.5

Method Summary
<X> void
addAttributeNodes(java.lang.String... attributeName)
           
<X> SubGraph<X>
addSubGraph(java.lang.String attribute)
           
<X> SubGraph<X>
addSubGraph(java.lang.String attribute, java.lang.Class<X> type)
          Used to add a node of the graph that corresponds to a managed type with inheritance.
 java.util.List<AttributeNode<?>> getAttributeNodes()
           
 java.lang.String getName()
          Returns the name of the static EntityGraph.
 

Method Detail

getName

java.lang.String getName()
Returns the name of the static EntityGraph. Will return null if the EntityGraph is not a named EntityGraph.


addAttributeNodes

<X> void addAttributeNodes(java.lang.String... attributeName)

addSubGraph

<X> SubGraph<X> addSubGraph(java.lang.String attribute)

addSubGraph

<X> SubGraph<X> addSubGraph(java.lang.String attribute,
                            java.lang.Class<X> type)
Used to add a node of the graph that corresponds to a managed type with inheritance. This allows for multiple subclass sub-graphs to be defined for this node of the entity graph. Subclass sub-graphs will include the specified attributes of superclass sub-graphs

Throws:
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

getAttributeNodes

java.util.List<AttributeNode<?>> getAttributeNodes()

EclipseLink 2.5.0, build 'v20130312-9664d23' API Reference