* EDM Complex Property Name - RULES
* ************************************************************************
*/
public static void build(final JPAEdmComplexPropertyView complexView, final JPAEdmPropertyView propertyView) {
ComplexProperty complexProperty = complexView.getEdmComplexProperty();
String jpaAttributeName = propertyView.getJPAAttribute().getName();
String jpaEntityTypeName = propertyView.getJPAEdmEntityTypeView().getJPAEntityType().getName();
JPAEdmMappingModelAccess mappingModelAccess = complexView.getJPAEdmMappingModelAccess();
String propertyName = null;
if (mappingModelAccess != null && mappingModelAccess.isMappingModelExists()) {
propertyName = mappingModelAccess.mapJPAAttribute(jpaEntityTypeName, jpaAttributeName);
}
if (propertyName == null) {
propertyName = Character.toUpperCase(jpaAttributeName.charAt(0)) + jpaAttributeName.substring(1);
}
// change for navigation property issue
JPAEdmMapping mapping = new JPAEdmMappingImpl();
((Mapping) mapping).setInternalName(jpaAttributeName);
mapping.setJPAType(propertyView.getJPAAttribute().getJavaType());
complexProperty.setMapping((Mapping) mapping);
complexProperty.setName(propertyName);
}