Examples of Movie


Examples of de.codecentric.moviedatabase.domain.Movie

    model.addAttribute("movie", movieResourceAssembler.toResource(movieService.findMovieById(id)));
    return getLogicalViewNamePrefix()+"comments";
  }
 
  protected void doCreateComment(@PathVariable UUID id, @RequestParam String content) {
    Movie movie = movieService.findMovieById(id);
    movie.getComments().add(new Comment(new Date(), content));
  }
View Full Code Here

Examples of de.codecentric.moviedatabase.domain.Movie

  }
 
  @RequestMapping(value = "/new", method = RequestMethod.POST, consumes={"application/json", "application/hal+json"})
  public @ResponseBody ResponseEntity<Resource<Movie>> addMovie(@RequestBody Movie movie) {
    // recreate the movie to make sure that the client is not sending too much information, e.g., an ID.
    Movie result = new Movie(movie.getTitle(), movie.getDescription(), movie.getStartDate());
    movieService.createMovie(result);
    return getMovie(result.getId());
  }
View Full Code Here

Examples of de.codecentric.moviedatabase.domain.Movie

    return getMovie(result.getId());
  }
 
  @RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes={"application/json", "application/hal+json"})
  public @ResponseBody ResponseEntity<Resource<Movie>> editMovie(@PathVariable UUID id, @RequestBody MovieForm movieForm) {
    Movie movie = movieService.findMovieById(id);
    movie.setDescription(movieForm.getDescription());
    movie.setStartDate(movieForm.getStartDate());
    movie.setTitle(movieForm.getTitle());
    movieService.updateMovie(movie);
    return getMovie(id);
  }
View Full Code Here

Examples of de.codecentric.moviedatabase.domain.Movie

    return new ResponseEntity<Object>(null, headers, HttpStatus.NO_CONTENT);
  }
 
  @RequestMapping(value = "/{id}/comments", method = RequestMethod.POST, consumes={"text/plain"})
  public @ResponseBody ResponseEntity<Resource<Movie>> addComment(@PathVariable UUID id, @RequestBody String content) {
    Movie movie = movieService.findMovieById(id);
    movie.getComments().add(new Comment(new Date(), content));
    return enableCorsRequests(movieResourceAssembler.toResource(movie), HttpStatus.CREATED);
  }
View Full Code Here

Examples of de.gmorling.methodvalidation.cdi.domain.Movie

  private final Map<Long, Movie> sampleMovies = new TreeMap<Long, Movie>();
 
  public MovieRepository() {
   
    Movie movie =
      new Movie(
        1,
        "The Usual Suspects",
        106,
        "Bryan Singer",
        new GregorianCalendar(1995, 7, 16).getTime());
   
    sampleMovies.put(movie.getId(), movie);
   
    movie = new Movie(
      2,
      "The Road",
      160,
      "John Hillcoat",
      null);

    sampleMovies.put(movie.getId(), movie);
  }
View Full Code Here

Examples of de.gmorling.methodvalidation.dynamicproxy.domain.Movie

  private final Map<Long, Movie> sampleMovies = new TreeMap<Long, Movie>();

  public MovieRepositoryImpl() {

    Movie movie =
      new Movie(
        1,
        "The Usual Suspects",
        106,
        "Bryan Singer",
        new GregorianCalendar(1995, 7, 16).getTime());

    sampleMovies.put(movie.getId(), movie);
  }
View Full Code Here

Examples of de.gmorling.methodvalidation.guice.domain.Movie

  private final Map<Long, Movie> sampleMovies = new TreeMap<Long, Movie>();

  public MovieRepository() {

    Movie movie =
      new Movie(
        1,
        "The Usual Suspects",
        106,
        "Bryan Singer",
        new GregorianCalendar(1995, 7, 16).getTime());

    sampleMovies.put(movie.getId(), movie);
   
    movie = new Movie(
      2,
      "The Road",
      160,
      "John Hillcoat",
      null);

    sampleMovies.put(movie.getId(), movie);
  }
View Full Code Here

Examples of de.gmorling.methodvalidation.spring.domain.Movie

  private final Map<Long, Movie> sampleMovies = new TreeMap<Long, Movie>();

  public MovieRepository() {

    Movie movie =
      new Movie(
        1,
        "The Usual Suspects",
        106,
        "Bryan Singer",
        new GregorianCalendar(1995, 7, 16).getTime());

    sampleMovies.put(movie.getId(), movie);

    movie = new Movie(
        2,
        "The Road",
        160,
        "John Hillcoat",
        null);

    sampleMovies.put(movie.getId(), movie);
  }
View Full Code Here

Examples of de.kunysch.localimdb.Movie

  public static void main(String[] args) {
    junit.swingui.TestRunner.run(MovieTest.class);
  }

  private final Movie copyMovie(Movie movie) {
    Movie copy = new Movie();
    copy.setYear(movie.getYear());
    copy.setRating(movie.getRank(), movie.getVotes());
    return copy;
  }
View Full Code Here

Examples of ensimag.cloud.projet.entity.Movie

  }

  private void displayInfo(Entity entityMovie, ServletRequest request,
      String title, ServletResponse response) throws ServletException,
      IOException {
    Movie movie = new Movie((String) entityMovie.getProperty("title"),
        (String) entityMovie.getProperty("year"),
        (String) entityMovie.getProperty("genre"),
        (String) entityMovie.getProperty("director"),
        (String) entityMovie.getProperty("writer"),
        (String) entityMovie.getProperty("actors"),
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.