Search in sources :

Example 1 with Movie

use of org.superbiz.moviefun.Movie in project tomee by apache.

the class LoadRest method load.

@POST
public void load() {
    moviesBean.addMovie(new Movie("Wedding Crashers", "David Dobkin", "Comedy", 7, 2005));
    moviesBean.addMovie(new Movie("Starsky & Hutch", "Todd Phillips", "Action", 6, 2004));
    moviesBean.addMovie(new Movie("Shanghai Knights", "David Dobkin", "Action", 6, 2003));
    moviesBean.addMovie(new Movie("I-Spy", "Betty Thomas", "Adventure", 5, 2002));
    moviesBean.addMovie(new Movie("The Royal Tenenbaums", "Wes Anderson", "Comedy", 8, 2001));
    moviesBean.addMovie(new Movie("Zoolander", "Ben Stiller", "Comedy", 6, 2001));
    moviesBean.addMovie(new Movie("Shanghai Noon", "Tom Dey", "Comedy", 7, 2000));
}
Also used : Movie(org.superbiz.moviefun.Movie) POST(javax.ws.rs.POST)

Example 2 with Movie

use of org.superbiz.moviefun.Movie in project tomee by apache.

the class ExampleDataProducer method createSampleMovies.

@Produces
@Examples
public List<Movie> createSampleMovies() {
    final List<Movie> sampleMovies = new ArrayList<Movie>();
    sampleMovies.add(new Movie("Wedding Crashers", "David Dobkin", "Comedy", 7, 2005));
    sampleMovies.add(new Movie("Starsky & Hutch", "Todd Phillips", "Action", 6, 2004));
    sampleMovies.add(new Movie("Shanghai Knights", "David Dobkin", "Action", 6, 2003));
    sampleMovies.add(new Movie("I-Spy", "Betty Thomas", "Adventure", 5, 2002));
    sampleMovies.add(new Movie("The Royal Tenenbaums", "Wes Anderson", "Comedy", 8, 2001));
    sampleMovies.add(new Movie("Zoolander", "Ben Stiller", "Comedy", 6, 2001));
    sampleMovies.add(new Movie("Shanghai Noon", "Tom Dey", "Comedy", 7, 2000));
    return sampleMovies;
}
Also used : Movie(org.superbiz.moviefun.Movie) ArrayList(java.util.ArrayList) Produces(javax.enterprise.inject.Produces)

Aggregations

Movie (org.superbiz.moviefun.Movie)2 ArrayList (java.util.ArrayList)1 Produces (javax.enterprise.inject.Produces)1 POST (javax.ws.rs.POST)1