Package org.simplecart.dao

Examples of org.simplecart.dao.InternetProductCategoryDAO


        HttpServletRequest req = (HttpServletRequest) request;
        HttpServletResponse res = (HttpServletResponse) response;
       
        try {
            // create DAO instance
            InternetProductCategoryDAO dao = new InternetProductCategoryDAO();

            // find category objects and attach to request
            Collection categories = dao.findAll();

            // now add this collection to the request
            req.setAttribute(Constants.COLLECTION_MENU_KEY, categories);

            // commit Hibernate transaction and close Session
View Full Code Here


        // cast my form to a useful Type
        CatalogItemForm productForm = (CatalogItemForm) form;
       
        // get a DAO for the Product and Category
        dao = new InternetProductDAO();
        cdao = new InternetProductCategoryDAO();
       
        Product product = null;
       
        try {
            // find product object for editing
View Full Code Here

            HttpServletResponse response) throws Exception {

        errors = new ActionMessages();
       
        // create DAO instance
        dao = new InternetProductCategoryDAO();
        if (dao == null){
            errors.add(
                    ActionMessages.GLOBAL_MESSAGE,
                    new ActionMessage("error.databaseDAO"));
        }
View Full Code Here

    public ProductCategory loadCategory (Long id) {
        // get the object for errors
        errors = new ActionMessages();
       
        // create DAO instance
        dao = new InternetProductCategoryDAO();
        if (dao == null){
            errors.add(
                    ActionMessages.GLOBAL_MESSAGE,
                    new ActionMessage("error.database"));
            return null;
View Full Code Here

       
        // set activity field in form-bean
        productForm.setActivity(Constants.ENTER_PAGE_KEY);
       
        // need categories to choose a parent for this product
        cdao = new InternetProductCategoryDAO();
        if (cdao == null){
            errors.add(
                    ActionMessages.GLOBAL_MESSAGE,
                    new ActionMessage("error.databaseDAO"));
        }
View Full Code Here

        productForm.setActivity(Constants.EDIT_PAGE_KEY);
        productForm.setId(product.getId());
        //productForm.setCategoryId(product.getCategory().getId());
       
        // need categories to choose a parent for this product
        cdao = new InternetProductCategoryDAO();
        if (cdao == null){
            errors.add(
                    ActionMessages.GLOBAL_MESSAGE,
                    new ActionMessage("error.databaseDAO"));
        }
View Full Code Here

        PropertyUtils.copyProperties(productForm, product.getSearchDetails());
        productForm.setActivity(Constants.DELETE_PAGE_KEY);
        productForm.setId(product.getId());
       
        // need categories to choose a parent for this product
        cdao = new InternetProductCategoryDAO();
        if (cdao == null){
            errors.add(
                    ActionMessages.GLOBAL_MESSAGE,
                    new ActionMessage("error.databaseDAO"));
        }
View Full Code Here

       
        // attach the address to this new category
        newCategory.setSearchDetails(searchDetails);
       
        // get a DAO for the new Category
        dao = new InternetProductCategoryDAO();
       
        // store the new Stake
        dao.makePersistent(newCategory);
       
        // commit this transaction
View Full Code Here

       
        // cast my form to a useful Type
        CatalogItemForm categoryForm = (CatalogItemForm) form;
       
        // get a DAO for the new Stake
        dao = new InternetProductCategoryDAO();
       
        ProductCategory category = null;
       
        try {
            // find category objects and attach to request
View Full Code Here

        // copy form-bean values to new Stake objects
        InternetProductCategory category = new InternetProductCategory();
        PropertyUtils.copyProperties(category, categoryForm);
       
        // get a DAO for the new Stake
        dao = new InternetProductCategoryDAO();
       
        // store the new Stake
        dao.makeTransient(category);
       
        // commit this transaction
View Full Code Here

TOP

Related Classes of org.simplecart.dao.InternetProductCategoryDAO

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.