1 // Copyright (c) 2003-2007, Jodd Team (jodd.sf.net). All Rights Reserved. 2 3 package jodd.db.orm.sqlgen; 4 5 import java.util.Map; 6 7 /** 8 * Generates parametered SQL queries. 9 */ 10 public interface DbSqlGenerator { 11 12 /** 13 * Generates SQL query. 14 */ 15 public String generateQuery(); 16 17 /** 18 * Returns a map of parameters used by generated query. 19 * Must be invoked only after the {@link #generateQuery()}. 20 */ 21 public Map<String, Object> getQueryParameters(); 22 23 24 /** 25 * Returns an optional map of table and column names, used by {@link jodd.db.orm.mapper.ResultSetMapper}. 26 * If column alias type is TABLE_REF, then each table reference has its names. 27 * If column alias type is COLUMN_CODE, then each column has table and columns name. 28 */ 29 public Map<String, String[]> getColumnData(); 30 } 31