convert ->Record and map->Record to java constructors where necessary