*/
private void visitClassTable(SpeedoClass sc) throws SpeedoException {
//check the mainTable
if (sc.mainTable == null) {
if (sc.inheritance == null || sc.inheritance.superClassName == null) {
sc.mainTable = new SpeedoTable();
} else if (sc.inheritance.isFilteredMapping()) {
//The table is one of the parent
sc.mainTable = getRootTable(sc.getSuper());
} else if (sc.inheritance.isHorizontalMapping()) {
sc.mainTable = new SpeedoTable();
} else if (sc.inheritance.isVerticalMapping()) {
SpeedoClass parent = sc.getSuper();
if (sc.inheritance.join == null) {
sc.inheritance.join = new SpeedoJoin();
}
SpeedoJoin join = sc.inheritance.join;
if (join.mainTable == null) {
join.mainTable = getRootTable(parent);
}
if (sc.mainTable == null) {
if (join.extTable == null) {
join.extTable = new SpeedoTable();
}
sc.mainTable = join.extTable;
} else {
join.extTable = sc.mainTable;
}
} else if (sc.inheritance.strategy == SpeedoInheritance.STRATEGY_SUBCLASS_TABLE) {
//allocate a temp table
sc.mainTable = new SpeedoTable();
} else {
throw new SpeedoException("Inheritance case not managed, class: "
+ sc.getSourceDesc());
}
}