Package com.dtrules.interpreter

Examples of com.dtrules.interpreter.RTable


                } catch (ParseException e) {
                    throw new RulesException("Invalid Date Format","EntityFactory.computeDefaultValue","Only support dates in 'MM/dd/yyyy' form.");
                }
            }
            case IRObject.iTable : {
                RTable table = RTable.newRTable(ef, null, defaultstr, -1);
                if(defaultstr.length()==0) return table;
                table.setValues(session, defaultstr);
                return table;
            }
            default: return RNull.getRNull();
      }
    }
View Full Code Here


             while(state.getds(--d).type()!=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

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

     
         public void execute(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

                
                 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

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

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

        
         public void execute(DTState state) throws RulesException {
             String type  = state.datapop().stringValue();
             RName  name  = state.datapop().rNameValue();
             int    itype = RSession.typeStr2Int(type,"","");
             RTable table = RTable.newRTable(state.getSession().getEntityFactory(),name,"",itype);
             state.datapush(table);
         }
View Full Code Here

      */
     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

     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 = new RArray(state.getSession().getUniqueID(),duplicates,false);
             for(IRObject key : keys){
                 if(table.containsKey(key)){
                    valueArray.add(table.getValue(key));
                 }
             }
             state.datapush(valueArray);
         }
View Full Code Here

TOP

Related Classes of com.dtrules.interpreter.RTable

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.