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