Top Description Methods
org.hibernate.graph

public Interface SubGraph<J>

extends Graph<J>, Subgraph<J>
Known Direct Subinterfaces
org.hibernate.graph.spi.SubGraphImplementor
Imports
java.util.List, javax.persistence.metamodel.Attribute

Hibernate extension to the JPA entity-graph Subgraph contract.
Authors
Steve Ebersole, Andrea Boriero

Method Summary

Modifier and TypeMethod and Description
public default void
addAttributeNodes(String...
name of the attribute
names
)

Implements javax.persistence.Subgraph.addAttributeNodes.

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

Implements javax.persistence.Subgraph.addAttributeNodes.

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

Implements javax.persistence.Subgraph.addKeySubgraph.

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

Implements javax.persistence.Subgraph.addKeySubgraph.

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

Implements javax.persistence.Subgraph.addKeySubgraph.

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

Implements javax.persistence.Subgraph.addKeySubgraph.

Add a node to the graph that corresponds to a map key that is a managed type with inheritance.
public default <X> SubGraph<X>
addSubgraph(Attribute<J, X>
attribute
attribute
)

Implements javax.persistence.Subgraph.addSubgraph.

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

Implements javax.persistence.Subgraph.addSubgraph.

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

Implements javax.persistence.Subgraph.addSubgraph.

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

Implements javax.persistence.Subgraph.addSubgraph.

Add a node to the graph that corresponds to a managed type with inheritance.
public default List<AttributeNode<?>>
getAttributeNodes()

Implements javax.persistence.Subgraph.getAttributeNodes.

Return the attribute nodes corresponding to the attributes of this managed type that are included in the subgraph.
public default Class<J>
getClassType()

Implements javax.persistence.Subgraph.getClassType.

Return the type for which this subgraph was defined.
Inherited from org.hibernate.graph.Graph:
addAttributeNodeaddAttributeNodeaddKeySubGraphaddKeySubGraphaddKeySubGraphaddKeySubGraphaddSubGraphaddSubGraphaddSubGraphaddSubGraphfindAttributeNodefindAttributeNodegetAttributeNodeListgetGraphAttributeNodesgetGraphedTypemakeCopymakeRootGraphmakeSubGraph

Method Detail

addAttributeNodesback to summary
public default void addAttributeNodes(String... names)

Implements javax.persistence.Subgraph.addAttributeNodes.

Doc from javax.persistence.Subgraph.addAttributeNodes.

Add one or more attribute nodes to the entity graph.

Parameters
names:String[]

name of the attribute

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

Implements javax.persistence.Subgraph.addAttributeNodes.

Doc from javax.persistence.Subgraph.addAttributeNodes.

Add one or more attribute nodes to the entity graph.

Parameters
attribute:Attribute<J, ?>[]

attribute

Annotations
@Override
@SuppressWarnings:unchecked
addKeySubgraphback to summary
public default <X> SubGraph<X> addKeySubgraph(Attribute<J, X> attribute)

Implements javax.persistence.Subgraph.addKeySubgraph.

Doc from javax.persistence.Subgraph.addKeySubgraph.

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

Parameters
attribute:Attribute<J, X>

attribute

Returns:SubGraph<X>

subgraph for the key attribute

Annotations
@Override
@SuppressWarnings:unchecked
addKeySubgraphback to summary
public default <X> SubGraph<? extends X> addKeySubgraph(Attribute<J, X> attribute, Class<? extends X> type)

Implements javax.persistence.Subgraph.addKeySubgraph.

Doc from javax.persistence.Subgraph.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
attribute:Attribute<J, X>

attribute

type:Class<? extends X>

entity subclass

Returns:SubGraph<? extends X>

subgraph for the attribute

Annotations
@Override
@SuppressWarnings:unchecked
addKeySubgraphback to summary
public default <X> SubGraph<X> addKeySubgraph(String name)

Implements javax.persistence.Subgraph.addKeySubgraph.

Doc from javax.persistence.Subgraph.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
name:String

name of the attribute

Returns:SubGraph<X>

subgraph for the key attribute

Annotations
@Override
addKeySubgraphback to summary
public default <X> SubGraph<X> addKeySubgraph(String name, Class<X> type)

Implements javax.persistence.Subgraph.addKeySubgraph.

Doc from javax.persistence.Subgraph.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
name:String

name of the attribute

type:Class<X>

entity subclass

Returns:SubGraph<X>

subgraph for the attribute

Annotations
@Override
@SuppressWarnings:unchecked
addSubgraphback to summary
public default <X> SubGraph<X> addSubgraph(Attribute<J, X> attribute)

Implements javax.persistence.Subgraph.addSubgraph.

Doc from javax.persistence.Subgraph.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<J, X>

attribute

Returns:SubGraph<X>

subgraph for the attribute

Annotations
@Override
@SuppressWarnings:unchecked
addSubgraphback to summary
public default <X> SubGraph<? extends X> addSubgraph(Attribute<J, X> attribute, Class<? extends X> type)

Implements javax.persistence.Subgraph.addSubgraph.

Doc from javax.persistence.Subgraph.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<J, X>

attribute

type:Class<? extends X>

entity subclass

Returns:SubGraph<? extends X>

subgraph for the attribute

Annotations
@Override
@SuppressWarnings:unchecked
addSubgraphback to summary
public default <X> SubGraph<X> addSubgraph(String name)

Implements javax.persistence.Subgraph.addSubgraph.

Doc from javax.persistence.Subgraph.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
name:String

name of the attribute

Returns:SubGraph<X>

subgraph for the attribute

Annotations
@Override
@SuppressWarnings:unchecked
addSubgraphback to summary
public default <X> SubGraph<X> addSubgraph(String name, Class<X> type)

Implements javax.persistence.Subgraph.addSubgraph.

Doc from javax.persistence.Subgraph.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
name:String

name of the attribute

type:Class<X>

entity subclass

Returns:SubGraph<X>

subgraph for the attribute

Annotations
@Override
@SuppressWarnings:unchecked
getAttributeNodesback to summary
public default List<AttributeNode<?>> getAttributeNodes()

Implements javax.persistence.Subgraph.getAttributeNodes.

Doc from javax.persistence.Subgraph.getAttributeNodes.

Return the attribute nodes corresponding to the attributes of this managed type that are included in the subgraph.

Returns:List<AttributeNode<?>>

list of attribute nodes included in the subgraph or empty List if none have been defined

Annotations
@Override
@SuppressWarnings:unchecked
getClassTypeback to summary
public default Class<J> getClassType()

Implements javax.persistence.Subgraph.getClassType.

Doc from javax.persistence.Subgraph.getClassType.

Return the type for which this subgraph was defined.

Returns:Class<J>

managed type referenced by the subgraph

Annotations
@Override
@SuppressWarnings:unchecked