}
f.set(result, associated);
} else {
// TODO Crear una excepcion especifica para darle significado a este suceso
throw new ReflectionException("ERROR: Compound key for associated entity.");
}
} else {
// If it is a common type we use the column name from the annotation or
// the name of the field if that has not been set
try {
// This is done because of finder queries where we don't want all entity fields
rs.findColumn(columnName);
} catch (SQLException e) {
readField = false;
if (!partialEntity) {
throw e;
}
}
if (readField) {
f.set(result, getValueFromQuery(f.getType(), rs, columnName));
}
}
}
} catch (Exception e) {
logger.log(Level.SEVERE, "Method: getFieldValue()", e);
throw new ReflectionException(e);
}
return result;
}