@POST @Timed @Path("{id}") public Object update(@PathParam("id") String id, Training training) { training.setTrainingId(id); return trainingStore.update(training); }
@DELETE @Timed @Path("{id}") public Object deleteById(@PathParam("id") String id) { return trainingStore.deleteById(id); }
@GET @Timed @Path("{id}") public Object getById(@PathParam("id") String id) { return trainingStore.findById(id); }
@GET @Timed public Object all(@Context UriInfo ui) { MultivaluedMap<String, String> queryParams = ui.getQueryParameters(); return trainingStore.query(queryParams); }