Package org.hibernate.classic

Examples of org.hibernate.classic.Session.update()


    //Actualizamos Item con nuevo Estado Actual
    item.setEstadoActual(savedEstadoItem);
    session = HibernateUtil.getSessionFactory().getCurrentSession();
    session.beginTransaction();
    session.update(item);
    session.getTransaction().commit();

    //Guardamos el nuevo historico
    this.nuevoEstadoHistorico(savedEstadoActual, savedEstadoItem);
   
View Full Code Here


    s.flush();
    s.connection().commit();
    s.close();

    s = openSession();
    s.update(z);
    s.flush();
    s.delete(z);
    s.delete("from W");
    s.flush();
    s.connection().commit();
View Full Code Here

    m = (Master) s.load(Master.class, mid);
    s.connection().commit();
    s.close();
    m.setName("New Name");
    s = openSession();
    s.update(m, mid);
    Iterator iter = m.getDetails().iterator();
    int i=0;
    while ( iter.hasNext() ) {
      assertTrue( iter.next()!=null );
      i++;
View Full Code Here

    s.close();
    c.setSubcategories(list);

    s = openSession();
    t = s.beginTransaction();
    s.update(c);
    t.commit();
    s.close();

    s = openSession();
    t = s.beginTransaction();
View Full Code Here

    assertTrue( !Hibernate.isInitialized( c.getSubcategories() ) );

    c.setSubcategories(list2);
    s = openSession();
    t = s.beginTransaction();
    s.update(c);
    t.commit();
    s.close();

    s = openSession();
    t = s.beginTransaction();
View Full Code Here

    Long id = (Long) s.save(m);
    t.commit();
    s.close();
    s = openSession();
    t = s.beginTransaction();
    s.update(m, id);
    s.flush();
    m.setAddress("foo bar");
    s.flush();
    s.delete(m);
    t.commit();
View Full Code Here

    s = openSession();
    t = s.beginTransaction();
    multi.setExtraProp( multi.getExtraProp() + "2" );
    //multi.setCount( multi.getCount() + 1 );
    multi.setName("new name");
    s.update(multi, mid);
    simp.setName("new name");
    s.update(simp, sid);
    sm.setAmount(456.7f);
    s.update(sm, smid);
    t.commit();
View Full Code Here

    multi.setExtraProp( multi.getExtraProp() + "2" );
    //multi.setCount( multi.getCount() + 1 );
    multi.setName("new name");
    s.update(multi, mid);
    simp.setName("new name");
    s.update(simp, sid);
    sm.setAmount(456.7f);
    s.update(sm, smid);
    t.commit();
    s.close();
View Full Code Here

    multi.setName("new name");
    s.update(multi, mid);
    simp.setName("new name");
    s.update(simp, sid);
    sm.setAmount(456.7f);
    s.update(sm, smid);
    t.commit();
    s.close();

    s = openSession();
    t = s.beginTransaction();
View Full Code Here

    t.commit();
    s.close();

    s = openSession();
    t = s.beginTransaction();
    s.update(multi, mid);
    s.delete(multi);
    assertEquals( 2, doDelete( s, "from Top" ) );
    t.commit();
    s.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.