Package org.uengine.kernel

Examples of org.uengine.kernel.Or


     
      if( param.equals("And")){
        newNode = new DefaultMutableTreeNode( new And());

      }else if( param.equals("Or")){
        newNode = new DefaultMutableTreeNode( new Or());

      }else{
        Evaluate eval = getNewEvaluate();
        newNode = new DefaultMutableTreeNode( eval);       
      }
View Full Code Here


  public Object getValue() {
    DefaultTableModel tableModel= (DefaultTableModel)table.getModel();
    Vector rows = tableModel.getDataVector();
   
    HashMap map = new HashMap();
    Or ors = new Or();
    for(int i=0; i<rows.size(); i++){
      Vector cols = (Vector)rows.get(i);
      String key = (String)cols.get(1);
     
      boolean isOtherwise = false;
     
      if(key==null)continue;
      if(!map.containsKey(key)){
        Or or = new Or();
        And and = new And();
        for(int j=START_INDEX;j<cols.size();j++){
          if(cols.get(j) instanceof Otherwise){
            isOtherwise = true;
            break;
          }else if(cols.get(j) instanceof RoleExist){
            RoleExist role = (RoleExist)cols.get(j);
            if(role!=null){
              and.addCondition(role);
            }
          }else{
            Evaluate eval = (Evaluate)cols.get(j);
            if(eval!=null){
              and.addCondition(eval);
            }
          }
        }
        if(!isOtherwise && and.getConditionsVt().size()>0){
          or.addCondition(and);
        }
       
        if(isOtherwise){
          Otherwise otherwise = new Otherwise();
          map.put(key, otherwise);
          otherwise.getDescription().setText(key);
          ors.addCondition(otherwise);
        }else{
          map.put(key, or);
          or.getDescription().setText(key);
          ors.addCondition(or);
        }

      }else{
        And and = new And();
View Full Code Here

        Condition condition = conditions[i];
       
        if(condition instanceof Evaluate
            || condition instanceof Otherwise
            || condition instanceof RoleExist){//������ ��츸
          Or wrapperOr = new Or();
          And wrapperAnd = new And();
          wrapperOr.addCondition(wrapperAnd);
          wrapperOr.setDescription(condition.getDescription());
                   
          if(condition instanceof Evaluate || condition instanceof RoleExist){
            condition.setDescription(null);
            wrapperAnd.addCondition(condition);
          }else {
            wrapperAnd.addCondition(new Otherwise());
          }
           
          condition = wrapperOr;
        }
       
        Or or = (Or)condition;
        String key = or.getDescription().getText();
       
        Condition[] rows = or.getConditions();
        for(int j=0;j<rows.length;j++){
          And and = (And)rows[j];
         
          Condition[] cols = and.getConditions();
          //Default RowCount�� �Ѿ��츦 '�ؼ� Row Count�� ������� �Ѵ�.
View Full Code Here

 
  public Object getValue() {
    DefaultTableModel tableModel= (DefaultTableModel)table.getModel();
    Vector conditions = tableModel.getDataVector();

    Or or = new Or();
    for(int i=0; i<conditions.size(); i++){
      Vector theConditionRow = (Vector)conditions.get(i);
      And and = new And();
     
      for(int j=0; j<theConditionRow.size(); j++){
       
        if(theConditionRow.get(j) instanceof Evaluate){
          Evaluate evaluation = (Evaluate)theConditionRow.get(j);
          if(evaluation!=null)
            and.addCondition(evaluation);
        }else{
          RoleExist roleExist = (RoleExist)theConditionRow.get(j);
          if(roleExist!=null)
            and.addCondition(roleExist);
        }
      }
     
      if(and.getConditionsVt().size()>0){
        or.addCondition(and);
      }
    }
       
    return or;
  }
View Full Code Here

    return or;
  }

  public void setValue(Object data) {
    if(data!=null){
      Or or = (Or)data;
      Condition[] rows = or.getConditions();
      ((DefaultTableModel)table.getModel()).setRowCount(rows.length+1);
     
      for(int i=0;i<rows.length;i++){
        And and = (And)rows[i];
        Condition[] cols = and.getConditions();
View Full Code Here

TOP

Related Classes of org.uengine.kernel.Or

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.