InheritancePolicy inheritancePolicy = desc.getInheritancePolicyOrNull();
Extension extension = null;
if (inheritancePolicy != null && inheritancePolicy.getParentClass() != null) {
extension = new Extension();
extension.setBaseType(desc.getSchemaReference().getSchemaContextAsQName(workingSchema.getNamespaceResolver()).getLocalPart());
ComplexContent complexContent = new ComplexContent();
complexContent.setExtension(extension);
ct.setComplexContent(complexContent);
}
Sequence seq = new Sequence();
for (DatabaseMapping mapping : desc.getMappings()) {
processMapping(mapping, seq, ct, schemaForNamespace, workingSchema, properties, descriptors);