1 2 12 package com.versant.core.ejb.query; 13 14 17 public class ExistsNode extends Node { 18 19 private boolean not; 20 private SelectNode subquery; 21 22 public ExistsNode(boolean not, SelectNode subquery) { 23 this.not = not; 24 this.subquery = subquery; 25 } 26 27 public boolean isNot() { 28 return not; 29 } 30 31 public SelectNode getSubquery() { 32 return subquery; 33 } 34 35 public Object arrive(NodeVisitor v, Object msg) { 36 return v.arriveExistsNode(this, msg); 37 } 38 39 public String toStringImp() { 40 StringBuffer s = new StringBuffer (); 41 if (not) { 42 s.append("NOT "); 43 } 44 s.append("EXISTS ("); 45 s.append(subquery); 46 s.append(')'); 47 return s.toString(); 48 } 49 50 public void resolve(ResolveContext rc) { 51 subquery.resolve(rc); 52 } 53 54 } 55 56 | Popular Tags |