Created
January 11, 2011 20:06
-
-
Save mmurray/775026 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package controllers; | |
import org.joda.time.DateTime; | |
import org.joda.time.LocalDate; | |
import com.hazardousholdings.musicbot.model.Album; | |
import com.hazardousholdings.musicbot.model.Artist; | |
import com.hazardousholdings.musicbot.model.Track; | |
import play.mvc.*; | |
public class Albums extends Controller { | |
public static void show(Long id) { | |
Artist artist = new Artist(); | |
artist.setName("Girl Talk"); | |
Album album = new Album(); | |
album.setArtist(artist); | |
album.setName("All Day"); | |
album.setReleaseDate((new DateTime()).toLocalDate()); | |
for(int i = 0; i < 12; i++){ | |
Track track = new Track(); | |
track.setTitle("crappy mix "+i); | |
track.setTrackNum(i+1); | |
album.addTrack(track); | |
} | |
render(album); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment