List<SurgeryPatient> list = currentSession.createCriteria(SurgeryPatient.class).add(Restrictions.and(Restrictions.eq("patient", patient), Restrictions.eq("surgery", surgery))).list();
this.logger.logDebug("exist surgery by patient successfully");
return !list.isEmpty();
} catch (HibernateException e) {
this.logger.logError("error on exist surgery by patient, msg: " + e.getMessage());
throw new ExceptionDAO("No se verificar si ya existe la intervención quirúrgicas del paciente", e.fillInStackTrace());
}
}