Package com.centraview.advancedsearch

Examples of com.centraview.advancedsearch.AdvancedSearchLocal


      String fieldValue = (String) replaceInfo.get("fieldValue");
      String fieldName = (String) replaceInfo.get("fieldName");

      InitialContext ic = CVUtility.getInitialContext();
      AdvancedSearchLocalHome home = (AdvancedSearchLocalHome) ic.lookup("local/AdvancedSearch");
      AdvancedSearchLocal remote = (AdvancedSearchLocal) home.create();
      remote.setDataSource(dataSource);
      ArrayList resultsIDs = new ArrayList();
      resultsIDs.addAll(remote.performSearch(individualID,searchVO));

      //Parse out the field Information which are fieldtableid, fieldID and fieldType
      // Field type as its own idenfication
      // for example  "6" is a phone type field. "8" is a multiple selection field type
      int fieldTableID = 0;
View Full Code Here


    try {
      InitialContext ctx = new InitialContext();
      Object oh = ctx.lookup("local/AdvancedSearch");
      AdvancedSearchLocalHome cfh = (AdvancedSearchLocalHome) javax.rmi.PortableRemoteObject.narrow(oh,
          com.centraview.advancedsearch.AdvancedSearchLocalHome.class);
      AdvancedSearchLocal localAdvancedSearch = (AdvancedSearchLocal) cfh.create();
      localAdvancedSearch.setDataSource(this.dataSource);

      ReportLocalHome reportHome = EntityHomeFactory.getReportLocalHome();
      ReportLocal reportLocal = reportHome.findByPrimaryKey(new ReportPK(reportId, this.dataSource));
      resultVO.setReportId(reportLocal.getReportId());
      resultVO.setModuleId(reportLocal.getModuleId());
      resultVO.setName(reportLocal.getName());
      resultVO.setSearchCriteria(getSearchCriteriaString(userId, reportId));
      // get report dates
      java.sql.Date fromDate = reportLocal.getDateFrom();
      java.sql.Date toDate = reportLocal.getDateTo();

      resultVO.setDateRange(fromDate, toDate);

      String where = localAdvancedSearch.getWhereClauseForReport(userId, search, "");
      ReportBuilder reportbuilder = null;
      switch (reportId) {
        case ReportBuilder.CONTACTS1_REPORT_ID: // Contacts1
        case ReportBuilder.CONTACTS2_REPORT_ID: // Contacts2
        {
          reportbuilder = new Contacts1ReportBuilder(reportId, fromDate, toDate, this.dataSource, where);
          break;
        }
        case ReportBuilder.HR1_REPORT_ID: // Hr1
        {
          reportbuilder = new Hr1ReportBuilder(fromDate, toDate, this.dataSource, where);
          break;
        }
        case ReportBuilder.HR2_REPORT_ID: // Hr2
        {
          reportbuilder = new Hr2ReportBuilder(fromDate, toDate, this.dataSource, where);
          break;
        }
        case ReportBuilder.HR3_REPORT_ID: // Hr3
        case ReportBuilder.HR4_REPORT_ID: // Hr4
        {

          where = localAdvancedSearch.getWhereClauseForReport(userId, search, "tsl");

          reportbuilder = new Hr3ReportBuilder(reportId, fromDate, toDate, this.dataSource, where);
          break;
        }

        case ReportBuilder.ACTIVITIES1_REPORT_ID: // Activities1
        case ReportBuilder.ACTIVITIES2_REPORT_ID: // Activities2
        {

          where = localAdvancedSearch.getWhereClauseForReport(userId, search, "act");

          reportbuilder = new Activities1ReportBuilder(reportId, fromDate, toDate, this.dataSource, where);
          break;
        }
        case ReportBuilder.SALES1_REPORT_ID: // Sales1
        case ReportBuilder.SALES2_REPORT_ID: // Sales2
        {

          where = localAdvancedSearch.getWhereClauseForReport(userId, search, "op");

          reportbuilder = new Sales1ReportBuilder(reportId, fromDate, toDate, this.dataSource, where);
          break;
        }
        case ReportBuilder.SALES3_REPORT_ID: // Sales3
        {

          where = localAdvancedSearch.getWhereClauseForReport(userId, search, "pi");

          reportbuilder = new Sales3ReportBuilder(reportId, fromDate, toDate, this.dataSource, where);
          break;
        }
        case ReportBuilder.SALES4_REPORT_ID: // Sales4
        {

          // where =
          // localAdvancedSearch.getWhereClauseByReportIdWithAlias(userId,
          // reportId, reportLocal.getModuleId(),"cvord");

          reportbuilder = new Sales4ReportBuilder(reportId, fromDate, toDate, this.dataSource, where);
          break;
        }
        case ReportBuilder.PROJECTS1_REPORT_ID: // Project1
        {

          where = localAdvancedSearch.getWhereClauseForReport(userId, search, "task");

          reportbuilder = new Project1ReportBuilder(reportId, fromDate, toDate, this.dataSource, where);
          break;
        }
        case ReportBuilder.SUPPORT1_REPORT_ID: // Support1
        case ReportBuilder.SUPPORT2_REPORT_ID: // Support2
        case ReportBuilder.SUPPORT3_REPORT_ID: // Support3
        {

          where = localAdvancedSearch.getWhereClauseForReport(userId, search, "tick");

          reportbuilder = new Support1ReportBuilder(reportId, fromDate, toDate, this.dataSource, where);
          break;
        }
        case ReportBuilder.INDIVIDUAL_NOTE_ID:
View Full Code Here

            // join against.
            InitialContext ctx = new InitialContext();
            Object oh = ctx.lookup("local/AdvancedSearch");
            AdvancedSearchLocalHome cfh = (AdvancedSearchLocalHome) javax.rmi.PortableRemoteObject.narrow(oh,
                com.centraview.advancedsearch.AdvancedSearchLocalHome.class);
            AdvancedSearchLocal localAdvancedSearch = (AdvancedSearchLocal) cfh.create();
            localAdvancedSearch.setDataSource(this.dataSource);
            HashMap primaryTableMap = localAdvancedSearch.getPrimaryTableForModule(moduleId.intValue());
            if (customFieldType.equals("SCALAR")) {
              wcvo.setFieldName("customfieldscalar" + cfCounter + ".value");
              wcvo.setRelationshipQuery("customfieldscalar" + cfCounter + ".customfieldId = " + rs.getInt(8) + " AND customfieldscalar" + cfCounter
                  + ".recordId = " + primaryTableMap.get("TableName") + "." + primaryTableMap.get("TablePrimaryKey"));
              wcvo.setRealTableName("customfieldscalar customfieldscalar" + cfCounter);
View Full Code Here

    try {
      InitialContext ctx = new InitialContext();
      Object oh = ctx.lookup("local/AdvancedSearch");
      AdvancedSearchLocalHome cfh = (AdvancedSearchLocalHome) javax.rmi.PortableRemoteObject.narrow(oh,
          com.centraview.advancedsearch.AdvancedSearchLocalHome.class);
      AdvancedSearchLocal localAdvancedSearch = (AdvancedSearchLocal) cfh.create();
      localAdvancedSearch.setDataSource(this.dataSource);

      // Here is where the advanced Search is actually performed and the results
      // effect the
      // results of the report query.
      String whereClause = localAdvancedSearch.getWhereClauseForReport(userId, search, "");

      HashMap primaryTableMap = localAdvancedSearch.getPrimaryTableForModule(report.getModuleId());
      // get the primary Table Name and Table Primary Key incase If the user
      // doesn't selects the primary key
      // You must have to add a hidden field in your report criteria coz primary
      // key only link to all other tables
      String primaryKey = primaryTableMap.get("TablePrimaryKey").toString();
View Full Code Here

TOP

Related Classes of com.centraview.advancedsearch.AdvancedSearchLocal

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.