EntityResult entityResult = new EntityResult(MetadataHelper.getClassForName(eResult.getEntityClass().getName(), loader));
// Process the field results.
if (eResult.hasFieldResults()) {
for (FieldResultMetadata fResult : eResult.getFieldResults()) {
FieldResult fieldResult = new FieldResult(fResult.getName(), fResult.getColumn());
if (project.useDelimitedIdentifier()) {
fieldResult.getColumn().setUseDelimiters(true);
} else if (project.getShouldForceFieldNamesToUpperCase() && !fieldResult.getColumn().shouldUseDelimiters()) {
//done directly as this field's name should be in uppercase.
fieldResult.getColumn().setName(fieldResult.getColumn().getName().toUpperCase());
}
entityResult.addFieldResult(fieldResult);
}
}