1 package org.apache.ojb.broker.accesslayer.sql; 2 3 17 18 import org.apache.ojb.broker.util.logging.Logger; 19 20 26 public class SqlSelectMNStatement extends SqlMNStatement 27 { 28 private String [] m_selectColumns; 29 30 35 public SqlSelectMNStatement(String table, String [] selectColumns, String [] columns, Logger logger) 36 { 37 super(table, columns, logger); 38 m_selectColumns = selectColumns; 39 } 40 41 44 public String getStatement() 45 { 46 StringBuffer stmt = new StringBuffer (1024); 47 48 stmt.append("SELECT "); 49 appendListOfColumns(m_selectColumns,stmt); 50 stmt.append(" FROM "); 51 appendTable(getTable(), stmt); 52 appendWhereClause(stmt, getColumns()); 53 54 return stmt.toString(); 55 } 56 } 57 | Popular Tags |