Examples of ImplClassA


Examples of org.apache.openjpa.persistence.inheritance.entity.ImplClassA

        // Add some entities
        em.getTransaction().begin();
        ManagedIface mif = em.createInstance(ManagedIface.class);
        mif.setIntFieldSup(10);
               
        ImplClassA ica = new ImplClassA();
        ica.setImplClassAName("ImplClassAName");
        ica.setIntFieldSup(11);
       
        em.persist(mif);
        em.persist(ica);       
        em.getTransaction().commit();

        em.clear();

        // Verify that the iface table does not contain a discriminator column
        verifyNoDypeColumn(em, "ManagedIface");

        // Verify that the impl table does not contain a discriminator column
        verifyNoDypeColumn(em, "ImplClassA");
       
        // Query the subclass tables.  Make sure the counts are correct and
        // the result is castable to the entity and interface types.
        verifyInheritanceQueryResult(em, "ImplClassA",
                classArray(ImplClassA.class, ManagedIface.class), ica.getId());

        // Query the interface2 table.  Make sure the count is correct and
        // the result is castable to the interface type.
        verifyInheritanceQueryResult(em, "ManagedIface",
                classArray(ManagedIface.class), mif.getId(),
                ica.getId());
       
        em.close();
    }
View Full Code Here

Examples of org.apache.openjpa.persistence.inheritance.entity.ImplClassA

        // Add some entities
        em.getTransaction().begin();
        ManagedIface mif = em.createInstance(ManagedIface.class);
        mif.setIntFieldSup(10);
               
        ImplClassA ica = new ImplClassA();
        ica.setImplClassAName("ImplClassAName");
        ica.setIntFieldSup(11);
       
        em.persist(mif);
        em.persist(ica);       
        em.getTransaction().commit();

        em.clear();

        // Verify that the iface table does not contain a discriminator column
        verifyNoDypeColumn(em, "ManagedIface");

        // Verify that the impl table does not contain a discriminator column
        verifyNoDypeColumn(em, "ImplClassA");
       
        // Query the subclass tables.  Make sure the counts are correct and
        // the result is castable to the entity and interface types.
        verifyInheritanceQueryResult(em, "ImplClassA",
                classArray(ImplClassA.class, ManagedIface.class), ica.getId());

        // Query the interface2 table.  Make sure the count is correct and
        // the result is castable to the interface type.
        verifyInheritanceQueryResult(em, "ManagedIface",
                classArray(ManagedIface.class), mif.getId(),
                ica.getId());
       
        em.close();
    }
View Full Code Here

Examples of org.apache.openjpa.persistence.inheritance.entity.ImplClassA

        // Add some entities
        em.getTransaction().begin();
        ManagedIface mif = em.createInstance(ManagedIface.class);
        mif.setIntFieldSup(10);
               
        ImplClassA ica = new ImplClassA();
        ica.setImplClassAName("ImplClassAName");
        ica.setIntFieldSup(11);
       
        em.persist(mif);
        em.persist(ica);       
        em.getTransaction().commit();

        em.clear();

        // Verify that the iface table does not contain a discriminator column
        verifyNoDypeColumn(em, "ManagedIface");

        // Verify that the impl table does not contain a discriminator column
        verifyNoDypeColumn(em, "ImplClassA");
       
        // Query the subclass tables.  Make sure the counts are correct and
        // the result is castable to the entity and interface types.
        verifyInheritanceQueryResult(em, "ImplClassA",
                classArray(ImplClassA.class, ManagedIface.class), ica.getId());

        // Query the interface2 table.  Make sure the count is correct and
        // the result is castable to the interface type.
        verifyInheritanceQueryResult(em, "ManagedIface",
                classArray(ManagedIface.class), mif.getId(),
                ica.getId());
       
        em.close();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.