private void setSchoolClassroom(List students) throws Exception { for (int i = 0; i < students.size(); i++) { Student student = (Student) students.get(i); HashMap hm = new HashMap(); hm.put("studentPk", student.getStudentPk()); List classroomList = getClassroomService().getSchoolInfoByStudent(hm); if (!classroomList.isEmpty()) { Classroom c = (Classroom) classroomList.get(0); student.setClassroomFk(c.getClassroomPk()); hm.put("studentFk", getCurrentStudent().getStudentPk()); hm.put("classroomPk", c.getClassroomPk()); Classroom school = getClassroomService().getSchoolInfo(hm); student.setSchoolName(school.getSchoolName()); } } }
public void setClassroomInfo() throws Exception { log.debug("setClassroomInfo"); if (getCurrentStudent() != null) { Map<String, Object> hm = new HashMap<String, Object>(); hm.put("studentFk", getCurrentStudent().getStudentPk()); hm.put("classroomPk", getClassroomPk()); Classroom school = getClassroomService().getSchoolInfo(hm); setSchoolName(school.getSchoolName()); setHomeStudy(school.getHomeStudy()); setSchoolPk(school.getSchoolFk()); // setCompletionDate(); setObservationCompletionDate(getCurrentStudent().getObservationCompletionDate()); setBtwCompletionDate(getCurrentStudent().getBehindWheelCompletionDate()); setTrainingCompletionDate(getCurrentStudent().getClassroomCompletionDate()); } else { log.error("################# setClassroomInfo ERROR"); } }