Package com.meidusa.amoeba.sqljep.function

Examples of com.meidusa.amoeba.sqljep.function.ComparativeBaseList


                }
                Comparative col = columnMap.get(colExpression.getColumn());
                Comparative newComparative = (Comparative) colExpression.evaluate(parameters);
                if (col != null) {
                  if(col instanceof ComparativeBaseList){
                    ComparativeBaseList source = (ComparativeBaseList)col;
                    if((source instanceof ComparativeAND && and) || (source instanceof ComparativeOR && !and)){
                      source.addComparative(newComparative);
                    }else{
                      ComparativeBaseList comparativeBaseList = null;
                          if (and) {
                              comparativeBaseList = new ComparativeAND(col);
                          } else {
                              comparativeBaseList = new ComparativeOR(col);
                          }
                          comparativeBaseList.addComparative(newComparative);
                          columnMap.put(colExpression.getColumn(), comparativeBaseList);
                    }
                  }else{
                      ComparativeBaseList comparativeBaseList = null;
                      if (and) {
                          comparativeBaseList = new ComparativeAND(col);
                      } else {
                          comparativeBaseList = new ComparativeOR(col);
                      }
                      comparativeBaseList.addComparative(newComparative);
                      columnMap.put(colExpression.getColumn(), comparativeBaseList);
                  }
                } else {
                    columnMap.put(colExpression.getColumn(), newComparative);
                }
View Full Code Here


    }
   
    Comparable<?>[] parameters = pfmc.evaluate(node, runtime);
   
    if(pfmc.isAutoBox()){
      ComparativeBaseList list = null;
      int index = -1;
      for(int i=0;i<parameters.length;i++){
        if(parameters[i] instanceof ComparativeBaseList){
          index = i;
          list = (ComparativeBaseList)parameters[i];
          break;
        }else{
         
        }
      }
     
      if(index >=0){
        for(int i=0;i<parameters.length;i++){
          if(i != index){
            if(parameters[i] instanceof Comparative){
              parameters[i] =((Comparative) parameters[i]).getValue();
            }
          }
        }
       
        for(Comparative comp:list.getList()){
          parameters[index] = comp.getValue();
          Comparable<?> value = pfmc.getResult(parameters);
          if(value instanceof Comparative){
            comp.setComparison(((Comparative) value).getComparison());
            comp.setValue(((Comparative) value).getValue());
View Full Code Here

TOP

Related Classes of com.meidusa.amoeba.sqljep.function.ComparativeBaseList

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.