Package org.xdams.page.query.bean

Examples of org.xdams.page.query.bean.QueryBean


      confBean = (ConfBean) modelMap.get("confBean");
      WorkFlowBean workFlowBean = (WorkFlowBean) modelMap.get("workFlowBean");
      MultiEditingManager editingManager = new MultiEditingManager(parameterMap, confBean, userBean, workFlowBean);
      editingManager.setTheXML(new XMLBuilder("root"));
      confBean = editingManager.rewriteMultipleConf(confControl);
      QueryBean queryBean = new QueryBean();
      try {
        xwconn = connectionManager.getConnection(workFlowBean.getArchive());
        XMLBuilder theXMLconf = confBean.getTheXMLConfQuery();
        // System.out.println("theXMLconftheXMLconftheXMLconftheXMLconf " + theXMLconf);
        it.highwaytech.db.QueryResult qr = null;
        if (theXMLconf.valoreNodo("/root/query/@numDocInfoQuery").equals("")) {
          qr = xwconn.selectQR("([UD,/xw/@UdType/]=\"" + workFlowBean.getArchive().getPne() + "\")");
        } else {
          qr = xwconn.selectQR(theXMLconf.valoreNodo("/root/query/@numDocInfoQuery", false));
        }
        queryBean.setTotNumDoc(qr.elements);
        queryBean.setLastUpdate(xwconn.getLastUpdate());
      } catch (Exception e) {
        // TODO: handle exception
      }

      // System.out.println("QueryPageCommand.execute() " + confBean.getTheXMLConfQuery().getXML("ISO-8859-1"));
View Full Code Here


        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;
              }
View Full Code Here

            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) {
              ArrayList arrQueryBean = new ArrayList();
              arrQueryBean.add(queryBean);
              httpSession.setAttribute("arrQueryBean" + multiArchivedbNames[i], arrQueryBean);
            } else {
              ArrayList arrQueryBean = (ArrayList) httpSession.getAttribute("arrQueryBean" + multiArchivedbNames[i]);
              boolean insert = true;
              int indexQr = 0;
              for (int z = 0; z < arrQueryBean.size(); z++) {
                QueryBean ilBean = (QueryBean) arrQueryBean.get(z);
                System.out.println("ilBean " + ilBean);
                System.out.println("queryBean " + queryBean);
                if (ilBean.getQuery().equals(queryBean.getQuery())) {
                  insert = false;
                  arrQueryBean.remove(z);
                  arrQueryBean.add(queryBean);
                  break;
                }
View Full Code Here

      MultiEditingManager editingManager = new MultiEditingManager(parameterMap, confBean, userBean, workFlowBean);
      editingManager.setTheXML(new XMLBuilder("root"));
      confBean = editingManager.rewriteMultipleConf(confControl);
     
      confBean.setTheXMLConfQuery(confBean.getTheXMLConfQueryMultiArchive());
      QueryBean queryBean = new QueryBean();
      try {
        xwconn = connectionManager.getConnection(workFlowBean.getArchive());
        XMLBuilder theXMLconf = confBean.getTheXMLConfQuery();
        // System.out.println("theXMLconftheXMLconftheXMLconftheXMLconf " + theXMLconf);
        it.highwaytech.db.QueryResult qr = null;
        if (theXMLconf.valoreNodo("/root/query/@numDocInfoQuery").equals("")) {
          qr = xwconn.selectQR("([UD,/xw/@UdType/]=\"" + workFlowBean.getArchive().getPne() + "\")");
        } else {
          qr = xwconn.selectQR(theXMLconf.valoreNodo("/root/query/@numDocInfoQuery", false));
        }
        queryBean.setTotNumDoc(qr.elements);
        queryBean.setLastUpdate(xwconn.getLastUpdate());
      } catch (Exception e) {
        // TODO: handle exception
      }

      // System.out.println("QueryPageCommand.execute() " + confBean.getTheXMLConfQuery().getXML("ISO-8859-1"));
View Full Code Here

TOP

Related Classes of org.xdams.page.query.bean.QueryBean

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.