return e;
}
public class StatusMapper implements RowMapper<Status> {
public Status mapRow(ResultSet rs, int rowNum) throws SQLException {
Status s = dataObjectFactory.getStatus();
s.setStatusId(rs.getLong("statusId"));
s.setHealth(HealthType.valueOf(rs.getString("health")));
s.setStartDate(rs.getDate("startDate"));
s.setCompletionDate(rs.getDate("completionDate"));
s.setRunName(rs.getString("runName"));
s.setInstrumentName(rs.getString("instrumentName"));
s.setLastUpdated(rs.getTimestamp("lastUpdated"));
Blob xmlblob = rs.getBlob("xml");
if (xmlblob != null) {
if (xmlblob.length() > 0) {
byte[] rbytes = xmlblob.getBytes(1, (int)xmlblob.length());
s.setXml(new String(rbytes));
}
}
return s;
}