public void addDerived(DerivedAttribute2 attribute, boolean firstOccurance) { if (!derivedAttributes.containsKey(attribute.getName())) { derivedAttributes.put(attribute.getName(), attribute); } else { if (firstOccurance) { derivedAttributes.put(attribute.getName(), attribute); } } for (EntityDefinition entityDefinition : supertypes) { if (entityDefinition.getAttributeBNWithSuper(attribute.getName()) != null) { derivedAttributesOverride.add(attribute.getName()); } } doSubtypes(attribute); }