return task.getTaskLogs().size();
}
@Override
public Object getValueAt(int row, int column) {
BOTaskLog taskLog = task.getTaskLogs().toArray(new BOTaskLog[] {})[row];
if (column == -1) {
return taskLog;
}
if (column == 0) {// name
return taskLog.getTaskLogName();
} else if (column == 1) {// description
return taskLog.getTaskLogDescription();
} else if (column == 2) {// duration
return taskLog.getTaskLogHours();
} else if (column == 3) {// date
if(taskLog != null && taskLog.getTaskLogDate() != null) {
if(dateFormatter == null) {
return taskLog.getTaskLogDate() + "";
}else {
return dateFormatter.format(taskLog.getTaskLogDate());
}
}
} else if (column == 4) {// user
return task.getTaskLogs().toArray(new BOTaskLog[] {})[row].getTaskLogCreator();
}