public static AppointmentEntity bindAppointment(AppointmentDto appointmentDto) { AppointmentEntity appointmentEntity = null; if (appointmentDto != null) { appointmentEntity = new AppointmentEntity(); appointmentEntity.setAppointmentId(appointmentDto.getAppointmentId()); appointmentEntity.setPracticeEntity(BindPractice.bindPractice(appointmentDto.getPractice())); appointmentEntity.setUserEntity(BindUser.bindUser(appointmentDto.getUser())); appointmentEntity.setNoteEntity(BindDataContent.bindDataContent(appointmentDto.getNote())); appointmentEntity.setExpectedFrm(appointmentDto.getExpectedFrm()); appointmentEntity.setExpectedTo(appointmentDto.getExpectedTo()); appointmentEntity.setActualFrm(appointmentDto.getActualFrm()); appointmentEntity.setActualTo(appointmentDto.getActualTo()); } return appointmentEntity; }