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;
while (iterAttendsList.hasNext()) {
infoSiteStudentInformation = new InfoSiteStudentInformation();
attend = (Attends) iterAttendsList.next();
infoSiteStudentInformation.setUsername(attend.getRegistration().getPerson().getUsername());
infoSiteStudentInformation.setNumber(attend.getRegistration().getNumber());
studentGroupAttendInformationList.add(infoSiteStudentInformation);
}
Collections.sort(studentGroupAttendInformationList, InfoSiteStudentInformation.COMPARATOR_BY_NUMBER);
infoSiteStudentsAndShiftByStudentGroup.setInfoSiteStudentInformationList(studentGroupAttendInformationList);
infoSiteStudentsAndShiftByStudentGroupList.add(infoSiteStudentsAndShiftByStudentGroup);
Collections.sort(infoSiteStudentsAndShiftByStudentGroupList,
InfoSiteStudentsAndShiftByStudentGroup.COMPARATOR_BY_NUMBER);