1 2 12 package com.versant.core.ejb.query; 13 14 17 public class BetweenNode extends Node { 18 19 private Node arg; 20 private boolean not; 21 private Node from; 22 private Node to; 23 24 public BetweenNode(Node arg, boolean not, Node from, 25 Node to) { 26 this.arg = arg; 27 this.not = not; 28 this.from = from; 29 this.to = to; 30 } 31 32 public Node getArg() { 33 return arg; 34 } 35 36 public boolean isNot() { 37 return not; 38 } 39 40 public Node getFrom() { 41 return from; 42 } 43 44 public Node getTo() { 45 return to; 46 } 47 48 public Object arrive(NodeVisitor v, Object msg) { 49 return v.arriveBetweenNode(this, msg); 50 } 51 52 public String toStringImp() { 53 StringBuffer s = new StringBuffer (); 54 s.append(arg); 55 if (not) { 56 s.append(" NOT"); 57 } 58 s.append(" BETWEEN "); 59 s.append(from); 60 s.append(" AND "); 61 s.append(to); 62 return s.toString(); 63 } 64 65 public void resolve(ResolveContext rc) { 66 arg.resolve(rc); 67 from.resolve(rc); 68 to.resolve(rc); 69 } 70 71 } 72 73 | Popular Tags |