Replace anonymous inner class for RowMapper with a closure