Examples of SLSBAudit


Examples of org.jboss.as.test.integration.jpa.hibernate.envers.SLSBAudit

    }

    @Test
    public void testRevisionsfromAuditJoinTable() throws Exception {

        SLSBAudit slsbAudit = lookup("SLSBAudit", SLSBAudit.class);

        Customer c1 = slsbAudit.createCustomer("MADHUMITA", "SADHUKHAN", "WORK", "+420", "543789654");
        Phone p1 = c1.getPhones().get(1);
        p1.setType("Emergency");
        slsbAudit.updatePhone(p1);
        c1.setSurname("Mondal");
        slsbAudit.updateCustomer(c1);
        c1.setFirstname("Steve");
        c1.setSurname("Jobs");
        slsbAudit.updateCustomer(c1);

        // delete phone

        c1.getPhones().remove(p1);
        slsbAudit.updateCustomer(c1);
        slsbAudit.deletePhone(p1);
        Assert.assertEquals(1, c1.getPhones().size());
        testRevisionDatafromAuditJoinTable(c1, slsbAudit);
        testRevisionTypefromAuditJoinTable(c1, slsbAudit);
        testOtherFieldslikeForeignKeysfromAuditJoinTable(c1, slsbAudit);
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.