Package org.apache.cayenne.lifecycle.db

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


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

        ObjectContext context = runtime.newContext();

        Auditable2 a1 = Cayenne.objectForPK(context, Auditable2.class, 1);
        Auditable2 a2 = Cayenne.objectForPK(context, Auditable2.class, 2);
        Auditable2 a3 = Cayenne.objectForPK(context, Auditable2.class, 3);

        a1.setCharProperty1("__");
        a2.setCharProperty2("__");
        a3.setCharProperty1("__");
        a3.setCharProperty2("__");

        context.commitChanges();

        assertEquals(2, processor.size);
        assertTrue(processor.audited.get(AuditableOperation.UPDATE).contains(a2));
View Full Code Here


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

        ObjectContext context = runtime.getContext();

        Auditable2 a1 = Cayenne.objectForPK(context, Auditable2.class, 1);
        Auditable2 a2 = Cayenne.objectForPK(context, Auditable2.class, 2);
        Auditable2 a3 = Cayenne.objectForPK(context, Auditable2.class, 3);

        a1.setCharProperty1("__");
        a2.setCharProperty2("__");
        a3.setCharProperty1("__");
        a3.setCharProperty2("__");

        context.commitChanges();

        assertEquals(2, processor.size);
        assertTrue(processor.audited.get(AuditableOperation.UPDATE).contains(a2));
View Full Code Here

TOP

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

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.