1 package org.apache.ojb.broker.accesslayer.sql; 2 3 17 18 import org.apache.ojb.broker.metadata.ClassDescriptor; 19 import org.apache.ojb.broker.util.logging.Logger; 20 21 27 public class SqlDeleteByPkStatement extends SqlPkStatement 28 { 29 private String sql; 30 31 37 public SqlDeleteByPkStatement(ClassDescriptor cld, Logger logger) 38 { 39 super(cld, logger); 40 } 41 42 43 public String getStatement() 44 { 45 if(sql == null) 46 { 47 StringBuffer stmt = new StringBuffer (1024); 48 ClassDescriptor cld = getClassDescriptor(); 49 50 stmt.append("DELETE FROM "); 51 appendTable(cld, stmt); 52 appendWhereClause(cld, true, stmt); 54 sql = stmt.toString(); 55 } 56 return sql; 57 } 58 59 } 60 61 | Popular Tags |