1 2 12 package com.versant.core.ejb.query; 13 14 17 public class UpdateNode extends Node { 18 19 private String schemaName; 20 private String identifier; 21 private SetNode updateList; 22 private Node where; 23 24 public UpdateNode(String schemaName, String identifier, SetNode updateList, 25 Node where) { 26 this.schemaName = schemaName; 27 this.identifier = identifier; 28 this.updateList = updateList; 29 this.where = where; 30 } 31 32 public String getSchemaName() { 33 return schemaName; 34 } 35 36 public String getIdentifier() { 37 return identifier; 38 } 39 40 public SetNode getUpdateList() { 41 return updateList; 42 } 43 44 public Node getWhere() { 45 return where; 46 } 47 48 public Object arrive(NodeVisitor v, Object msg) { 49 return v.arriveUpdateNode(this, msg); 50 } 51 52 public String toStringImp() { 53 StringBuffer s = new StringBuffer (); 54 s.append("UPDATE "); 55 s.append(schemaName); 56 s.append(" AS "); 57 s.append(identifier); 58 s.append("\nSET "); 59 if (updateList != null) { 60 updateList.appendList(s); 61 } 62 if (where != null) { 63 s.append("\nWHERE "); 64 s.append(where); 65 } 66 return s.toString(); 67 } 68 69 public void resolve(ResolveContext rc) { 70 resolve(updateList, rc); 71 if (where != null) { 72 where.resolve(rc); 73 } 74 } 75 76 } 77 78 | Popular Tags |