public List<Historico> listAll() { pdmDao.createEntityManager(); List<Historico> result = pdmDao.findAll(); pdmDao.closeEntityManager(); return result; }
public List<Historico> listByParceiro(int parId) { pdmDao.createEntityManager(); List<Historico> result = pdmDao.findHistoricoByParceiro(parId); pdmDao.closeEntityManager(); return result; }
public void delete(Historico pdm) { pdmDao.beginTransaction(); Historico persistedPersonWithIdOnly = pdmDao.findReferenceOnly(pdm.getHisId()); pdmDao.delete(persistedPersonWithIdOnly); pdmDao.commitAndCloseTransaction(); }
public Historico find(int pdmId) { pdmDao.beginTransaction(); Historico person = pdmDao.find(pdmId); pdmDao.closeTransaction(); return person; }
public void update(Historico pdm) { pdmDao.beginTransaction(); pdmDao.update(pdm); pdmDao.commitAndCloseTransaction(); }