Package org.hibernate.ejb.test.pack.explodedpar

Examples of org.hibernate.ejb.test.pack.explodedpar.Carpet


  }

  public void testExplodedPar() throws Exception {
    EntityManagerFactory emf = Persistence.createEntityManagerFactory( "explodedpar", new HashMap() );
    EntityManager em = emf.createEntityManager();
    org.hibernate.ejb.test.pack.explodedpar.Carpet carpet = new Carpet();
    Elephant el = new Elephant();
    el.setName( "Dumbo" );
    carpet.setCountry( "Turkey" );
    em.getTransaction().begin();
    em.persist( carpet );
    em.persist( el );
    assertEquals( 1, em.createNamedQuery( "allCarpet" ).getResultList().size() );
    assertNotNull( carpet.getId() );
    em.remove( carpet );
    em.getTransaction().commit();
    em.close();
    emf.close();
  }
View Full Code Here


  }

  public void testExplodedPar() throws Exception {
    EntityManagerFactory emf = Persistence.createEntityManagerFactory( "explodedpar", new HashMap() );
    EntityManager em = emf.createEntityManager();
    org.hibernate.ejb.test.pack.explodedpar.Carpet carpet = new Carpet();
    Elephant el = new Elephant();
    el.setName( "Dumbo" );
    carpet.setCountry( "Turkey" );
    em.getTransaction().begin();
    em.persist( carpet );
    em.persist( el );
    assertEquals( 1, em.createNamedQuery( "allCarpet" ).getResultList().size() );
    assertNotNull( carpet.getId() );
    em.remove( carpet );
    em.getTransaction().commit();
    em.close();
    emf.close();
  }
View Full Code Here

    File testPackage = buildExplodedPar();
    addPackageToClasspath( testPackage );

    EntityManagerFactory emf = Persistence.createEntityManagerFactory( "explodedpar", new HashMap() );
    EntityManager em = emf.createEntityManager();
    org.hibernate.ejb.test.pack.explodedpar.Carpet carpet = new Carpet();
    Elephant el = new Elephant();
    el.setName( "Dumbo" );
    carpet.setCountry( "Turkey" );
    em.getTransaction().begin();
    em.persist( carpet );
    em.persist( el );
    assertEquals( 1, em.createNamedQuery( "allCarpet" ).getResultList().size() );
    assertNotNull( carpet.getId() );
    em.remove( carpet );
    em.getTransaction().commit();
    em.close();
    emf.close();
  }
View Full Code Here

  }

  public void testExplodedPar() throws Exception {
    EntityManagerFactory emf = Persistence.createEntityManagerFactory( "explodedpar", new HashMap() );
    EntityManager em = emf.createEntityManager();
    org.hibernate.ejb.test.pack.explodedpar.Carpet carpet = new Carpet();
    Elephant el = new Elephant();
    el.setName( "Dumbo" );
    carpet.setCountry( "Turkey" );
    em.getTransaction().begin();
    em.persist( carpet );
    em.persist( el );
    assertEquals( 1, em.createNamedQuery( "allCarpet" ).getResultList().size() );
    assertNotNull( carpet.getId() );
    em.remove( carpet );
    em.getTransaction().commit();
    em.close();
    emf.close();
  }
View Full Code Here

  }

  public void testExplodedPar() throws Exception {
    EntityManagerFactory emf = Persistence.createEntityManagerFactory( "explodedpar", new HashMap() );
    EntityManager em = emf.createEntityManager();
    org.hibernate.ejb.test.pack.explodedpar.Carpet carpet = new Carpet();
    Elephant el = new Elephant();
    el.setName( "Dumbo" );
    carpet.setCountry( "Turkey" );
    em.getTransaction().begin();
    em.persist( carpet );
    em.persist( el );
    assertEquals( 1, em.createNamedQuery( "allCarpet" ).getResultList().size() );
    assertNotNull( carpet.getId() );
    em.remove( carpet );
    em.getTransaction().commit();
    em.close();
    emf.close();
  }
View Full Code Here

  }

  public void testExplodedPar() throws Exception {
    EntityManagerFactory emf = Persistence.createEntityManagerFactory( "explodedpar", new HashMap() );
    EntityManager em = emf.createEntityManager();
    org.hibernate.ejb.test.pack.explodedpar.Carpet carpet = new Carpet();
    Elephant el = new Elephant();
    el.setName( "Dumbo" );
    carpet.setCountry( "Turkey" );
    em.getTransaction().begin();
    em.persist( carpet );
    em.persist( el );
    assertEquals( 1, em.createNamedQuery( "allCarpet" ).getResultList().size() );
    assertNotNull( carpet.getId() );
    em.remove( carpet );
    em.getTransaction().commit();
    em.close();
    emf.close();
  }
View Full Code Here

  }

  public void testExplodedPar() throws Exception {
    EntityManagerFactory emf = Persistence.createEntityManagerFactory( "explodedpar", new HashMap() );
    EntityManager em = emf.createEntityManager();
    org.hibernate.ejb.test.pack.explodedpar.Carpet carpet = new Carpet();
    Elephant el = new Elephant();
    el.setName( "Dumbo" );
    carpet.setCountry( "Turkey" );
    em.getTransaction().begin();
    em.persist( carpet );
    em.persist( el );
    assertEquals( 1, em.createNamedQuery( "allCarpet" ).getResultList().size() );
    assertNotNull( carpet.getId() );
    em.remove( carpet );
    em.getTransaction().commit();
    em.close();
    emf.close();
  }
View Full Code Here

  }

  public void testExplodedPar() throws Exception {
    EntityManagerFactory emf = Persistence.createEntityManagerFactory( "explodedpar", new HashMap() );
    EntityManager em = emf.createEntityManager();
    org.hibernate.ejb.test.pack.explodedpar.Carpet carpet = new Carpet();
    Elephant el = new Elephant();
    el.setName( "Dumbo" );
    carpet.setCountry( "Turkey" );
    em.getTransaction().begin();
    em.persist( carpet );
    em.persist( el );
    assertEquals( 1, em.createNamedQuery( "allCarpet" ).getResultList().size() );
    assertNotNull( carpet.getId() );
    em.remove( carpet );
    em.getTransaction().commit();
    em.close();
    emf.close();
  }
View Full Code Here

  }

  public void testExplodedPar() throws Exception {
    EntityManagerFactory emf = Persistence.createEntityManagerFactory( "explodedpar", new HashMap() );
    EntityManager em = emf.createEntityManager();
    org.hibernate.ejb.test.pack.explodedpar.Carpet carpet = new Carpet();
    Elephant el = new Elephant();
    el.setName( "Dumbo" );
    carpet.setCountry( "Turkey" );
    em.getTransaction().begin();
    em.persist( carpet );
    em.persist( el );
    assertEquals( 1, em.createNamedQuery( "allCarpet" ).getResultList().size() );
    assertNotNull( carpet.getId() );
    em.remove( carpet );
    em.getTransaction().commit();
    em.close();
    emf.close();
  }
View Full Code Here

TOP

Related Classes of org.hibernate.ejb.test.pack.explodedpar.Carpet

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.