* when we're finish visiting an attribute, these two will be poped from each stack.
*/
@Override
public boolean startingAttribute(AttributeDefinition attributeDefinition) {
final String attrName = attributeDefinition.getName();
AttributeNodeImplementor attributeNode = NON_EXIST_ATTRIBUTE_NODE;
GraphNodeImplementor subGraphNode = NON_EXIST_SUBGRAPH_NODE;
//the attribute is in the EntityGraph, so, let's continue
if ( attributeNodeImplementorMap.containsKey( attrName ) ) {
attributeNode = attributeNodeImplementorMap.get( attrName );
//here we need to check if there is a subgraph (or sub key graph if it is an indexed attribute )
Map<Class, Subgraph> subGraphs = attributeNode.getSubgraphs();
Class javaType = attributeDefinition.getType().getReturnedClass();
if ( !subGraphs.isEmpty() && subGraphs.containsKey( javaType ) ) {
subGraphNode = (GraphNodeImplementor) subGraphs.get( javaType );
}