Package org.nanocontainer.nanowar.sample.model

Examples of org.nanocontainer.nanowar.sample.model.Cheese


    private final Map cheeses;

    public MemoryCheeseDao() {
        cheeses = new HashMap();
        cheeses.put("cheddar", new Cheese("cheddar","England"));
    }
View Full Code Here


    public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) throws Exception {
        CheeseForm cheeseForm = (CheeseForm) form;

        if (!isEmpty(cheeseForm.getName())) {
            Cheese cheese = new Cheese(cheeseForm.getName(), cheeseForm.getCountry());
            cheeseService.save(cheese);
        }

        Collection cheeses = cheeseService.getCheeses();
        request.setAttribute("cheesesOfTheWord", cheeses);
View Full Code Here

TOP

Related Classes of org.nanocontainer.nanowar.sample.model.Cheese

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.