1 30 package com.genimen.djeneric.tools.scriptengine.core.nodes; 31 32 import java.util.HashMap ; 33 34 import com.genimen.djeneric.tools.scriptengine.core.DjScriptParserEngine; 35 import com.genimen.djeneric.tools.scriptengine.core.SimpleNode; 36 import com.genimen.djeneric.tools.scriptengine.core.util.DjScriptExecutionTimeScope; 37 38 public class IntegerNode extends SimpleNode implements ValueExpression 39 { 40 Integer _value; 41 42 public IntegerNode(int i) 43 { 44 super(i); 45 } 46 47 public IntegerNode(DjScriptParserEngine p, int i) 48 { 49 super(p, i); 50 } 51 52 public String getName() 53 { 54 return toString(); 55 } 56 57 public String toString() 58 { 59 return String.valueOf(_value.intValue()); 60 } 61 62 public void setValue(int value) 63 { 64 _value = new Integer (value); 65 } 66 67 public Object getValue(DjScriptExecutionTimeScope context) 68 { 69 return _value; 70 } 71 72 public void translateOql(DjScriptExecutionTimeScope ctxt, StringBuffer result, HashMap parameters) 73 { 74 result.append(_value); 75 } 76 77 } | Popular Tags |