assertEquals("Mismatched CatalogMap sizes for " + field_name, map0.size(), map1.size());
Class<? extends CatalogType> generic_class = (Class<? extends CatalogType>) map0.getGenericClass();
assert (generic_class != null);
CatalogType map0_values[] = map0.values();
CatalogType map1_values[] = map0.values();
for (int i = 0, cnt = map0.size(); i < cnt; i++) {
CatalogType child0 = map0_values[i];
assertNotNull("Null child element at index " + i + " for " + field_name, child0);
CatalogType child1 = map1_values[i];
assertNotNull("Null child element at index " + i + " for " + field_name, child1);
this.checkFields(generic_class, child0, child1);
} // FOR
}
// ConstraintRefs
else if (field_val0 instanceof ConstraintRef) {
ConstraintRef ref0 = (ConstraintRef) field_val0;
ConstraintRef ref1 = (ConstraintRef) field_val1;
if (debug)
System.err.println(CatalogUtil.getDisplayName(ref0) + " <-> " + CatalogUtil.getDisplayName(ref1));
this.checkFields(Column.class, ref0.getConstraint(), ref1.getConstraint());
}
// TableRefs
else if (field_val0 instanceof TableRef) {
TableRef ref0 = (TableRef) field_val0;
TableRef ref1 = (TableRef) field_val1;
if (debug)
System.err.println(CatalogUtil.getDisplayName(ref0) + " <-> " + CatalogUtil.getDisplayName(ref1));
this.checkFields(Table.class, ref0.getTable(), ref1.getTable());
}
// ColumnRefs
else if (field_val0 instanceof ColumnRef) {
ColumnRef ref0 = (ColumnRef) field_val0;
ColumnRef ref1 = (ColumnRef) field_val1;
if (debug)
System.err.println(CatalogUtil.getDisplayName(ref0) + " <-> " + CatalogUtil.getDisplayName(ref1));
this.checkFields(Column.class, ref0.getColumn(), ref1.getColumn());
}
// CatalogMap
else if (field_val0 != null && ClassUtil.getSuperClasses(field_val0.getClass()).contains(CatalogType.class)) {
CatalogType type0 = (CatalogType) field_val0;
CatalogType type1 = (CatalogType) field_val1;
if (debug)
System.err.println(CatalogUtil.getDisplayName(type0) + " <-> " + CatalogUtil.getDisplayName(type1));
assertEquals("Mismatched values for " + field_name, type0.getName(), type1.getName());
}
// Scalar
else {
if (debug)
System.err.println(field_val0 + " <-> " + field_val1);