}
keyViewBuilder.build();
}
break;
case EMBEDDED:
ComplexType complexType = complexTypeView
.searchEdmComplexType(currentAttribute.getJavaType().getName());
if (complexType == null) {
JPAEdmComplexTypeView complexTypeViewLocal = new JPAEdmComplexType(
schemaView, currentAttribute);
complexTypeViewLocal.getBuilder().build();
complexType = complexTypeViewLocal.getEdmComplexType();
complexTypeView.addJPAEdmCompleTypeView(complexTypeViewLocal);
}
if (isBuildModeComplexType == false
&& entityTypeView.getJPAEntityType().getIdType()
.getJavaType()
.equals(currentAttribute.getJavaType())) {
if (keyView == null) {
keyView = new JPAEdmKey(complexTypeView,
JPAEdmProperty.this);
}
keyView.getBuilder().build();
complexTypeView.expandEdmComplexType(complexType, properties, currentAttribute.getName());
} else {
currentComplexProperty = new ComplexProperty();
if (isBuildModeComplexType) {
JPAEdmNameBuilder
.build((JPAEdmComplexPropertyView) JPAEdmProperty.this,
complexTypeView.getJPAEmbeddableType().getJavaType().getSimpleName());
} else {
JPAEdmNameBuilder
.build((JPAEdmComplexPropertyView) JPAEdmProperty.this,
JPAEdmProperty.this, skipDefaultNaming);
}
currentComplexProperty.setType(new FullQualifiedName(
schemaView.getEdmSchema().getNamespace(),
complexType.getName()));
properties.add(currentComplexProperty);
if (!complexTypeView.isReferencedInKey(currentComplexProperty.getType().getName()))
{
complexTypeView.setReferencedInKey(currentComplexProperty.getType().getName());