int validationCode = validator.validate();
if (validationCode >= ValidationDisplayHandler.WARNING) {
Iterator it = validator.validationResults().iterator();
while (it.hasNext()) {
ValidationInfo nextProblem = (ValidationInfo) it.next();
Entity failedEntity = null;
if (nextProblem.getValidatedObject() instanceof DbAttribute) {
DbAttribute failedAttribute = (DbAttribute) nextProblem
.getValidatedObject();
failedEntity = failedAttribute.getEntity();
}
else if (nextProblem.getValidatedObject() instanceof DbRelationship) {
DbRelationship failedRelationship = (DbRelationship) nextProblem
.getValidatedObject();
failedEntity = failedRelationship.getSourceEntity();
}
else if (nextProblem.getValidatedObject() instanceof DbEntity) {
failedEntity = (Entity) nextProblem.getValidatedObject();
}
if (failedEntity == null) {
continue;
}
excludedTables.put(failedEntity.getName(), failedEntity);
validationMessages.put(failedEntity.getName(), nextProblem.getMessage());
}
}
// now do a pass through the tables and exclude derived
Iterator tablesIt = tables.iterator();