コード例 #1
0
 public StudentBean studentDtoToStudentBeanConverter(StudentDto studentDto) {
   StudentBean studentBean = new StudentBean();
   studentBean.setFirstName(studentDto.getFirstName());
   studentBean.setLastName(studentDto.getLastName());
   studentBean.setGender(studentDto.getGender());
   studentBean.setDOB(new Date(studentDto.getDOB().getTime()));
   studentBean.setEmail(studentDto.getEmail());
   studentBean.setMobileNumber(studentDto.getMobileNumber());
   studentBean.setAddress(studentDto.getAddress());
   studentBean.setCourses(studentDto.getCourses());
   return studentBean;
 }
コード例 #2
0
 public StudentDto studentBeanToStudentDtoConverter(StudentBean studentBean) {
   StudentDto studentDto = new StudentDto();
   studentDto.setFirstName(studentBean.getFirstName());
   studentDto.setLastName(studentBean.getLastName());
   studentDto.setGender(studentBean.getGender());
   studentDto.setDOB(new java.sql.Date(studentBean.getDOB().getTime()));
   studentDto.setEmail(studentBean.getEmail());
   studentDto.setMobileNumber(studentBean.getMobileNumber());
   studentDto.setAddress(studentBean.getAddress());
   studentDto.setCourses(studentBean.getCourses());
   return studentDto;
 }