public abstract class BaseTableScriptCreator extends Object implements TableScriptInterface
| 构造器和说明 |
|---|
BaseTableScriptCreator() |
| 限定符和类型 | 方法和说明 |
|---|---|
abstract String |
alterField(PropertyVO propertyVO)
生成修改字段的SQL语句
|
abstract String |
createIndexKey(PropertyVO propertyVO)
生成创建索引的SQL语句
|
abstract String |
createPrimaryKey(PropertyVO propertyVO)
生成创建主键的SQL语句
|
String |
createUnique(EntityVO entityVO)
生成创建唯一约束的SQL语句
|
abstract String |
dropIndexKey(PropertyVO propertyVO)
生成删除索引的SQL语句
|
abstract String |
dropPrimaryKey(String tableName)
生成删除主键的SQL语句
|
String |
dropUnique(EntityVO entityVO)
生成删除唯一约束的SQL语句
|
abstract boolean |
exist(String tableName)
判断指定表是否存在
|
abstract boolean |
exist(String tableName,
String fieldName)
判断指定表中的字段是否存在
|
abstract List<EntityVO> |
getEntities()
获取所有实体对象列表
|
abstract EntityVO |
getEntity(String tableName)
根据表名获取实体对象信息
|
abstract String |
getMappingType(PropertyVO propertyVO)
获取属性对应的数据库字段类型映射
|
PropertyVO |
getProperty(String tableName,
String fieldName)
根据表名和字段名获取属性对象
|
abstract int |
getTableFieldLength(String tableName,
String fieldName)
获取指定表字段的长度
|
abstract String |
getTableFieldType(String tableName,
String fieldName)
获取指定表字段的数据库类型
|
boolean |
isEqualsProperty(PropertyVO propertyVO)
判断给定属性与数据库中对应字段是否相等(类型和长度)
|
boolean |
isEqualsProperty(PropertyVO xmlProperty,
PropertyVO fieldPropertyVO)
判断两个属性对象是否相等(类型和长度)
|
abstract boolean |
isExistIndexKey(PropertyVO propertyVO)
判断指定属性的索引是否存在
|
abstract boolean |
isExistPrimaryKey(String tableName)
判断指定表是否存在主键
|
String |
saveTable(EntityVO entityVO)
保存表结构,根据实体对象生成创建或修改表的SQL语句
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateField, createTable, dropField, droptable, getEntityNames, getPropertiespublic abstract boolean exist(String tableName, String fieldName) throws SQLException
exist 在接口中 TableScriptInterfacetableName - 表名fieldName - 字段名SQLException - SQL执行异常public abstract boolean exist(String tableName) throws SQLException
exist 在接口中 TableScriptInterfacetableName - 表名SQLException - SQL执行异常public abstract String getMappingType(PropertyVO propertyVO) throws SQLException
getMappingType 在接口中 TableScriptInterfacepropertyVO - 属性对象SQLException - SQL执行异常public abstract boolean isExistPrimaryKey(String tableName) throws SQLException
isExistPrimaryKey 在接口中 TableScriptInterfacetableName - 表名SQLException - SQL执行异常public abstract String dropPrimaryKey(String tableName)
dropPrimaryKey 在接口中 TableScriptInterfacetableName - 表名public abstract String createPrimaryKey(PropertyVO propertyVO)
createPrimaryKey 在接口中 TableScriptInterfacepropertyVO - 属性对象,包含主键信息public abstract String dropIndexKey(PropertyVO propertyVO) throws SQLException
propertyVO - 属性对象,包含索引信息SQLException - SQL执行异常public abstract String createIndexKey(PropertyVO propertyVO) throws SQLException
propertyVO - 属性对象,包含索引信息SQLException - SQL执行异常public abstract boolean isExistIndexKey(PropertyVO propertyVO) throws SQLException
propertyVO - 属性对象SQLException - SQL执行异常public abstract String getTableFieldType(String tableName, String fieldName) throws SQLException
getTableFieldType 在接口中 TableScriptInterfacetableName - 表名fieldName - 字段名SQLException - SQL执行异常public abstract EntityVO getEntity(String tableName) throws SQLException
getEntity 在接口中 TableScriptInterfacetableName - 表名SQLException - SQL执行异常public abstract int getTableFieldLength(String tableName, String fieldName) throws SQLException
getTableFieldLength 在接口中 TableScriptInterfacetableName - 表名fieldName - 字段名SQLException - SQL执行异常public PropertyVO getProperty(String tableName, String fieldName) throws SQLException
getProperty 在接口中 TableScriptInterfacetableName - 表名fieldName - 字段名SQLException - SQL执行异常public boolean isEqualsProperty(PropertyVO propertyVO) throws SQLException
isEqualsProperty 在接口中 TableScriptInterfacepropertyVO - 属性对象SQLException - SQL执行异常public boolean isEqualsProperty(PropertyVO xmlProperty, PropertyVO fieldPropertyVO) throws SQLException
isEqualsProperty 在接口中 TableScriptInterfacexmlProperty - XML配置中的属性对象fieldPropertyVO - 数据库中的属性对象SQLException - SQL执行异常public String createUnique(EntityVO entityVO)
createUnique 在接口中 TableScriptInterfaceentityVO - 实体对象public String dropUnique(EntityVO entityVO)
dropUnique 在接口中 TableScriptInterfaceentityVO - 实体对象public abstract String alterField(PropertyVO propertyVO) throws SQLException
alterField 在接口中 TableScriptInterfacepropertyVO - 属性对象SQLException - SQL执行异常public String saveTable(EntityVO entityVO) throws SQLException
saveTable 在接口中 TableScriptInterfaceentityVO - 实体对象,包含表结构信息SQLException - SQL执行异常public abstract List<EntityVO> getEntities() throws SQLException
getEntities 在接口中 TableScriptInterfaceSQLException - SQL执行异常Copyright © 2025. All rights reserved.