this.logger.logDebug("Getting all averages");
Session currentSession = FacadeDB.getInstance().getCurrentSession();
List<AverageByDecadeFemale> listFemale = currentSession.createCriteria(AverageByDecadeFemale.class).addOrder(Order.asc("decade")).list();
List<AverageByDecadeMale> listMale = currentSession.createCriteria(AverageByDecadeMale.class).addOrder(Order.asc("decade")).list();
this.logger.logDebug("get averages successfully");
Averages averages = new Averages(listFemale, listMale);
return averages;
} catch (HibernateException e) {
this.logger.logError("error on get averages, msg: " + e.getMessage());
throw new ExceptionDAO("No se pudieron obtener los promedios", e.fillInStackTrace());
}