Package com.centraview.advancedsearch

Examples of com.centraview.advancedsearch.SearchVO


    int moduleId = getModuleId(request);

    reportId = getTheId("reportId", request);
    // if we are coming from one of the form pages, we should have
    // a searchVO on the form, if so pass it on.
    SearchVO search = getSearchVOFromForm(actionForm, request);

    ReportResultVO reportResults = getReportResults(userId, reportId, search);
    String action = request.getParameter("action");
    if (action != null) {
      if (action.equals("export")) {
View Full Code Here


        } else if (action.equals("print")) {
          reportForm.set("createNew", "true");
          nextURL = "printstandardreportresult";
        }
        // Extract the SearchVO from the form
        SearchVO search = this.getSearchVOFromForm(actionForm, request);
        if (action.equals("run")){
          session.removeAttribute("searchVO");
          session.setAttribute("searchVO",search);
        }
        // Run the report and get the results.
View Full Code Here

  protected SearchVO getSearchVOFromForm(ActionForm form, HttpServletRequest request) throws IOException, ServletException
  {
    // The SearchVO we need should only consist of an array of searchCriteria
    // and a moduleid.
    DynaActionForm advancedSearchForm = (DynaActionForm)form;
    SearchVO searchVO = new SearchVO();
    int moduleId = ((Integer)advancedSearchForm.get("moduleId")).intValue();
    searchVO.setModuleID(moduleId);
    List searchCriteriaList = Arrays.asList((SearchCriteriaVO[])advancedSearchForm.get("searchCriteria"));
    ArrayList searchCriteria = new ArrayList(searchCriteriaList);
    // before simply setting the criteria on the VO check and make sure we really have any.
    for (int i = 0; i < searchCriteria.size(); i++) {
      SearchCriteriaVO currentCriteria = (SearchCriteriaVO)searchCriteria.get(i);
      if (currentCriteria.getTableID().equals("") || currentCriteria.getFieldID().equals("") || currentCriteria.getValue().equals("")) {
        searchCriteria.remove(i);
      }
    }
    if (searchCriteria.size() > 0) {
      searchVO.setSearchCriteria(searchCriteria);
    }
    return searchVO;
  }
View Full Code Here

    try {

      int individualID = ((Integer) replaceInfo.get("individualID")).intValue();
      Integer primaryTableID = (Integer) replaceInfo.get("tableID");
      SearchVO searchVO = (SearchVO) replaceInfo.get("searchVO");
      String fieldInfo = (String) replaceInfo.get("fieldInfo");
      String fieldValue = (String) replaceInfo.get("fieldValue");
      String fieldName = (String) replaceInfo.get("fieldName");

      InitialContext ic = CVUtility.getInitialContext();
View Full Code Here

      String fieldName = (String)globalReplaceForm.get("fieldName");
      replaceInfo.put("fieldName", fieldName);

      String searchType = (String)globalReplaceForm.get("searchType");

      SearchVO searchObject = (SearchVO) session.getAttribute("searchObject");

      replaceInfo.put("searchVO", searchObject);
      request.setAttribute("displayListFlag","true");

      //Collection of HashMap with its setted value to EJB and Perform GlobalReplace
View Full Code Here

          logger.error("[Exception] GlobalReplaceHandler.Execute Handler ", e);
        }
       
        // If the user selecte the New Search then build Search VO.
        // Else pass the searchId to the EJB and get the searchVO.
        SearchVO searchObject = new SearchVO();
        String searchType = (String)globalReplaceForm.get("searchType");
        if (searchType != null && searchType.equals("New Search")) {
          searchObject.setModuleID(moduleId);
          searchObject.setName("New Search");
          List searchCriteria = Arrays.asList((SearchCriteriaVO[])globalReplaceForm.get("searchCriteria"));
          searchObject.setSearchCriteria(searchCriteria);
        } else {
          String savedSearchID = (String)globalReplaceForm.get("savedSearchID");
          if (!(savedSearchID.equals("0") || savedSearchID.equals(""))) {
            searchObject = remoteAdvancedSearch.getSavedSearch(Integer.parseInt(savedSearchID),"ADVANCE",null);
          }
        }

        // Add an extra search Criteria on User selected criteria
        // The Criteria is defined so that user is categorizing the search should be applied to
        // Marketing List 1 or 2 etc.,
        // If the user selects he wants to apply to all Records then we will not add the criteria
        if (!(marketingListID.equals("0") || marketingListID.equals(""))) {
          int fieldID = globalReplace.getSearchFieldID(replaceTableID);
          if (fieldID != -1) {
            SearchCriteriaVO searchCriteriaVO = new SearchCriteriaVO();
            searchCriteriaVO.setTableID(replaceTableID+"");
            searchCriteriaVO.setFieldID(replaceTableID+"");
            searchCriteriaVO.setConditionID((SearchVO.EQUALS_INTEGER).toString());
            searchCriteriaVO.setExpressionType(GlobalReplaceConstantKeys.SEARCH_AND_OR);
            searchCriteriaVO.setValue(marketingListID);
            searchObject.addSearchCriteria(searchCriteriaVO);
          }
        }

        session.setAttribute("searchObject",searchObject);
        ArrayList resultsIDs = new ArrayList();
View Full Code Here

      String fieldName = (String)globalReplaceForm.get("fieldName");
      replaceInfo.put("fieldName", fieldName);

      String searchType = (String)globalReplaceForm.get("searchType");

      SearchVO searchObject = (SearchVO) session.getAttribute("searchObject");

      replaceInfo.put("searchVO", searchObject);
      request.setAttribute("displayListFlag","true");

      //Collection of HashMap with its setted value to EJB and Perform GlobalReplace
View Full Code Here

TOP

Related Classes of com.centraview.advancedsearch.SearchVO

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.