Package nz.co.elysium.core

Examples of nz.co.elysium.core.Pizza


    public void setUp() throws Exception {
        // set up
        t1 = new Topping(1, "Cheese");
        t2 = new Topping(2, "Ham");
        t3 = new Topping(3, "Pineapple");
        pizza = new Pizza(3, "PizzaOne", (long)1000);
        pizza.addTopping(t1);
        pizza.addTopping(t2);
    }
View Full Code Here


    @GET
    @Timed
    @Path("{id}")
    public Pizza getPizza(@PathParam("id") int id) {
        Pizza p = dao.selectById(id);
        injectToppings(p);
        return p;
    }
View Full Code Here

    @POST
    @Timed
    @Path("{id}/toppings")
    public Pizza addTopping(@PathParam("id") int id,
                            @QueryParam("topping_id") int topping_id) {
        Pizza p = dao.selectById(id);
        dao.insertTopping(id, topping_id);
        injectToppings(p);
        return p;
    }
View Full Code Here

    @DELETE
    @Timed
    @Path("{id}/toppings/{topping_id}")
    public Pizza deleteTopping(@PathParam("id") int id,
                               @PathParam("topping_id") int topping_id) {
        Pizza p = dao.selectById(id);
        dao.deleteTopping(id, topping_id);
        injectToppings(p);
        return p;
    }
View Full Code Here

TOP

Related Classes of nz.co.elysium.core.Pizza

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.