Package org.hibernate.test.annotations.id.entities

Examples of org.hibernate.test.annotations.id.entities.Furniture


    Session s = openSession();
    Transaction tx = s.beginTransaction();
    SoundSystem system = new SoundSystem();
    system.setBrand("Genelec");
    system.setModel("T234");
    Furniture fur = new Furniture();
    s.persist(system);
    s.persist(fur);
    tx.commit();
    s.close();

    s = openSession();
    tx = s.beginTransaction();
    system = (SoundSystem) s.get(SoundSystem.class, system.getId());
    fur = (Furniture) s.get(Furniture.class, fur.getId());
    assertNotNull(system);
    assertNotNull(fur);
    s.delete(system);
    s.delete(fur);
    tx.commit();
View Full Code Here


    Session s = openSession();
    Transaction tx = s.beginTransaction();
    SoundSystem system = new SoundSystem();
    system.setBrand("Genelec");
    system.setModel("T234");
    Furniture fur = new Furniture();
    s.persist(system);
    s.persist(fur);
    tx.commit();
    s.close();

    s = openSession();
    tx = s.beginTransaction();
    system = (SoundSystem) s.get(SoundSystem.class, system.getId());
    fur = (Furniture) s.get(Furniture.class, fur.getId());
    assertNotNull(system);
    assertNotNull(fur);
    s.delete(system);
    s.delete(fur);
    tx.commit();
View Full Code Here

    Session s = openSession();
    Transaction tx = s.beginTransaction();
    SoundSystem system = new SoundSystem();
    system.setBrand("Genelec");
    system.setModel("T234");
    Furniture fur = new Furniture();
    s.persist(system);
    s.persist(fur);
    tx.commit();
    s.close();

    s = openSession();
    tx = s.beginTransaction();
    system = (SoundSystem) s.get(SoundSystem.class, system.getId());
    fur = (Furniture) s.get(Furniture.class, fur.getId());
    assertNotNull(system);
    assertNotNull(fur);
    s.delete(system);
    s.delete(fur);
    tx.commit();
View Full Code Here

TOP

Related Classes of org.hibernate.test.annotations.id.entities.Furniture

Copyright © 2018 www.massapicom. 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.