Package org.apache.cayenne.access

Examples of org.apache.cayenne.access.DataContext.commitChanges()


        for (int i = 0; i < 6; i++) {
            if (i < 3) {
                obj = context.newObject(MtTableBool.class);
                obj.setBlablacheck(true);
                obj.setNumber(i);
                context.commitChanges();
            }
            else {
                obj = context.newObject(MtTableBool.class);
                obj.setBlablacheck(false);
                obj.setNumber(i);
View Full Code Here


            }
            else {
                obj = context.newObject(MtTableBool.class);
                obj.setBlablacheck(false);
                obj.setNumber(i);
                context.commitChanges();
            }
        }
    }

    public void testPostAddCallback() throws Exception {
View Full Code Here

        Object pk = a.getObjectId().getReplacementIdMap().get(Artist.ARTIST_ID_PK_COLUMN);
        assertNotNull(pk);

        assertEquals(pk, DataObjectUtils.longPKForObject(a));

        context.commitChanges();

        Object pkAfterCommit = a.getObjectId().getIdSnapshot().get(
                Artist.ARTIST_ID_PK_COLUMN);
        assertEquals(pk, pkAfterCommit);
    }
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.