sc.inheritance.join = new SpeedoJoin();
sc.inheritance.join.mainTable = sc.mainTable;
sc.inheritance.join.extTable = sc.getSuper().mainTable;
// First parse PrimaryKeyJoinColumn
if (a1 != null) {
SpeedoJoinColumn jcol = new SpeedoJoinColumn();
jcol.column = sc.getColumn(a1.name(), true);
if (jcol.column == null) {
nbErrors++;
logger.log(BasicLevel.ERROR, sc.getSourceDescShort()
+ ": inheritance join define with a column that does not exist - ("
+ a1.name() + ") not found!");
return;
}
if (a1.referencedColumnName().equals("")) {
nbErrors++;
logger.log(BasicLevel.ERROR, sc.getSourceDescShort()
+ ": inheritance join define with no column associated in superclass!");
return;
}
jcol.targetColumn = a1.referencedColumnName();
sc.inheritance.join.columns.add(jcol);
return;
}
// Now parse PrimaryKeyJoinColumns: the PrimaryKeyJoinColmun from the "pkjcs" array
for (PrimaryKeyJoinColumn pkjc : a2.value()) {
SpeedoJoinColumn jcol = new SpeedoJoinColumn();
jcol.column = sc.getColumn(pkjc.name(), true);
if (jcol.column == null) {
nbErrors++;
logger.log(BasicLevel.ERROR, sc.getSourceDescShort()
+ ": inheritance join define with a column that does not exist - ("