From 83df01c4cb19a4257b8754999a627036600665d2 Mon Sep 17 00:00:00 2001 From: Wolfgang Wiedermann Date: Tue, 24 May 2016 21:34:02 +0200 Subject: [PATCH] Corrected duplicate code section --- README.md | 63 +++---------------------------------------------------- 1 file changed, 3 insertions(+), 60 deletions(-) diff --git a/README.md b/README.md index c050200..c47a0aa 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,9 @@ a useful way to check the validity of the content of the attributes within the object. ```java +/* +* de/ww/sample/CustomerRepository.java +*/ package de.ww.sample; import java.util.ArrayList; @@ -222,66 +225,6 @@ public class Customer implements Serializable { } } -/* -* de/ww/sample/CustomerRepository.java -*/ -package de.ww.sample; - -import java.util.ArrayList; -import javax.ws.rs.Path; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.DELETE; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.PathParam; -import javax.ws.rs.Consumes; -import de.ww.sample.entities.Customer; - -/** -* Generated Interface for CustomerRepository with JAX-RS Annotations -*/ -@Path("/api") -public interface CustomerRepository { - - /** - * @param id - * @return Customer - */ - @GET - @Path("/customer/{id}") - @Produces("application/json") - public Customer getCustomerById(@PathParam("id") int id); - - /** - * @param prename - * @param surname - * @return ArrayList - */ - @GET - @Path("/customer") - @Produces("application/json") - public ArrayList findCustomer(@QueryParam("prename") String prename, @QueryParam("surname") String surname); - - /** - * @param c - * @return Customer - */ - @POST - @Path("/customer") - @Produces("application/json") - @Consumes("application/json") - public Customer createCustomer(Customer c); - - /** - * @param id - * @return int - */ - @DELETE - @Path("/customer/{id}") - public int deleteCustomer(@PathParam("id") int id); -} - ``` ## Call the client proxy code generation