How to assure that search results are the same numeric type as they are mapped to? (Integer vs Long)