コード例 #1
0
  public void setContactAddPageDataFields() {
    try {
      CommonOperInterface cbt = new CommonConFactory().createInterface();
      List<GridDataPropertyView> gridFields =
          Configuration.getConfigurationData(
              "mapped_common_contact_configuration",
              accountID,
              connectionSpace,
              "",
              0,
              "table_name",
              "common_contact_configuration");
      if (gridFields != null) {
        contactDD = new ArrayList<ConfigurationUtilBean>();
        for (GridDataPropertyView gdp : gridFields) {
          ConfigurationUtilBean objdata = new ConfigurationUtilBean();
          if (gdp.getColType().trim().equalsIgnoreCase("D")) {
            objdata.setKey(gdp.getColomnName());
            objdata.setValue(gdp.getHeadingName());
            objdata.setColType(gdp.getColType());
            objdata.setValidationType(gdp.getValidationType());
            if (gdp.getMandatroy() == null) objdata.setMandatory(false);
            else if (gdp.getMandatroy().equalsIgnoreCase("0")) objdata.setMandatory(false);
            else if (gdp.getMandatroy().equalsIgnoreCase("1")) objdata.setMandatory(true);
            contactDD.add(objdata);

            if (gdp.getColomnName().equalsIgnoreCase("regLevel")) {
              officeMap = new HashMap<Integer, String>();
              List data =
                  cbt.executeAllSelectQuery(
                      " select levelName from mapped_orgleinfo_level ", connectionSpace);

              if (data != null && data.size() > 0 && data.get(0) != null) {
                String arr[] = data.get(0).toString().split("#");
                for (int i = 0; i < arr.length; i++) {
                  officeMap.put(i + 1, arr[i].toString());
                }
              }
            }
          }
        }
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
コード例 #2
0
  @SuppressWarnings("rawtypes")
  public void setContactDataFieldsToAdd(String mappedTable, String configTable) {
    try {
      CommonOperInterface cbt = new CommonConFactory().createInterface();
      List<GridDataPropertyView> gridFields =
          Configuration.getConfigurationData(
              mappedTable, accountID, connectionSpace, "", 0, "table_name", configTable);

      if (gridFields != null) {
        deptMap = new HashMap<Integer, String>();
        contactFormDDBox = new ArrayList<ConfigurationUtilBean>();
        contactTextBox = new ArrayList<ConfigurationUtilBean>();
        industryMap = new HashMap<Integer, String>();
        contactFileBox = new ArrayList<ConfigurationUtilBean>();
        contactDateTimeBox = new ArrayList<ConfigurationUtilBean>();
        for (GridDataPropertyView gdp : gridFields) {
          ConfigurationUtilBean objdata = new ConfigurationUtilBean();
          if (gdp.getColType().trim().equalsIgnoreCase("T")
              && !gdp.getColomnName().equalsIgnoreCase("userName")
              && !gdp.getColomnName().equalsIgnoreCase("createdDate")
              && !gdp.getColomnName().equalsIgnoreCase("createdAt")
              && !gdp.getColomnName().equalsIgnoreCase("userAccountId")
              && !gdp.getColomnName().equalsIgnoreCase("flag")) {
            objdata.setKey(gdp.getColomnName());
            objdata.setValue(gdp.getHeadingName());
            objdata.setColType(gdp.getColType());
            objdata.setValidationType(gdp.getValidationType());
            if (gdp.getMandatroy() == null) objdata.setMandatory(false);
            else if (gdp.getMandatroy().equalsIgnoreCase("0")) objdata.setMandatory(false);
            else if (gdp.getMandatroy().equalsIgnoreCase("1")) objdata.setMandatory(true);
            contactTextBox.add(objdata);
          } else if (gdp.getColType().trim().equalsIgnoreCase("F")
              && !gdp.getColomnName().equalsIgnoreCase("userName")
              && !gdp.getColomnName().equalsIgnoreCase("createdDate")
              && !gdp.getColomnName().equalsIgnoreCase("createdAt")) {
            objdata.setKey(gdp.getColomnName());
            objdata.setValue(gdp.getHeadingName());
            objdata.setColType(gdp.getColType());
            objdata.setValidationType(gdp.getValidationType());
            if (gdp.getMandatroy() == null) objdata.setMandatory(false);
            else if (gdp.getMandatroy().equalsIgnoreCase("0")) objdata.setMandatory(false);
            else if (gdp.getMandatroy().equalsIgnoreCase("1")) objdata.setMandatory(true);
            contactFileBox.add(objdata);

          } else if (gdp.getColType().trim().equalsIgnoreCase("date")) {
            objdata.setKey(gdp.getColomnName());
            objdata.setValue(gdp.getHeadingName());
            objdata.setColType(gdp.getColType());
            objdata.setValidationType(gdp.getValidationType());
            if (gdp.getMandatroy() == null) objdata.setMandatory(false);
            else if (gdp.getMandatroy().equalsIgnoreCase("0")) objdata.setMandatory(false);
            else if (gdp.getMandatroy().equalsIgnoreCase("1")) objdata.setMandatory(true);
            contactDateTimeBox.add(objdata);
          } else if (gdp.getColType().trim().equalsIgnoreCase("D")) {
            objdata.setKey(gdp.getColomnName());
            objdata.setValue(gdp.getHeadingName());
            objdata.setColType(gdp.getColType());
            objdata.setValidationType(gdp.getValidationType());
            if (gdp.getMandatroy() == null) objdata.setMandatory(false);
            else if (gdp.getMandatroy().equalsIgnoreCase("0")) objdata.setMandatory(false);
            else if (gdp.getMandatroy().equalsIgnoreCase("1")) objdata.setMandatory(true);
            contactFormDDBox.add(objdata);

            if (gdp.getColomnName().equalsIgnoreCase("industry")) {
              List data =
                  cbt.executeAllSelectQuery(
                      "select id,industry from industrydatalevel1", connectionSpace);
              if (data != null && data.size() > 0) {
                for (Iterator iterator = data.iterator(); iterator.hasNext(); ) {
                  Object[] object = (Object[]) iterator.next();
                  if (object[0] != null && object[1] != null) {
                    industryMap.put(Integer.parseInt(object[0].toString()), object[1].toString());
                  }
                }
              }
            } /*else if (getRegLevel() != null) {
              	List data = cbt.executeAllSelectQuery(
              			"select id,deptName from department where mappedOrgnztnId='"
              					+ getRegLevel() + "'",
              			connectionSpace);
              	if (data != null && data.size() > 0) {
              		for (Iterator iterator = data.iterator(); iterator
              				.hasNext();) {
              			Object[] object = (Object[]) iterator
              					.next();
              			if (object[0] != null && object[1] != null) {
              				deptMap.put(Integer.parseInt(object[0]
              						.toString()), object[1]
              						.toString());
              			}
              		}
              	}
              }*/
          }
        }
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
コード例 #3
0
 public void setViewPageProps() {
   try {
     if (empForAddBasic == 1) {
       setContactAddPageDataFields();
       setContactDataFieldsToAdd("mapped_emp_contact_configuration", "emp_contact_configuration");
     }
     if (empForAddPrsl == 1) {
       List<GridDataPropertyView> empPer =
           Configuration.getConfigurationData(
               "mapped_employee_basic_configuration",
               accountID,
               connectionSpace,
               "",
               0,
               "table_name",
               "employee_personal_configuration");
       ConfigurationUtilBean objEjb = null;
       if (empPer != null) {
         empPerFileBox = new ArrayList<ConfigurationUtilBean>();
         for (GridDataPropertyView gdp : empPer) {
           objEjb = new ConfigurationUtilBean();
           if (gdp.getColType().equalsIgnoreCase("T")) {
             if (!gdp.getColomnName().equalsIgnoreCase("userName")
                 && !gdp.getColomnName().equalsIgnoreCase("date")
                 && !gdp.getColomnName().equalsIgnoreCase("time")) {
               objEjb.setKey(gdp.getColomnName());
               objEjb.setValue(gdp.getHeadingName());
               objEjb.setColType(gdp.getColType());
               objEjb.setValidationType(gdp.getValidationType());
               if (gdp.getMandatroy() == null) objEjb.setMandatory(false);
               else if (gdp.getMandatroy().equalsIgnoreCase("0")) objEjb.setMandatory(false);
               else if (gdp.getMandatroy().equalsIgnoreCase("1")) objEjb.setMandatory(true);
               empPerLevels.add(objEjb);
             }
           }
           if (gdp.getColType().trim().equalsIgnoreCase("F")
               && !gdp.getColomnName().equalsIgnoreCase("userName")
               && !gdp.getColomnName().equalsIgnoreCase("date")
               && !gdp.getColomnName().equalsIgnoreCase("time")) {
             objEjb.setKey(gdp.getColomnName());
             objEjb.setValue(gdp.getHeadingName());
             objEjb.setColType(gdp.getColType());
             objEjb.setValidationType(gdp.getValidationType());
             if (gdp.getMandatroy() == null) objEjb.setMandatory(false);
             else if (gdp.getMandatroy().equalsIgnoreCase("0")) objEjb.setMandatory(false);
             else if (gdp.getMandatroy().equalsIgnoreCase("1")) objEjb.setMandatory(true);
             empPerFileBox.add(objEjb);
             // System.out.println("empPerFileBox" +empPerFileBox.size());
           } else if (gdp.getColType().equalsIgnoreCase("Time")) {
             objEjb.setKey(gdp.getColomnName());
             objEjb.setValue(gdp.getHeadingName());
             objEjb.setColType(gdp.getColType());
             objEjb.setValidationType(gdp.getValidationType());
             if (gdp.getMandatroy() == null) objEjb.setMandatory(false);
             else if (gdp.getMandatroy().equalsIgnoreCase("0")) objEjb.setMandatory(false);
             else if (gdp.getMandatroy().equalsIgnoreCase("1")) objEjb.setMandatory(true);
             empPerCalendr.add(objEjb);
           } else if (gdp.getColType().equalsIgnoreCase("D"))
             empNameForOther = gdp.getHeadingName();
         }
       }
     }
     if (empForAddWorkQua == 1) {
       List<GridDataPropertyView> empQua =
           Configuration.getConfigurationData(
               "mapped_employee_basic_configuration",
               accountID,
               connectionSpace,
               "",
               0,
               "table_name",
               "employee_work_exprience_configuration");
       ConfigurationUtilBean objEjb = null;
       if (empQua != null) {
         empWorkExpFileBox = new ArrayList<ConfigurationUtilBean>();
         for (GridDataPropertyView gdp : empQua) {
           objEjb = new ConfigurationUtilBean();
           if (gdp.getColType().equalsIgnoreCase("T")) {
             if (!gdp.getColomnName().equalsIgnoreCase("userName")
                 && !gdp.getColomnName().equalsIgnoreCase("date")
                 && !gdp.getColomnName().equalsIgnoreCase("time")) {
               objEjb.setKey(gdp.getColomnName());
               objEjb.setValue(gdp.getHeadingName());
               objEjb.setColType(gdp.getColType());
               objEjb.setValidationType(gdp.getValidationType());
               if (gdp.getMandatroy() == null) objEjb.setMandatory(false);
               else if (gdp.getMandatroy().equalsIgnoreCase("0")) objEjb.setMandatory(false);
               else if (gdp.getMandatroy().equalsIgnoreCase("1")) objEjb.setMandatory(true);
               empWorkExpLevels.add(objEjb);
             }
           } else if (gdp.getColType().equalsIgnoreCase("Time")) {
             objEjb.setKey(gdp.getColomnName());
             objEjb.setValue(gdp.getHeadingName());
             objEjb.setColType(gdp.getColType());
             objEjb.setValidationType(gdp.getValidationType());
             if (gdp.getMandatroy() == null) objEjb.setMandatory(false);
             else if (gdp.getMandatroy().equalsIgnoreCase("0")) objEjb.setMandatory(false);
             else if (gdp.getMandatroy().equalsIgnoreCase("1")) objEjb.setMandatory(true);
             empWorkExpCalendr.add(objEjb);
           }
           if (gdp.getColType().trim().equalsIgnoreCase("F")
               && !gdp.getColomnName().equalsIgnoreCase("userName")
               && !gdp.getColomnName().equalsIgnoreCase("date")
               && !gdp.getColomnName().equalsIgnoreCase("time")) {
             objEjb.setKey(gdp.getColomnName());
             objEjb.setValue(gdp.getHeadingName());
             objEjb.setColType(gdp.getColType());
             objEjb.setValidationType(gdp.getValidationType());
             if (gdp.getMandatroy() == null) objEjb.setMandatory(false);
             else if (gdp.getMandatroy().equalsIgnoreCase("0")) objEjb.setMandatory(false);
             else if (gdp.getMandatroy().equalsIgnoreCase("1")) objEjb.setMandatory(true);
             empWorkExpFileBox.add(objEjb);
             // System.out.println("empWorkExpFileBox" +empWorkExpFileBox.size());
           } else if (gdp.getColType().equalsIgnoreCase("D"))
             empNameForOther = gdp.getHeadingName();
         }
       }
     }
     // System.out.println("empForAddWorkExpirence" +empForAddWorkExpirence);
     if (empForAddWorkExpirence == 1) {
       // System.out.println("empForAddWorkExpirence" +empForAddWorkExpirence);
       List<GridDataPropertyView> empQua =
           Configuration.getConfigurationData(
               "mapped_employee_basic_configuration",
               accountID,
               connectionSpace,
               "",
               0,
               "table_name",
               "employee_work_exprience_configuration");
       ConfigurationUtilBean objEjb = null;
       if (empQua != null) {
         bankFileBox = new ArrayList<ConfigurationUtilBean>();
         for (GridDataPropertyView gdp : empQua) {
           objEjb = new ConfigurationUtilBean();
           if (gdp.getColType().equalsIgnoreCase("T")) {
             if (!gdp.getColomnName().equalsIgnoreCase("userName")
                 && !gdp.getColomnName().equalsIgnoreCase("date")
                 && !gdp.getColomnName().equalsIgnoreCase("time")) {
               objEjb.setKey(gdp.getColomnName());
               objEjb.setValue(gdp.getHeadingName());
               objEjb.setColType(gdp.getColType());
               objEjb.setValidationType(gdp.getValidationType());
               if (gdp.getMandatroy() == null) objEjb.setMandatory(false);
               else if (gdp.getMandatroy().equalsIgnoreCase("0")) objEjb.setMandatory(false);
               else if (gdp.getMandatroy().equalsIgnoreCase("1")) objEjb.setMandatory(true);
               empWorkExpLevels.add(objEjb);
             }
           } else if (gdp.getColType().equalsIgnoreCase("Time")) {
             objEjb.setKey(gdp.getColomnName());
             objEjb.setValue(gdp.getHeadingName());
             objEjb.setColType(gdp.getColType());
             objEjb.setValidationType(gdp.getValidationType());
             if (gdp.getMandatroy() == null) objEjb.setMandatory(false);
             else if (gdp.getMandatroy().equalsIgnoreCase("0")) objEjb.setMandatory(false);
             else if (gdp.getMandatroy().equalsIgnoreCase("1")) objEjb.setMandatory(true);
             empWorkExpCalendr.add(objEjb);
           } else if (gdp.getColType().equalsIgnoreCase("D"))
             empNameForOther = gdp.getHeadingName();
         }
       }
     }
     if (empForAddBaank == 1) {
       // for bank details
       List<GridDataPropertyView> empBank =
           Configuration.getConfigurationData(
               "mapped_employee_basic_configuration",
               accountID,
               connectionSpace,
               "",
               0,
               "table_name",
               "employee_bank_details_configuration");
       ConfigurationUtilBean objEjb = null;
       if (empBank != null) {
         bankFileBox = new ArrayList<ConfigurationUtilBean>();
         for (GridDataPropertyView gdp : empBank) {
           objEjb = new ConfigurationUtilBean();
           if (gdp.getColType().equalsIgnoreCase("T")) {
             if (!gdp.getColomnName().equalsIgnoreCase("userName")
                 && !gdp.getColomnName().equalsIgnoreCase("date")
                 && !gdp.getColomnName().equalsIgnoreCase("time")) {
               objEjb.setKey(gdp.getColomnName());
               objEjb.setValue(gdp.getHeadingName());
               objEjb.setColType(gdp.getColType());
               objEjb.setValidationType(gdp.getValidationType());
               if (gdp.getMandatroy() == null) objEjb.setMandatory(false);
               else if (gdp.getMandatroy().equalsIgnoreCase("0")) objEjb.setMandatory(false);
               else if (gdp.getMandatroy().equalsIgnoreCase("1")) objEjb.setMandatory(true);
               empBankLevels.add(objEjb);
             }
           }
           // System.out.println("getColomnName" +gdp.getColomnName());
           if (gdp.getColType().trim().equalsIgnoreCase("F")
               && !gdp.getColomnName().equalsIgnoreCase("userName")
               && !gdp.getColomnName().equalsIgnoreCase("date")
               && !gdp.getColomnName().equalsIgnoreCase("time")) {
             objEjb.setKey(gdp.getColomnName());
             objEjb.setValue(gdp.getHeadingName());
             objEjb.setColType(gdp.getColType());
             objEjb.setValidationType(gdp.getValidationType());
             if (gdp.getMandatroy() == null) objEjb.setMandatory(false);
             else if (gdp.getMandatroy().equalsIgnoreCase("0")) objEjb.setMandatory(false);
             else if (gdp.getMandatroy().equalsIgnoreCase("1")) objEjb.setMandatory(true);
             bankFileBox.add(objEjb);
             // System.out.println("bankFileBox" +bankFileBox.size());
           } else if (gdp.getColType().equalsIgnoreCase("D")
               && gdp.getColomnName().equalsIgnoreCase("empName"))
             empNameForOther = gdp.getHeadingName();
           else if (gdp.getColType().equalsIgnoreCase("D"))
             accountTypeLevel = gdp.getHeadingName();
         }
       }
     }
   } catch (Exception me) {
     me.printStackTrace();
   }
 }