Package org.xdams.page.query.command

Examples of org.xdams.page.query.command.FindDocumentCommand


        System.out.println(" ---- ERROR ---- QueryParserCommand (xwconn.setTitleRole(titleRole)), title to parse: " + titleRole);
        xwconn.restoreTitleRole();
      }

      if (MyRequest.getParameter("fromId", parameterMap).equals("")) {
        FindDocumentCommand findDocumentCommand = null;
        try {
          findDocumentCommand = new FindDocumentCommand(parameterMap, modelMap);
          queryResult = findDocumentCommand.execute(workFlowBean, xwconn);
          // mi setto il selid per le operazioni di raffinamento
          workFlowBean.getRequest().setAttribute("qrId", queryResult.id);
          QueryBean queryBean = new QueryBean();
          queryBean.setDb(workFlowBean.getAlias());
          System.out.println("findDocumentCommand.getLaFrase() " + findDocumentCommand.getLaFrase());
          queryBean.setQuery(findDocumentCommand.getLaFrase());
          queryBean.setTot(String.valueOf(queryResult.elements));

          if (httpSession.getAttribute(workFlowBean.getQueryBeanName()) == null) {
            ArrayList arrQueryBean = new ArrayList();
            arrQueryBean.add(queryBean);
            httpSession.setAttribute(workFlowBean.getQueryBeanName(), arrQueryBean);
          } else {
            ArrayList arrQueryBean = (ArrayList) httpSession.getAttribute(workFlowBean.getQueryBeanName());
            boolean insert = true;
            int indexQr = 0;
            for (int i = 0; i < arrQueryBean.size(); i++) {
              QueryBean ilBean = (QueryBean) arrQueryBean.get(i);
              if (ilBean.getQuery().equals(queryBean.getQuery())) {
                insert = false;
                arrQueryBean.remove(i);
                arrQueryBean.add(queryBean);
                break;
              }
            }
            if (insert) {
              arrQueryBean.add(queryBean);
              httpSession.setAttribute(workFlowBean.getQueryBeanName(), arrQueryBean);
            }
          }
        } catch (Exception e) {
          queryResult = new QueryResult();
          workFlowBean.getRequest().setAttribute("qrId", queryResult.id);
        }
        System.out.println("QueryParserCommand.execute() " + findDocumentCommand.getLaFrase());
      } else {
        queryResult = xwconn.getQRFromSelId(MyRequest.getParameter("qrId", parameterMap));
        workFlowBean.getRequest().setAttribute("qrId", queryResult.id);
      }
View Full Code Here


      if (multiArchivedbNames != null) {
        for (int i = 0; i < multiArchivedbNames.length; i++) {
          try {
            MultiArchiveBean multiArchiveBean = new MultiArchiveBean();
            xwconn = connectionManager.getConnection(ServiceUser.getArchive(userBean, multiArchivedbNames[i]));
            FindDocumentCommand findDocumentCommand = null;
            findDocumentCommand = new FindDocumentCommand(parameterMap, modelMap);
            queryResult = findDocumentCommand.execute(workFlowBean, xwconn);
            QueryBean queryBean = new QueryBean();
            queryBean.setDb(workFlowBean.getAlias());
            System.out.println("findDocumentCommand.getLaFrase() " + findDocumentCommand.getLaFrase());
            System.out.println("findDocumentCommand.getLaFrase() " + findDocumentCommand.getLaFrase());
            System.out.println("findDocumentCommand.getLaFrase() " + findDocumentCommand.getLaFrase());
            System.out.println("findDocumentCommand.getLaFrase() " + findDocumentCommand.getLaFrase());
            System.out.println("findDocumentCommand.getLaFrase() " + findDocumentCommand.getLaFrase());
            queryBean.setQuery(findDocumentCommand.getLaFrase());
            queryBean.setTot(String.valueOf(queryResult.elements));
            multiArchiveBean.setArchive(ServiceUser.getArchive(userBean, multiArchivedbNames[i]));
            multiArchiveBean.setRecordFound((queryResult.elements));
            multiArchiveBeans.add(multiArchiveBean);
            if (httpSession.getAttribute("arrQueryBean" + multiArchivedbNames[i]) == null) {
View Full Code Here

TOP

Related Classes of org.xdams.page.query.command.FindDocumentCommand

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.