Package org.hibernate.test.annotations.inheritance.singletable

Examples of org.hibernate.test.annotations.inheritance.singletable.Noise


    s = openSession();
    tx = s.beginTransaction();
    Rock guns = new Rock();
    guns.setAvgBeat( 90 );
    guns.setType( 2 );
    Noise white = new Noise();
    white.setAvgBeat( 0 );
    white.setType( null );

    s.persist( guns );
    s.persist( white );
    tx.commit();
    s.close();

    s = openSession();
    tx = s.beginTransaction();
    List result = s.createCriteria( Noise.class ).list();
    assertNotNull( result );
    assertEquals( 1, result.size() );
    white = (Noise) result.get( 0 );
    assertNull( white.getType() );
    s.delete( white );
    result = s.createCriteria( Rock.class ).list();
    assertEquals( 1, result.size() );
    s.delete( result.get( 0 ) );
    result = s.createCriteria( Funk.class ).list();
View Full Code Here


    s = openSession();
    tx = s.beginTransaction();
    Rock guns = new Rock();
    guns.setAvgBeat( 90 );
    guns.setType( 2 );
    Noise white = new Noise();
    white.setAvgBeat( 0 );
    white.setType( null );

    s.persist( guns );
    s.persist( white );
    tx.commit();
    s.close();

    s = openSession();
    tx = s.beginTransaction();
    List result = s.createCriteria( Noise.class ).list();
    assertNotNull( result );
    assertEquals( 1, result.size() );
    white = (Noise) result.get( 0 );
    assertNull( white.getType() );
    s.delete( white );
    result = s.createCriteria( Rock.class ).list();
    assertEquals( 1, result.size() );
    s.delete( result.get( 0 ) );
    result = s.createCriteria( Funk.class ).list();
View Full Code Here

    s = openSession();
    tx = s.beginTransaction();
    Rock guns = new Rock();
    guns.setAvgBeat( 90 );
    guns.setType( 2 );
    Noise white = new Noise();
    white.setAvgBeat( 0 );
    white.setType( null );

    s.persist( guns );
    s.persist( white );
    tx.commit();
    s.close();

    s = openSession();
    tx = s.beginTransaction();
    List result = s.createCriteria( Noise.class ).list();
    assertNotNull( result );
    assertEquals( 1, result.size() );
    white = (Noise) result.get( 0 );
    assertNull( white.getType() );
    s.delete( white );
    result = s.createCriteria( Rock.class ).list();
    assertEquals( 1, result.size() );
    s.delete( result.get( 0 ) );
    result = s.createCriteria( Funk.class ).list();
View Full Code Here

    s = openSession();
    tx = s.beginTransaction();
    Rock guns = new Rock();
    guns.setAvgBeat( 90 );
    guns.setType( 2 );
    Noise white = new Noise();
    white.setAvgBeat( 0 );
    white.setType( null );

    s.persist( guns );
    s.persist( white );
    tx.commit();
    s.close();

    s = openSession();
    tx = s.beginTransaction();
    List result = s.createCriteria( Noise.class ).list();
    assertNotNull( result );
    assertEquals( 1, result.size() );
    white = (Noise) result.get( 0 );
    assertNull( white.getType() );
    s.delete( white );
    result = s.createCriteria( Rock.class ).list();
    assertEquals( 1, result.size() );
    s.delete( result.get( 0 ) );
    result = s.createCriteria( Funk.class ).list();
View Full Code Here

    s = openSession();
    tx = s.beginTransaction();
    Rock guns = new Rock();
    guns.setAvgBeat( 90 );
    guns.setType( 2 );
    Noise white = new Noise();
    white.setAvgBeat( 0 );
    white.setType( null );

    s.persist( guns );
    s.persist( white );
    tx.commit();
    s.close();

    s = openSession();
    tx = s.beginTransaction();
    List result = s.createCriteria( Noise.class ).list();
    assertNotNull( result );
    assertEquals( 1, result.size() );
    white = (Noise) result.get( 0 );
    assertNull( white.getType() );
    s.delete( white );
    result = s.createCriteria( Rock.class ).list();
    assertEquals( 1, result.size() );
    s.delete( result.get( 0 ) );
    result = s.createCriteria( Funk.class ).list();
View Full Code Here

TOP

Related Classes of org.hibernate.test.annotations.inheritance.singletable.Noise

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.