try {
this.logger.logDebug("getting analysis by remote id");
Session currentSession = FacadeDB.getInstance().getCurrentSession();
Criteria criteria = currentSession.createCriteria(
AnalysisRemote.class).add(Restrictions.eq("remoteId", remoteId)).setMaxResults(1);
AnalysisRemote analysisRemote = (AnalysisRemote) criteria.uniqueResult();
this.logger.logDebug("get successfully");
return (analysisRemote != null ? analysisRemote.getAnalysis() : null);
} catch (HibernateException e) {
this.logger.logError("error on get analysis by remote id, msg: " + e.getMessage());
throw new ExceptionDAO("No se pudieron obtener los análisis", e.fillInStackTrace());
}
}