BAEL-3961 move the sql string into a new line to improve readability.

This commit is contained in:
Gang Wu 2020-04-22 22:36:18 -06:00
parent 8985f601a7
commit 38f62ad24d
1 changed files with 2 additions and 1 deletions

View File

@ -28,7 +28,8 @@ public class EmployeeDAO {
public List<Employee> getEmployeesFromIdListNamed(List<Integer> ids) { public List<Employee> getEmployeesFromIdListNamed(List<Integer> ids) {
SqlParameterSource parameters = new MapSqlParameterSource("ids", ids); SqlParameterSource parameters = new MapSqlParameterSource("ids", ids);
List<Employee> employees = namedJdbcTemplate.query("SELECT * FROM EMPLOYEE WHERE id IN (:ids)", List<Employee> employees = namedJdbcTemplate.query(
"SELECT * FROM EMPLOYEE WHERE id IN (:ids)",
parameters, parameters,
(rs, rowNum) -> new Employee(rs.getInt("id"), rs.getString("first_name"), rs.getString("last_name"))); (rs, rowNum) -> new Employee(rs.getInt("id"), rs.getString("first_name"), rs.getString("last_name")));