Package com.vst.model

Examples of com.vst.model.DocumentType


    /**
     * @see com.vst.dao.DocumentTypeDao#getDocumentType(Integer documentTypeId)
     */
    public DocumentType getDocumentType(final Integer documentTypeId) {
        DocumentType documentType = (DocumentType) getObject(documentTypeId);
        return documentType;
    }
View Full Code Here


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

        DocumentType documentType = new DocumentType();
        // populate object with request parameters
        BeanUtils.populate(documentType, request.getParameterMap());

        List documentTypes = documentTypeManager.getDocumentTypes(documentType);
View Full Code Here

    }


    public void makeNotNull(Question question) {
        if (question.getDocumentType() == null) {
            question.setDocumentType(new DocumentType());
        }
    }
View Full Code Here

    }

    protected Object formBackingObject(HttpServletRequest request)
            throws Exception {
        String documentTypeId = request.getParameter("documentTypeId");
        DocumentType documentType = null;

        if (!StringUtils.isEmpty(documentTypeId)) {
            documentType = documentTypeManager.getDocumentType(documentTypeId);
        } else {
            documentType = new DocumentType();
        }

        return documentType;
    }
View Full Code Here

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

        DocumentType documentType = (DocumentType) command;
        boolean isNew = (documentType.getDocumentTypeId() == null);
        Locale locale = request.getLocale();

        if (request.getParameter("delete") != null) {
            documentTypeManager.removeDocumentType(documentType.getDocumentTypeId().toString());

            saveMessage(request, getText("documentType.deleted", locale));
        } else {
            documentTypeManager.saveDocumentType(documentType);

            String key = (isNew) ? "documentType.added" : "documentType.updated";
            saveMessage(request, getText(key, locale));

            if (!isNew) {
                return new ModelAndView("redirect:editDocumentType.html", "documentTypeId", documentType.getDocumentTypeId());
            }
        }

        return new ModelAndView(getSuccessView());
    }
View Full Code Here

      question.setFewAnswers((Boolean) cols[7]);
      question.setQuestionType((QuestionType) cols[8]);
      if (cols[9] != null) {
        question.setDocumentType((DocumentType) cols[9]);
      } else {
        question.setDocumentType(new DocumentType());
      }
//      q.setAnswers(new ArrayList<Answer>());
      qmap.put(question.getQuestionId(), question);
    }
View Full Code Here

TOP

Related Classes of com.vst.model.DocumentType

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.