package com.changhong.autoform.entity.sql; import java.util.Map; public abstract class Sql { private String tableName; private Map fields; public Sql(String tableName, Map fields) { super(); this.tableName = tableName; this.fields = fields; } public String getTableName() { return tableName; } public void setTableName(String tableName) { this.tableName = tableName; } public Map getFields() { return fields; } public void setFields(Map fields) { this.fields = fields; } /** * 获得sql * @return */ public abstract String getSql(); /** * 获得参数 * @return */ public Object[] getParams() { return getFields().values().toArray(); } }