Package org.apache.openjpa.persistence.simple

Examples of org.apache.openjpa.persistence.simple.NamedEntity


    extends SingleEMFTestCase {

    public void setUp() {
        setUp(NamedEntity.class);

        NamedEntity e = new NamedEntity();
        e.setName("e");

        EntityManager em = emf.createEntityManager();
        em.getTransaction().begin();
        em.persist(e);
        em.getTransaction().commit();
View Full Code Here


    }

    public void testQuery() {
        EntityManager em = emf.createEntityManager();
        Query q = em.createQuery("select e from named e");
        NamedEntity e = (NamedEntity) q.getSingleResult();
        assertNotNull(e);
        assertEquals("e", e.getName());
        em.close();
    }
View Full Code Here

TOP

Related Classes of org.apache.openjpa.persistence.simple.NamedEntity

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.