refactor resultsetmapperbuilder to extract generalised builder logic