@Override
public Object getValueAt(int row, int col) {
if (dbObjects == null || dbObjects.size() == 0)
return null;
EmployeeVacation vacation = (EmployeeVacation) dbObjects.get(row);
switch (col) {
case 0:
return vacation.getId();
case 1:
return vacation.getVacType();
case 2:
return ViewUtil.formatDate(vacation.getFromDate());
case 3:
return ViewUtil.formatDate(vacation.getToDate());
case 4:
return Days.daysBetween(new DateTime(vacation.getFromDate()),
new DateTime(vacation.getToDate())).getDays();
case 5:
return vacation.getNotes();
default:
return null;
}
}