@PUT @Path("{id}") @Consumes({"application/xml", "application/json"}) public void edit(@PathParam("id") Integer id, Film entity) { entity.setFilmId(id.intValue()); filmFacadeEJB.edit(entity); }
@GET @Path("{id}") @Produces({"application/xml", "application/json"}) public Film find(@PathParam("id") Integer id) { return filmFacadeEJB.find(id); }
@POST @Consumes({"application/xml", "application/json"}) public void create(Film entity) { filmFacadeEJB.create(entity); }
@GET @Produces({"application/xml", "application/json"}) public List<Film> findAll() { return filmFacadeEJB.findAll(); }