Esempio n. 1
0
  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;
  }
Esempio n. 2
0
  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;
  }