public static StructuralProperty getStructuralProperty ( EntityDataModel entityDataModel , StructuredType structuredType , String propertyName ) { StructuralProperty structuralProperty = structuredType . getStructuralProperty ( propertyName ) ; if ( structuralProperty != null ) { return structuralProperty ; } else { // Look up recursively in the 'base type' String baseTypeName = structuredType . getBaseTypeName ( ) ; if ( ! isNullOrEmpty ( baseTypeName ) ) { Type baseType = entityDataModel . getType ( baseTypeName ) ; if ( baseType != null && baseType instanceof StructuredType ) { return getStructuralProperty ( entityDataModel , ( StructuredType ) baseType , propertyName ) ; } } } return null ; }
Get the Structural Property from the given Entity Data Model and Structured Type looking up all the base types recursively .