Package org.hibernate

Examples of org.hibernate.Session.update()


   

    public void editar(Computador computador) {
        Session session = HibernateUtil.getSessionFactory().openSession();
        session.beginTransaction();
        session.update(computador);
        session.getTransaction().commit();
        session.close();
    }
   
        public void deletar(Computador computador) {
View Full Code Here


        session.beginTransaction();
        if( existinglayout == null ){
            session.save(layout);
        }else{
            existinglayout.setLayout( layout.getLayout() );
            session.update(existinglayout);
        }
        session.getTransaction().commit();
    }

    /** insert a layout object into the database */
 
View Full Code Here

        session.beginTransaction();
        if (existingadmin == null){
            session.save(adminUser);
        }else{
            existingadmin.setPassword(adminUser.getPassword());
            session.update(existingadmin);
        }
        session.getTransaction().commit();
    }

    /**
 
View Full Code Here

        trans.begin();

        TipoDeficiencia df2 = pesquisarTipoDeficienciaPorCodigo(df.getCodTipoDeficiencia());
        df.setCodTipoDeficiencia(df2.getCodTipoDeficiencia());
        session.update(df);

        trans.commit();
        session.close();
    }
View Full Code Here

        trans.begin();

        TipoSitOcupacional to2 = pesquisarTipoSitOcupacionalPorCodigo(to.getCodTipoSitOcupacional());
        to.setCodTipoSitOcupacional(to2.getCodTipoSitOcupacional());
        session.update(to);

        trans.commit();
        session.close();
    }
View Full Code Here

        trans.begin();

        Familia fm2 = pesquisarFamiliaPorCodigo(fm.getCodFamilia());
        fm.setCodFamilia(fm2.getCodFamilia());
        session.update(fm);

        trans.commit();
        session.close();
    }
View Full Code Here

        trans.begin();

        Logradouro lg2 = pesquisarLogradouroPorCodigo(lg.getCodLogradouro());
        lg.setCodLogradouro(lg2.getCodLogradouro());
        session.update(lg);

        trans.commit();
        session.close();
    }
View Full Code Here

        trans.begin();

        Org org2 = pesquisarOrgPorCodigo(org.getCodOrg());
        org.setCodOrg(org2.getCodOrg());
        session.update(org);

        trans.commit();
        session.close();
    }
View Full Code Here

        trans.begin();

        TipoMoradia md2 = pesquisarTipoMoradiaPorCodigo(md.getCodTipoMoradia());
        md.setCodTipoMoradia(md2.getCodTipoMoradia());
        session.update(md);

        trans.commit();
        session.close();
    }
View Full Code Here

        trans.begin();

        GrupoUs gu2 = pesquisarGrupoUsPorCodigo(gu.getCodGrupoUs());
        gu.setCodGrupoUs(gu2.getCodGrupoUs());
        session.update(gu);

        trans.commit();
        session.close();
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.