Examples of EmployeeImpl


Examples of org.springmodules.prevayler.test.domain.EmployeeImpl

        result = this.prevalentSystem.get(emp.getClass());
        assertTrue(result.isEmpty());
    }
   
    public void testDeleteUnsavedObject() {
        EmployeeImpl emp = new EmployeeImpl("a1");
       
        try {
            // Delete the transient employee:
            this.prevalentSystem.delete(emp);
            fail("Delete must fail!");
View Full Code Here

Examples of org.springmodules.prevayler.test.domain.EmployeeImpl

        // Create and save the manager:
        ManagerImpl man1 = new ManagerImpl("m1");
        this.template.save(man1);
       
        // Create an employee and add it to the manager:
        EmployeeImpl emp1 = new EmployeeImpl("a1");
        man1.addManagedEmployee(emp1);
        // Update the manager:
        this.template.update(man1);
       
        // Get the employee from the manager and change employee firstname:
        emp1 = (EmployeeImpl) man1.getManagedEmployees().iterator().next();
        emp1.setFirstname("Sergio");
        // Update the manager and the employee by cascade:
        this.template.update(man1);
       
        // Verify:
        emp1 = (EmployeeImpl) this.template.get(Employee.class, emp1.getId());
        assertEquals("Sergio", emp1.getFirstname());
    }
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.