Package java.util

Examples of java.util.HashMap.containsKey()


    oStMeta = getTargetConnection().createStatement();
    oRsMeta = oStMeta.executeQuery("SELECT * FROM " + sTargetTable + " WHERE 1=0");
    oRsMetaData = oRsMeta.getMetaData();
    iColCount = oRsMetaData.getColumnCount();
    for (int c=1; c<=iColCount; c++) {
      if (oSourceCols.containsKey(oRsMetaData.getColumnName(c)))
        sColList += (sColList.length()==0 ? "" : ",") + oRsMetaData.getColumnName(c);
      else
        sColList += (sColList.length()==0 ? "" : ",") + "NULL AS "+oRsMetaData.getColumnName(c);
    } // next

View Full Code Here


    String[] aParams = Gadgets.split(getStringNull(DB.tx_parameters,""),";");
  int nParams = aParams.length;
  for (int p=0; p<nParams; p++) {
    if (aParams[p].indexOf('=')<1) throw new IllegalArgumentException("Event "+getStringNull("id_event","null")+": invalid name-value pair \""+aParams[p]+"\" at tx_parameters");
    String[] aNameValuePair = Gadgets.split2(aParams[p],'=');
    if (oParamMap.containsKey(aNameValuePair[0].trim().toLowerCase())) throw new IllegalArgumentException("Event "+getStringNull("id_event","null")+": duplicated parameter name "+aNameValuePair[0]);
    oParamMap.put(aNameValuePair[0].trim().toLowerCase(),aNameValuePair[1]);   
  } // next
  return oParamMap;
  } // parseDefaultParameters
View Full Code Here

              oMap = (HashMap) FieldMaps.get(s);
              // Si existe un mapeo de nombres,
              // traducir el nombre en destino al que tenga en origen.
              // Tener en cuenta el caso en que la columna destino está
              // definida como autoincremental
              bIsMapped = oMap.containsKey(sCol);
              if (bIsMapped)
                sCol = (String) oMap.get(sCol);
              else {
                bIsMapped = oMap.containsKey(sCol.toUpperCase());
                if (bIsMapped)
View Full Code Here

              // definida como autoincremental
              bIsMapped = oMap.containsKey(sCol);
              if (bIsMapped)
                sCol = (String) oMap.get(sCol);
              else {
                bIsMapped = oMap.containsKey(sCol.toUpperCase());
                if (bIsMapped)
                  sCol = (String) oMap.get(sCol.toUpperCase());
                else {
                  bIsMapped = oMap.containsKey(sCol.toLowerCase());
                  if (bIsMapped)
View Full Code Here

              else {
                bIsMapped = oMap.containsKey(sCol.toUpperCase());
                if (bIsMapped)
                  sCol = (String) oMap.get(sCol.toUpperCase());
                else {
                  bIsMapped = oMap.containsKey(sCol.toLowerCase());
                  if (bIsMapped)
                    sCol = (String) oMap.get(sCol.toLowerCase());
                }
              }
            }
View Full Code Here

            if (iCol!=-1)
              sSQL += sCol + ((c<iTrCols-1) ? "," : " ");
            else {
              try {
                oMap = (HashMap) FieldDefs.get(s);
                bHasDefault = oMap.containsKey(sCol);
              }
              catch (ArrayIndexOutOfBoundsException e) {
                // Si el XML no tiene una sección <DEFVALS>
                // la llamada FieldDefs.get(s) provocará una
                // excepción ArrayIndexOutOfBoundsException
View Full Code Here

    ArrayList oDistinct = new ArrayList(nCount);
    HashMap oMap = new HashMap(nCount+10);
    for (int iRow=0; iRow<nCount; iRow++) {
      Object oObj = get(iCol,iRow);
      if (null!=oObj) {
        if (!oMap.containsKey(oObj)) {
          oMap.put(oObj,oObj);
          oDistinct.add(oObj);
        } // fi
      } // fi     
    } // next
View Full Code Here

      Node[] paramArr = XmlToolkit.getChildArr(sectionArr[secIdx], "param");
      for (int paramIdx = 0; paramIdx < paramArr.length; paramIdx++) {
        String paramName = XmlToolkit.getAttribute(paramArr[paramIdx], "name", true);
        String paramValue = XmlToolkit.getText(paramArr[paramIdx], true);

        if (paramMap.containsKey(paramName)) {
          throw new RegainException("Preparator configuration of '" + className
              + "' has multiple '" + paramName + "' parameters in section '"
              + sectionName + "'");
        }
View Full Code Here

                     if (!E.hasAttributeNS(
                             XML_LANG_URI,
                             currentAncestorAttr.getLocalName())) {

                        // the xml:* attr is not in E
                        if (!loa.containsKey(currentAncestorAttr.getName())) {
                           loa.put(currentAncestorAttr.getName(),
                                   currentAncestorAttr);
                        }
                     }
                  }
View Full Code Here

                     if (!E.hasAttributeNS(
                             XML_LANG_URI,
                             currentAncestorAttr.getLocalName())) {

                        // the xml:* attr is not in E
                        if (!loa.containsKey(currentAncestorAttr.getName())) {
                           loa.put(currentAncestorAttr.getName(),
                                   currentAncestorAttr);
                        }
                     }
                  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.