@@ -0,0 +1,2195 @@
+package com.pizza5stars.resources;%0A%0Aimport com.pizza5stars.dao.PizzaDAO;%0Aimport com.pizza5stars.dao.SizeDAO;%0Aimport com.pizza5stars.representations.Pizza;%0Aimport com.pizza5stars.representations.Size;%0Aimport org.skife.jdbi.v2.DBI;%0A%0Aimport javax.validation.ConstraintViolation;%0Aimport javax.validation.Validator;%0Aimport javax.ws.rs.*;%0Aimport javax.ws.rs.core.MediaType;%0Aimport javax.ws.rs.core.Response;%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0Aimport java.util.Set;%0A%0A@Path(%22/pizza%22)%0A@Produces(MediaType.APPLICATION_JSON)%0Apublic class PizzaResource %7B%0A%0A    private final PizzaDAO pizzaDAO;%0A    private final SizeDAO sizeDAO;%0A    private final Validator validator;%0A%0A    public PizzaResource(DBI jdbi, Validator validator) %7B%0A        this.pizzaDAO = jdbi.onDemand(PizzaDAO.class);%0A        this.sizeDAO = jdbi.onDemand(SizeDAO.class);%0A        this.validator = validator;%0A    %7D%0A%0A    @POST%0A    public Response createPizza(Pizza pizza) %7B%0A        Set%3CConstraintViolation%3CPizza%3E%3E violations = validator.validate(pizza);%0A        if (violations.size() %3E 0) %7B%0A            ArrayList%3CString%3E validationMessages = new ArrayList%3CString%3E();%0A            for (ConstraintViolation%3CPizza%3E violation : violations) %7B%0A                validationMessages.add(violation.getPropertyPath().toString() + %22: %22 + violation.getMessage());%0A            %7D%0A            return Response%0A                    .status(Response.Status.BAD_REQUEST)%0A                    .entity(validationMessages)%0A                    .build();%0A        %7D else %7B%0A            int pizzaId = pizzaDAO.createPizzaWithinTransaction(0, pizza);%0A            return Response.ok(pizzaId).build();%0A        %7D%0A    %7D%0A%0A    @GET%0A    public Response getPizzasByIds(@QueryParam(%22ids%22) final List%3CInteger%3E ids) %7B%0A        List%3CPizza%3E pizzas = pizzaDAO.getPizzasByIds(ids);%0A        return Response.ok(pizzas).build();%0A    %7D%0A%0A    @GET%0A    @Path(%22/suggestions%22)%0A    public Response getSuggestions() %7B%0A        List%3CPizza%3E pizzas = pizzaDAO.getPizzaSuggestions();%0A        return Response.ok(pizzas).build();%0A    %7D%0A%0A    @GET%0A    @Path(%22/sizes%22)%0A    public Response getSizes() %7B%0A        List%3CSize%3E sizes = sizeDAO.getSizes();%0A        return Response.ok(sizes).build();%0A    %7D%0A%0A%7D%0A

Add PizzaResource with endpointsn and operations