Package org.apache.cayenne.lifecycle.db

Examples of org.apache.cayenne.lifecycle.db.AuditableChild3


        ChangeSetFilter changeSetFilter = new ChangeSetFilter();
        domain.addFilter(changeSetFilter);

        ObjectContext context = runtime.newContext();

        AuditableChild3 ac1 = Cayenne.objectForPK(context, AuditableChild3.class, 1);

        // a change to ignored property should not cause an audit event
        ac1.setCharProperty1("X_X");

        context.commitChanges();
        assertEquals(0, processor.size);

        processor.reset();
        ac1.setCharProperty2("XXXXX");
        context.commitChanges();
        assertEquals(1, processor.size);
    }
View Full Code Here


        domain.addFilter(changeSetFilter);
        domain.getEntityResolver().getCallbackRegistry().addListener(changeSetFilter);

        ObjectContext context = runtime.getContext();

        AuditableChild3 ac1 = Cayenne.objectForPK(context, AuditableChild3.class, 1);

        // a change to ignored property should not cause an audit event
        ac1.setCharProperty1("X_X");

        context.commitChanges();
        assertEquals(0, processor.size);

        processor.reset();
        ac1.setCharProperty2("XXXXX");
        context.commitChanges();
        assertEquals(1, processor.size);
    }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.lifecycle.db.AuditableChild3

Copyright © 2018 www.massapicom. 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.