// }
assignment.getDetail().setTask(task);
assignment.getDetail().setResource(resource);
Object snapshotId=new Integer(s);
TaskSnapshot snapshot=(TaskSnapshot)task.getSnapshot(snapshotId);
//TODO was commented but needed for loading because task.getSnapshot(snapshotId)==null
//for snapshots other than CURRENT
if (snapshot==null){
snapshot=new TaskSnapshot();
snapshot.setCurrentSchedule(task.getCurrentSchedule());
task.setSnapshot(snapshotId,snapshot);
}
if (Snapshottable.TIMESHEET.equals(snapshotId)) {
assignment.setTimesheetAssignment(true);
}
//
snapshot.addAssignment(assignment);
if (assigned&&Snapshottable.CURRENT.equals(snapshotId)) resource.addAssignment(assignment);
if (assignmentData!=null) assignmentData.emtpy();
//incremental.addAssignment(assignmentData);