Examples of EmployeeLowerSalaryException


Examples of be.c4j.demo.security.demo.exception.EmployeeLowerSalaryException

    @CustomVoterCheck(EmployeeSalaryUpdateVoter.class)
    public void updateSalary(Employee employee) {
        Employee dataEmployee = data.getEmployee(employee.getId());
        if (dataEmployee.getSalary() > employee.getSalary()) {
           throw new EmployeeLowerSalaryException();
        }
        dataEmployee.setSalary(employee.getSalary());
        data.updateEmployee(dataEmployee);
    }
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.