Grouping groupProperties = FenixFramework.getDomainObject(groupPropertiesCode);
if (groupProperties == null) {
return null;
}
Shift shift = FenixFramework.getDomainObject(shiftCode);
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();