If I am calling stored proc Using Jdbc template which returns multiple rows of Data. For Example Stored Procedure returns 200 records based on some business rules. How to iterate and process those 1 at a time, can we use Custom row mapper for it?
Here I am able to call it for 1 Employee. But need it as a List.
SimpleJdbcCall jdbcCall = new
SimpleJdbcCall(dataSource).withProcedureName("getEmployeeeRecord");
SqlParameterSource in = new MapSqlParameterSource().addValue("emp_id", id);
Map<String, Object> out = jdbcCall.execute(in);
Employee employee = new Employee();
employee.setId(id);
employee.setName((String) out.get("out_name"));
employee.setAge((Integer) out.get("out_age"));
return employee ;