1 package org.apache.ojb.jdo.jdoql; 2 3 17 18 26 public class LocalVariable extends QueryTreeNode 27 { 28 29 private String _name; 30 31 private Type _type; 32 33 private boolean _isBound = false; 34 35 private Object _value; 36 37 43 public LocalVariable(Type type, String name) 44 { 45 _type = type; 46 _name = name; 47 } 48 49 54 public Type getType() 55 { 56 return _type; 57 } 58 59 64 public Object getValue() 65 { 66 return _value; 67 } 68 69 74 public void setValue(Object value) 75 { 76 _value = value; 77 _isBound = true; 78 } 79 80 85 public boolean isBound() 86 { 87 return _isBound; 88 } 89 90 95 public String getName() 96 { 97 return _name; 98 } 99 100 103 public void accept(Visitor visitor) 104 { 105 visitor.visit(this); 106 } 107 108 111 public String toString() 112 { 113 return _type.toString() + " " + _name; 114 } 115 } 116 | Popular Tags |