Classify a DOSchemaClass by its inheritance — check if it's an IDEntite reference-holder, an Entite entity, a Param lookup table, or a descendant of any given ancestor class. Use this skill when type classification drives export routing.
All four classification methods live directly on DOSchemaClass and delegate to SchemaUtil.isDescendantOf(). All require a DOSchema instance (the reference schema).
| What you want | How to get it |
|---|---|
| Is descendant of any ancestor? | schemaClass.isDescendantOf(ancestorFQN, schema) |
| Is an IDEntite reference-holder? | schemaClass.isIDEntite(schema) |
| Is a full entity (has own mID)? | schemaClass.isEntite(schema) |
| Is a parameter/lookup table? | schemaClass.isParam(schema) |
DOSchema schema = DOSchemaService.getInstance().getReferenceSchema();
DOSchema schema = DOSchemaService.getInstance().getReferenceSchema();
// Route: entity vs reference-holder
if (schemaClass.isEntite(schema)) {
// can be a target of IDEntite references — has its own mID
}
if (schemaClass.isIDEntite(schema)) {
// carries a foreign-key mID — schemaClass.pointsTo names the target entity
}
if (schemaClass.isParam(schema)) {
// lookup/code table
}
// Custom ancestry
if (schemaClass.isDescendantOf("gest.intervention.Intervention", schema)) { ... }
isDescendantOf also returns true when the class is the named ancestor itself."gest.gen.IDEntite", "gest.gen.EntiteContientID", "gest.gen.EntiteParam".ApplicationService.initialize() must have run).src/main/java/migration4o/models/schema/DOSchemaClass.javasrc/main/java/migration4o/util/SchemaUtil.javasrc/main/java/migration4o/schema/DOSchemaService.java