Apple exchanged my Iphone which i had backed up but my music isn't on there?

I took my phone into apple today and had backed it up yesterday just incase they gave me a new phone which they did. I have just restored my phone but none of my music is on my new phone. If I go to the itunes store on my phone and search for a song I have previously purchased it just had 'purchased' next to that song. But I can't play them. It only plays the preview of the song. But if I go to the itunes store on my phone it wants me to re-purchase the songs. How do I get the songs back?

Go back to the store and have them fix it