Examples of DefectRecomendation


Examples of com.vst.model.DefectRecomendation

        String pageNumber = request.getParameter("d-2568331-p");
        if (pageNumber != null) {
            request.setAttribute("pageNumber", "d-2568331-p=" + pageNumber);
        }
        DefectRecomendation defectRecomendation = new DefectRecomendation();
        // populate object with request parameters
        BeanUtils.populate(defectRecomendation, request.getParameterMap());
        if (request.getParameter("delete") != null) {
            String defectRecomendationId = request.getParameter("id");
            ResourceBundle bundle = ResourceBundle.getBundle("ApplicationResources");
View Full Code Here

Examples of com.vst.model.DefectRecomendation

        //getting recomendations for these defect Categories
        Set recomendationSet = new HashSet();
        Iterator defectCategoryIterator = defectCategorySet.iterator();
        while (defectCategoryIterator.hasNext()) {
            DefectCategory defectCategory = (DefectCategory) defectCategoryIterator.next();
            DefectRecomendation defectRecomendation = dao.getDefectRecomendationByCategoryAndConstruction(defectCategory.getDefectCategoryId().toString());
            if (defectRecomendation != null) {
                recomendationSet.add(defectRecomendation);
            }
        }
        List recomendationList = new ArrayList();
View Full Code Here

Examples of com.vst.model.DefectRecomendation

        request = newGet("/editDefectRecomendation.html");
        request.addParameter("defectRecomendationId", "1");

        mv = c.handleRequest(request, new MockHttpServletResponse());

        DefectRecomendation defectRecomendation = (DefectRecomendation) mv.getModel().get(c.getCommandName());
        assertNotNull(defectRecomendation);
        request = newPost("/editDefectRecomendation.html");
        super.objectToRequestParameters(defectRecomendation, request);

        // update the form's fields and add it back to the request
View Full Code Here

Examples of com.vst.model.DefectRecomendation

        }


        if (!isFormSubmission(request)) {
            String defectRecomendationId = request.getParameter("defectRecomendationId");
            DefectRecomendation defectRecomendation = null;

            if (!StringUtils.isEmpty(defectRecomendationId)) {
                defectRecomendation = defectRecomendationManager.getDefectRecomendation(defectRecomendationId);
                defectRecomendationManager.evict(defectRecomendation);
            } else {
                defectRecomendation = new DefectRecomendation();
            }
            if (request.getParameter("edited") != null) {
                request.setAttribute("addition", "?edited=1");
                defectRecomendation.setEdited(true);
            }
            defectRecomendation.setDocLocation(request.getParameter("docLocation"));
            return defectRecomendation;
        }


        return super.formBackingObject(request);
View Full Code Here

Examples of com.vst.model.DefectRecomendation

            throws Exception {
        if (log.isDebugEnabled()) {
            log.debug("entering 'onSubmit' method...");
        }

        DefectRecomendation defectRecomendation = (DefectRecomendation) command;
        boolean isNew = (defectRecomendation.getDefectRecomendationId() == null);
        Locale locale = request.getLocale();

        if (request.getParameter("delete") != null) {
            defectRecomendationManager.removeDefectRecomendation(defectRecomendation.getDefectRecomendationId().toString());

            saveMessage(request, getText("defectRecomendation.deleted", locale));
        } else {


            Integer defectCategoryId = defectRecomendation.getDefectCategory().getDefectCategoryId();
            if (!defectCategoryId.equals(new Integer(-1))) {
                defectRecomendation.setDefectCategory(defectCategoryManager.getDefectCategory(defectCategoryId.toString()));
            }

            defectRecomendation.setConstructionType(constructionTypeManager.getConstructionType(defectRecomendation.getDefectCategory().getConstructionType().getConstructionTypeId().toString()));

//            Integer constructionTypeId = defectRecomendation.getConstructionType().getConstructionTypeId();
//            if (!constructionTypeId.equals(new Integer(-1))) {
//                defectRecomendation.setConstructionType(constructionTypeManager.getConstructionType(constructionTypeId.toString()));
//            }

            defectRecomendationManager.saveDefectRecomendation(defectRecomendation);

            String key = (isNew) ? "defectRecomendation.added" : "defectRecomendation.updated";
            saveMessage(request, getText(key, locale));
            if (defectRecomendation.isEdited()) {
                return new ModelAndView("redirect:updating.html?id=" + defectRecomendation.getDefectRecomendationId() + "&fieldId=" + request.getParameter("fieldId"));
            }

        }

        return new ModelAndView("redirect:" + defectRecomendation.getDocLocation());
    }
View Full Code Here

Examples of com.vst.model.DefectRecomendation

        return new ModelAndView("redirect:" + defectRecomendation.getDocLocation());
    }

    public ModelAndView processFormSubmission(HttpServletRequest request, HttpServletResponse response, Object command, BindException errors) throws Exception {
        DefectRecomendation defectRecomendation = (DefectRecomendation) command;
        Integer constructionTypeId = defectRecomendation.getFormConstructionType().getConstructionTypeId();
        if (!constructionTypeId.equals(new Integer(-1))) {
            request.setAttribute("defectTypeList", defectTypeManager.getDefectTypesByConstructionTypeId(constructionTypeId));
            request.setAttribute("defectZoneList", defectZoneManager.getDefectZonesByConstructionType(constructionTypeId.toString()));

        }
        if (!defectRecomendation.getFormDefectType().getDefectTypeId().equals(new Integer(-1))) {
            request.setAttribute("defectVarityList", defectVarityManager.getDefectVaritiesByType(defectRecomendation.getFormDefectType().getDefectTypeId().toString()));
        }


        request.setAttribute("defectCategoryList", defectCategoryManager.getDefectCategoryByParameters(defectRecomendation));
        request.setAttribute("reasonNameList", reasonNameManager.getReasonNamesByParameters(defectRecomendation));
View Full Code Here

Examples of com.vst.model.DefectRecomendation

    public void setDefectRecomendationDao(DefectRecomendationDao dao) {
        this.dao = dao;
    }

    public void testAddDefectRecomendation() throws Exception {
        DefectRecomendation defectRecomendation = new DefectRecomendation();

        // set required fields

        dao.saveDefectRecomendation(defectRecomendation);

        // verify a primary key was assigned
        assertNotNull(defectRecomendation.getDefectRecomendationId());

        // verify set fields are same after save
    }
View Full Code Here

Examples of com.vst.model.DefectRecomendation

        // verify set fields are same after save
    }

    public void testGetDefectRecomendation() throws Exception {
        DefectRecomendation defectRecomendation = dao.getDefectRecomendation(defectRecomendationId);
        assertNotNull(defectRecomendation);
    }
View Full Code Here

Examples of com.vst.model.DefectRecomendation

        DefectRecomendation defectRecomendation = dao.getDefectRecomendation(defectRecomendationId);
        assertNotNull(defectRecomendation);
    }

    public void testGetDefectRecomendations() throws Exception {
        DefectRecomendation defectRecomendation = new DefectRecomendation();

        List results = dao.getDefectRecomendations(defectRecomendation);
        assertTrue(results.size() > 0);
    }
View Full Code Here

Examples of com.vst.model.DefectRecomendation

        List results = dao.getDefectRecomendations(defectRecomendation);
        assertTrue(results.size() > 0);
    }

    public void testSaveDefectRecomendation() throws Exception {
        DefectRecomendation defectRecomendation = dao.getDefectRecomendation(defectRecomendationId);

        // update required fields

        dao.saveDefectRecomendation(defectRecomendation);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.