public Employee getTotalSalaryForManager(Employee employee) { int total = simpleJdbcTemplate.queryForInt(QUERY_ALL_SALARIES, new Object[] {employee.getEmpId()}); logger.info( "getTotalSalaryForManager for employee id " + employee.getEmpId() + " returned " + total); employee.setTotal(total); return employee; }
public Employee getSalaryForEmployee(Employee employee) { int salary = simpleJdbcTemplate.queryForObject( QUERY_SALARY_FOR_ID, Integer.class, new Object[] {employee.getEmpId()}); logger.info( "getSalaryForEmployee for employee id " + employee.getEmpId() + " returned " + salary); employee.setSalary(salary); return employee; }