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