Examples of resetValidation()


Examples of org.apache.cayenne.testdo.mt.ClientMtTable1.resetValidation()

        context.commitChanges();
        assertFalse(o1.isValidatedForInsert());
        assertFalse(o1.isValidatedForDelete());
        assertTrue(o1.isValidatedForUpdate());

        o1.resetValidation(false);
        context.deleteObject(o1);
        context.deleteObject(o2);

        context.commitChanges();
        assertFalse(o1.isValidatedForInsert());
View Full Code Here

Examples of org.apache.cayenne.testdo.mt.ClientMtTable1.resetValidation()

        assertTrue(o1.isValidatedForDelete());
        assertFalse(o1.isValidatedForUpdate());

        ClientMtTable1 o11 = context.newObject(ClientMtTable1.class);
        o11.setGlobalAttribute1("G1");
        o11.resetValidation(true);

        try {
            context.commitChanges();
            fail("Validation failure must have prevented commit");
        }
View Full Code Here

Examples of org.apache.cayenne.testdo.mt.ClientMtTable1.resetValidation()

    public void testValidate() throws Exception {

        ClientMtTable1 o1 = context.newObject(ClientMtTable1.class);
        o1.setGlobalAttribute1("G1");
        o1.resetValidation(false);

        // this one is not validating
        ClientMtTable2 o2 = context.newObject(ClientMtTable2.class);
        o2.setTable1(o1);
View Full Code Here

Examples of org.apache.cayenne.testdo.mt.ClientMtTable1.resetValidation()

        context.commitChanges();
        assertTrue(o1.isValidatedForInsert());
        assertFalse(o1.isValidatedForDelete());
        assertFalse(o1.isValidatedForUpdate());

        o1.resetValidation(false);
        o1.setGlobalAttribute1("G2");

        context.commitChanges();
        assertFalse(o1.isValidatedForInsert());
        assertFalse(o1.isValidatedForDelete());
View Full Code Here

Examples of org.apache.cayenne.testdo.mt.ClientMtTable1.resetValidation()

        CayenneContext c = new CayenneContext(clientChannel);
       
        ClientMtTable1 o1 = c.newObject(ClientMtTable1.class);
        o1.setGlobalAttribute1("G1");
        o1.resetValidation(false);
       
        // this one is not validating
        ClientMtTable2 o2 = c.newObject(ClientMtTable2.class);
        o2.setTable1(o1);
       
View Full Code Here

Examples of org.apache.cayenne.testdo.mt.ClientMtTable1.resetValidation()

        c.commitChanges();
        assertTrue(o1.isValidatedForInsert());
        assertFalse(o1.isValidatedForDelete());
        assertFalse(o1.isValidatedForUpdate());
       
        o1.resetValidation(false);
        o1.setGlobalAttribute1("G2");
       
        c.commitChanges();
        assertFalse(o1.isValidatedForInsert());
        assertFalse(o1.isValidatedForDelete());
View Full Code Here

Examples of org.apache.cayenne.testdo.mt.ClientMtTable1.resetValidation()

        c.commitChanges();
        assertFalse(o1.isValidatedForInsert());
        assertFalse(o1.isValidatedForDelete());
        assertTrue(o1.isValidatedForUpdate());
       
        o1.resetValidation(false);
        c.deleteObject(o1);
        c.deleteObject(o2);
       
        c.commitChanges();
        assertFalse(o1.isValidatedForInsert());
View Full Code Here

Examples of org.apache.cayenne.testdo.mt.ClientMtTable1.resetValidation()

        assertTrue(o1.isValidatedForDelete());
        assertFalse(o1.isValidatedForUpdate());
       
        ClientMtTable1 o11 = c.newObject(ClientMtTable1.class);
        o11.setGlobalAttribute1("G1");
        o11.resetValidation(true);
       
        try {
            c.commitChanges();
            fail("Validation failure must have prevented commit");
        }
View Full Code Here

Examples of org.apache.cayenne.testdo.mt.ClientMtTable1.resetValidation()

    public void testValidate() throws Exception {

        ClientMtTable1 o1 = context.newObject(ClientMtTable1.class);
        o1.setGlobalAttribute1("G1");
        o1.resetValidation(false);

        // this one is not validating
        ClientMtTable2 o2 = context.newObject(ClientMtTable2.class);
        o2.setTable1(o1);
View Full Code Here

Examples of org.apache.cayenne.testdo.mt.ClientMtTable1.resetValidation()

        context.commitChanges();
        assertTrue(o1.isValidatedForInsert());
        assertFalse(o1.isValidatedForDelete());
        assertFalse(o1.isValidatedForUpdate());

        o1.resetValidation(false);
        o1.setGlobalAttribute1("G2");

        context.commitChanges();
        assertFalse(o1.isValidatedForInsert());
        assertFalse(o1.isValidatedForDelete());
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.