On the correspondence between black holes, domain walls and fluxes