try {
this.logger.logDebug("getting sport by remote id");
Session currentSession = FacadeDB.getInstance().getCurrentSession();
Criteria criteria = currentSession.createCriteria(
SportRemote.class).add(Restrictions.eq("remoteId", remoteId)).setMaxResults(1);
SportRemote sportRemote = (SportRemote) criteria.uniqueResult();
this.logger.logDebug("get successfully");
return (sportRemote != null ? sportRemote.getSport() : null);
} catch (HibernateException e) {
this.logger.logError("error on get sport by remote id, msg: " + e.getMessage());
throw new ExceptionDAO("No se pudieron obtener las actividades físicas", e.fillInStackTrace());
}
}