public abstract class AbstractJdbcExpert extends Object implements JdbcExpert
| Modifier and Type | Field and Description |
|---|---|
protected JdbcExpertConfigFile |
conf
提供给子类使用的配置文件对象
|
protected Set<String> |
keywords |
| Constructor and Description |
|---|
AbstractJdbcExpert(JdbcExpertConfigFile conf) |
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 in interface JdbcExpertconn - 数据库连接en - 实体public ValueAdaptor getAdaptor(MappingField ef)
JdbcExpertgetAdaptor in interface JdbcExpertef - 实体数据库映射字段public Pojo createPojo(SqlType type)
JdbcExpertcreatePojo in interface JdbcExperttype - POJO 语句的 SQL 类型SqlTypepublic boolean dropEntity(Dao dao, Entity<?> en)
JdbcExpertdropEntity in interface JdbcExperten - 实体public Map<String,Object> getConf()
getConf in interface JdbcExpertpublic void createRelation(Dao dao, Entity<?> en)
createRelation in interface JdbcExpertpublic void dropRelation(Dao dao, Entity<?> en)
dropRelation in interface JdbcExpertpublic String evalFieldType(MappingField mf)
evalFieldType in interface JdbcExpertprotected static List<DaoStatement> wrap(String... sqls)
protected static List<DaoStatement> wrap(List<String> sqls)
protected String getDefaultValue(MappingField mf)
public Sql createIndexSql(Entity<?> en, EntityIndex index)
createIndexSql in interface JdbcExpertpublic void formatQuery(DaoStatement daoStatement)
JdbcExpertformatQuery in interface JdbcExpertdaoStatement - Dao 语句public abstract void formatQuery(Pojo pojo)
public void formatQuery(Sql sql)
public Pojo fetchPojoId(Entity<?> en, MappingField idField)
fetchPojoId in interface JdbcExpertpublic boolean isSupportAutoIncrement()
isSupportAutoIncrement in interface JdbcExpertpublic void addDefaultValue(StringBuilder sb, MappingField mf)
public boolean addColumnNeedColumn()
addColumnNeedColumn in interface JdbcExpertpublic boolean supportTimestampDefault()
supportTimestampDefault in interface JdbcExpertpublic void setKeywords(Set<String> keywords)
setKeywords in interface JdbcExpertpublic String wrapKeywork(String columnName, boolean force)
wrapKeywork in interface JdbcExpertpublic boolean isSupportGeneratedKeys()
isSupportGeneratedKeys in interface JdbcExpertpublic void checkDataSource(Connection conn) throws SQLException
checkDataSource in interface JdbcExpertSQLExceptionpublic Sql createAddColumnSql(Entity<?> en, MappingField mf)
createAddColumnSql in interface JdbcExpertpublic boolean canCommentWhenAddIndex()
canCommentWhenAddIndex in interface JdbcExpertpublic List<String> getIndexNames(Entity<?> en, Connection conn) throws SQLException
getIndexNames in interface JdbcExpertSQLExceptionCopyright © 2017. All rights reserved.