try {
this.logger.logDebug("getting family to upload");
Session currentSession = FacadeDB.getInstance().getCurrentSession();
Criteria criteria = currentSession.createCriteria(
FamilyRemote.class).add(Restrictions.eq("remoteId", remoteId)).setMaxResults(1);
FamilyRemote familyRemote = (FamilyRemote) criteria.uniqueResult();
this.logger.logDebug("get successfully");
return (familyRemote != null ? familyRemote.getFamily() : null);
} catch (HibernateException e) {
this.logger.logError("error on get las remote family synchronized, msg: " + e.getMessage());
throw new ExceptionDAO("No se pudieron obtener los familiares", e.fillInStackTrace());
}
}