public EducationHistory toLog(EducationDto dto) { EducationHistory log = new EducationHistory(); log.setVersion(dto.getVersion()); log.setId(dto.getId()); log.setCourse(dto.getCourse()); log.setEducationStatus(dto.getEducationalStatus()); log.setStartDate(dto.getDate()); log.setStudentId(dto.getStudentId()); log.setSecondaryLevel1(dto.getSecondaryEducationStatus1()); log.setSecondaryLevel2(dto.getSecondaryEducationStatus2()); log.setYear(dto.getYear()); log.setComments(dto.getComments()); log.setPredictedEndDate(dto.getPredictedEndDate()); return log; }