Examples of RelLockingTestEntity


Examples of org.apache.cayenne.testdo.locking.RelLockingTestEntity

        List allObjects = context
                .performQuery(new SelectQuery(RelLockingTestEntity.class));
        assertEquals(1, allObjects.size());

        RelLockingTestEntity object = (RelLockingTestEntity) allObjects.get(0);

        // change name and save... no optimistic lock failure expected
        object.setName("first update");
        context.commitChanges();

        // change relationship and save... no optimistic lock failure expected
        SimpleLockingTestEntity object1 = context
                .newObject(SimpleLockingTestEntity.class);
        object.setToSimpleLockingTest(object1);
        context.commitChanges();

        // change row underneath, change description and save... optimistic lock failure
        // expected
        createTestData("RelLockUpdate");
        object.setName("third update");

        try {
            context.commitChanges();
            fail("Optimistic lock failure expected.");
        }
View Full Code Here

Examples of org.apache.cayenne.testdo.locking.RelLockingTestEntity

        List<?> allObjects = context.performQuery(new SelectQuery(
                RelLockingTestEntity.class));
        assertEquals(1, allObjects.size());

        RelLockingTestEntity object = (RelLockingTestEntity) allObjects.get(0);

        // change name and save... no optimistic lock failure expected
        object.setName("first update");
        context.commitChanges();

        // change relationship and save... no optimistic lock failure expected
        SimpleLockingTestEntity object1 = context
                .newObject(SimpleLockingTestEntity.class);
        object.setToSimpleLockingTest(object1);
        context.commitChanges();

        // change row underneath, change description and save... optimistic lock failure
        // expected
        createRelLockUpdate();

        object.setName("third update");

        try {
            context.commitChanges();
            fail("Optimistic lock failure expected.");
        }
View Full Code Here

Examples of org.apache.cayenne.testdo.locking.RelLockingTestEntity

        List allObjects = context
                .performQuery(new SelectQuery(RelLockingTestEntity.class));
        assertEquals(1, allObjects.size());

        RelLockingTestEntity object = (RelLockingTestEntity) allObjects.get(0);

        // change name and save... no optimistic lock failure expected
        object.setName("first update");
        context.commitChanges();

        // change relationship and save... no optimistic lock failure expected
        SimpleLockingTestEntity object1 = context
                .newObject(SimpleLockingTestEntity.class);
        object.setToSimpleLockingTest(object1);
        context.commitChanges();

        // change row underneath, change description and save... optimistic lock failure
        // expected
        createTestData("RelLockUpdate");
        object.setName("third update");

        try {
            context.commitChanges();
            fail("Optimistic lock failure expected.");
        }
View Full Code Here

Examples of org.apache.cayenne.testdo.locking.RelLockingTestEntity

        List<?> allObjects = context.performQuery(new SelectQuery(
                RelLockingTestEntity.class));
        assertEquals(1, allObjects.size());

        RelLockingTestEntity object = (RelLockingTestEntity) allObjects.get(0);

        // change name and save... no optimistic lock failure expected
        object.setName("first update");
        context.commitChanges();

        // change relationship and save... no optimistic lock failure expected
        SimpleLockingTestEntity object1 = context
                .newObject(SimpleLockingTestEntity.class);
        object.setToSimpleLockingTest(object1);
        context.commitChanges();

        // change row underneath, change description and save... optimistic lock failure
        // expected
        createRelLockUpdate();

        object.setName("third update");

        try {
            context.commitChanges();
            fail("Optimistic lock failure expected.");
        }
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.