1 2 12 package com.versant.core.ejb.query; 13 14 17 public class InNode extends Node { 18 19 private Node path; 21 private boolean not; 22 private Node inList; 23 24 public InNode(Node arg, boolean not, Node inList) { 25 this.path = arg; 26 this.not = not; 27 this.inList = inList; 28 } 29 30 public PathNode getPath() { 31 return (PathNode)path; 32 } 33 34 public boolean isNot() { 35 return not; 36 } 37 38 public Node getInList() { 39 return inList; 40 } 41 42 public Object arrive(NodeVisitor v, Object msg) { 43 return v.arriveInNode(this, msg); 44 } 45 46 public String toStringImp() { 47 StringBuffer s = new StringBuffer (); 48 s.append(path); 49 if (not) { 50 s.append(" NOT"); 51 } 52 s.append(" IN "); 53 s.append('('); 54 s.append(inList); 55 for (Node e = inList.getNext(); e != null; e = e.getNext()) { 56 s.append(", "); 57 s.append(e); 58 } 59 s.append(')'); 60 return s.toString(); 61 } 62 63 public void resolve(ResolveContext rc) { 64 path.resolve(rc); 65 resolve(inList, rc); 66 } 67 68 } 69 70 | Popular Tags |