Examples of addEmployee()


Examples of org.springmodules.xt.examples.domain.IOffice.addEmployee()

            return this.showForm(request, response, errors);
        }
        else {
            try {
                IEmployee employee = (IEmployee) this.introductor.getTarget(view);
                office.addEmployee(employee);
                store.addOffice(office);
            }
            catch(BusinessException ex) {
                for (Error error : ex.getErrors()) {
                    errors.reject(error.getCode(), error.getMessage());
View Full Code Here

Examples of org.springmodules.xt.test.domain.IOffice.addEmployee()

        IOffice office1 = new Office();
        IEmployee emp1 = new Employee();
       
        office1.setOfficeId("o1");
        emp1.setMatriculationCode("1");
        office1.addEmployee(emp1);
       
        composite.compose(spec);
        assertTrue(composite.evaluate(office1));
        assertTrue(adapter.evaluate(office1));
    }
View Full Code Here

Examples of org.springmodules.xt.test.domain.IOffice.addEmployee()

        IOffice office1 = new Office();
        IEmployee emp1 = new Employee();
       
        office1.setOfficeId("o1");
        emp1.setMatriculationCode("1");
        office1.addEmployee(emp1);
       
        assertTrue(spec.isSatisfiedBy(office1));
        assertTrue(adapter.evaluate(office1));
    }
}
View Full Code Here

Examples of org.springmodules.xt.test.domain.IOffice.addEmployee()

        IOffice office1 = new Office();
        IEmployee emp1 = new Employee();
       
        office1.setOfficeId("o1");
        emp1.setMatriculationCode("1");
        office1.addEmployee(emp1);
       
        assertTrue(this.compositeSpecification.compose(spec1).and(spec2).andNot(spec3).evaluate(office1));
       
        // Test also composition with another CompositeSpecificationImpl ...
        CompositeSpecificationImpl<BaseSpecification, IOffice> composite2 = new CompositeSpecificationImpl<BaseSpecification, IOffice>(BaseSpecification.class, "isSatisfiedBy");
View Full Code Here

Examples of org.springmodules.xt.test.domain.IOffice.addEmployee()

        IOffice office1 = new Office();
        IEmployee emp1 = new Employee();
       
        office1.setOfficeId("o1");
        emp1.setMatriculationCode("1");
        office1.addEmployee(emp1);
       
        assertTrue(this.compositeSpecification.compose(spec1).or(spec2).evaluate(office1));
       
        // Test also composition with another CompositeSpecificationImpl ...
        CompositeSpecificationImpl<BaseSpecification, IOffice> composite2 = new CompositeSpecificationImpl<BaseSpecification, IOffice>(BaseSpecification.class, "isSatisfiedBy");
View Full Code Here

Examples of org.springmodules.xt.test.domain.IOffice.addEmployee()

        IOffice office1 = new Office();
        IEmployee emp1 = new Employee();
       
        office1.setOfficeId("o1");
        emp1.setMatriculationCode("1");
        office1.addEmployee(emp1);
       
        assertTrue(this.compositeSpecification.compose(spec1).andNot(spec2).and(spec3).evaluate(office1));
       
        // Test also composition with another CompositeSpecificationImpl ...
        CompositeSpecificationImpl<BaseSpecification, IOffice> composite2 = new CompositeSpecificationImpl<BaseSpecification, IOffice>(BaseSpecification.class, "isSatisfiedBy");
View Full Code Here

Examples of org.springmodules.xt.test.domain.IOffice.addEmployee()

        IOffice office1 = new Office();
        IEmployee emp1 = new Employee();
       
        office1.setOfficeId("o1");
        emp1.setMatriculationCode("1");
        office1.addEmployee(emp1);
       
        assertTrue(this.compositeSpecification.compose(spec1).orNot(spec1).evaluate(office1));
       
        // Test also composition with another CompositeSpecificationImpl ...
        CompositeSpecificationImpl<BaseSpecification, IOffice> composite2 = new CompositeSpecificationImpl<BaseSpecification, IOffice>(BaseSpecification.class, "isSatisfiedBy");
View Full Code Here

Examples of org.springmodules.xt.test.domain.IOffice.addEmployee()

        IOffice office1 = new Office();
        IEmployee emp1 = new Employee();
       
        office1.setOfficeId("aaa");
        emp1.setMatriculationCode("1");
        office1.addEmployee(emp1);
       
        Notification notification = new NotificationImpl();
       
        assertFalse(this.compositeSpecification.compose(spec1).withMessage(new MessageImpl("wrong.office.id", Message.Type.ERROR, "Wrong Office Id"), false)
                                                                       .and(spec2).withMessage(new MessageImpl("office.unavailable", Message.Type.ERROR, "Office Not Available"), false)
View Full Code Here

Examples of org.springmodules.xt.test.domain.IOffice.addEmployee()

        IOffice office1 = new Office();
        IEmployee emp1 = new Employee();
       
        office1.setOfficeId("aaa");
        emp1.setMatriculationCode("1");
        office1.addEmployee(emp1);
       
        Notification notification = new NotificationImpl();
       
        assertFalse(this.compositeSpecification.compose(spec1).withMessage(new MessageImpl("wrong.office.id", Message.Type.WARNING, "Wrong Office Id"), false)
                                                                       .and(spec2).withMessage(new MessageImpl("office.unavailable", Message.Type.WARNING, "Office Not Available"), false)
View Full Code Here

Examples of org.springmodules.xt.test.domain.IOffice.addEmployee()

        IOffice office1 = new Office();
        IEmployee emp1 = new Employee();
       
        office1.setOfficeId("o1");
        emp1.setMatriculationCode("1");
        office1.addEmployee(emp1);
       
        Notification notification = new NotificationImpl();
       
        assertTrue(this.compositeSpecification.compose(spec1).withMessage(new MessageImpl("good.office.id", Message.Type.INFO, "Good Office Id"), true)
                                                                       .and(spec2).withMessage(new MessageImpl("office.available", Message.Type.INFO, "Office Available"), true)
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.