// no super entity
if (parseEntity.subEntities.length == 0) {
// no sub entities --> simple one
entity = new MappedEntity(this, parseEntity);
} else {
CInheritance inheritance = parseEntity.inheritance;
if (inheritance == null) {
throw new ModelUseException(
"inherited entity root is not annotated with @" + CInheritance.class.getSimpleName());
}
// base entity of inheritance structure
switch (inheritance.type()) {
case SINGLE_TABLE:
entity = new MappedEntitySTRoot(this, parseEntity);
break;
case TABLE_PER_CLASS:
entity = new MappedEntityTPCRoot(this, parseEntity);