}
@Override
public void updateEntity(Task entity, Long id)
{
Task task = super.getEntity(id);
task.setCategory(categoryHome.findByUsernameAndCategory(user.getUsername(), categoryName));
task.setResolved(isResolved());
if (entity.getName() != null)
{
task.setName(entity.getName());
}
if (isResolved())
{
task.setUpdated(new Date());
}
taskHome.update();
}