return result;
}
private CDERow toCDERow(ResultSet rs, Mapping map, List<String> returnNames) {
CDERow row = new CDERow();
if (returnNames != null && returnNames.size() > 0) {
for (Iterator<String> i = returnNames.iterator(); i.hasNext();) {
String retName = i.next();
MappingField fld = map.getFieldByLocalName(retName);
// only handle dynamic fields here
// if it was a constant field, then it will be dealt with
// later
if (fld.getType().equals(FieldType.DYNAMIC)) {
// go ahead and add it in
try {
String elemDbVal = rs.getString(retName);
for (Iterator<MappingFunc> j = fld.getFuncs().iterator(); j
.hasNext();) {
MappingFunc func = j.next();
CDEValue origVal = new CDEValue(fld.getName(), elemDbVal);
CDEValue newVal = func.inverseTranslate(origVal);
elemDbVal = newVal.getVal();
}
row.getVals().add(new CDEValue(fld.getName(), elemDbVal));
} catch (SQLException e) {
LOG.log(Level.WARNING, "Unable to obtain field: [" + retName
+ "] from result set: message: " + e.getMessage());
}
}