public String findAlias ( String entityAlias , List < String > propertyPathWithoutAlias ) { RelationshipAliasTree aliasTree = relationshipAliases . get ( entityAlias ) ; if ( aliasTree == null ) { return null ; } RelationshipAliasTree associationAlias = aliasTree ; for ( int i = 0 ; i < propertyPathWithoutAlias . size ( ) ; i ++ ) { associationAlias = associationAlias . findChild ( propertyPathWithoutAlias . get ( i ) ) ; if ( associationAlias == null ) { return null ; } } return associationAlias . getAlias ( ) ; }
Given the alias of the entity and the path to the relationship it will return the alias of the component .