Examples of RTable


Examples of com.dtrules.interpreter.RTable

      */
     public static class SetDescription extends ROperator {
         SetDescription() { super("setdescription"); }
         public void execute(DTState state) throws RulesException {
             RString description  = state.datapop().rStringValue();
             RTable  table        = state.datapop().rTableValue();
             table.setDescription(description);
         }
View Full Code Here

Examples of com.dtrules.interpreter.RTable

     public static class Translate extends ROperator {
         Translate(){super("translate"); }
         public void execute(DTState state) throws RulesException {
             boolean duplicates = state.datapop().booleanValue();
             RArray  keys       = state.datapop().rArrayValue();
             RTable  table      = state.datapop().rTableValue();
             RArray valueArray = RArray.newArray(state.getSession(),duplicates,false);
             for(IRObject key : keys){
                 if(table.containsKey(key)){
                    IRObject o = table.getValue(key);
                    valueArray.add(o);
                    if (state.testState(DTState.TRACE)) {
                        state.traceInfo("addto", "arrayId", valueArray.getID() + "",
                                o.postFix());
                    }
View Full Code Here

Examples of com.dtrules.interpreter.RTable

        node.setMap(new HashMap<Object,Object>());
      }else{
          node.getMap().clear();
      }
     
        RTable result = (RTable) node.getTargetMap();
        Set<IRObject> keys = result.getTable().keySet();
        for(IRObject key : keys){
            Object thekey   = convert(key);
            Object thevalue = null;
            try {
                thevalue = convert(result.getValue(key));
            } catch (RulesException e) {}
            node.getMap().put(thekey, thevalue);
        }
    }
View Full Code Here

Examples of com.dtrules.interpreter.RTable

             while(state.getds(--d).type().getId()!=iTable)cnt++;
             RName []keys = new RName[cnt];
             for(int i=0;i<cnt;i++){
                keys[i]= state.datapop().rNameValue();
             }
             RTable rtable = state.datapop().rTableValue();
             state.datapush(rtable.getValue(keys));
         }
View Full Code Here

Examples of com.dtrules.interpreter.RTable

     public static class GetWithKey extends ROperator {
         GetWithKey(){ super("getwithkey");}
        
         public void arrayExecute(DTState state) throws RulesException {
             IRObject key = state.datapop();
             RTable rtable = state.datapop().rTableValue();
             state.datapush(rtable.getValue(key));
         }
View Full Code Here

Examples of com.dtrules.interpreter.RTable

     
         public void arrayExecute(DTState state) throws RulesException {
            
             IRObject   v      = state.datapop();                // Get the value to store
             IRObject   key    = state.datapop().rNameValue();
             RTable     rtable = state.datapop().rTableValue();
             rtable.setValue(key,v);
            
         }
View Full Code Here

Examples of com.dtrules.interpreter.RTable

                
                 for(int i=0;i<cnt;i++){                        // Get all the keys off the data stack
                    keys[i]= state.datapop();
                 }
                
                 RTable rtable = state.datapop().rTableValue();
                
                 rtable.setValue(state,keys, v);                // Set the value.
             }else{
                 IRObject   key    = state.datapop();
                 RTable     rtable = state.datapop().rTableValue();
                 rtable.setValue(key,v);
             }
            
            
         }
View Full Code Here

Examples of com.dtrules.interpreter.RTable

      */
     public static class GetKeysArray extends ROperator {
         GetKeysArray(){ super("getkeysarray");}
        
         public void arrayExecute(DTState state) throws RulesException {
             RTable rtable = state.datapop().rTableValue();
             state.datapush(rtable.getKeys(state));
         }
View Full Code Here

Examples of com.dtrules.interpreter.RTable

      */
     public static class ClearTable extends ROperator {
         ClearTable(){ super("cleartable");}
        
         public void arrayExecute(DTState state) throws RulesException {
             RTable rtable = state.datapop().rTableValue();
             rtable.getTable().clear();
         }
View Full Code Here

Examples of com.dtrules.interpreter.RTable

         NewTable(){ super("newtable");}
        
         public void arrayExecute(DTState state) throws RulesException {
             String type  = state.datapop().stringValue();
             RName  name  = state.datapop().rNameValue();
             RTable table = RTable.newRTable(state.getSession().getEntityFactory(),name,"");
             state.datapush(table);
         }
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.