List<StudentGroup> aux = new ArrayList<StudentGroup>();
List studentGroupsWithShift = groupProperties.getStudentGroupsWithShift();
Iterator iterStudentGroupsWithShift = studentGroupsWithShift.iterator();
while (iterStudentGroupsWithShift.hasNext()) {
StudentGroup studentGroup = (StudentGroup) iterStudentGroupsWithShift.next();
if (studentGroup.getShift().equals(shift)) {
aux.add(studentGroup);
}
}
List<StudentGroup> allStudentGroups = new ArrayList<StudentGroup>();
allStudentGroups.addAll(groupProperties.getStudentGroupsSet());
Iterator iterAux = aux.iterator();
while (iterAux.hasNext()) {
StudentGroup studentGroup = (StudentGroup) iterAux.next();
allStudentGroups.remove(studentGroup);
}
Iterator iterAllStudentGroups = allStudentGroups.iterator();
InfoSiteStudentsAndShiftByStudentGroup infoSiteStudentsAndShiftByStudentGroup = null;
while (iterAllStudentGroups.hasNext()) {
infoSiteStudentsAndShiftByStudentGroup = new InfoSiteStudentsAndShiftByStudentGroup();
StudentGroup studentGroup = (StudentGroup) iterAllStudentGroups.next();
Shift turno = studentGroup.getShift();
infoSiteStudentsAndShiftByStudentGroup.setInfoStudentGroup(InfoStudentGroup.newInfoFromDomain(studentGroup));
infoSiteStudentsAndShiftByStudentGroup.setInfoShift(InfoShift.newInfoFromDomain(turno));
Collection attendsList = studentGroup.getAttendsSet();
List<InfoSiteStudentInformation> studentGroupAttendInformationList = new ArrayList<InfoSiteStudentInformation>();
Iterator iterAttendsList = attendsList.iterator();
InfoSiteStudentInformation infoSiteStudentInformation = null;
Attends attend = null;