Package de.codecentric.moviedatabase.domain

Examples of de.codecentric.moviedatabase.domain.Comment


    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


  }
 
  @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

TOP

Related Classes of de.codecentric.moviedatabase.domain.Comment

Copyright © 2018 www.massapicom. 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.