public static AppointmentDto bindAppointment(AppointmentEntity appointmentEntity) { AppointmentDto appointmentDto = null; if (appointmentEntity != null) { appointmentDto = new AppointmentDto(); appointmentDto.setAppointmentId(appointmentEntity.getAppointmentId()); appointmentDto.setPractice(BindPractice.bindPractice(appointmentEntity.getPracticeEntity())); appointmentDto.setUser(BindUser.bindUser(appointmentEntity.getUserEntity())); appointmentDto.setNote(BindDataContent.bindDataContent(appointmentEntity.getNoteEntity())); appointmentDto.setExpectedFrm(appointmentEntity.getExpectedFrm()); appointmentDto.setExpectedTo(appointmentEntity.getExpectedTo()); appointmentDto.setActualFrm(appointmentEntity.getActualFrm()); appointmentDto.setActualTo(appointmentEntity.getActualTo()); } return appointmentDto; }