1 19 package org.netbeans.modules.db.sql.visualeditor.querymodel; 20 21 24 25 import java.util.ArrayList ; 26 import java.util.List ; 27 import java.util.Collection ; 28 29 public class HavingNode implements Having { 30 31 33 private Expression _condition; 35 37 public HavingNode () { 38 } 39 40 public HavingNode(Expression condition) { 41 _condition = condition; 42 } 43 44 45 47 public String genText() { 50 String res=""; if (_condition != null) { 52 res = "\nHAVING " + _condition.genText(); } 54 55 return res; 56 } 57 58 59 61 63 public Expression getExpression() { 64 return _condition; 65 } 66 67 void renameTableSpec(String oldTableSpec, String corrName) { 68 69 if (_condition instanceof Predicate) 70 ((Predicate) _condition).renameTableSpec(oldTableSpec, corrName); 71 } 72 73 public void getReferencedColumns (Collection columns) { 75 if (_condition != null) 76 _condition.getReferencedColumns(columns); 77 } 78 79 public void getQueryItems(Collection items) { 80 items.add(_condition); 81 } 82 } 83 84 85 | Popular Tags |