I had written the following code expecting it to work:
It was actually creating a list of Integer objects, not Long objects! I now understand this is because the requiredType class wasn't being set within the mapper so it was looking at the result set meta data for the sql type and determining it was best mapped to Integer.
Replacing it with this form does the trick:
Is it not possible for Spring to set the required type in the plain constructor form? Doesn't the ParameterizedSingleColumnRowMapper have access to the type that it's been parameterized with?
I'm annoyed that I've been caught out by this and suspect it won't be the first time!