private Map<String, Object> checkRoadAudit(Student student) { log.debug("checkRoadAudit"); Map<String, Object> hm = null; if (student.getRoadTestCompletionDate() != null) { if (student.getRoadCompletionSchoolNumber() != null) { hm = new HashMap<String, Object>(); // if the school is is 1-499 or 6001-6500 its a dl employee. so won't have a score // but dont care cause its not going to be viewed by users. hm.put("studentFk", student.getStudentPk()); hm.put("completionDate", student.getRoadTestCompletionDate()); int fk = student.getRoadCompletionSchoolNumber().intValue(); // the values of dl employees if ((fk >= 1 && fk <= 499) || (fk >= 6001 && fk <= 6500)) { hm.put("schoolNumber", new Integer(0)); } else { hm.put("schoolNumber", student.getRoadCompletionSchoolNumber()); } if (student.getRoadTestScore() != null) { hm.put("roadScore", student.getRoadTestScore()); } if (student.getRoadTestInstructorFk() != null) { hm.put("roadInstructorFk", student.getRoadTestInstructorFk()); } } } return hm; }
private Student setAllSchoolNumbers(Student student) throws DaoException { if (student.getSchoolFk() != null) { String number = getSchoolNumber(student.getSchoolFk()); Integer schoolNumber = Integer.valueOf(number); log.debug("allSchoolNumbers schoolNumber is " + schoolNumber); if (student.getBtwCompletionSchoolNumber() == null) { student.setBtwCompletionSchoolNumber(schoolNumber); } if (student.getClassroomCompletionSchoolNumber() == null) { student.setClassroomCompletionSchoolNumber(schoolNumber); } if (student.getObservationCompletionSchoolNumber() == null) { student.setObservationCompletionSchoolNumber(schoolNumber); } if (student.getRoadCompletionSchoolNumber() == null) { student.setRoadCompletionSchoolNumber(schoolNumber); } if (student.getWrittenCompletionSchoolNumber() == null) { student.setWrittenCompletionSchoolNumber(schoolNumber); } } return student; }