コード例 #1
0
 private void doSubtypes(DerivedAttribute2 attribute) {
   for (EntityDefinition entityDefinition : subtypes) {
     entityDefinition.addDerived(
         new DerivedAttribute2(
             attribute.getName(),
             attribute.getType(),
             attribute.getExpressCode(),
             attribute.isCollection(),
             true),
         false);
     entityDefinition.doSubtypes(attribute);
   }
 }
コード例 #2
0
 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);
 }