public abstract class AbstractDDLBuilder extends AbstractSQLBuilder implements DDLBuilder
| 限定符和类型 | 字段和说明 |
|---|---|
protected org.slf4j.Logger |
logger |
connectionExecutor, PLACEHOLDER, quickDAOConfig| 构造器和说明 |
|---|
AbstractDDLBuilder(QuickDAOConfig quickDAOConfig) |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
alterColumn(Property property)
修改列
|
String |
createForeignKey(Property property)
建立外键约束
|
String |
createIndex(IndexField indexField)
创建索引
|
String |
createProperty(Property property)
创建字段
|
abstract String |
createTable(Entity entity)
创建新表
|
String |
dropColumn(Property property)
删除列
|
String |
dropIndex(String tableName,
String indexName)
删除索引
|
String |
dropTable(String tableName)
删除表
|
protected abstract String |
getAutoIncrementSQL(Property property)
获取自增语句
|
List<Entity> |
getDatabaseEntity()
获取数据库信息
|
void |
getDatabaseName()
获取数据库名称
|
protected abstract List<Entity> |
getEntityList()
从数据库提取表信息
|
protected abstract void |
getEntityPropertyList(List<Entity> entityList)
提取表字段信息
|
protected abstract void |
getIndex(List<Entity> entityList)
提取索引信息
|
abstract Map<String,String> |
getTypeFieldMapping()
获取默认Java类型与数据库类型映射关系表
|
List<Entity> |
getVirtualEntity()
获取虚拟表信息
|
String |
hasConstraintExists(String tableName,
String constraintName)
判断约束是否存在
|
abstract String |
hasIndexExists(String tableName,
String indexName)
判断索引是否存在
|
abstract String |
hasTableExists(Entity entity)
判断表是否已经存在
|
execute, getFieldFromInstance, replaceFirst, selectCountById, selectCountByUniqueKey, setParameter, setParameter, setPrepareStatementParameterclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitenableForeignConstraintCheckpublic AbstractDDLBuilder(QuickDAOConfig quickDAOConfig)
public void getDatabaseName()
throws SQLException
DDLBuildergetDatabaseName 在接口中 DDLBuilderSQLExceptionpublic List<Entity> getVirtualEntity()
DDLBuildergetVirtualEntity 在接口中 DDLBuilderpublic List<Entity> getDatabaseEntity() throws SQLException
DDLBuildergetDatabaseEntity 在接口中 DDLBuilderSQLExceptionpublic abstract String hasTableExists(Entity entity)
DDLBuilderhasTableExists 在接口中 DDLBuilderpublic abstract String createTable(Entity entity)
DDLBuildercreateTable 在接口中 DDLBuilderpublic String createProperty(Property property)
DDLBuildercreateProperty 在接口中 DDLBuilderpublic String alterColumn(Property property)
DDLBuilderalterColumn 在接口中 DDLBuilderpublic String dropColumn(Property property)
DDLBuilderdropColumn 在接口中 DDLBuilderpublic String dropTable(String tableName)
DDLBuilderdropTable 在接口中 DDLBuilderpublic abstract String hasIndexExists(String tableName, String indexName)
DDLBuilderhasIndexExists 在接口中 DDLBuildertableName - 表名indexName - 索引名称public String hasConstraintExists(String tableName, String constraintName) throws SQLException
DDLBuilderhasConstraintExists 在接口中 DDLBuildertableName - 表名constraintName - 约束名称SQLExceptionpublic String createIndex(IndexField indexField)
DDLBuildercreateIndex 在接口中 DDLBuilderindexField - 索引字段public String dropIndex(String tableName, String indexName)
DDLBuilderdropIndex 在接口中 DDLBuildertableName - 表名indexName - 索引名称public String createForeignKey(Property property) throws SQLException
DDLBuildercreateForeignKey 在接口中 DDLBuilderSQLExceptionpublic abstract Map<String,String> getTypeFieldMapping()
DDLBuildergetTypeFieldMapping 在接口中 DDLBuilderprotected abstract String getAutoIncrementSQL(Property property)
property - 自增字段信息protected abstract void getIndex(List<Entity> entityList) throws SQLException
SQLExceptionprotected abstract void getEntityPropertyList(List<Entity> entityList) throws SQLException
SQLExceptionprotected abstract List<Entity> getEntityList() throws SQLException
SQLExceptionCopyright © 2022. All rights reserved.