public class AbstractDDLDAO extends AbstractSQLDAO implements DDLDAO
logger, quickDAOConfig, sqlBuilder| 构造器和说明 |
|---|
AbstractDDLDAO(QuickDAOConfig quickDAOConfig) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
automaticCreateTableAndColumn()
自动建表和新增字段
|
void |
create(Class clazz)
建表
|
void |
create(Entity entity)
建表
|
void |
createColumn(String tableName,
Property property)
新增列
|
void |
createIndex(IndexField indexField)
新增索引
|
Property |
dropColumn(String tableName,
String column)
删除列
|
void |
dropIndex(String tableName,
String indexName)
删除索引
|
void |
dropTable(Class clazz)
删表
|
void |
dropTable(String tableName)
删表
|
void |
enableForeignConstraintCheck(boolean enable)
是否开启外键约束检查
|
Map<String,String> |
getTypeFieldMapping()
获取Java类型到数据库字段类型映射表
|
boolean |
hasIndex(String tableName,
String indexName)
索引是否存在
|
void |
rebuild(Class clazz)
重建表
|
void |
rebuild(String tableName)
重建表
|
void |
refreshDbEntityList()
重新获取数据库信息
|
void |
syncEntityList()
双向同步扫描实体类信息和数据库表信息
|
public AbstractDDLDAO(QuickDAOConfig quickDAOConfig)
public void createColumn(String tableName, Property property)
DDLDAOcreateColumn 在接口中 DDLDAOtableName - 表名property - 字段属性public Property dropColumn(String tableName, String column)
DDLDAOdropColumn 在接口中 DDLDAOtableName - 表名column - 列名public void createIndex(IndexField indexField)
DDLDAOcreateIndex 在接口中 DDLDAOindexField - 索引信息public void enableForeignConstraintCheck(boolean enable)
DDLDAOenableForeignConstraintCheck 在接口中 DDLDAOpublic Map<String,String> getTypeFieldMapping()
DDLDAOgetTypeFieldMapping 在接口中 DDLDAOpublic void syncEntityList()
DDLDAOsyncEntityList 在接口中 DDLDAOpublic void automaticCreateTableAndColumn()
DDLDAOautomaticCreateTableAndColumn 在接口中 DDLDAOpublic void refreshDbEntityList()
DDLDAOrefreshDbEntityList 在接口中 DDLDAOCopyright © 2021. All rights reserved.