Examples of PCClassPC


Examples of org.apache.openjpa.persistence.kernel.common.apps.PCClassPC

        assertEquals(PCClassInterface.class.getName(),
            fmd.getDeclaredType().getName());
    }

    public void testPersist() {
        PCClassPC pc = new PCClassPC();
        pc.setSpecificPC(pc);
        pc.setGenericPC(pc);
        pc.setGenericObject(pc);
        pc.setSpecificInterface(pc);
        pc.setDefaultInterface(pc);
        pc.setGenericInterface(pc);
        pc.setSerializableInterface(pc);

        OpenJPAEntityManager pm = getPM();
        startTx(pm);
        pm.persist(pc);
        Object oid = pm.getObjectId(pc);
        endTx(pm);
        endEm(pm);

        pm = getPM();

        pc = (PCClassPC) pm.find(PCClassPC.class, oid);

        assertTrue(pc == pc.getSpecificPC());
        assertTrue(pc == pc.getGenericPC());
        assertNotNull(pc.getGenericObject());
        assertTrue(pc == pc.getGenericObject());
        assertTrue(pc == pc.getSpecificInterface());
        assertTrue(pc == pc.getDefaultInterface());
        assertNotNull(pc.getGenericInterface());
        assertTrue(pc == pc.getGenericInterface());
        assertNotNull(pc.getSerializableInterface());
        assertTrue(pc == pc.getSerializableInterface());

        endEm(pm);
    }
View Full Code Here

Examples of org.apache.openjpa.persistence.kernel.common.apps.PCClassPC

        assertEquals(PCClassInterface.class.getName(),
            fmd.getDeclaredType().getName());
    }

    public void testPersist() {
        PCClassPC pc = new PCClassPC();
        pc.setSpecificPC(pc);
        pc.setGenericPC(pc);
        pc.setGenericObject(pc);
        pc.setSpecificInterface(pc);
        pc.setDefaultInterface(pc);
        pc.setGenericInterface(pc);
        pc.setSerializableInterface(pc);

        OpenJPAEntityManager pm = getPM();
        startTx(pm);
        pm.persist(pc);
        Object oid = pm.getObjectId(pc);
        endTx(pm);
        endEm(pm);

        pm = getPM();

        pc = pm.find(PCClassPC.class, oid);

        assertTrue(pc == pc.getSpecificPC());
        assertTrue(pc == pc.getGenericPC());
        assertNotNull(pc.getGenericObject());
        assertTrue(pc == pc.getGenericObject());
        assertTrue(pc == pc.getSpecificInterface());
        assertTrue(pc == pc.getDefaultInterface());
        assertNotNull(pc.getGenericInterface());
        assertTrue(pc == pc.getGenericInterface());
        assertNotNull(pc.getSerializableInterface());
        assertTrue(pc == pc.getSerializableInterface());

        endEm(pm);
    }
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.