public abstract class AbstractJdbcExpert extends Object implements JdbcExpert
| 限定符和类型 | 字段和说明 |
|---|---|
protected JdbcExpertConfigFile |
conf
提供给子类使用的配置文件对象
|
| 构造器和说明 |
|---|
AbstractJdbcExpert(JdbcExpertConfigFile conf) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addComment(Dao dao,
Entity<?> en) |
void |
addComment(Dao dao,
Entity<?> en,
String commentTable,
String commentColumn) |
protected List<Sql> |
createIndexs(Entity<?> en) |
Pojo |
createPojo(SqlType type)
根据类型创建一个 SQL 语句的实例
|
protected void |
createRelation(Dao dao,
Entity<?> en) |
protected String |
createResultSetMetaSql(Entity<?> en) |
boolean |
dropEntity(Dao dao,
Entity<?> en)
根据实体信息,返回某实体的删表语句
|
protected void |
dropRelation(Dao dao,
Entity<?> en) |
protected String |
evalFieldType(MappingField mf) |
Pojo |
fetchPojoId(Entity<?> en,
MappingField idField) |
void |
formatQuery(DaoStatement daoStatement)
根据 Dao 查询语句,以及其翻页信息,对其进行格式化
|
abstract void |
formatQuery(Pojo pojo) |
void |
formatQuery(Sql sql) |
ValueAdaptor |
getAdaptor(MappingField ef)
根据字段类型为其获取一个字段适配器
|
Map<String,Object> |
getConf() |
protected String |
getDefaultValue(MappingField mf) |
protected static String |
gSQL(String ptn,
String table,
String field) |
boolean |
isSupportAutoIncrement() |
String |
makePksName(Entity<?> en) |
void |
setupEntityField(Connection conn,
Entity<?> en)
通过访问数据库,为实体的映射字段设置约束
实体类在解析的时候会用到这个函数
|
protected static List<DaoStatement> |
wrap(List<String> sqls) |
protected static List<DaoStatement> |
wrap(String... sqls) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateEntity, getDatabaseTypeprotected JdbcExpertConfigFile conf
public AbstractJdbcExpert(JdbcExpertConfigFile conf)
public void setupEntityField(Connection conn, Entity<?> en)
JdbcExpert实体类在解析的时候会用到这个函数
setupEntityField 在接口中 JdbcExpertconn - 数据库连接en - 实体public ValueAdaptor getAdaptor(MappingField ef)
JdbcExpertgetAdaptor 在接口中 JdbcExpertef - 实体数据库映射字段public Pojo createPojo(SqlType type)
JdbcExpertcreatePojo 在接口中 JdbcExperttype - POJO 语句的 SQL 类型SqlTypepublic boolean dropEntity(Dao dao, Entity<?> en)
JdbcExpertdropEntity 在接口中 JdbcExperten - 实体public Map<String,Object> getConf()
getConf 在接口中 JdbcExpertprotected String evalFieldType(MappingField mf)
protected static List<DaoStatement> wrap(String... sqls)
protected static List<DaoStatement> wrap(List<String> sqls)
protected String getDefaultValue(MappingField mf)
public void formatQuery(DaoStatement daoStatement)
JdbcExpertformatQuery 在接口中 JdbcExpertdaoStatement - Dao 语句public abstract void formatQuery(Pojo pojo)
public void formatQuery(Sql sql)
public Pojo fetchPojoId(Entity<?> en, MappingField idField)
fetchPojoId 在接口中 JdbcExpertpublic boolean isSupportAutoIncrement()
isSupportAutoIncrement 在接口中 JdbcExpertCopyright © 2014. All rights reserved.