List of usage examples for org.hibernate Session update
void update(Object object);
From source file:br.com.clinica.dao.ConsultaDao.java
public void atualizar(Consulta consulta) { Session ss = HibernateUtil.getSessionFactory().getCurrentSession(); ss.beginTransaction();//from w w w . j av a 2s . co m ss.update(consulta); ss.getTransaction().commit(); //ss.close(); }
From source file:br.com.clinica.dao.DadosAdicionaisDao.java
@Override public void atualizar(DadosAdicionais dadosAdicionais) { Session ss = HibernateUtil.getSessionFactory().getCurrentSession(); ss.beginTransaction();// w ww . j ava2s .c o m ss.update(dadosAdicionais); ss.getTransaction().commit(); ss.close(); }
From source file:br.com.clinica.dao.PessoaDao.java
@Override public void atualizar(Pessoa pessoa) { Session ss = HibernateUtil.getSessionFactory().getCurrentSession(); try {/* www.j av a 2s. com*/ ss.beginTransaction(); try { ss.update(pessoa); ss.getTransaction().commit(); } catch (Exception ex) { ss.getTransaction().rollback(); throw ex; } } finally { HibernateUtil.getSessionFactory().getCurrentSession().close(); } }
From source file:br.com.clinica.dao.ProntuarioDao.java
@Override public void atualizar(Prontuario prontuario) { Session ss = HibernateUtil.getSessionFactory().getCurrentSession(); try {/*ww w . java2s .com*/ ss.beginTransaction(); try { ss.update(prontuario); ss.getTransaction().commit(); } catch (Exception ex) { ss.getTransaction().rollback(); throw ex; } } finally { HibernateUtil.getSessionFactory().getCurrentSession().close(); } }
From source file:br.com.Dao.HibernateDao.java
@Override public void update(T entity) { Session.update(entity); }
From source file:br.com.dao.UsuarioImp.java
public void update(Usuario usuario) { Session session = HibernateUtil.getSessionFactory().openSession(); Transaction t = session.beginTransaction(); session.update(usuario); t.commit();/*from w w w.j a v a 2 s . c o m*/ }
From source file:br.com.gaiatosfc.DAO.AdversariosDAOImp.java
@Override public void atualizar(Adversarios jogador) throws DAOException { Session session = null; try {//from ww w . j a va 2 s .c om session = HibernateUtil.getSessionFactory().openSession(); Transaction t = session.beginTransaction(); session.update(jogador); t.commit(); } catch (Exception e) { session.getTransaction().rollback(); throw new DAOException(e); } finally { if (session != null) { session.close(); } } }
From source file:br.com.gaiatosfc.DAO.CampeonatosDAOImp.java
@Override public void atualizar(Campeonatos campeonato) throws DAOException { Session session = null; try {//w w w. j a v a 2s .c o m session = HibernateUtil.getSessionFactory().openSession(); Transaction t = session.beginTransaction(); session.update(campeonato); t.commit(); } catch (Exception e) { session.getTransaction().rollback(); throw new DAOException(e); } finally { if (session != null) { session.close(); } } }
From source file:br.com.itw.qopsearch.api.persistence.core.FeatureProductRepositoryImpl.java
License:Apache License
@Override public ProductFeature update(ProductFeature productFeature) { Session session = (Session) entityManager.getDelegate(); session.update(productFeature); return productFeature; }
From source file:br.com.itw.qopsearch.api.persistence.core.FeatureRepositoryImpl.java
License:Apache License
@Override public Feature update(Feature feature) { Session session = (Session) entityManager.getDelegate(); session.update(feature); return feature; }