Examples of fetchInitialField()


Examples of org.apache.openjpa.kernel.OpenJPAStateManager.fetchInitialField()

        Date d = rt1.getDateField();

        OpenJPAStateManager sm = getStateManager(rt1, pm);
        FieldMetaData fmd = sm.getMetaData().getField("dateField");
        assertEquals(d, sm.fetchInitialField(fmd.getIndex()));

        // == should pass here since we haven't made any modifications.
        assertTrue("mutable object fails == test; should not",
            d == sm.fetchInitialField(fmd.getIndex()));
View Full Code Here

Examples of org.apache.openjpa.kernel.OpenJPAStateManager.fetchInitialField()

        FieldMetaData fmd = sm.getMetaData().getField("dateField");
        assertEquals(d, sm.fetchInitialField(fmd.getIndex()));

        // == should pass here since we haven't made any modifications.
        assertTrue("mutable object fails == test; should not",
            d == sm.fetchInitialField(fmd.getIndex()));

        Date d2 = new Date();
        rt1.setDateField(d2);
        assertEquals(d, sm.fetchInitialField(fmd.getIndex()));
        endTx(pm);
View Full Code Here

Examples of org.apache.openjpa.kernel.OpenJPAStateManager.fetchInitialField()

        assertTrue("mutable object fails == test; should not",
            d == sm.fetchInitialField(fmd.getIndex()));

        Date d2 = new Date();
        rt1.setDateField(d2);
        assertEquals(d, sm.fetchInitialField(fmd.getIndex()));
        endTx(pm);
        assertEquals(d2, sm.fetchInitialField(fmd.getIndex()));
        assertTrue("mutable object passes == test; should not",
            d2 != sm.fetchInitialField(fmd.getIndex()));
        endEm(pm);
View Full Code Here

Examples of org.apache.openjpa.kernel.OpenJPAStateManager.fetchInitialField()

        Date d2 = new Date();
        rt1.setDateField(d2);
        assertEquals(d, sm.fetchInitialField(fmd.getIndex()));
        endTx(pm);
        assertEquals(d2, sm.fetchInitialField(fmd.getIndex()));
        assertTrue("mutable object passes == test; should not",
            d2 != sm.fetchInitialField(fmd.getIndex()));
        endEm(pm);
    }
View Full Code Here

Examples of org.apache.openjpa.kernel.OpenJPAStateManager.fetchInitialField()

        rt1.setDateField(d2);
        assertEquals(d, sm.fetchInitialField(fmd.getIndex()));
        endTx(pm);
        assertEquals(d2, sm.fetchInitialField(fmd.getIndex()));
        assertTrue("mutable object passes == test; should not",
            d2 != sm.fetchInitialField(fmd.getIndex()));
        endEm(pm);
    }

    public void testInitialValueExceptions() {
        OpenJPAEntityManager pm = getPM();
View Full Code Here

Examples of org.apache.openjpa.kernel.OpenJPAStateManager.fetchInitialField()

        startTx(pm);
        RuntimeTest1 rt1 = getObject(pm);
        OpenJPAStateManager sm = getStateManager(rt1, pm);
        FieldMetaData fmd = sm.getMetaData().getField("stringField");
        try {
            sm.fetchInitialField(fmd.getIndex());
            fail("exception should be thrown by KodoSM.fetchInitialField");
        } catch (org.apache.openjpa.util.UserException e) {
            // expected case
        }
        endTx(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.