}
private void addEntity(List<JobListVO> list, Object[] columns)
{
JobListVO vo = new JobListVO();
vo.setJobId((Integer) columns[0]);
vo.setDueDate((Date) columns[1]);
vo.setStatus((JobVO.Status) columns[2]);
vo.setPriority((JobVO.Priority) columns[3]);
vo.setSubject((String) columns[4]);
vo.setAssignedUserName((String) columns[5]);
StringBuilder reference = new StringBuilder();
if(columns[6] != null)
reference.append(columns[6]);
if(columns[7] != null) {
if(reference.length() > 0)
reference.append(" ");
reference.append(columns[7]);
}
if(columns[8] != null) {
boolean hasPerson = false;
if(reference.length() > 0) {
hasPerson = true;
reference.append(" (");
}
reference.append(columns[8]);
if(hasPerson)
reference.append(")");
}
if(reference.length() > 0)
vo.setReference(reference.toString());
list.add(vo);
}