001 002 package railo.runtime.sql.old; 003 004 005 // Referenced classes of package Zql: 006 // ZStatement, ZExp 007 008 public final class ZDelete 009 implements ZStatement 010 { 011 012 public ZDelete(String s) 013 { 014 where_ = null; 015 table_ = new String(s); 016 } 017 018 public void addWhere(ZExp zexp) 019 { 020 where_ = zexp; 021 } 022 023 public String getTable() 024 { 025 return table_; 026 } 027 028 public ZExp getWhere() 029 { 030 return where_; 031 } 032 033 public String toString() 034 { 035 StringBuffer stringbuffer = new StringBuffer("delete "); 036 if(where_ != null) 037 stringbuffer.append("from "); 038 stringbuffer.append(table_); 039 if(where_ != null) 040 stringbuffer.append(" where " + where_.toString()); 041 return stringbuffer.toString(); 042 } 043 044 String table_; 045 ZExp where_; 046 }