private static void copyShifts(final ExecutionCourse executionCourseFrom, final ExecutionCourse executionCourseTo) {
final List<Shift> associatedShifts = new ArrayList<Shift>(executionCourseFrom.getAssociatedShifts());
for (final Shift shift : associatedShifts) {
List<CourseLoad> courseLoadsFrom = new ArrayList<CourseLoad>(shift.getCourseLoadsSet());
for (Iterator<CourseLoad> iter = courseLoadsFrom.iterator(); iter.hasNext();) {
CourseLoad courseLoadFrom = iter.next();
CourseLoad courseLoadTo = executionCourseTo.getCourseLoadByShiftType(courseLoadFrom.getType());
if (courseLoadTo == null) {
courseLoadTo =
new CourseLoad(executionCourseTo, courseLoadFrom.getType(), courseLoadFrom.getUnitQuantity(),
courseLoadFrom.getTotalQuantity());
}
iter.remove();
shift.removeCourseLoads(courseLoadFrom);
shift.addCourseLoads(courseLoadTo);