studentGroupAttendList = studentGroup.getAttendsSet();
Iterator iterStudentGroupAttendList = studentGroupAttendList.iterator();
InfoSiteStudentInformation infoSiteStudentInformation = null;
InfoSiteStudentAndGroup infoSiteStudentAndGroup = null;
Attends attend = null;
while (iterStudentGroupAttendList.hasNext()) {
infoSiteStudentInformation = new InfoSiteStudentInformation();
infoSiteStudentAndGroup = new InfoSiteStudentAndGroup();
attend = (Attends) iterStudentGroupAttendList.next();
infoSiteStudentAndGroup.setInfoStudentGroup(InfoStudentGroup.newInfoFromDomain(studentGroup));
infoSiteStudentInformation.setNumber(attend.getRegistration().getNumber());
infoSiteStudentInformation.setUsername(attend.getRegistration().getPerson().getUsername());
infoSiteStudentInformation.setName(attend.getRegistration().getPerson().getName());
infoSiteStudentInformation.setEmail(attend.getRegistration().getPerson().getEmail());
infoSiteStudentInformation.setPersonID(attend.getRegistration().getPerson().getExternalId());
infoSiteStudentAndGroup.setInfoSiteStudentInformation(infoSiteStudentInformation);
infoSiteStudentsAndGroupsList.add(infoSiteStudentAndGroup);
}
}
Collections.sort(infoSiteStudentsAndGroupsList, new BeanComparator("infoSiteStudentInformation.number"));