Package org.hibernate.ejb.test.pack.externaljar

Examples of org.hibernate.ejb.test.pack.externaljar.Scooter


    stats.setStatisticsEnabled( false );
  }

  public void testExternalJar() throws Exception {
    EntityManager em = factory.createEntityManager();
    Scooter s = new Scooter();
    s.setModel( "Abadah" );
    s.setSpeed( new Long( 85 ) );
    em.getTransaction().begin();
    em.persist( s );
    em.getTransaction().commit();
    em.close();
    em = factory.createEntityManager();
    em.getTransaction().begin();
    s = em.find( Scooter.class, s.getModel() );
    assertEquals( new Long( 85 ), s.getSpeed() );
    em.remove( s );
    em.getTransaction().commit();
    em.close();
  }
View Full Code Here


    stats.setStatisticsEnabled( false );
  }

  public void testExternalJar() throws Exception {
    EntityManager em = getOrCreateEntityManager();
    Scooter s = new Scooter();
    s.setModel( "Abadah" );
    s.setSpeed( 85l );
    em.getTransaction().begin();
    em.persist( s );
    em.getTransaction().commit();
    em.close();
    em = getOrCreateEntityManager();
    em.getTransaction().begin();
    s = em.find( Scooter.class, s.getModel() );
    assertEquals( new Long( 85 ), s.getSpeed() );
    em.remove( s );
    em.getTransaction().commit();
    em.close();
  }
View Full Code Here

    File testPackage = buildExplicitPar();
    addPackageToClasspath( testPackage, externalJar );

    EntityManagerFactory emf = Persistence.createEntityManagerFactory( "manager1", new HashMap() );
    EntityManager em = emf.createEntityManager();
    Scooter s = new Scooter();
    s.setModel( "Abadah" );
    s.setSpeed( 85l );
    em.getTransaction().begin();
    em.persist( s );
    em.getTransaction().commit();
    em.close();
    em = emf.createEntityManager();
    em.getTransaction().begin();
    s = em.find( Scooter.class, s.getModel() );
    assertEquals( new Long( 85 ), s.getSpeed() );
    em.remove( s );
    em.getTransaction().commit();
    em.close();
    emf.close();
  }
View Full Code Here

    stats.setStatisticsEnabled( false );
  }

  public void testExternalJar() throws Exception {
    EntityManager em = getOrCreateEntityManager();
    Scooter s = new Scooter();
    s.setModel( "Abadah" );
    s.setSpeed( 85l );
    em.getTransaction().begin();
    em.persist( s );
    em.getTransaction().commit();
    em.close();
    em = getOrCreateEntityManager();
    em.getTransaction().begin();
    s = em.find( Scooter.class, s.getModel() );
    assertEquals( new Long( 85 ), s.getSpeed() );
    em.remove( s );
    em.getTransaction().commit();
    em.close();
  }
View Full Code Here

    stats.setStatisticsEnabled( false );
  }

  public void testExternalJar() throws Exception {
    EntityManager em = factory.createEntityManager();
    Scooter s = new Scooter();
    s.setModel( "Abadah" );
    s.setSpeed( 85l );
    em.getTransaction().begin();
    em.persist( s );
    em.getTransaction().commit();
    em.close();
    em = factory.createEntityManager();
    em.getTransaction().begin();
    s = em.find( Scooter.class, s.getModel() );
    assertEquals( new Long( 85 ), s.getSpeed() );
    em.remove( s );
    em.getTransaction().commit();
    em.close();
  }
View Full Code Here

    stats.setStatisticsEnabled( false );
  }

  public void testExternalJar() throws Exception {
    EntityManager em = getOrCreateEntityManager();
    Scooter s = new Scooter();
    s.setModel( "Abadah" );
    s.setSpeed( 85l );
    em.getTransaction().begin();
    em.persist( s );
    em.getTransaction().commit();
    em.close();
    em = getOrCreateEntityManager();
    em.getTransaction().begin();
    s = em.find( Scooter.class, s.getModel() );
    assertEquals( new Long( 85 ), s.getSpeed() );
    em.remove( s );
    em.getTransaction().commit();
    em.close();
  }
View Full Code Here

    stats.setStatisticsEnabled( false );
  }

  public void testExternalJar() throws Exception {
    EntityManager em = getOrCreateEntityManager();
    Scooter s = new Scooter();
    s.setModel( "Abadah" );
    s.setSpeed( 85l );
    em.getTransaction().begin();
    em.persist( s );
    em.getTransaction().commit();
    em.close();
    em = getOrCreateEntityManager();
    em.getTransaction().begin();
    s = em.find( Scooter.class, s.getModel() );
    assertEquals( new Long( 85 ), s.getSpeed() );
    em.remove( s );
    em.getTransaction().commit();
    em.close();
  }
View Full Code Here

    stats.setStatisticsEnabled( false );
  }

  public void testExternalJar() throws Exception {
    EntityManager em = factory.createEntityManager();
    Scooter s = new Scooter();
    s.setModel( "Abadah" );
    s.setSpeed( 85l );
    em.getTransaction().begin();
    em.persist( s );
    em.getTransaction().commit();
    em.close();
    em = factory.createEntityManager();
    em.getTransaction().begin();
    s = em.find( Scooter.class, s.getModel() );
    assertEquals( new Long( 85 ), s.getSpeed() );
    em.remove( s );
    em.getTransaction().commit();
    em.close();
  }
View Full Code Here

    stats.setStatisticsEnabled( false );
  }

  public void testExternalJar() throws Exception {
    EntityManager em = getOrCreateEntityManager();
    Scooter s = new Scooter();
    s.setModel( "Abadah" );
    s.setSpeed( new Long( 85 ) );
    em.getTransaction().begin();
    em.persist( s );
    em.getTransaction().commit();
    em.close();
    em = getOrCreateEntityManager();
    em.getTransaction().begin();
    s = em.find( Scooter.class, s.getModel() );
    assertEquals( new Long( 85 ), s.getSpeed() );
    em.remove( s );
    em.getTransaction().commit();
    em.close();
  }
View Full Code Here

TOP

Related Classes of org.hibernate.ejb.test.pack.externaljar.Scooter

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.