try {
this.logger.logDebug("getting medic to upload");
Session currentSession = FacadeDB.getInstance().getCurrentSession();
Criteria criteria = currentSession.createCriteria(
MedicRemote.class).add(Restrictions.eq("remoteId", remoteId)).setMaxResults(1);
MedicRemote medicRemote = (MedicRemote) criteria.uniqueResult();
this.logger.logDebug("get successfully");
return (medicRemote != null ? medicRemote.getMedic() : null);
} catch (HibernateException e) {
this.logger.logError("error on get medic by remote id, msg: " + e.getMessage());
throw new ExceptionDAO("No se pudieron obtener los médicos", e.fillInStackTrace());
}
}