private Set<ShiftType> getNonAssociatedTeachersShiftTypes(ExecutionCourse executionCourse) { Set<ShiftType> nonAssociatedTeachersShiftTypes = new HashSet<ShiftType>(); for (Shift shift : executionCourse.getAssociatedShifts()) { if (shift.getDegreeTeachingServicesSet().isEmpty() && shift.getNonRegularTeachingServicesSet().isEmpty()) { nonAssociatedTeachersShiftTypes.addAll(shift.getTypes()); } } return nonAssociatedTeachersShiftTypes; }