I made a simple library to hide the boilerplate part to get result of OUT
parameters, it's type-safe and supports ref cursors (library available on Maven Central). It works beyond spring-jdbc. For the given example the call can look like
import static org.morejdbc.OracleSqlTypes.cursor;
import static org.morejdbc.NamedJdbcCall.call;
...
public record Entity(String id, String value) {
}
...
Out<List<Entity>> outUserCursor = Out.of(cursor((rs, rowNum) -> {
// implementation of spring RowMapper: your custom ResultSet mapping here
return new Entity(rs.getString("id"), rs.getString("value"));
}));
jdbcTemplate.execute(call("PRC_GET_USERS_BY_SECTION")
.in("section_option_in", "value_of_section_option_in")
.in("section_in", "value_of_section_in")
.out("user_cursor", outUserCursor));
// outUserCursor.get() now contains List<Entity>