Ejemplo n.º 1
0
 @GET
 public DataResponse<E10> get(@Context UriInfo uriInfo) {
   return LinkRest.select(E10.class, config).uri(uriInfo).select();
 }
 @DELETE
 @Path("{id}")
 public SimpleResponse delete(@PathParam("id") int id, @Context UriInfo uriInfo) {
   return LinkRest.delete(Flavor.class, config).id(id).delete();
 }
 @PUT
 @Path("{id}")
 public DataResponse<Flavor> createOrUpdate(@PathParam("id") int id, String data) {
   return LinkRest.createOrUpdate(Flavor.class, config).process(data);
 }
 @POST
 public DataResponse<Flavor> create(String data) {
   return LinkRest.create(Flavor.class, config).process(data);
 }
 @GET
 @Path("{id}")
 public DataResponse<Flavor> getOne(@PathParam("id") int id, @Context UriInfo uriInfo) {
   return LinkRest.select(Flavor.class, config).byId(id).uri(uriInfo).select();
 }
 @GET
 public DataResponse<Flavor> getAll(@Context UriInfo uriInfo) {
   return LinkRest.select(Flavor.class, config).uri(uriInfo).select();
 }