Search in sources :

Example 1 with AttributeNodeImpl

use of org.hibernate.jpa.graph.internal.AttributeNodeImpl in project hibernate-orm by hibernate.

the class MetamodelImpl method applyNamedAttributeNodes.

private void applyNamedAttributeNodes(NamedAttributeNode[] namedAttributeNodes, NamedEntityGraph namedEntityGraph, AbstractGraphNode graphNode) {
    for (NamedAttributeNode namedAttributeNode : namedAttributeNodes) {
        final String value = namedAttributeNode.value();
        AttributeNodeImpl attributeNode = graphNode.addAttribute(value);
        if (StringHelper.isNotEmpty(namedAttributeNode.subgraph())) {
            final SubgraphImpl subgraph = attributeNode.makeSubgraph();
            applyNamedSubgraphs(namedEntityGraph, namedAttributeNode.subgraph(), subgraph);
        }
        if (StringHelper.isNotEmpty(namedAttributeNode.keySubgraph())) {
            final SubgraphImpl subgraph = attributeNode.makeKeySubgraph();
            applyNamedSubgraphs(namedEntityGraph, namedAttributeNode.keySubgraph(), subgraph);
        }
    }
}
Also used : AttributeNodeImpl(org.hibernate.jpa.graph.internal.AttributeNodeImpl) NamedAttributeNode(javax.persistence.NamedAttributeNode) SubgraphImpl(org.hibernate.jpa.graph.internal.SubgraphImpl)

Aggregations

NamedAttributeNode (javax.persistence.NamedAttributeNode)1 AttributeNodeImpl (org.hibernate.jpa.graph.internal.AttributeNodeImpl)1 SubgraphImpl (org.hibernate.jpa.graph.internal.SubgraphImpl)1